From b5032069e3ac10c0636bf0bde9f1d18bc5475d01 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Tue, 14 Feb 2017 15:41:23 +0700 Subject: [PATCH] Fixing race issues - Refactored chromedp-gen and cdp code so that Execute no longer returns a channel - Fixing potential race problems in handler - Eliminated some dead code - Updated examples to include new logging parameters --- cdp/accessibility/accessibility.go | 41 +- cdp/accessibility/easyjson.go | 1358 +-- cdp/animation/animation.go | 343 +- cdp/animation/easyjson.go | 1346 +-- cdp/applicationcache/applicationcache.go | 145 +- cdp/applicationcache/easyjson.go | 780 +- cdp/cachestorage/cachestorage.go | 149 +- cdp/cachestorage/easyjson.go | 666 +- cdp/cdp.go | 5 +- cdp/css/css.go | 825 +- cdp/css/easyjson.go | 9136 +++++++------- cdp/database/database.go | 136 +- cdp/database/easyjson.go | 720 +- cdp/debugger/debugger.go | 823 +- cdp/debugger/easyjson.go | 5564 ++++----- cdp/deviceorientation/deviceorientation.go | 63 +- cdp/deviceorientation/easyjson.go | 128 +- cdp/dom/dom.go | 1512 +-- cdp/dom/easyjson.go | 11936 +++++++++---------- cdp/domdebugger/domdebugger.go | 313 +- cdp/domdebugger/easyjson.go | 1568 ++- cdp/domdebugger/types.go | 1 - cdp/domstorage/domstorage.go | 199 +- cdp/domstorage/easyjson.go | 1040 +- cdp/easyjson.go | 328 +- cdp/emulation/easyjson.go | 1750 +-- cdp/emulation/emulation.go | 523 +- cdp/heapprofiler/easyjson.go | 1114 +- cdp/heapprofiler/heapprofiler.go | 371 +- cdp/indexeddb/easyjson.go | 2174 ++-- cdp/indexeddb/indexeddb.go | 245 +- cdp/input/input.go | 239 +- cdp/inspector/easyjson.go | 258 +- cdp/inspector/inspector.go | 57 +- cdp/io/easyjson.go | 156 +- cdp/io/io.go | 75 +- cdp/layertree/easyjson.go | 1512 +-- cdp/layertree/layertree.go | 330 +- cdp/log/easyjson.go | 496 +- cdp/log/log.go | 147 +- cdp/memory/memory.go | 105 +- cdp/network/easyjson.go | 9224 +++++++------- cdp/network/network.go | 814 +- cdp/page/easyjson.go | 6762 +++++------ cdp/page/page.go | 921 +- cdp/profiler/easyjson.go | 1032 +- cdp/profiler/profiler.go | 155 +- cdp/rendering/easyjson.go | 278 +- cdp/rendering/rendering.go | 171 +- cdp/runtime/easyjson.go | 5948 ++++----- cdp/runtime/runtime.go | 455 +- cdp/schema/schema.go | 37 +- cdp/security/easyjson.go | 466 +- cdp/security/security.go | 85 +- cdp/serviceworker/easyjson.go | 1472 +-- cdp/serviceworker/serviceworker.go | 363 +- cdp/storage/storage.go | 35 +- cdp/systeminfo/easyjson.go | 342 +- cdp/systeminfo/systeminfo.go | 37 +- cdp/target/easyjson.go | 2432 ++-- cdp/target/target.go | 511 +- cdp/tethering/easyjson.go | 144 +- cdp/tethering/tethering.go | 69 +- cdp/tracing/easyjson.go | 1218 +- cdp/tracing/tracing.go | 169 +- chromedp_test.go | 2 +- cmd/chromedp-gen/internal/types.go | 6 +- cmd/chromedp-gen/protocol.json | 6 - cmd/chromedp-gen/templates/domain.qtpl | 75 +- cmd/chromedp-gen/templates/domain.qtpl.go | 263 +- cmd/chromedp-gen/templates/extra.qtpl | 5 +- cmd/chromedp-gen/templates/extra.qtpl.go | 173 +- examples/click/main.go | 2 +- examples/edge-simple/main.go | 10 +- examples/eval/main.go | 2 +- examples/headless/main.go | 2 +- examples/keys/main.go | 2 +- examples/screenshot/main.go | 2 +- examples/simple/main.go | 2 +- examples/submit/main.go | 2 +- examples/text/main.go | 2 +- examples/visible/main.go | 2 +- handler.go | 123 +- util.go | 4 +- 84 files changed, 36627 insertions(+), 45875 deletions(-) diff --git a/cdp/accessibility/accessibility.go b/cdp/accessibility/accessibility.go index 271deb4..f4275b0 100644 --- a/cdp/accessibility/accessibility.go +++ b/cdp/accessibility/accessibility.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // GetPartialAXTreeParams fetches the accessibility node and partial @@ -49,44 +48,12 @@ type GetPartialAXTreeReturns struct { // returns: // nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. func (p *GetPartialAXTreeParams) Do(ctxt context.Context, h cdp.Handler) (nodes []*AXNode, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetPartialAXTreeReturns + err = h.Execute(ctxt, cdp.CommandAccessibilityGetPartialAXTree, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandAccessibilityGetPartialAXTree, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetPartialAXTreeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Nodes, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Nodes, nil } diff --git a/cdp/accessibility/easyjson.go b/cdp/accessibility/easyjson.go index c43654a..e2dae4c 100644 --- a/cdp/accessibility/easyjson.go +++ b/cdp/accessibility/easyjson.go @@ -203,7 +203,681 @@ func (v *GetPartialAXTreeParams) UnmarshalJSON(data []byte) error { func (v *GetPartialAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(in *jlexer.Lexer, out *AXValueSource) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(in *jlexer.Lexer, out *AXNode) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + out.NodeID = AXNodeID(in.String()) + case "ignored": + out.Ignored = bool(in.Bool()) + case "ignoredReasons": + if in.IsNull() { + in.Skip() + out.IgnoredReasons = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.IgnoredReasons = make([]*AXProperty, 0, 8) + } else { + out.IgnoredReasons = []*AXProperty{} + } + for !in.IsDelim(']') { + var v4 *AXProperty + if in.IsNull() { + in.Skip() + v4 = nil + } else { + if v4 == nil { + v4 = new(AXProperty) + } + (*v4).UnmarshalEasyJSON(in) + } + out.IgnoredReasons = append(out.IgnoredReasons, v4) + in.WantComma() + } + in.Delim(']') + } + case "role": + if in.IsNull() { + in.Skip() + out.Role = nil + } else { + if out.Role == nil { + out.Role = new(AXValue) + } + (*out.Role).UnmarshalEasyJSON(in) + } + case "name": + if in.IsNull() { + in.Skip() + out.Name = nil + } else { + if out.Name == nil { + out.Name = new(AXValue) + } + (*out.Name).UnmarshalEasyJSON(in) + } + case "description": + if in.IsNull() { + in.Skip() + out.Description = nil + } else { + if out.Description == nil { + out.Description = new(AXValue) + } + (*out.Description).UnmarshalEasyJSON(in) + } + case "value": + if in.IsNull() { + in.Skip() + out.Value = nil + } else { + if out.Value == nil { + out.Value = new(AXValue) + } + (*out.Value).UnmarshalEasyJSON(in) + } + case "properties": + if in.IsNull() { + in.Skip() + out.Properties = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Properties = make([]*AXProperty, 0, 8) + } else { + out.Properties = []*AXProperty{} + } + for !in.IsDelim(']') { + var v5 *AXProperty + if in.IsNull() { + in.Skip() + v5 = nil + } else { + if v5 == nil { + v5 = new(AXProperty) + } + (*v5).UnmarshalEasyJSON(in) + } + out.Properties = append(out.Properties, v5) + in.WantComma() + } + in.Delim(']') + } + case "childIds": + if in.IsNull() { + in.Skip() + out.ChildIds = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ChildIds = make([]AXNodeID, 0, 4) + } else { + out.ChildIds = []AXNodeID{} + } + for !in.IsDelim(']') { + var v6 AXNodeID + v6 = AXNodeID(in.String()) + out.ChildIds = append(out.ChildIds, v6) + in.WantComma() + } + in.Delim(']') + } + case "backendDOMNodeId": + (out.BackendDOMNodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(out *jwriter.Writer, in AXNode) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.String(string(in.NodeID)) + } + if in.Ignored { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"ignored\":") + out.Bool(bool(in.Ignored)) + } + if len(in.IgnoredReasons) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"ignoredReasons\":") + if in.IgnoredReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v7, v8 := range in.IgnoredReasons { + if v7 > 0 { + out.RawByte(',') + } + if v8 == nil { + out.RawString("null") + } else { + (*v8).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Role != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"role\":") + if in.Role == nil { + out.RawString("null") + } else { + (*in.Role).MarshalEasyJSON(out) + } + } + if in.Name != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + if in.Name == nil { + out.RawString("null") + } else { + (*in.Name).MarshalEasyJSON(out) + } + } + if in.Description != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"description\":") + if in.Description == nil { + out.RawString("null") + } else { + (*in.Description).MarshalEasyJSON(out) + } + } + if in.Value != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + if in.Value == nil { + out.RawString("null") + } else { + (*in.Value).MarshalEasyJSON(out) + } + } + if len(in.Properties) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"properties\":") + if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v9, v10 := range in.Properties { + if v9 > 0 { + out.RawByte(',') + } + if v10 == nil { + out.RawString("null") + } else { + (*v10).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.ChildIds) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"childIds\":") + if in.ChildIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.ChildIds { + if v11 > 0 { + out.RawByte(',') + } + out.String(string(v12)) + } + out.RawByte(']') + } + } + if in.BackendDOMNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendDOMNodeId\":") + out.Int64(int64(in.BackendDOMNodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AXNode) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AXNode) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AXNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AXNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility3(in *jlexer.Lexer, out *AXValue) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "value": + (out.Value).UnmarshalEasyJSON(in) + case "relatedNodes": + if in.IsNull() { + in.Skip() + out.RelatedNodes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.RelatedNodes = make([]*AXRelatedNode, 0, 8) + } else { + out.RelatedNodes = []*AXRelatedNode{} + } + for !in.IsDelim(']') { + var v13 *AXRelatedNode + if in.IsNull() { + in.Skip() + v13 = nil + } else { + if v13 == nil { + v13 = new(AXRelatedNode) + } + (*v13).UnmarshalEasyJSON(in) + } + out.RelatedNodes = append(out.RelatedNodes, v13) + in.WantComma() + } + in.Delim(']') + } + case "sources": + if in.IsNull() { + in.Skip() + out.Sources = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Sources = make([]*AXValueSource, 0, 8) + } else { + out.Sources = []*AXValueSource{} + } + for !in.IsDelim(']') { + var v14 *AXValueSource + if in.IsNull() { + in.Skip() + v14 = nil + } else { + if v14 == nil { + v14 = new(AXValueSource) + } + (*v14).UnmarshalEasyJSON(in) + } + out.Sources = append(out.Sources, v14) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(out *jwriter.Writer, in AXValue) { + out.RawByte('{') + first := true + _ = first + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if (in.Value).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + (in.Value).MarshalEasyJSON(out) + } + if len(in.RelatedNodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"relatedNodes\":") + if in.RelatedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v15, v16 := range in.RelatedNodes { + if v15 > 0 { + out.RawByte(',') + } + if v16 == nil { + out.RawString("null") + } else { + (*v16).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.Sources) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sources\":") + if in.Sources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v17, v18 := range in.Sources { + if v17 > 0 { + out.RawByte(',') + } + if v18 == nil { + out.RawString("null") + } else { + (*v18).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AXValue) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AXValue) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AXValue) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AXValue) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility4(in *jlexer.Lexer, out *AXProperty) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "value": + if in.IsNull() { + in.Skip() + out.Value = nil + } else { + if out.Value == nil { + out.Value = new(AXValue) + } + (*out.Value).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(out *jwriter.Writer, in AXProperty) { + out.RawByte('{') + first := true + _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + if in.Value == nil { + out.RawString("null") + } else { + (*in.Value).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AXProperty) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AXProperty) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AXProperty) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AXProperty) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility5(in *jlexer.Lexer, out *AXRelatedNode) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "backendDOMNodeId": + (out.BackendDOMNodeID).UnmarshalEasyJSON(in) + case "idref": + out.Idref = string(in.String()) + case "text": + out.Text = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(out *jwriter.Writer, in AXRelatedNode) { + out.RawByte('{') + first := true + _ = first + if in.BackendDOMNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendDOMNodeId\":") + out.Int64(int64(in.BackendDOMNodeID)) + } + if in.Idref != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"idref\":") + out.String(string(in.Idref)) + } + if in.Text != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"text\":") + out.String(string(in.Text)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AXRelatedNode) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AXRelatedNode) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AXRelatedNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AXRelatedNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility6(in *jlexer.Lexer, out *AXValueSource) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -274,7 +948,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(out *jwriter.Writer, in AXValueSource) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility6(out *jwriter.Writer, in AXValueSource) { out.RawByte('{') first := true _ = first @@ -367,698 +1041,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(out *jwriter.Wr // MarshalJSON supports json.Marshaler interface func (v AXValueSource) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AXValueSource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AXValueSource) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AXValueSource) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility3(in *jlexer.Lexer, out *AXValue) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "value": - (out.Value).UnmarshalEasyJSON(in) - case "relatedNodes": - if in.IsNull() { - in.Skip() - out.RelatedNodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.RelatedNodes = make([]*AXRelatedNode, 0, 8) - } else { - out.RelatedNodes = []*AXRelatedNode{} - } - for !in.IsDelim(']') { - var v4 *AXRelatedNode - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(AXRelatedNode) - } - (*v4).UnmarshalEasyJSON(in) - } - out.RelatedNodes = append(out.RelatedNodes, v4) - in.WantComma() - } - in.Delim(']') - } - case "sources": - if in.IsNull() { - in.Skip() - out.Sources = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Sources = make([]*AXValueSource, 0, 8) - } else { - out.Sources = []*AXValueSource{} - } - for !in.IsDelim(']') { - var v5 *AXValueSource - if in.IsNull() { - in.Skip() - v5 = nil - } else { - if v5 == nil { - v5 = new(AXValueSource) - } - (*v5).UnmarshalEasyJSON(in) - } - out.Sources = append(out.Sources, v5) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(out *jwriter.Writer, in AXValue) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if (in.Value).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - (in.Value).MarshalEasyJSON(out) - } - if len(in.RelatedNodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"relatedNodes\":") - if in.RelatedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v6, v7 := range in.RelatedNodes { - if v6 > 0 { - out.RawByte(',') - } - if v7 == nil { - out.RawString("null") - } else { - (*v7).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.Sources) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sources\":") - if in.Sources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Sources { - 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 AXValue) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AXValue) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AXValue) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AXValue) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility4(in *jlexer.Lexer, out *AXRelatedNode) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "backendDOMNodeId": - (out.BackendDOMNodeID).UnmarshalEasyJSON(in) - case "idref": - out.Idref = string(in.String()) - case "text": - out.Text = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(out *jwriter.Writer, in AXRelatedNode) { - out.RawByte('{') - first := true - _ = first - if in.BackendDOMNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendDOMNodeId\":") - out.Int64(int64(in.BackendDOMNodeID)) - } - if in.Idref != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"idref\":") - out.String(string(in.Idref)) - } - if in.Text != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AXRelatedNode) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AXRelatedNode) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AXRelatedNode) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AXRelatedNode) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility5(in *jlexer.Lexer, out *AXProperty) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(AXValue) - } - (*out.Value).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(out *jwriter.Writer, in AXProperty) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - if in.Value == nil { - out.RawString("null") - } else { - (*in.Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AXProperty) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AXProperty) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AXProperty) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AXProperty) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility6(in *jlexer.Lexer, out *AXNode) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - out.NodeID = AXNodeID(in.String()) - case "ignored": - out.Ignored = bool(in.Bool()) - case "ignoredReasons": - if in.IsNull() { - in.Skip() - out.IgnoredReasons = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.IgnoredReasons = make([]*AXProperty, 0, 8) - } else { - out.IgnoredReasons = []*AXProperty{} - } - for !in.IsDelim(']') { - var v10 *AXProperty - if in.IsNull() { - in.Skip() - v10 = nil - } else { - if v10 == nil { - v10 = new(AXProperty) - } - (*v10).UnmarshalEasyJSON(in) - } - out.IgnoredReasons = append(out.IgnoredReasons, v10) - in.WantComma() - } - in.Delim(']') - } - case "role": - if in.IsNull() { - in.Skip() - out.Role = nil - } else { - if out.Role == nil { - out.Role = new(AXValue) - } - (*out.Role).UnmarshalEasyJSON(in) - } - case "name": - if in.IsNull() { - in.Skip() - out.Name = nil - } else { - if out.Name == nil { - out.Name = new(AXValue) - } - (*out.Name).UnmarshalEasyJSON(in) - } - case "description": - if in.IsNull() { - in.Skip() - out.Description = nil - } else { - if out.Description == nil { - out.Description = new(AXValue) - } - (*out.Description).UnmarshalEasyJSON(in) - } - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(AXValue) - } - (*out.Value).UnmarshalEasyJSON(in) - } - case "properties": - if in.IsNull() { - in.Skip() - out.Properties = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Properties = make([]*AXProperty, 0, 8) - } else { - out.Properties = []*AXProperty{} - } - for !in.IsDelim(']') { - var v11 *AXProperty - if in.IsNull() { - in.Skip() - v11 = nil - } else { - if v11 == nil { - v11 = new(AXProperty) - } - (*v11).UnmarshalEasyJSON(in) - } - out.Properties = append(out.Properties, v11) - in.WantComma() - } - in.Delim(']') - } - case "childIds": - if in.IsNull() { - in.Skip() - out.ChildIds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ChildIds = make([]AXNodeID, 0, 4) - } else { - out.ChildIds = []AXNodeID{} - } - for !in.IsDelim(']') { - var v12 AXNodeID - v12 = AXNodeID(in.String()) - out.ChildIds = append(out.ChildIds, v12) - in.WantComma() - } - in.Delim(']') - } - case "backendDOMNodeId": - (out.BackendDOMNodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility6(out *jwriter.Writer, in AXNode) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.String(string(in.NodeID)) - } - if in.Ignored { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"ignored\":") - out.Bool(bool(in.Ignored)) - } - if len(in.IgnoredReasons) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"ignoredReasons\":") - if in.IgnoredReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v13, v14 := range in.IgnoredReasons { - if v13 > 0 { - out.RawByte(',') - } - if v14 == nil { - out.RawString("null") - } else { - (*v14).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Role != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"role\":") - if in.Role == nil { - out.RawString("null") - } else { - (*in.Role).MarshalEasyJSON(out) - } - } - if in.Name != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - if in.Name == nil { - out.RawString("null") - } else { - (*in.Name).MarshalEasyJSON(out) - } - } - if in.Description != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"description\":") - if in.Description == nil { - out.RawString("null") - } else { - (*in.Description).MarshalEasyJSON(out) - } - } - if in.Value != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - if in.Value == nil { - out.RawString("null") - } else { - (*in.Value).MarshalEasyJSON(out) - } - } - if len(in.Properties) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"properties\":") - if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v15, v16 := range in.Properties { - if v15 > 0 { - out.RawByte(',') - } - if v16 == nil { - out.RawString("null") - } else { - (*v16).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.ChildIds) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"childIds\":") - if in.ChildIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.ChildIds { - if v17 > 0 { - out.RawByte(',') - } - out.String(string(v18)) - } - out.RawByte(']') - } - } - if in.BackendDOMNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendDOMNodeId\":") - out.Int64(int64(in.BackendDOMNodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AXNode) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AXNode) MarshalEasyJSON(w *jwriter.Writer) { +func (v AXValueSource) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AXNode) UnmarshalJSON(data []byte) error { +func (v *AXValueSource) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AXNode) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *AXValueSource) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAccessibility6(l, v) } diff --git a/cdp/animation/animation.go b/cdp/animation/animation.go index d4a4319..4adfe55 100644 --- a/cdp/animation/animation.go +++ b/cdp/animation/animation.go @@ -11,7 +11,6 @@ import ( cdp "github.com/knq/chromedp/cdp" "github.com/knq/chromedp/cdp/runtime" - "github.com/mailru/easyjson" ) // EnableParams enables animation domain notifications. @@ -25,33 +24,7 @@ func Enable() *EnableParams { // Do executes Animation.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationEnable, nil, nil) } // DisableParams disables animation domain notifications. @@ -65,33 +38,7 @@ func Disable() *DisableParams { // Do executes Animation.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationDisable, nil, nil) } // GetPlaybackRateParams gets the playback rate of the document timeline. @@ -113,40 +60,14 @@ type GetPlaybackRateReturns struct { // returns: // playbackRate - Playback rate for animations on page. func (p *GetPlaybackRateParams) Do(ctxt context.Context, h cdp.Handler) (playbackRate float64, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationGetPlaybackRate, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetPlaybackRateReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.PlaybackRate, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() + var res GetPlaybackRateReturns + err = h.Execute(ctxt, cdp.CommandAnimationGetPlaybackRate, nil, &res) + if err != nil { + return 0, err } - return 0, cdp.ErrUnknownResult + return res.PlaybackRate, nil } // SetPlaybackRateParams sets the playback rate of the document timeline. @@ -167,39 +88,7 @@ func SetPlaybackRate(playbackRate float64) *SetPlaybackRateParams { // Do executes Animation.setPlaybackRate against the provided context and // target handler. func (p *SetPlaybackRateParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationSetPlaybackRate, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationSetPlaybackRate, p, nil) } // GetCurrentTimeParams returns the current time of the an animation. @@ -228,46 +117,14 @@ type GetCurrentTimeReturns struct { // returns: // currentTime - Current time of the page. func (p *GetCurrentTimeParams) Do(ctxt context.Context, h cdp.Handler) (currentTime float64, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetCurrentTimeReturns + err = h.Execute(ctxt, cdp.CommandAnimationGetCurrentTime, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationGetCurrentTime, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetCurrentTimeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.CurrentTime, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.CurrentTime, nil } // SetPausedParams sets the paused state of a set of animations. @@ -291,39 +148,7 @@ func SetPaused(animations []string, paused bool) *SetPausedParams { // Do executes Animation.setPaused against the provided context and // target handler. func (p *SetPausedParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationSetPaused, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationSetPaused, p, nil) } // SetTimingParams sets the timing of an animation node. @@ -350,39 +175,7 @@ func SetTiming(animationID string, duration float64, delay float64) *SetTimingPa // Do executes Animation.setTiming against the provided context and // target handler. func (p *SetTimingParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationSetTiming, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationSetTiming, p, nil) } // SeekAnimationsParams seek a set of animations to a particular time within @@ -408,39 +201,7 @@ func SeekAnimations(animations []string, currentTime float64) *SeekAnimationsPar // Do executes Animation.seekAnimations against the provided context and // target handler. func (p *SeekAnimationsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationSeekAnimations, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationSeekAnimations, p, nil) } // ReleaseAnimationsParams releases a set of animations to no longer be @@ -463,39 +224,7 @@ func ReleaseAnimations(animations []string) *ReleaseAnimationsParams { // Do executes Animation.releaseAnimations against the provided context and // target handler. func (p *ReleaseAnimationsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationReleaseAnimations, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandAnimationReleaseAnimations, p, nil) } // ResolveAnimationParams gets the remote object of the Animation. @@ -524,44 +253,12 @@ type ResolveAnimationReturns struct { // returns: // remoteObject - Corresponding remote object. func (p *ResolveAnimationParams) Do(ctxt context.Context, h cdp.Handler) (remoteObject *runtime.RemoteObject, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res ResolveAnimationReturns + err = h.Execute(ctxt, cdp.CommandAnimationResolveAnimation, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandAnimationResolveAnimation, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r ResolveAnimationReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.RemoteObject, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.RemoteObject, nil } diff --git a/cdp/animation/easyjson.go b/cdp/animation/easyjson.go index 084c0f4..1d33cbb 100644 --- a/cdp/animation/easyjson.go +++ b/cdp/animation/easyjson.go @@ -18,7 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation(in *jlexer.Lexer, out *SetTimingParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation(in *jlexer.Lexer, out *KeyframeStyle) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -37,12 +37,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation(in *jlexer.Lexer, ou continue } switch key { - case "animationId": - out.AnimationID = string(in.String()) - case "duration": - out.Duration = float64(in.Float64()) - case "delay": - out.Delay = float64(in.Float64()) + case "offset": + out.Offset = string(in.String()) + case "easing": + out.Easing = string(in.String()) default: in.SkipRecursive() } @@ -53,55 +51,53 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation(out *jwriter.Writer, in SetTimingParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation(out *jwriter.Writer, in KeyframeStyle) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.Offset != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"offset\":") + out.String(string(in.Offset)) } - first = false - out.RawString("\"animationId\":") - out.String(string(in.AnimationID)) - if !first { - out.RawByte(',') + if in.Easing != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"easing\":") + out.String(string(in.Easing)) } - first = false - out.RawString("\"duration\":") - out.Float64(float64(in.Duration)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"delay\":") - out.Float64(float64(in.Delay)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetTimingParams) MarshalJSON() ([]byte, error) { +func (v KeyframeStyle) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetTimingParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v KeyframeStyle) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetTimingParams) UnmarshalJSON(data []byte) error { +func (v *KeyframeStyle) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetTimingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *KeyframeStyle) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation1(in *jlexer.Lexer, out *SetPlaybackRateParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation1(in *jlexer.Lexer, out *KeyframesRule) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -120,8 +116,35 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation1(in *jlexer.Lexer, o continue } switch key { - case "playbackRate": - out.PlaybackRate = float64(in.Float64()) + case "name": + out.Name = string(in.String()) + case "keyframes": + if in.IsNull() { + in.Skip() + out.Keyframes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Keyframes = make([]*KeyframeStyle, 0, 8) + } else { + out.Keyframes = []*KeyframeStyle{} + } + for !in.IsDelim(']') { + var v1 *KeyframeStyle + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(KeyframeStyle) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Keyframes = append(out.Keyframes, v1) + in.WantComma() + } + in.Delim(']') + } default: in.SkipRecursive() } @@ -132,43 +155,68 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation1(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation1(out *jwriter.Writer, in SetPlaybackRateParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation1(out *jwriter.Writer, in KeyframesRule) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if len(in.Keyframes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyframes\":") + if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.Keyframes { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } } - first = false - out.RawString("\"playbackRate\":") - out.Float64(float64(in.PlaybackRate)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetPlaybackRateParams) MarshalJSON() ([]byte, error) { +func (v KeyframesRule) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetPlaybackRateParams) UnmarshalJSON(data []byte) error { +func (v *KeyframesRule) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation2(in *jlexer.Lexer, out *SetPausedParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation2(in *jlexer.Lexer, out *Effect) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -187,27 +235,34 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation2(in *jlexer.Lexer, o continue } switch key { - case "animations": + case "delay": + out.Delay = float64(in.Float64()) + case "endDelay": + out.EndDelay = float64(in.Float64()) + case "iterationStart": + out.IterationStart = float64(in.Float64()) + case "iterations": + out.Iterations = float64(in.Float64()) + case "duration": + out.Duration = float64(in.Float64()) + case "direction": + out.Direction = string(in.String()) + case "fill": + out.Fill = string(in.String()) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "keyframesRule": if in.IsNull() { in.Skip() - out.Animations = nil + out.KeyframesRule = nil } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Animations = make([]string, 0, 4) - } else { - out.Animations = []string{} + if out.KeyframesRule == nil { + out.KeyframesRule = new(KeyframesRule) } - for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.Animations = append(out.Animations, v1) - in.WantComma() - } - in.Delim(']') + (*out.KeyframesRule).UnmarshalEasyJSON(in) } - case "paused": - out.Paused = bool(in.Bool()) + case "easing": + out.Easing = string(in.String()) default: in.SkipRecursive() } @@ -218,60 +273,121 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation2(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation2(out *jwriter.Writer, in SetPausedParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation2(out *jwriter.Writer, in Effect) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"animations\":") - if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Animations { - if v2 > 0 { - out.RawByte(',') - } - out.String(string(v3)) + if in.Delay != 0 { + if !first { + out.RawByte(',') } - out.RawByte(']') + first = false + out.RawString("\"delay\":") + out.Float64(float64(in.Delay)) } - if !first { - out.RawByte(',') + if in.EndDelay != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"endDelay\":") + out.Float64(float64(in.EndDelay)) + } + if in.IterationStart != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"iterationStart\":") + out.Float64(float64(in.IterationStart)) + } + if in.Iterations != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"iterations\":") + out.Float64(float64(in.Iterations)) + } + if in.Duration != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"duration\":") + out.Float64(float64(in.Duration)) + } + if in.Direction != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"direction\":") + out.String(string(in.Direction)) + } + if in.Fill != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"fill\":") + out.String(string(in.Fill)) + } + if in.BackendNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeId\":") + out.Int64(int64(in.BackendNodeID)) + } + if in.KeyframesRule != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyframesRule\":") + if in.KeyframesRule == nil { + out.RawString("null") + } else { + (*in.KeyframesRule).MarshalEasyJSON(out) + } + } + if in.Easing != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"easing\":") + out.String(string(in.Easing)) } - first = false - out.RawString("\"paused\":") - out.Bool(bool(in.Paused)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetPausedParams) MarshalJSON() ([]byte, error) { +func (v Effect) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetPausedParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Effect) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetPausedParams) UnmarshalJSON(data []byte) error { +func (v *Effect) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetPausedParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Effect) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation3(in *jlexer.Lexer, out *SeekAnimationsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation3(in *jlexer.Lexer, out *Animation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -290,27 +406,34 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation3(in *jlexer.Lexer, o continue } switch key { - case "animations": - if in.IsNull() { - in.Skip() - out.Animations = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Animations = make([]string, 0, 4) - } else { - out.Animations = []string{} - } - for !in.IsDelim(']') { - var v4 string - v4 = string(in.String()) - out.Animations = append(out.Animations, v4) - in.WantComma() - } - in.Delim(']') - } + case "id": + out.ID = string(in.String()) + case "name": + out.Name = string(in.String()) + case "pausedState": + out.PausedState = bool(in.Bool()) + case "playState": + out.PlayState = string(in.String()) + case "playbackRate": + out.PlaybackRate = float64(in.Float64()) + case "startTime": + out.StartTime = float64(in.Float64()) case "currentTime": out.CurrentTime = float64(in.Float64()) + case "source": + if in.IsNull() { + in.Skip() + out.Source = nil + } else { + if out.Source == nil { + out.Source = new(Effect) + } + (*out.Source).UnmarshalEasyJSON(in) + } + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "cssId": + out.CSSID = string(in.String()) default: in.SkipRecursive() } @@ -321,57 +444,118 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation3(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation3(out *jwriter.Writer, in SeekAnimationsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation3(out *jwriter.Writer, in Animation) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"animations\":") - if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v5, v6 := range in.Animations { - if v5 > 0 { - out.RawByte(',') - } - out.String(string(v6)) + if in.ID != "" { + if !first { + out.RawByte(',') } - out.RawByte(']') + first = false + out.RawString("\"id\":") + out.String(string(in.ID)) } - if !first { - out.RawByte(',') + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.PausedState { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pausedState\":") + out.Bool(bool(in.PausedState)) + } + if in.PlayState != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"playState\":") + out.String(string(in.PlayState)) + } + if in.PlaybackRate != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"playbackRate\":") + out.Float64(float64(in.PlaybackRate)) + } + if in.StartTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"startTime\":") + out.Float64(float64(in.StartTime)) + } + if in.CurrentTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"currentTime\":") + out.Float64(float64(in.CurrentTime)) + } + if in.Source != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"source\":") + if in.Source == nil { + out.RawString("null") + } else { + (*in.Source).MarshalEasyJSON(out) + } + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.CSSID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cssId\":") + out.String(string(in.CSSID)) } - first = false - out.RawString("\"currentTime\":") - out.Float64(float64(in.CurrentTime)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SeekAnimationsParams) MarshalJSON() ([]byte, error) { +func (v Animation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SeekAnimationsParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Animation) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SeekAnimationsParams) UnmarshalJSON(data []byte) error { +func (v *Animation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SeekAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Animation) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation3(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation4(in *jlexer.Lexer, out *ResolveAnimationReturns) { @@ -553,9 +737,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation6(in *jlexer.Lexer, o out.Animations = []string{} } for !in.IsDelim(']') { - var v7 string - v7 = string(in.String()) - out.Animations = append(out.Animations, v7) + var v4 string + v4 = string(in.String()) + out.Animations = append(out.Animations, v4) in.WantComma() } in.Delim(']') @@ -583,11 +767,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation6(out *jwriter.Writer out.RawString("null") } else { out.RawByte('[') - for v8, v9 := range in.Animations { - if v8 > 0 { + for v5, v6 := range in.Animations { + if v5 > 0 { out.RawByte(',') } - out.String(string(v9)) + out.String(string(v6)) } out.RawByte(']') } @@ -617,7 +801,7 @@ func (v *ReleaseAnimationsParams) UnmarshalJSON(data []byte) error { func (v *ReleaseAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation7(in *jlexer.Lexer, out *KeyframesRule) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation7(in *jlexer.Lexer, out *SeekAnimationsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -636,35 +820,27 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation7(in *jlexer.Lexer, o continue } switch key { - case "name": - out.Name = string(in.String()) - case "keyframes": + case "animations": if in.IsNull() { in.Skip() - out.Keyframes = nil + out.Animations = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.Keyframes = make([]*KeyframeStyle, 0, 8) + out.Animations = make([]string, 0, 4) } else { - out.Keyframes = []*KeyframeStyle{} + out.Animations = []string{} } for !in.IsDelim(']') { - var v10 *KeyframeStyle - if in.IsNull() { - in.Skip() - v10 = nil - } else { - if v10 == nil { - v10 = new(KeyframeStyle) - } - (*v10).UnmarshalEasyJSON(in) - } - out.Keyframes = append(out.Keyframes, v10) + var v7 string + v7 = string(in.String()) + out.Animations = append(out.Animations, v7) in.WantComma() } in.Delim(']') } + case "currentTime": + out.CurrentTime = float64(in.Float64()) default: in.SkipRecursive() } @@ -675,68 +851,60 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation7(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(out *jwriter.Writer, in KeyframesRule) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(out *jwriter.Writer, in SeekAnimationsParams) { out.RawByte('{') first := true _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) + if !first { + out.RawByte(',') } - if len(in.Keyframes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyframes\":") - if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v11, v12 := range in.Keyframes { - if v11 > 0 { - out.RawByte(',') - } - if v12 == nil { - out.RawString("null") - } else { - (*v12).MarshalEasyJSON(out) - } + first = false + out.RawString("\"animations\":") + if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.Animations { + if v8 > 0 { + out.RawByte(',') } - out.RawByte(']') + out.String(string(v9)) } + out.RawByte(']') } + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"currentTime\":") + out.Float64(float64(in.CurrentTime)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v KeyframesRule) MarshalJSON() ([]byte, error) { +func (v SeekAnimationsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) { +func (v SeekAnimationsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *KeyframesRule) UnmarshalJSON(data []byte) error { +func (v *SeekAnimationsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SeekAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation8(in *jlexer.Lexer, out *KeyframeStyle) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation8(in *jlexer.Lexer, out *SetTimingParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -755,10 +923,12 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation8(in *jlexer.Lexer, o continue } switch key { - case "offset": - out.Offset = string(in.String()) - case "easing": - out.Easing = string(in.String()) + case "animationId": + out.AnimationID = string(in.String()) + case "duration": + out.Duration = float64(in.Float64()) + case "delay": + out.Delay = float64(in.Float64()) default: in.SkipRecursive() } @@ -769,53 +939,55 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation8(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation8(out *jwriter.Writer, in KeyframeStyle) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation8(out *jwriter.Writer, in SetTimingParams) { out.RawByte('{') first := true _ = first - if in.Offset != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"offset\":") - out.String(string(in.Offset)) + if !first { + out.RawByte(',') } - if in.Easing != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"easing\":") - out.String(string(in.Easing)) + first = false + out.RawString("\"animationId\":") + out.String(string(in.AnimationID)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"duration\":") + out.Float64(float64(in.Duration)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"delay\":") + out.Float64(float64(in.Delay)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v KeyframeStyle) MarshalJSON() ([]byte, error) { +func (v SetTimingParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v KeyframeStyle) MarshalEasyJSON(w *jwriter.Writer) { +func (v SetTimingParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *KeyframeStyle) UnmarshalJSON(data []byte) error { +func (v *SetTimingParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *KeyframeStyle) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetTimingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation9(in *jlexer.Lexer, out *GetPlaybackRateReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation9(in *jlexer.Lexer, out *SetPausedParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -834,8 +1006,27 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation9(in *jlexer.Lexer, o continue } switch key { - case "playbackRate": - out.PlaybackRate = float64(in.Float64()) + case "animations": + if in.IsNull() { + in.Skip() + out.Animations = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Animations = make([]string, 0, 4) + } else { + out.Animations = []string{} + } + for !in.IsDelim(']') { + var v10 string + v10 = string(in.String()) + out.Animations = append(out.Animations, v10) + in.WantComma() + } + in.Delim(']') + } + case "paused": + out.Paused = bool(in.Bool()) default: in.SkipRecursive() } @@ -846,104 +1037,60 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation9(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation9(out *jwriter.Writer, in GetPlaybackRateReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation9(out *jwriter.Writer, in SetPausedParams) { out.RawByte('{') first := true _ = first - if in.PlaybackRate != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"playbackRate\":") - out.Float64(float64(in.PlaybackRate)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"animations\":") + if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Animations { + if v11 > 0 { + out.RawByte(',') + } + out.String(string(v12)) + } + out.RawByte(']') + } + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"paused\":") + out.Bool(bool(in.Paused)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetPlaybackRateReturns) MarshalJSON() ([]byte, error) { +func (v SetPausedParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPlaybackRateReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v SetPausedParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPlaybackRateReturns) UnmarshalJSON(data []byte) error { +func (v *SetPausedParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPlaybackRateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetPausedParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation10(in *jlexer.Lexer, out *GetPlaybackRateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation10(out *jwriter.Writer, in GetPlaybackRateParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetPlaybackRateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPlaybackRateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(in *jlexer.Lexer, out *GetCurrentTimeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation10(in *jlexer.Lexer, out *GetCurrentTimeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -974,7 +1121,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(out *jwriter.Writer, in GetCurrentTimeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation10(out *jwriter.Writer, in GetCurrentTimeReturns) { out.RawByte('{') first := true _ = first @@ -992,27 +1139,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v GetCurrentTimeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetCurrentTimeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetCurrentTimeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetCurrentTimeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation10(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation12(in *jlexer.Lexer, out *GetCurrentTimeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(in *jlexer.Lexer, out *GetCurrentTimeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1043,7 +1190,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation12(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(out *jwriter.Writer, in GetCurrentTimeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(out *jwriter.Writer, in GetCurrentTimeParams) { out.RawByte('{') first := true _ = first @@ -1059,27 +1206,94 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v GetCurrentTimeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetCurrentTimeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetCurrentTimeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetCurrentTimeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation12(in *jlexer.Lexer, out *SetPlaybackRateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "playbackRate": + out.PlaybackRate = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(out *jwriter.Writer, in SetPlaybackRateParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"playbackRate\":") + out.Float64(float64(in.PlaybackRate)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetPlaybackRateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetPlaybackRateParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation12(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetCurrentTimeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation12(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation13(in *jlexer.Lexer, out *EventAnimationStarted) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation13(in *jlexer.Lexer, out *GetPlaybackRateReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1098,16 +1312,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation13(in *jlexer.Lexer, continue } switch key { - case "animation": - if in.IsNull() { - in.Skip() - out.Animation = nil - } else { - if out.Animation == nil { - out.Animation = new(Animation) - } - (*out.Animation).UnmarshalEasyJSON(in) - } + case "playbackRate": + out.PlaybackRate = float64(in.Float64()) default: in.SkipRecursive() } @@ -1118,49 +1324,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation13(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(out *jwriter.Writer, in EventAnimationStarted) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(out *jwriter.Writer, in GetPlaybackRateReturns) { out.RawByte('{') first := true _ = first - if in.Animation != nil { + if in.PlaybackRate != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"animation\":") - if in.Animation == nil { - out.RawString("null") - } else { - (*in.Animation).MarshalEasyJSON(out) - } + out.RawString("\"playbackRate\":") + out.Float64(float64(in.PlaybackRate)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventAnimationStarted) MarshalJSON() ([]byte, error) { +func (v GetPlaybackRateReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventAnimationStarted) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetPlaybackRateReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventAnimationStarted) UnmarshalJSON(data []byte) error { +func (v *GetPlaybackRateReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation13(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAnimationStarted) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetPlaybackRateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation13(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation14(in *jlexer.Lexer, out *EventAnimationCreated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation14(in *jlexer.Lexer, out *GetPlaybackRateParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1179,8 +1381,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation14(in *jlexer.Lexer, continue } switch key { - case "id": - out.ID = string(in.String()) default: in.SkipRecursive() } @@ -1191,45 +1391,37 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation14(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation14(out *jwriter.Writer, in EventAnimationCreated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation14(out *jwriter.Writer, in GetPlaybackRateParams) { out.RawByte('{') first := true _ = first - if in.ID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"id\":") - out.String(string(in.ID)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventAnimationCreated) MarshalJSON() ([]byte, error) { +func (v GetPlaybackRateParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventAnimationCreated) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventAnimationCreated) UnmarshalJSON(data []byte) error { +func (v *GetPlaybackRateParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAnimationCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation14(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation15(in *jlexer.Lexer, out *EventAnimationCanceled) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation15(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1248,8 +1440,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation15(in *jlexer.Lexer, continue } switch key { - case "id": - out.ID = string(in.String()) default: in.SkipRecursive() } @@ -1260,42 +1450,34 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation15(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation15(out *jwriter.Writer, in EventAnimationCanceled) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation15(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first - if in.ID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"id\":") - out.String(string(in.ID)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventAnimationCanceled) MarshalJSON() ([]byte, error) { +func (v DisableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventAnimationCanceled) MarshalEasyJSON(w *jwriter.Writer) { +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventAnimationCanceled) UnmarshalJSON(data []byte) error { +func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation15(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAnimationCanceled) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation15(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation16(in *jlexer.Lexer, out *EnableParams) { @@ -1357,237 +1539,7 @@ func (v *EnableParams) UnmarshalJSON(data []byte) error { func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation17(in *jlexer.Lexer, out *Effect) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "delay": - out.Delay = float64(in.Float64()) - case "endDelay": - out.EndDelay = float64(in.Float64()) - case "iterationStart": - out.IterationStart = float64(in.Float64()) - case "iterations": - out.Iterations = float64(in.Float64()) - case "duration": - out.Duration = float64(in.Float64()) - case "direction": - out.Direction = string(in.String()) - case "fill": - out.Fill = string(in.String()) - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) - case "keyframesRule": - if in.IsNull() { - in.Skip() - out.KeyframesRule = nil - } else { - if out.KeyframesRule == nil { - out.KeyframesRule = new(KeyframesRule) - } - (*out.KeyframesRule).UnmarshalEasyJSON(in) - } - case "easing": - out.Easing = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(out *jwriter.Writer, in Effect) { - out.RawByte('{') - first := true - _ = first - if in.Delay != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"delay\":") - out.Float64(float64(in.Delay)) - } - if in.EndDelay != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endDelay\":") - out.Float64(float64(in.EndDelay)) - } - if in.IterationStart != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"iterationStart\":") - out.Float64(float64(in.IterationStart)) - } - if in.Iterations != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"iterations\":") - out.Float64(float64(in.Iterations)) - } - if in.Duration != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"duration\":") - out.Float64(float64(in.Duration)) - } - if in.Direction != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"direction\":") - out.String(string(in.Direction)) - } - if in.Fill != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"fill\":") - out.String(string(in.Fill)) - } - if in.BackendNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendNodeId\":") - out.Int64(int64(in.BackendNodeID)) - } - if in.KeyframesRule != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyframesRule\":") - if in.KeyframesRule == nil { - out.RawString("null") - } else { - (*in.KeyframesRule).MarshalEasyJSON(out) - } - } - if in.Easing != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"easing\":") - out.String(string(in.Easing)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Effect) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Effect) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Effect) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Effect) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation18(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation18(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation19(in *jlexer.Lexer, out *Animation) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation17(in *jlexer.Lexer, out *EventAnimationCanceled) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1608,32 +1560,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation19(in *jlexer.Lexer, switch key { case "id": out.ID = string(in.String()) - case "name": - out.Name = string(in.String()) - case "pausedState": - out.PausedState = bool(in.Bool()) - case "playState": - out.PlayState = string(in.String()) - case "playbackRate": - out.PlaybackRate = float64(in.Float64()) - case "startTime": - out.StartTime = float64(in.Float64()) - case "currentTime": - out.CurrentTime = float64(in.Float64()) - case "source": - if in.IsNull() { - in.Skip() - out.Source = nil - } else { - if out.Source == nil { - out.Source = new(Effect) - } - (*out.Source).UnmarshalEasyJSON(in) - } - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "cssId": - out.CSSID = string(in.String()) default: in.SkipRecursive() } @@ -1644,7 +1570,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation19(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(out *jwriter.Writer, in Animation) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(out *jwriter.Writer, in EventAnimationCanceled) { out.RawByte('{') first := true _ = first @@ -1656,105 +1582,179 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(out *jwriter.Write out.RawString("\"id\":") out.String(string(in.ID)) } - if in.Name != "" { - if !first { - out.RawByte(',') + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventAnimationCanceled) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventAnimationCanceled) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventAnimationCanceled) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAnimationCanceled) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation18(in *jlexer.Lexer, out *EventAnimationStarted) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) + in.Skip() + return } - if in.PausedState { - if !first { - out.RawByte(',') + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue } - first = false - out.RawString("\"pausedState\":") - out.Bool(bool(in.PausedState)) + switch key { + case "animation": + if in.IsNull() { + in.Skip() + out.Animation = nil + } else { + if out.Animation == nil { + out.Animation = new(Animation) + } + (*out.Animation).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() } - if in.PlayState != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"playState\":") - out.String(string(in.PlayState)) + in.Delim('}') + if isTopLevel { + in.Consumed() } - if in.PlaybackRate != 0 { +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation18(out *jwriter.Writer, in EventAnimationStarted) { + out.RawByte('{') + first := true + _ = first + if in.Animation != nil { if !first { out.RawByte(',') } first = false - out.RawString("\"playbackRate\":") - out.Float64(float64(in.PlaybackRate)) - } - if in.StartTime != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startTime\":") - out.Float64(float64(in.StartTime)) - } - if in.CurrentTime != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"currentTime\":") - out.Float64(float64(in.CurrentTime)) - } - if in.Source != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"source\":") - if in.Source == nil { + out.RawString("\"animation\":") + if in.Animation == nil { out.RawString("null") } else { - (*in.Source).MarshalEasyJSON(out) + (*in.Animation).MarshalEasyJSON(out) } } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.CSSID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cssId\":") - out.String(string(in.CSSID)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v Animation) MarshalJSON() ([]byte, error) { +func (v EventAnimationStarted) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventAnimationStarted) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventAnimationStarted) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAnimationStarted) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation19(in *jlexer.Lexer, out *EventAnimationCreated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.ID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(out *jwriter.Writer, in EventAnimationCreated) { + out.RawByte('{') + first := true + _ = first + if in.ID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"id\":") + out.String(string(in.ID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventAnimationCreated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Animation) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventAnimationCreated) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Animation) UnmarshalJSON(data []byte) error { +func (v *EventAnimationCreated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation19(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Animation) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventAnimationCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpAnimation19(l, v) } diff --git a/cdp/applicationcache/applicationcache.go b/cdp/applicationcache/applicationcache.go index 3318efb..6f36141 100644 --- a/cdp/applicationcache/applicationcache.go +++ b/cdp/applicationcache/applicationcache.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // GetFramesWithManifestsParams returns array of frame identifiers with @@ -36,40 +35,14 @@ type GetFramesWithManifestsReturns struct { // returns: // frameIds - Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache. func (p *GetFramesWithManifestsParams) Do(ctxt context.Context, h cdp.Handler) (frameIds []*FrameWithManifest, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandApplicationCacheGetFramesWithManifests, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetFramesWithManifestsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.FrameIds, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetFramesWithManifestsReturns + err = h.Execute(ctxt, cdp.CommandApplicationCacheGetFramesWithManifests, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.FrameIds, nil } // EnableParams enables application cache domain notifications. @@ -83,33 +56,7 @@ func Enable() *EnableParams { // Do executes ApplicationCache.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandApplicationCacheEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandApplicationCacheEnable, nil, nil) } // GetManifestForFrameParams returns manifest URL for document in the given @@ -139,46 +86,14 @@ type GetManifestForFrameReturns struct { // returns: // manifestURL - Manifest URL for document in the given frame. func (p *GetManifestForFrameParams) Do(ctxt context.Context, h cdp.Handler) (manifestURL string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetManifestForFrameReturns + err = h.Execute(ctxt, cdp.CommandApplicationCacheGetManifestForFrame, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandApplicationCacheGetManifestForFrame, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetManifestForFrameReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.ManifestURL, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.ManifestURL, nil } // GetApplicationCacheForFrameParams returns relevant application cache data @@ -209,44 +124,12 @@ type GetApplicationCacheForFrameReturns struct { // returns: // applicationCache - Relevant application cache data for the document in given frame. func (p *GetApplicationCacheForFrameParams) Do(ctxt context.Context, h cdp.Handler) (applicationCache *ApplicationCache, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetApplicationCacheForFrameReturns + err = h.Execute(ctxt, cdp.CommandApplicationCacheGetApplicationCacheForFrame, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandApplicationCacheGetApplicationCacheForFrame, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetApplicationCacheForFrameReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.ApplicationCache, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.ApplicationCache, nil } diff --git a/cdp/applicationcache/easyjson.go b/cdp/applicationcache/easyjson.go index 53f9504..208cb88 100644 --- a/cdp/applicationcache/easyjson.go +++ b/cdp/applicationcache/easyjson.go @@ -17,7 +17,245 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(in *jlexer.Lexer, out *Resource) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(in *jlexer.Lexer, out *FrameWithManifest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "manifestURL": + out.ManifestURL = string(in.String()) + case "status": + out.Status = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(out *jwriter.Writer, in FrameWithManifest) { + out.RawByte('{') + first := true + _ = first + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + if in.ManifestURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"manifestURL\":") + out.String(string(in.ManifestURL)) + } + if in.Status != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"status\":") + out.Int64(int64(in.Status)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v FrameWithManifest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v FrameWithManifest) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *FrameWithManifest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *FrameWithManifest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(in *jlexer.Lexer, out *ApplicationCache) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "manifestURL": + out.ManifestURL = string(in.String()) + case "size": + out.Size = float64(in.Float64()) + case "creationTime": + out.CreationTime = float64(in.Float64()) + case "updateTime": + out.UpdateTime = float64(in.Float64()) + case "resources": + if in.IsNull() { + in.Skip() + out.Resources = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Resources = make([]*Resource, 0, 8) + } else { + out.Resources = []*Resource{} + } + for !in.IsDelim(']') { + var v1 *Resource + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(Resource) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Resources = append(out.Resources, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache1(out *jwriter.Writer, in ApplicationCache) { + out.RawByte('{') + first := true + _ = first + if in.ManifestURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"manifestURL\":") + out.String(string(in.ManifestURL)) + } + if in.Size != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"size\":") + out.Float64(float64(in.Size)) + } + if in.CreationTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"creationTime\":") + out.Float64(float64(in.CreationTime)) + } + if in.UpdateTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"updateTime\":") + out.Float64(float64(in.UpdateTime)) + } + if len(in.Resources) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"resources\":") + if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.Resources { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ApplicationCache) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ApplicationCache) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ApplicationCache) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ApplicationCache) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(in *jlexer.Lexer, out *Resource) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -52,7 +290,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(in *jlexer.Le in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(out *jwriter.Writer, in Resource) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache2(out *jwriter.Writer, in Resource) { out.RawByte('{') first := true _ = first @@ -86,27 +324,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(out *jwriter. // MarshalJSON supports json.Marshaler interface func (v Resource) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Resource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Resource) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Resource) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(in *jlexer.Lexer, out *GetManifestForFrameReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache3(in *jlexer.Lexer, out *EventNetworkStateUpdated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -125,8 +363,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(in *jlexer.L continue } switch key { - case "manifestURL": - out.ManifestURL = string(in.String()) + case "isNowOnline": + out.IsNowOnline = bool(in.Bool()) default: in.SkipRecursive() } @@ -137,45 +375,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(in *jlexer.L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache1(out *jwriter.Writer, in GetManifestForFrameReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache3(out *jwriter.Writer, in EventNetworkStateUpdated) { out.RawByte('{') first := true _ = first - if in.ManifestURL != "" { + if in.IsNowOnline { if !first { out.RawByte(',') } first = false - out.RawString("\"manifestURL\":") - out.String(string(in.ManifestURL)) + out.RawString("\"isNowOnline\":") + out.Bool(bool(in.IsNowOnline)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetManifestForFrameReturns) MarshalJSON() ([]byte, error) { +func (v EventNetworkStateUpdated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetManifestForFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache1(w, v) +func (v EventNetworkStateUpdated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetManifestForFrameReturns) UnmarshalJSON(data []byte) error { +func (v *EventNetworkStateUpdated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetManifestForFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache1(l, v) +func (v *EventNetworkStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(in *jlexer.Lexer, out *GetManifestForFrameParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache4(in *jlexer.Lexer, out *EventApplicationCacheStatusUpdated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -196,6 +434,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(in *jlexer.L switch key { case "frameId": (out.FrameID).UnmarshalEasyJSON(in) + case "manifestURL": + out.ManifestURL = string(in.String()) + case "status": + out.Status = int64(in.Int64()) default: in.SkipRecursive() } @@ -206,208 +448,58 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(in *jlexer.L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache2(out *jwriter.Writer, in GetManifestForFrameParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache4(out *jwriter.Writer, in EventApplicationCacheStatusUpdated) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetManifestForFrameParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetManifestForFrameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetManifestForFrameParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetManifestForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache3(in *jlexer.Lexer, out *GetFramesWithManifestsReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameIds": - if in.IsNull() { - in.Skip() - out.FrameIds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.FrameIds = make([]*FrameWithManifest, 0, 8) - } else { - out.FrameIds = []*FrameWithManifest{} - } - for !in.IsDelim(']') { - var v1 *FrameWithManifest - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(FrameWithManifest) - } - (*v1).UnmarshalEasyJSON(in) - } - out.FrameIds = append(out.FrameIds, v1) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache3(out *jwriter.Writer, in GetFramesWithManifestsReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.FrameIds) != 0 { + if in.FrameID != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"frameIds\":") - if in.FrameIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.FrameIds { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + if in.ManifestURL != "" { + if !first { + out.RawByte(',') } + first = false + out.RawString("\"manifestURL\":") + out.String(string(in.ManifestURL)) + } + if in.Status != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"status\":") + out.Int64(int64(in.Status)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetFramesWithManifestsReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetFramesWithManifestsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetFramesWithManifestsReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetFramesWithManifestsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache4(in *jlexer.Lexer, out *GetFramesWithManifestsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache4(out *jwriter.Writer, in GetFramesWithManifestsParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetFramesWithManifestsParams) MarshalJSON() ([]byte, error) { +func (v EventApplicationCacheStatusUpdated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetFramesWithManifestsParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventApplicationCacheStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetFramesWithManifestsParams) UnmarshalJSON(data []byte) error { +func (v *EventApplicationCacheStatusUpdated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetFramesWithManifestsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventApplicationCacheStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache4(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache5(in *jlexer.Lexer, out *GetApplicationCacheForFrameReturns) { @@ -558,7 +650,7 @@ func (v *GetApplicationCacheForFrameParams) UnmarshalJSON(data []byte) error { func (v *GetApplicationCacheForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache7(in *jlexer.Lexer, out *FrameWithManifest) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache7(in *jlexer.Lexer, out *GetManifestForFrameReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -577,12 +669,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache7(in *jlexer.L continue } switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) case "manifestURL": out.ManifestURL = string(in.String()) - case "status": - out.Status = int64(in.Int64()) default: in.SkipRecursive() } @@ -593,18 +681,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache7(in *jlexer.L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(out *jwriter.Writer, in FrameWithManifest) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(out *jwriter.Writer, in GetManifestForFrameReturns) { out.RawByte('{') first := true _ = first - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } if in.ManifestURL != "" { if !first { out.RawByte(',') @@ -613,110 +693,33 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(out *jwriter out.RawString("\"manifestURL\":") out.String(string(in.ManifestURL)) } - if in.Status != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"status\":") - out.Int64(int64(in.Status)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v FrameWithManifest) MarshalJSON() ([]byte, error) { +func (v GetManifestForFrameReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v FrameWithManifest) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetManifestForFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *FrameWithManifest) UnmarshalJSON(data []byte) error { +func (v *GetManifestForFrameReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FrameWithManifest) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetManifestForFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache8(in *jlexer.Lexer, out *EventNetworkStateUpdated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "isNowOnline": - out.IsNowOnline = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(out *jwriter.Writer, in EventNetworkStateUpdated) { - out.RawByte('{') - first := true - _ = first - if in.IsNowOnline { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"isNowOnline\":") - out.Bool(bool(in.IsNowOnline)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventNetworkStateUpdated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventNetworkStateUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventNetworkStateUpdated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventNetworkStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(in *jlexer.Lexer, out *EventApplicationCacheStatusUpdated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache8(in *jlexer.Lexer, out *GetManifestForFrameParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -737,10 +740,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(in *jlexer.L switch key { case "frameId": (out.FrameID).UnmarshalEasyJSON(in) - case "manifestURL": - out.ManifestURL = string(in.String()) - case "status": - out.Status = int64(in.Int64()) default: in.SkipRecursive() } @@ -751,61 +750,43 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(in *jlexer.L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(out *jwriter.Writer, in EventApplicationCacheStatusUpdated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(out *jwriter.Writer, in GetManifestForFrameParams) { out.RawByte('{') first := true _ = first - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - if in.ManifestURL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"manifestURL\":") - out.String(string(in.ManifestURL)) - } - if in.Status != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"status\":") - out.Int64(int64(in.Status)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventApplicationCacheStatusUpdated) MarshalJSON() ([]byte, error) { +func (v GetManifestForFrameParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventApplicationCacheStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(w, v) +func (v GetManifestForFrameParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventApplicationCacheStatusUpdated) UnmarshalJSON(data []byte) error { +func (v *GetManifestForFrameParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventApplicationCacheStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(l, v) +func (v *GetManifestForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -834,7 +815,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(in *jlexer. in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first @@ -844,27 +825,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(out *jwrite // MarshalJSON supports json.Marshaler interface func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache11(in *jlexer.Lexer, out *ApplicationCache) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(in *jlexer.Lexer, out *GetFramesWithManifestsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -883,37 +864,29 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache11(in *jlexer. continue } switch key { - case "manifestURL": - out.ManifestURL = string(in.String()) - case "size": - out.Size = float64(in.Float64()) - case "creationTime": - out.CreationTime = float64(in.Float64()) - case "updateTime": - out.UpdateTime = float64(in.Float64()) - case "resources": + case "frameIds": if in.IsNull() { in.Skip() - out.Resources = nil + out.FrameIds = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.Resources = make([]*Resource, 0, 8) + out.FrameIds = make([]*FrameWithManifest, 0, 8) } else { - out.Resources = []*Resource{} + out.FrameIds = []*FrameWithManifest{} } for !in.IsDelim(']') { - var v4 *Resource + var v4 *FrameWithManifest if in.IsNull() { in.Skip() v4 = nil } else { if v4 == nil { - v4 = new(Resource) + v4 = new(FrameWithManifest) } (*v4).UnmarshalEasyJSON(in) } - out.Resources = append(out.Resources, v4) + out.FrameIds = append(out.FrameIds, v4) in.WantComma() } in.Delim(']') @@ -928,53 +901,21 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache11(in *jlexer. in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(out *jwriter.Writer, in ApplicationCache) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(out *jwriter.Writer, in GetFramesWithManifestsReturns) { out.RawByte('{') first := true _ = first - if in.ManifestURL != "" { + if len(in.FrameIds) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"manifestURL\":") - out.String(string(in.ManifestURL)) - } - if in.Size != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"size\":") - out.Float64(float64(in.Size)) - } - if in.CreationTime != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"creationTime\":") - out.Float64(float64(in.CreationTime)) - } - if in.UpdateTime != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"updateTime\":") - out.Float64(float64(in.UpdateTime)) - } - if len(in.Resources) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"resources\":") - if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"frameIds\":") + if in.FrameIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v5, v6 := range in.Resources { + for v5, v6 := range in.FrameIds { if v5 > 0 { out.RawByte(',') } @@ -991,25 +932,84 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(out *jwrite } // MarshalJSON supports json.Marshaler interface -func (v ApplicationCache) MarshalJSON() ([]byte, error) { +func (v GetFramesWithManifestsReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetFramesWithManifestsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetFramesWithManifestsReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetFramesWithManifestsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache11(in *jlexer.Lexer, out *GetFramesWithManifestsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(out *jwriter.Writer, in GetFramesWithManifestsParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetFramesWithManifestsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v ApplicationCache) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetFramesWithManifestsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *ApplicationCache) UnmarshalJSON(data []byte) error { +func (v *GetFramesWithManifestsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ApplicationCache) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetFramesWithManifestsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpApplicationcache11(l, v) } diff --git a/cdp/cachestorage/cachestorage.go b/cdp/cachestorage/cachestorage.go index 9d2d6e5..abefba1 100644 --- a/cdp/cachestorage/cachestorage.go +++ b/cdp/cachestorage/cachestorage.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // RequestCacheNamesParams requests cache names. @@ -39,46 +38,14 @@ type RequestCacheNamesReturns struct { // returns: // caches - Caches for the security origin. func (p *RequestCacheNamesParams) Do(ctxt context.Context, h cdp.Handler) (caches []*Cache, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RequestCacheNamesReturns + err = h.Execute(ctxt, cdp.CommandCacheStorageRequestCacheNames, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCacheStorageRequestCacheNames, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestCacheNamesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Caches, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Caches, nil } // RequestEntriesParams requests data from cache. @@ -115,46 +82,14 @@ type RequestEntriesReturns struct { // cacheDataEntries - Array of object store data entries. // hasMore - If true, there are more entries to fetch in the given range. func (p *RequestEntriesParams) Do(ctxt context.Context, h cdp.Handler) (cacheDataEntries []*DataEntry, hasMore bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RequestEntriesReturns + err = h.Execute(ctxt, cdp.CommandCacheStorageRequestEntries, p, &res) if err != nil { return nil, false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCacheStorageRequestEntries, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestEntriesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, false, cdp.ErrInvalidResult - } - - return r.CacheDataEntries, r.HasMore, nil - - case error: - return nil, false, v - } - - case <-ctxt.Done(): - return nil, false, ctxt.Err() - } - - return nil, false, cdp.ErrUnknownResult + return res.CacheDataEntries, res.HasMore, nil } // DeleteCacheParams deletes a cache. @@ -175,39 +110,7 @@ func DeleteCache(cacheID CacheID) *DeleteCacheParams { // Do executes CacheStorage.deleteCache against the provided context and // target handler. func (p *DeleteCacheParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCacheStorageDeleteCache, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCacheStorageDeleteCache, p, nil) } // DeleteEntryParams deletes a cache entry. @@ -231,37 +134,5 @@ func DeleteEntry(cacheID CacheID, request string) *DeleteEntryParams { // Do executes CacheStorage.deleteEntry against the provided context and // target handler. func (p *DeleteEntryParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCacheStorageDeleteEntry, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCacheStorageDeleteEntry, p, nil) } diff --git a/cdp/cachestorage/easyjson.go b/cdp/cachestorage/easyjson.go index c416fb7..ccc82d9 100644 --- a/cdp/cachestorage/easyjson.go +++ b/cdp/cachestorage/easyjson.go @@ -17,7 +17,317 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(in *jlexer.Lexer, out *RequestEntriesReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(in *jlexer.Lexer, out *Cache) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "cacheId": + out.CacheID = CacheID(in.String()) + case "securityOrigin": + out.SecurityOrigin = string(in.String()) + case "cacheName": + out.CacheName = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(out *jwriter.Writer, in Cache) { + out.RawByte('{') + first := true + _ = first + if in.CacheID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cacheId\":") + out.String(string(in.CacheID)) + } + if in.SecurityOrigin != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"securityOrigin\":") + out.String(string(in.SecurityOrigin)) + } + if in.CacheName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cacheName\":") + out.String(string(in.CacheName)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Cache) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Cache) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Cache) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(in *jlexer.Lexer, out *DataEntry) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "request": + out.Request = string(in.String()) + case "response": + out.Response = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(out *jwriter.Writer, in DataEntry) { + out.RawByte('{') + first := true + _ = first + if in.Request != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"request\":") + out.String(string(in.Request)) + } + if in.Response != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + out.String(string(in.Response)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DataEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DataEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(in *jlexer.Lexer, out *DeleteEntryParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "cacheId": + out.CacheID = CacheID(in.String()) + case "request": + out.Request = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(out *jwriter.Writer, in DeleteEntryParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cacheId\":") + out.String(string(in.CacheID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"request\":") + out.String(string(in.Request)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DeleteEntryParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DeleteEntryParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DeleteEntryParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DeleteEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(in *jlexer.Lexer, out *DeleteCacheParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "cacheId": + out.CacheID = CacheID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(out *jwriter.Writer, in DeleteCacheParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cacheId\":") + out.String(string(in.CacheID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DeleteCacheParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DeleteCacheParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DeleteCacheParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DeleteCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(in *jlexer.Lexer, out *RequestEntriesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -75,7 +385,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(out *jwriter.Writer, in RequestEntriesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(out *jwriter.Writer, in RequestEntriesReturns) { out.RawByte('{') first := true _ = first @@ -116,27 +426,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v RequestEntriesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RequestEntriesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RequestEntriesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RequestEntriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(in *jlexer.Lexer, out *RequestEntriesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(in *jlexer.Lexer, out *RequestEntriesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -171,7 +481,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(out *jwriter.Writer, in RequestEntriesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(out *jwriter.Writer, in RequestEntriesParams) { out.RawByte('{') first := true _ = first @@ -199,27 +509,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(out *jwriter.Wri // MarshalJSON supports json.Marshaler interface func (v RequestEntriesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RequestEntriesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RequestEntriesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RequestEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(in *jlexer.Lexer, out *RequestCacheNamesReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(in *jlexer.Lexer, out *RequestCacheNamesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -275,7 +585,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(out *jwriter.Writer, in RequestCacheNamesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(out *jwriter.Writer, in RequestCacheNamesReturns) { out.RawByte('{') first := true _ = first @@ -308,27 +618,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(out *jwriter.Wri // MarshalJSON supports json.Marshaler interface func (v RequestCacheNamesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RequestCacheNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RequestCacheNamesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RequestCacheNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(in *jlexer.Lexer, out *RequestCacheNamesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(in *jlexer.Lexer, out *RequestCacheNamesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -359,7 +669,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(out *jwriter.Writer, in RequestCacheNamesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(out *jwriter.Writer, in RequestCacheNamesParams) { out.RawByte('{') first := true _ = first @@ -374,334 +684,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(out *jwriter.Wri // MarshalJSON supports json.Marshaler interface func (v RequestCacheNamesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestCacheNamesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestCacheNamesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestCacheNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(in *jlexer.Lexer, out *DeleteEntryParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "cacheId": - out.CacheID = CacheID(in.String()) - case "request": - out.Request = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(out *jwriter.Writer, in DeleteEntryParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cacheId\":") - out.String(string(in.CacheID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"request\":") - out.String(string(in.Request)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DeleteEntryParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DeleteEntryParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DeleteEntryParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DeleteEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(in *jlexer.Lexer, out *DeleteCacheParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "cacheId": - out.CacheID = CacheID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(out *jwriter.Writer, in DeleteCacheParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cacheId\":") - out.String(string(in.CacheID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DeleteCacheParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DeleteCacheParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DeleteCacheParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DeleteCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(in *jlexer.Lexer, out *DataEntry) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - out.Request = string(in.String()) - case "response": - out.Response = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(out *jwriter.Writer, in DataEntry) { - out.RawByte('{') - first := true - _ = first - if in.Request != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"request\":") - out.String(string(in.Request)) - } - if in.Response != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - out.String(string(in.Response)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DataEntry) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DataEntry) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(in *jlexer.Lexer, out *Cache) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "cacheId": - out.CacheID = CacheID(in.String()) - case "securityOrigin": - out.SecurityOrigin = string(in.String()) - case "cacheName": - out.CacheName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(out *jwriter.Writer, in Cache) { - out.RawByte('{') - first := true - _ = first - if in.CacheID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cacheId\":") - out.String(string(in.CacheID)) - } - if in.SecurityOrigin != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"securityOrigin\":") - out.String(string(in.SecurityOrigin)) - } - if in.CacheName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cacheName\":") - out.String(string(in.CacheName)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Cache) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Cache) MarshalEasyJSON(w *jwriter.Writer) { +func (v RequestCacheNamesParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Cache) UnmarshalJSON(data []byte) error { +func (v *RequestCacheNamesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *RequestCacheNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(l, v) } diff --git a/cdp/cdp.go b/cdp/cdp.go index 89c88b5..f141782 100644 --- a/cdp/cdp.go +++ b/cdp/cdp.go @@ -1352,7 +1352,7 @@ type Handler interface { // Execute executes the specified command using the supplied context and // parameters. - Execute(context.Context, MethodType, easyjson.RawMessage) <-chan interface{} + Execute(context.Context, MethodType, easyjson.Marshaler, easyjson.Unmarshaler) error // Listen creates a channel that will receive an event for the types // specified. @@ -1362,9 +1362,6 @@ type Handler interface { Release(<-chan interface{}) } -// Empty is an empty JSON object message. -var Empty = easyjson.RawMessage(`{}`) - // FrameID unique frame identifier. type FrameID string diff --git a/cdp/css/css.go b/cdp/css/css.go index c51af21..9a19608 100644 --- a/cdp/css/css.go +++ b/cdp/css/css.go @@ -20,7 +20,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables the CSS agent for the given page. Clients should not @@ -38,33 +37,7 @@ func Enable() *EnableParams { // Do executes CSS.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCSSEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCSSEnable, nil, nil) } // DisableParams disables the CSS agent for the given page. @@ -78,33 +51,7 @@ func Disable() *DisableParams { // Do executes CSS.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCSSDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCSSDisable, nil, nil) } // GetMatchedStylesForNodeParams returns requested styles for a DOM node @@ -145,46 +92,14 @@ type GetMatchedStylesForNodeReturns struct { // inherited - A chain of inherited styles (from the immediate node parent up to the DOM tree root). // cssKeyframesRules - A list of CSS keyframed animations matching this node. func (p *GetMatchedStylesForNodeParams) Do(ctxt context.Context, h cdp.Handler) (inlineStyle *Style, attributesStyle *Style, matchedCSSRules []*RuleMatch, pseudoElements []*PseudoElementMatches, inherited []*InheritedStyleEntry, cssKeyframesRules []*KeyframesRule, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetMatchedStylesForNodeReturns + err = h.Execute(ctxt, cdp.CommandCSSGetMatchedStylesForNode, p, &res) if err != nil { return nil, nil, nil, nil, nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetMatchedStylesForNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, nil, nil, nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetMatchedStylesForNodeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, nil, nil, nil, nil, cdp.ErrInvalidResult - } - - return r.InlineStyle, r.AttributesStyle, r.MatchedCSSRules, r.PseudoElements, r.Inherited, r.CSSKeyframesRules, nil - - case error: - return nil, nil, nil, nil, nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, nil, nil, nil, nil, ctxt.Err() - } - - return nil, nil, nil, nil, nil, nil, cdp.ErrUnknownResult + return res.InlineStyle, res.AttributesStyle, res.MatchedCSSRules, res.PseudoElements, res.Inherited, res.CSSKeyframesRules, nil } // GetInlineStylesForNodeParams returns the styles defined inline (explicitly @@ -219,46 +134,14 @@ type GetInlineStylesForNodeReturns struct { // inlineStyle - Inline style for the specified DOM node. // attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%"). func (p *GetInlineStylesForNodeParams) Do(ctxt context.Context, h cdp.Handler) (inlineStyle *Style, attributesStyle *Style, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetInlineStylesForNodeReturns + err = h.Execute(ctxt, cdp.CommandCSSGetInlineStylesForNode, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetInlineStylesForNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetInlineStylesForNodeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.InlineStyle, r.AttributesStyle, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.InlineStyle, res.AttributesStyle, nil } // GetComputedStyleForNodeParams returns the computed style for a DOM node @@ -289,46 +172,14 @@ type GetComputedStyleForNodeReturns struct { // returns: // computedStyle - Computed style for the specified DOM node. func (p *GetComputedStyleForNodeParams) Do(ctxt context.Context, h cdp.Handler) (computedStyle []*ComputedProperty, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetComputedStyleForNodeReturns + err = h.Execute(ctxt, cdp.CommandCSSGetComputedStyleForNode, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetComputedStyleForNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetComputedStyleForNodeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.ComputedStyle, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.ComputedStyle, nil } // GetPlatformFontsForNodeParams requests information about platform fonts @@ -359,46 +210,14 @@ type GetPlatformFontsForNodeReturns struct { // returns: // fonts - Usage statistics for every employed platform font. func (p *GetPlatformFontsForNodeParams) Do(ctxt context.Context, h cdp.Handler) (fonts []*PlatformFontUsage, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetPlatformFontsForNodeReturns + err = h.Execute(ctxt, cdp.CommandCSSGetPlatformFontsForNode, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetPlatformFontsForNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetPlatformFontsForNodeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Fonts, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Fonts, nil } // GetStyleSheetTextParams returns the current textual content and the URL @@ -429,46 +248,14 @@ type GetStyleSheetTextReturns struct { // returns: // text - The stylesheet text. func (p *GetStyleSheetTextParams) Do(ctxt context.Context, h cdp.Handler) (text string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetStyleSheetTextReturns + err = h.Execute(ctxt, cdp.CommandCSSGetStyleSheetText, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetStyleSheetText, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetStyleSheetTextReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.Text, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.Text, nil } // CollectClassNamesParams returns all class names from specified stylesheet. @@ -497,46 +284,14 @@ type CollectClassNamesReturns struct { // returns: // classNames - Class name list. func (p *CollectClassNamesParams) Do(ctxt context.Context, h cdp.Handler) (classNames []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CollectClassNamesReturns + err = h.Execute(ctxt, cdp.CommandCSSCollectClassNames, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSCollectClassNames, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CollectClassNamesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.ClassNames, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.ClassNames, nil } // SetStyleSheetTextParams sets the new stylesheet text. @@ -568,46 +323,14 @@ type SetStyleSheetTextReturns struct { // returns: // sourceMapURL - URL of source map associated with script (if any). func (p *SetStyleSheetTextParams) Do(ctxt context.Context, h cdp.Handler) (sourceMapURL string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetStyleSheetTextReturns + err = h.Execute(ctxt, cdp.CommandCSSSetStyleSheetText, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSSetStyleSheetText, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetStyleSheetTextReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.SourceMapURL, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.SourceMapURL, nil } // SetRuleSelectorParams modifies the rule selector. @@ -642,46 +365,14 @@ type SetRuleSelectorReturns struct { // returns: // selectorList - The resulting selector list after modification. func (p *SetRuleSelectorParams) Do(ctxt context.Context, h cdp.Handler) (selectorList *SelectorList, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetRuleSelectorReturns + err = h.Execute(ctxt, cdp.CommandCSSSetRuleSelector, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSSetRuleSelector, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetRuleSelectorReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.SelectorList, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.SelectorList, nil } // SetKeyframeKeyParams modifies the keyframe rule key text. @@ -716,46 +407,14 @@ type SetKeyframeKeyReturns struct { // returns: // keyText - The resulting key text after modification. func (p *SetKeyframeKeyParams) Do(ctxt context.Context, h cdp.Handler) (keyText *Value, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetKeyframeKeyReturns + err = h.Execute(ctxt, cdp.CommandCSSSetKeyframeKey, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSSetKeyframeKey, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetKeyframeKeyReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.KeyText, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.KeyText, nil } // SetStyleTextsParams applies specified style edits one after another in the @@ -786,46 +445,14 @@ type SetStyleTextsReturns struct { // returns: // styles - The resulting styles after modification. func (p *SetStyleTextsParams) Do(ctxt context.Context, h cdp.Handler) (styles []*Style, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetStyleTextsReturns + err = h.Execute(ctxt, cdp.CommandCSSSetStyleTexts, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSSetStyleTexts, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetStyleTextsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Styles, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Styles, nil } // SetMediaTextParams modifies the rule selector. @@ -860,46 +487,14 @@ type SetMediaTextReturns struct { // returns: // media - The resulting CSS media rule after modification. func (p *SetMediaTextParams) Do(ctxt context.Context, h cdp.Handler) (media *Media, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetMediaTextReturns + err = h.Execute(ctxt, cdp.CommandCSSSetMediaText, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSSetMediaText, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetMediaTextReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Media, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Media, nil } // CreateStyleSheetParams creates a new special "via-inspector" stylesheet in @@ -930,46 +525,14 @@ type CreateStyleSheetReturns struct { // returns: // styleSheetID - Identifier of the created "via-inspector" stylesheet. func (p *CreateStyleSheetParams) Do(ctxt context.Context, h cdp.Handler) (styleSheetID StyleSheetID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CreateStyleSheetReturns + err = h.Execute(ctxt, cdp.CommandCSSCreateStyleSheet, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSCreateStyleSheet, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CreateStyleSheetReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.StyleSheetID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.StyleSheetID, nil } // AddRuleParams inserts a new rule with the given ruleText in a stylesheet @@ -1006,46 +569,14 @@ type AddRuleReturns struct { // returns: // rule - The newly created rule. func (p *AddRuleParams) Do(ctxt context.Context, h cdp.Handler) (rule *Rule, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res AddRuleReturns + err = h.Execute(ctxt, cdp.CommandCSSAddRule, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSAddRule, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r AddRuleReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Rule, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Rule, nil } // ForcePseudoStateParams ensures that the given node will have specified @@ -1071,39 +602,7 @@ func ForcePseudoState(nodeID cdp.NodeID, forcedPseudoClasses []PseudoClass) *For // Do executes CSS.forcePseudoState against the provided context and // target handler. func (p *ForcePseudoStateParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCSSForcePseudoState, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCSSForcePseudoState, p, nil) } // GetMediaQueriesParams returns all media queries parsed by the rendering @@ -1126,40 +625,14 @@ type GetMediaQueriesReturns struct { // returns: // medias func (p *GetMediaQueriesParams) Do(ctxt context.Context, h cdp.Handler) (medias []*Media, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetMediaQueries, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetMediaQueriesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Medias, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetMediaQueriesReturns + err = h.Execute(ctxt, cdp.CommandCSSGetMediaQueries, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.Medias, nil } // SetEffectivePropertyValueForNodeParams find a rule with the given active @@ -1188,39 +661,7 @@ func SetEffectivePropertyValueForNode(nodeID cdp.NodeID, propertyName string, va // Do executes CSS.setEffectivePropertyValueForNode against the provided context and // target handler. func (p *SetEffectivePropertyValueForNodeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCSSSetEffectivePropertyValueForNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCSSSetEffectivePropertyValueForNode, p, nil) } // GetBackgroundColorsParams [no description]. @@ -1249,46 +690,14 @@ type GetBackgroundColorsReturns struct { // returns: // backgroundColors - The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load). func (p *GetBackgroundColorsParams) Do(ctxt context.Context, h cdp.Handler) (backgroundColors []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetBackgroundColorsReturns + err = h.Execute(ctxt, cdp.CommandCSSGetBackgroundColors, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetBackgroundColors, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetBackgroundColorsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.BackgroundColors, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.BackgroundColors, nil } // GetLayoutTreeAndStylesParams for the main document and any content @@ -1325,46 +734,14 @@ type GetLayoutTreeAndStylesReturns struct { // layoutTreeNodes // computedStyles func (p *GetLayoutTreeAndStylesParams) Do(ctxt context.Context, h cdp.Handler) (layoutTreeNodes []*LayoutTreeNode, computedStyles []*ComputedStyle, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetLayoutTreeAndStylesReturns + err = h.Execute(ctxt, cdp.CommandCSSGetLayoutTreeAndStyles, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSGetLayoutTreeAndStyles, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetLayoutTreeAndStylesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.LayoutTreeNodes, r.ComputedStyles, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.LayoutTreeNodes, res.ComputedStyles, nil } // StartRuleUsageTrackingParams enables the selector recording. @@ -1378,33 +755,7 @@ func StartRuleUsageTracking() *StartRuleUsageTrackingParams { // Do executes CSS.startRuleUsageTracking against the provided context and // target handler. func (p *StartRuleUsageTrackingParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandCSSStartRuleUsageTracking, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandCSSStartRuleUsageTracking, nil, nil) } // StopRuleUsageTrackingParams the list of rules with an indication of @@ -1428,38 +779,12 @@ type StopRuleUsageTrackingReturns struct { // returns: // ruleUsage func (p *StopRuleUsageTrackingParams) Do(ctxt context.Context, h cdp.Handler) (ruleUsage []*RuleUsage, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandCSSStopRuleUsageTracking, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r StopRuleUsageTrackingReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.RuleUsage, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res StopRuleUsageTrackingReturns + err = h.Execute(ctxt, cdp.CommandCSSStopRuleUsageTracking, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.RuleUsage, nil } diff --git a/cdp/css/easyjson.go b/cdp/css/easyjson.go index c5ff31f..aa01192 100644 --- a/cdp/css/easyjson.go +++ b/cdp/css/easyjson.go @@ -18,7 +18,1399 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(in *jlexer.Lexer, out *Value) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(in *jlexer.Lexer, out *EventStyleSheetRemoved) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(out *jwriter.Writer, in EventStyleSheetRemoved) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventStyleSheetRemoved) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventStyleSheetRemoved) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventStyleSheetRemoved) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventStyleSheetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(in *jlexer.Lexer, out *EventStyleSheetAdded) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "header": + if in.IsNull() { + in.Skip() + out.Header = nil + } else { + if out.Header == nil { + out.Header = new(StyleSheetHeader) + } + (*out.Header).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(out *jwriter.Writer, in EventStyleSheetAdded) { + out.RawByte('{') + first := true + _ = first + if in.Header != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"header\":") + if in.Header == nil { + out.RawString("null") + } else { + (*in.Header).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventStyleSheetAdded) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventStyleSheetAdded) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventStyleSheetAdded) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventStyleSheetAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(in *jlexer.Lexer, out *EventStyleSheetChanged) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(out *jwriter.Writer, in EventStyleSheetChanged) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventStyleSheetChanged) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventStyleSheetChanged) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventStyleSheetChanged) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventStyleSheetChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(in *jlexer.Lexer, out *EventFontsUpdated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in EventFontsUpdated) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventFontsUpdated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventFontsUpdated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventFontsUpdated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventFontsUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(in *jlexer.Lexer, out *EventMediaQueryResultChanged) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(out *jwriter.Writer, in EventMediaQueryResultChanged) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventMediaQueryResultChanged) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventMediaQueryResultChanged) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventMediaQueryResultChanged) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventMediaQueryResultChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(in *jlexer.Lexer, out *ComputedStyle) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "properties": + if in.IsNull() { + in.Skip() + out.Properties = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Properties = make([]*ComputedProperty, 0, 8) + } else { + out.Properties = []*ComputedProperty{} + } + for !in.IsDelim(']') { + var v1 *ComputedProperty + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(ComputedProperty) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Properties = append(out.Properties, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(out *jwriter.Writer, in ComputedStyle) { + out.RawByte('{') + first := true + _ = first + if len(in.Properties) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"properties\":") + if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.Properties { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ComputedStyle) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ComputedStyle) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(in *jlexer.Lexer, out *LayoutTreeNode) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "boundingBox": + if in.IsNull() { + in.Skip() + out.BoundingBox = nil + } else { + if out.BoundingBox == nil { + out.BoundingBox = new(dom.Rect) + } + (*out.BoundingBox).UnmarshalEasyJSON(in) + } + case "layoutText": + out.LayoutText = string(in.String()) + case "inlineTextNodes": + if in.IsNull() { + in.Skip() + out.InlineTextNodes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.InlineTextNodes = make([]*InlineTextBox, 0, 8) + } else { + out.InlineTextNodes = []*InlineTextBox{} + } + for !in.IsDelim(']') { + var v4 *InlineTextBox + if in.IsNull() { + in.Skip() + v4 = nil + } else { + if v4 == nil { + v4 = new(InlineTextBox) + } + (*v4).UnmarshalEasyJSON(in) + } + out.InlineTextNodes = append(out.InlineTextNodes, v4) + in.WantComma() + } + in.Delim(']') + } + case "styleIndex": + out.StyleIndex = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(out *jwriter.Writer, in LayoutTreeNode) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + if in.BoundingBox != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"boundingBox\":") + if in.BoundingBox == nil { + out.RawString("null") + } else { + (*in.BoundingBox).MarshalEasyJSON(out) + } + } + if in.LayoutText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"layoutText\":") + out.String(string(in.LayoutText)) + } + if len(in.InlineTextNodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"inlineTextNodes\":") + if in.InlineTextNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v5, v6 := range in.InlineTextNodes { + if v5 > 0 { + out.RawByte(',') + } + if v6 == nil { + out.RawString("null") + } else { + (*v6).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.StyleIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleIndex\":") + out.Int64(int64(in.StyleIndex)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v LayoutTreeNode) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(in *jlexer.Lexer, out *InlineTextBox) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "boundingBox": + if in.IsNull() { + in.Skip() + out.BoundingBox = nil + } else { + if out.BoundingBox == nil { + out.BoundingBox = new(dom.Rect) + } + (*out.BoundingBox).UnmarshalEasyJSON(in) + } + case "startCharacterIndex": + out.StartCharacterIndex = int64(in.Int64()) + case "numCharacters": + out.NumCharacters = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss7(out *jwriter.Writer, in InlineTextBox) { + out.RawByte('{') + first := true + _ = first + if in.BoundingBox != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"boundingBox\":") + if in.BoundingBox == nil { + out.RawString("null") + } else { + (*in.BoundingBox).MarshalEasyJSON(out) + } + } + if in.StartCharacterIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"startCharacterIndex\":") + out.Int64(int64(in.StartCharacterIndex)) + } + if in.NumCharacters != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"numCharacters\":") + out.Int64(int64(in.NumCharacters)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InlineTextBox) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InlineTextBox) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss8(in *jlexer.Lexer, out *StyleDeclarationEdit) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "range": + if in.IsNull() { + in.Skip() + out.Range = nil + } else { + if out.Range == nil { + out.Range = new(SourceRange) + } + (*out.Range).UnmarshalEasyJSON(in) + } + case "text": + out.Text = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss8(out *jwriter.Writer, in StyleDeclarationEdit) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + if in.Range != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"range\":") + if in.Range == nil { + out.RawString("null") + } else { + (*in.Range).MarshalEasyJSON(out) + } + } + if in.Text != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"text\":") + out.String(string(in.Text)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StyleDeclarationEdit) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StyleDeclarationEdit) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StyleDeclarationEdit) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StyleDeclarationEdit) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(in *jlexer.Lexer, out *KeyframeRule) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "origin": + (out.Origin).UnmarshalEasyJSON(in) + case "keyText": + if in.IsNull() { + in.Skip() + out.KeyText = nil + } else { + if out.KeyText == nil { + out.KeyText = new(Value) + } + (*out.KeyText).UnmarshalEasyJSON(in) + } + case "style": + if in.IsNull() { + in.Skip() + out.Style = nil + } else { + if out.Style == nil { + out.Style = new(Style) + } + (*out.Style).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(out *jwriter.Writer, in KeyframeRule) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + if in.Origin != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + (in.Origin).MarshalEasyJSON(out) + } + if in.KeyText != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyText\":") + if in.KeyText == nil { + out.RawString("null") + } else { + (*in.KeyText).MarshalEasyJSON(out) + } + } + if in.Style != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"style\":") + if in.Style == nil { + out.RawString("null") + } else { + (*in.Style).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v KeyframeRule) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v KeyframeRule) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *KeyframeRule) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *KeyframeRule) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(in *jlexer.Lexer, out *KeyframesRule) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "animationName": + if in.IsNull() { + in.Skip() + out.AnimationName = nil + } else { + if out.AnimationName == nil { + out.AnimationName = new(Value) + } + (*out.AnimationName).UnmarshalEasyJSON(in) + } + case "keyframes": + if in.IsNull() { + in.Skip() + out.Keyframes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Keyframes = make([]*KeyframeRule, 0, 8) + } else { + out.Keyframes = []*KeyframeRule{} + } + for !in.IsDelim(']') { + var v7 *KeyframeRule + if in.IsNull() { + in.Skip() + v7 = nil + } else { + if v7 == nil { + v7 = new(KeyframeRule) + } + (*v7).UnmarshalEasyJSON(in) + } + out.Keyframes = append(out.Keyframes, v7) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(out *jwriter.Writer, in KeyframesRule) { + out.RawByte('{') + first := true + _ = first + if in.AnimationName != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"animationName\":") + if in.AnimationName == nil { + out.RawString("null") + } else { + (*in.AnimationName).MarshalEasyJSON(out) + } + } + if len(in.Keyframes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyframes\":") + if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.Keyframes { + 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 KeyframesRule) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *KeyframesRule) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(in *jlexer.Lexer, out *PlatformFontUsage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "familyName": + out.FamilyName = string(in.String()) + case "isCustomFont": + out.IsCustomFont = bool(in.Bool()) + case "glyphCount": + out.GlyphCount = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss11(out *jwriter.Writer, in PlatformFontUsage) { + out.RawByte('{') + first := true + _ = first + if in.FamilyName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"familyName\":") + out.String(string(in.FamilyName)) + } + if in.IsCustomFont { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isCustomFont\":") + out.Bool(bool(in.IsCustomFont)) + } + if in.GlyphCount != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"glyphCount\":") + out.Float64(float64(in.GlyphCount)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PlatformFontUsage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PlatformFontUsage) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PlatformFontUsage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PlatformFontUsage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss12(in *jlexer.Lexer, out *MediaQueryExpression) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "value": + out.Value = float64(in.Float64()) + case "unit": + out.Unit = string(in.String()) + case "feature": + out.Feature = string(in.String()) + case "valueRange": + if in.IsNull() { + in.Skip() + out.ValueRange = nil + } else { + if out.ValueRange == nil { + out.ValueRange = new(SourceRange) + } + (*out.ValueRange).UnmarshalEasyJSON(in) + } + case "computedLength": + out.ComputedLength = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss12(out *jwriter.Writer, in MediaQueryExpression) { + out.RawByte('{') + first := true + _ = first + if in.Value != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.Float64(float64(in.Value)) + } + if in.Unit != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"unit\":") + out.String(string(in.Unit)) + } + if in.Feature != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"feature\":") + out.String(string(in.Feature)) + } + if in.ValueRange != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"valueRange\":") + if in.ValueRange == nil { + out.RawString("null") + } else { + (*in.ValueRange).MarshalEasyJSON(out) + } + } + if in.ComputedLength != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"computedLength\":") + out.Float64(float64(in.ComputedLength)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MediaQueryExpression) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MediaQueryExpression) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MediaQueryExpression) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MediaQueryExpression) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(in *jlexer.Lexer, out *MediaQuery) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "expressions": + if in.IsNull() { + in.Skip() + out.Expressions = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Expressions = make([]*MediaQueryExpression, 0, 8) + } else { + out.Expressions = []*MediaQueryExpression{} + } + for !in.IsDelim(']') { + var v10 *MediaQueryExpression + if in.IsNull() { + in.Skip() + v10 = nil + } else { + if v10 == nil { + v10 = new(MediaQueryExpression) + } + (*v10).UnmarshalEasyJSON(in) + } + out.Expressions = append(out.Expressions, v10) + in.WantComma() + } + in.Delim(']') + } + case "active": + out.Active = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss13(out *jwriter.Writer, in MediaQuery) { + out.RawByte('{') + first := true + _ = first + if len(in.Expressions) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"expressions\":") + if in.Expressions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Expressions { + if v11 > 0 { + out.RawByte(',') + } + if v12 == nil { + out.RawString("null") + } else { + (*v12).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Active { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"active\":") + out.Bool(bool(in.Active)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MediaQuery) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MediaQuery) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MediaQuery) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MediaQuery) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(in *jlexer.Lexer, out *Media) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -39,6 +1431,189 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(in *jlexer.Lexer, out *Val switch key { case "text": out.Text = string(in.String()) + case "source": + (out.Source).UnmarshalEasyJSON(in) + case "sourceURL": + out.SourceURL = string(in.String()) + case "range": + if in.IsNull() { + in.Skip() + out.Range = nil + } else { + if out.Range == nil { + out.Range = new(SourceRange) + } + (*out.Range).UnmarshalEasyJSON(in) + } + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "mediaList": + if in.IsNull() { + in.Skip() + out.MediaList = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.MediaList = make([]*MediaQuery, 0, 8) + } else { + out.MediaList = []*MediaQuery{} + } + for !in.IsDelim(']') { + var v13 *MediaQuery + if in.IsNull() { + in.Skip() + v13 = nil + } else { + if v13 == nil { + v13 = new(MediaQuery) + } + (*v13).UnmarshalEasyJSON(in) + } + out.MediaList = append(out.MediaList, v13) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(out *jwriter.Writer, in Media) { + out.RawByte('{') + first := true + _ = first + if in.Text != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"text\":") + out.String(string(in.Text)) + } + if in.Source != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"source\":") + (in.Source).MarshalEasyJSON(out) + } + if in.SourceURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sourceURL\":") + out.String(string(in.SourceURL)) + } + if in.Range != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"range\":") + if in.Range == nil { + out.RawString("null") + } else { + (*in.Range).MarshalEasyJSON(out) + } + } + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + if len(in.MediaList) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"mediaList\":") + if in.MediaList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.MediaList { + if v14 > 0 { + out.RawByte(',') + } + if v15 == nil { + out.RawString("null") + } else { + (*v15).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Media) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Media) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Media) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Media) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(in *jlexer.Lexer, out *Property) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + case "important": + out.Important = bool(in.Bool()) + case "implicit": + out.Implicit = bool(in.Bool()) + case "text": + out.Text = string(in.String()) + case "parsedOk": + out.ParsedOk = bool(in.Bool()) + case "disabled": + out.Disabled = bool(in.Bool()) case "range": if in.IsNull() { in.Skip() @@ -59,10 +1634,42 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(in *jlexer.Lexer, out *Val in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(out *jwriter.Writer, in Value) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(out *jwriter.Writer, in Property) { out.RawByte('{') first := true _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + if in.Important { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"important\":") + out.Bool(bool(in.Important)) + } + if in.Implicit { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"implicit\":") + out.Bool(bool(in.Implicit)) + } if in.Text != "" { if !first { out.RawByte(',') @@ -71,6 +1678,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(out *jwriter.Writer, in Va out.RawString("\"text\":") out.String(string(in.Text)) } + if in.ParsedOk { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parsedOk\":") + out.Bool(bool(in.ParsedOk)) + } + if in.Disabled { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"disabled\":") + out.Bool(bool(in.Disabled)) + } if in.Range != nil { if !first { out.RawByte(',') @@ -87,29 +1710,771 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(out *jwriter.Writer, in Va } // MarshalJSON supports json.Marshaler interface -func (v Value) MarshalJSON() ([]byte, error) { +func (v Property) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Value) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(w, v) +func (v Property) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Value) UnmarshalJSON(data []byte) error { +func (v *Property) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss(l, v) +func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(in *jlexer.Lexer, out *StyleSheetHeader) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(in *jlexer.Lexer, out *Style) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "cssProperties": + if in.IsNull() { + in.Skip() + out.CSSProperties = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.CSSProperties = make([]*Property, 0, 8) + } else { + out.CSSProperties = []*Property{} + } + for !in.IsDelim(']') { + var v16 *Property + if in.IsNull() { + in.Skip() + v16 = nil + } else { + if v16 == nil { + v16 = new(Property) + } + (*v16).UnmarshalEasyJSON(in) + } + out.CSSProperties = append(out.CSSProperties, v16) + in.WantComma() + } + in.Delim(']') + } + case "shorthandEntries": + if in.IsNull() { + in.Skip() + out.ShorthandEntries = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ShorthandEntries = make([]*ShorthandEntry, 0, 8) + } else { + out.ShorthandEntries = []*ShorthandEntry{} + } + for !in.IsDelim(']') { + var v17 *ShorthandEntry + if in.IsNull() { + in.Skip() + v17 = nil + } else { + if v17 == nil { + v17 = new(ShorthandEntry) + } + (*v17).UnmarshalEasyJSON(in) + } + out.ShorthandEntries = append(out.ShorthandEntries, v17) + in.WantComma() + } + in.Delim(']') + } + case "cssText": + out.CSSText = string(in.String()) + case "range": + if in.IsNull() { + in.Skip() + out.Range = nil + } else { + if out.Range == nil { + out.Range = new(SourceRange) + } + (*out.Range).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(out *jwriter.Writer, in Style) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + if len(in.CSSProperties) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cssProperties\":") + if in.CSSProperties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v18, v19 := range in.CSSProperties { + if v18 > 0 { + out.RawByte(',') + } + if v19 == nil { + out.RawString("null") + } else { + (*v19).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.ShorthandEntries) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"shorthandEntries\":") + if in.ShorthandEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v20, v21 := range in.ShorthandEntries { + if v20 > 0 { + out.RawByte(',') + } + if v21 == nil { + out.RawString("null") + } else { + (*v21).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.CSSText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cssText\":") + out.String(string(in.CSSText)) + } + if in.Range != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"range\":") + if in.Range == nil { + out.RawString("null") + } else { + (*in.Range).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Style) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Style) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Style) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Style) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(in *jlexer.Lexer, out *ComputedProperty) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(out *jwriter.Writer, in ComputedProperty) { + out.RawByte('{') + first := true + _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ComputedProperty) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ComputedProperty) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ComputedProperty) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ComputedProperty) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(in *jlexer.Lexer, out *ShorthandEntry) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + case "important": + out.Important = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(out *jwriter.Writer, in ShorthandEntry) { + out.RawByte('{') + first := true + _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + if in.Important { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"important\":") + out.Bool(bool(in.Important)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ShorthandEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ShorthandEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ShorthandEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ShorthandEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(in *jlexer.Lexer, out *SourceRange) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "startLine": + out.StartLine = int64(in.Int64()) + case "startColumn": + out.StartColumn = int64(in.Int64()) + case "endLine": + out.EndLine = int64(in.Int64()) + case "endColumn": + out.EndColumn = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss19(out *jwriter.Writer, in SourceRange) { + out.RawByte('{') + first := true + _ = first + if in.StartLine != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"startLine\":") + out.Int64(int64(in.StartLine)) + } + if in.StartColumn != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"startColumn\":") + out.Int64(int64(in.StartColumn)) + } + if in.EndLine != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"endLine\":") + out.Int64(int64(in.EndLine)) + } + if in.EndColumn != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"endColumn\":") + out.Int64(int64(in.EndColumn)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SourceRange) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SourceRange) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SourceRange) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SourceRange) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss20(in *jlexer.Lexer, out *RuleUsage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "range": + if in.IsNull() { + in.Skip() + out.Range = nil + } else { + if out.Range == nil { + out.Range = new(SourceRange) + } + (*out.Range).UnmarshalEasyJSON(in) + } + case "used": + out.Used = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss20(out *jwriter.Writer, in RuleUsage) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + if in.Range != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"range\":") + if in.Range == nil { + out.RawString("null") + } else { + (*in.Range).MarshalEasyJSON(out) + } + } + if in.Used { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"used\":") + out.Bool(bool(in.Used)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RuleUsage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RuleUsage) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RuleUsage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RuleUsage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(in *jlexer.Lexer, out *Rule) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "selectorList": + if in.IsNull() { + in.Skip() + out.SelectorList = nil + } else { + if out.SelectorList == nil { + out.SelectorList = new(SelectorList) + } + (*out.SelectorList).UnmarshalEasyJSON(in) + } + case "origin": + (out.Origin).UnmarshalEasyJSON(in) + case "style": + if in.IsNull() { + in.Skip() + out.Style = nil + } else { + if out.Style == nil { + out.Style = new(Style) + } + (*out.Style).UnmarshalEasyJSON(in) + } + case "media": + if in.IsNull() { + in.Skip() + out.Media = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Media = make([]*Media, 0, 8) + } else { + out.Media = []*Media{} + } + for !in.IsDelim(']') { + var v22 *Media + if in.IsNull() { + in.Skip() + v22 = nil + } else { + if v22 == nil { + v22 = new(Media) + } + (*v22).UnmarshalEasyJSON(in) + } + out.Media = append(out.Media, v22) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(out *jwriter.Writer, in Rule) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + if in.SelectorList != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"selectorList\":") + if in.SelectorList == nil { + out.RawString("null") + } else { + (*in.SelectorList).MarshalEasyJSON(out) + } + } + if in.Origin != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + (in.Origin).MarshalEasyJSON(out) + } + if in.Style != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"style\":") + if in.Style == nil { + out.RawString("null") + } else { + (*in.Style).MarshalEasyJSON(out) + } + } + if len(in.Media) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"media\":") + if in.Media == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v23, v24 := range in.Media { + if v23 > 0 { + out.RawByte(',') + } + if v24 == nil { + out.RawString("null") + } else { + (*v24).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Rule) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Rule) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Rule) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Rule) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss22(in *jlexer.Lexer, out *StyleSheetHeader) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -162,7 +2527,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(out *jwriter.Writer, in StyleSheetHeader) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(out *jwriter.Writer, in StyleSheetHeader) { out.RawByte('{') first := true _ = first @@ -268,27 +2633,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(out *jwriter.Writer, in S // MarshalJSON supports json.Marshaler interface func (v StyleSheetHeader) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StyleSheetHeader) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StyleSheetHeader) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss22(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StyleSheetHeader) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss22(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(in *jlexer.Lexer, out *StyleDeclarationEdit) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(in *jlexer.Lexer, out *SelectorList) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -307,17 +2672,32 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(in *jlexer.Lexer, out *St continue } switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - case "range": + case "selectors": if in.IsNull() { in.Skip() - out.Range = nil + out.Selectors = nil } else { - if out.Range == nil { - out.Range = new(SourceRange) + in.Delim('[') + if !in.IsDelim(']') { + out.Selectors = make([]*Value, 0, 8) + } else { + out.Selectors = []*Value{} } - (*out.Range).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v25 *Value + if in.IsNull() { + in.Skip() + v25 = nil + } else { + if v25 == nil { + v25 = new(Value) + } + (*v25).UnmarshalEasyJSON(in) + } + out.Selectors = append(out.Selectors, v25) + in.WantComma() + } + in.Delim(']') } case "text": out.Text = string(in.String()) @@ -331,28 +2711,31 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(out *jwriter.Writer, in StyleDeclarationEdit) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(out *jwriter.Writer, in SelectorList) { out.RawByte('{') first := true _ = first - if in.StyleSheetID != "" { + if len(in.Selectors) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - if in.Range != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"range\":") - if in.Range == nil { + out.RawString("\"selectors\":") + if in.Selectors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { - (*in.Range).MarshalEasyJSON(out) + out.RawByte('[') + for v26, v27 := range in.Selectors { + if v26 > 0 { + out.RawByte(',') + } + if v27 == nil { + out.RawString("null") + } else { + (*v27).MarshalEasyJSON(out) + } + } + out.RawByte(']') } } if in.Text != "" { @@ -367,29 +2750,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(out *jwriter.Writer, in S } // MarshalJSON supports json.Marshaler interface -func (v StyleDeclarationEdit) MarshalJSON() ([]byte, error) { +func (v SelectorList) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v StyleDeclarationEdit) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss2(w, v) +func (v SelectorList) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *StyleDeclarationEdit) UnmarshalJSON(data []byte) error { +func (v *SelectorList) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StyleDeclarationEdit) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss2(l, v) +func (v *SelectorList) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(in *jlexer.Lexer, out *Style) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss24(in *jlexer.Lexer, out *Value) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -408,64 +2791,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(in *jlexer.Lexer, out *St continue } switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - case "cssProperties": - if in.IsNull() { - in.Skip() - out.CSSProperties = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.CSSProperties = make([]*Property, 0, 8) - } else { - out.CSSProperties = []*Property{} - } - for !in.IsDelim(']') { - var v1 *Property - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(Property) - } - (*v1).UnmarshalEasyJSON(in) - } - out.CSSProperties = append(out.CSSProperties, v1) - in.WantComma() - } - in.Delim(']') - } - case "shorthandEntries": - if in.IsNull() { - in.Skip() - out.ShorthandEntries = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ShorthandEntries = make([]*ShorthandEntry, 0, 8) - } else { - out.ShorthandEntries = []*ShorthandEntry{} - } - for !in.IsDelim(']') { - var v2 *ShorthandEntry - if in.IsNull() { - in.Skip() - v2 = nil - } else { - if v2 == nil { - v2 = new(ShorthandEntry) - } - (*v2).UnmarshalEasyJSON(in) - } - out.ShorthandEntries = append(out.ShorthandEntries, v2) - in.WantComma() - } - in.Delim(']') - } - case "cssText": - out.CSSText = string(in.String()) + case "text": + out.Text = string(in.String()) case "range": if in.IsNull() { in.Skip() @@ -486,71 +2813,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in Style) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(out *jwriter.Writer, in Value) { out.RawByte('{') first := true _ = first - if in.StyleSheetID != "" { + if in.Text != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - if len(in.CSSProperties) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cssProperties\":") - if in.CSSProperties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v3, v4 := range in.CSSProperties { - if v3 > 0 { - out.RawByte(',') - } - if v4 == nil { - out.RawString("null") - } else { - (*v4).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.ShorthandEntries) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"shorthandEntries\":") - if in.ShorthandEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v5, v6 := range in.ShorthandEntries { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.CSSText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cssText\":") - out.String(string(in.CSSText)) + out.RawString("\"text\":") + out.String(string(in.Text)) } if in.Range != nil { if !first { @@ -568,29 +2841,398 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in S } // MarshalJSON supports json.Marshaler interface -func (v Style) MarshalJSON() ([]byte, error) { +func (v Value) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Style) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(w, v) +func (v Value) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Style) UnmarshalJSON(data []byte) error { +func (v *Value) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss24(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Style) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss3(l, v) +func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss24(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(in *jlexer.Lexer, out *StopRuleUsageTrackingReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss25(in *jlexer.Lexer, out *RuleMatch) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "rule": + if in.IsNull() { + in.Skip() + out.Rule = nil + } else { + if out.Rule == nil { + out.Rule = new(Rule) + } + (*out.Rule).UnmarshalEasyJSON(in) + } + case "matchingSelectors": + if in.IsNull() { + in.Skip() + out.MatchingSelectors = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.MatchingSelectors = make([]int64, 0, 8) + } else { + out.MatchingSelectors = []int64{} + } + for !in.IsDelim(']') { + var v28 int64 + v28 = int64(in.Int64()) + out.MatchingSelectors = append(out.MatchingSelectors, v28) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(out *jwriter.Writer, in RuleMatch) { + out.RawByte('{') + first := true + _ = first + if in.Rule != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"rule\":") + if in.Rule == nil { + out.RawString("null") + } else { + (*in.Rule).MarshalEasyJSON(out) + } + } + if len(in.MatchingSelectors) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"matchingSelectors\":") + if in.MatchingSelectors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v29, v30 := range in.MatchingSelectors { + if v29 > 0 { + out.RawByte(',') + } + out.Int64(int64(v30)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RuleMatch) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RuleMatch) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RuleMatch) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss25(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RuleMatch) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss25(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss26(in *jlexer.Lexer, out *InheritedStyleEntry) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "inlineStyle": + if in.IsNull() { + in.Skip() + out.InlineStyle = nil + } else { + if out.InlineStyle == nil { + out.InlineStyle = new(Style) + } + (*out.InlineStyle).UnmarshalEasyJSON(in) + } + case "matchedCSSRules": + if in.IsNull() { + in.Skip() + out.MatchedCSSRules = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.MatchedCSSRules = make([]*RuleMatch, 0, 8) + } else { + out.MatchedCSSRules = []*RuleMatch{} + } + for !in.IsDelim(']') { + var v31 *RuleMatch + if in.IsNull() { + in.Skip() + v31 = nil + } else { + if v31 == nil { + v31 = new(RuleMatch) + } + (*v31).UnmarshalEasyJSON(in) + } + out.MatchedCSSRules = append(out.MatchedCSSRules, v31) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(out *jwriter.Writer, in InheritedStyleEntry) { + out.RawByte('{') + first := true + _ = first + if in.InlineStyle != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"inlineStyle\":") + if in.InlineStyle == nil { + out.RawString("null") + } else { + (*in.InlineStyle).MarshalEasyJSON(out) + } + } + if len(in.MatchedCSSRules) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"matchedCSSRules\":") + if in.MatchedCSSRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v32, v33 := range in.MatchedCSSRules { + if v32 > 0 { + out.RawByte(',') + } + if v33 == nil { + out.RawString("null") + } else { + (*v33).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InheritedStyleEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InheritedStyleEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InheritedStyleEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss26(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InheritedStyleEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss26(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss27(in *jlexer.Lexer, out *PseudoElementMatches) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "pseudoType": + (out.PseudoType).UnmarshalEasyJSON(in) + case "matches": + if in.IsNull() { + in.Skip() + out.Matches = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Matches = make([]*RuleMatch, 0, 8) + } else { + out.Matches = []*RuleMatch{} + } + for !in.IsDelim(']') { + var v34 *RuleMatch + if in.IsNull() { + in.Skip() + v34 = nil + } else { + if v34 == nil { + v34 = new(RuleMatch) + } + (*v34).UnmarshalEasyJSON(in) + } + out.Matches = append(out.Matches, v34) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(out *jwriter.Writer, in PseudoElementMatches) { + out.RawByte('{') + first := true + _ = first + if in.PseudoType != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pseudoType\":") + (in.PseudoType).MarshalEasyJSON(out) + } + if len(in.Matches) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"matches\":") + if in.Matches == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v35, v36 := range in.Matches { + if v35 > 0 { + out.RawByte(',') + } + if v36 == nil { + out.RawString("null") + } else { + (*v36).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PseudoElementMatches) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PseudoElementMatches) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PseudoElementMatches) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PseudoElementMatches) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss27(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss28(in *jlexer.Lexer, out *StopRuleUsageTrackingReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -621,17 +3263,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(in *jlexer.Lexer, out *St out.RuleUsage = []*RuleUsage{} } for !in.IsDelim(']') { - var v7 *RuleUsage + var v37 *RuleUsage if in.IsNull() { in.Skip() - v7 = nil + v37 = nil } else { - if v7 == nil { - v7 = new(RuleUsage) + if v37 == nil { + v37 = new(RuleUsage) } - (*v7).UnmarshalEasyJSON(in) + (*v37).UnmarshalEasyJSON(in) } - out.RuleUsage = append(out.RuleUsage, v7) + out.RuleUsage = append(out.RuleUsage, v37) in.WantComma() } in.Delim(']') @@ -646,7 +3288,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(out *jwriter.Writer, in StopRuleUsageTrackingReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(out *jwriter.Writer, in StopRuleUsageTrackingReturns) { out.RawByte('{') first := true _ = first @@ -660,14 +3302,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(out *jwriter.Writer, in S out.RawString("null") } else { out.RawByte('[') - for v8, v9 := range in.RuleUsage { - if v8 > 0 { + for v38, v39 := range in.RuleUsage { + if v38 > 0 { out.RawByte(',') } - if v9 == nil { + if v39 == nil { out.RawString("null") } else { - (*v9).MarshalEasyJSON(out) + (*v39).MarshalEasyJSON(out) } } out.RawByte(']') @@ -679,27 +3321,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(out *jwriter.Writer, in S // MarshalJSON supports json.Marshaler interface func (v StopRuleUsageTrackingReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StopRuleUsageTrackingReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StopRuleUsageTrackingReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss28(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StopRuleUsageTrackingReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss4(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss28(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(in *jlexer.Lexer, out *StopRuleUsageTrackingParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss29(in *jlexer.Lexer, out *StopRuleUsageTrackingParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -728,7 +3370,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(out *jwriter.Writer, in StopRuleUsageTrackingParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(out *jwriter.Writer, in StopRuleUsageTrackingParams) { out.RawByte('{') first := true _ = first @@ -738,27 +3380,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(out *jwriter.Writer, in S // MarshalJSON supports json.Marshaler interface func (v StopRuleUsageTrackingParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StopRuleUsageTrackingParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StopRuleUsageTrackingParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss29(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StopRuleUsageTrackingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss5(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss29(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(in *jlexer.Lexer, out *StartRuleUsageTrackingParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss30(in *jlexer.Lexer, out *StartRuleUsageTrackingParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -787,7 +3429,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(out *jwriter.Writer, in StartRuleUsageTrackingParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(out *jwriter.Writer, in StartRuleUsageTrackingParams) { out.RawByte('{') first := true _ = first @@ -797,27 +3439,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(out *jwriter.Writer, in S // MarshalJSON supports json.Marshaler interface func (v StartRuleUsageTrackingParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StartRuleUsageTrackingParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss6(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StartRuleUsageTrackingParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss30(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StartRuleUsageTrackingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss6(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss30(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(in *jlexer.Lexer, out *SourceRange) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(in *jlexer.Lexer, out *GetLayoutTreeAndStylesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -836,217 +3478,56 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(in *jlexer.Lexer, out *So continue } switch key { - case "startLine": - out.StartLine = int64(in.Int64()) - case "startColumn": - out.StartColumn = int64(in.Int64()) - case "endLine": - out.EndLine = int64(in.Int64()) - case "endColumn": - out.EndColumn = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss7(out *jwriter.Writer, in SourceRange) { - out.RawByte('{') - first := true - _ = first - if in.StartLine != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startLine\":") - out.Int64(int64(in.StartLine)) - } - if in.StartColumn != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startColumn\":") - out.Int64(int64(in.StartColumn)) - } - if in.EndLine != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endLine\":") - out.Int64(int64(in.EndLine)) - } - if in.EndColumn != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endColumn\":") - out.Int64(int64(in.EndColumn)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SourceRange) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SourceRange) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SourceRange) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SourceRange) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss8(in *jlexer.Lexer, out *ShorthandEntry) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - case "value": - out.Value = string(in.String()) - case "important": - out.Important = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss8(out *jwriter.Writer, in ShorthandEntry) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - } - if in.Important { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"important\":") - out.Bool(bool(in.Important)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ShorthandEntry) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ShorthandEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ShorthandEntry) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ShorthandEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(in *jlexer.Lexer, out *SetStyleTextsReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styles": + case "layoutTreeNodes": if in.IsNull() { in.Skip() - out.Styles = nil + out.LayoutTreeNodes = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.Styles = make([]*Style, 0, 8) + out.LayoutTreeNodes = make([]*LayoutTreeNode, 0, 8) } else { - out.Styles = []*Style{} + out.LayoutTreeNodes = []*LayoutTreeNode{} } for !in.IsDelim(']') { - var v10 *Style + var v40 *LayoutTreeNode if in.IsNull() { in.Skip() - v10 = nil + v40 = nil } else { - if v10 == nil { - v10 = new(Style) + if v40 == nil { + v40 = new(LayoutTreeNode) } - (*v10).UnmarshalEasyJSON(in) + (*v40).UnmarshalEasyJSON(in) } - out.Styles = append(out.Styles, v10) + out.LayoutTreeNodes = append(out.LayoutTreeNodes, v40) + in.WantComma() + } + in.Delim(']') + } + case "computedStyles": + if in.IsNull() { + in.Skip() + out.ComputedStyles = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ComputedStyles = make([]*ComputedStyle, 0, 8) + } else { + out.ComputedStyles = []*ComputedStyle{} + } + for !in.IsDelim(']') { + var v41 *ComputedStyle + if in.IsNull() { + in.Skip() + v41 = nil + } else { + if v41 == nil { + v41 = new(ComputedStyle) + } + (*v41).UnmarshalEasyJSON(in) + } + out.ComputedStyles = append(out.ComputedStyles, v41) in.WantComma() } in.Delim(']') @@ -1061,28 +3542,51 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(in *jlexer.Lexer, out *Se in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(out *jwriter.Writer, in SetStyleTextsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(out *jwriter.Writer, in GetLayoutTreeAndStylesReturns) { out.RawByte('{') first := true _ = first - if len(in.Styles) != 0 { + if len(in.LayoutTreeNodes) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"styles\":") - if in.Styles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"layoutTreeNodes\":") + if in.LayoutTreeNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v11, v12 := range in.Styles { - if v11 > 0 { + for v42, v43 := range in.LayoutTreeNodes { + if v42 > 0 { out.RawByte(',') } - if v12 == nil { + if v43 == nil { out.RawString("null") } else { - (*v12).MarshalEasyJSON(out) + (*v43).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.ComputedStyles) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"computedStyles\":") + if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v44, v45 := range in.ComputedStyles { + if v44 > 0 { + out.RawByte(',') + } + if v45 == nil { + out.RawString("null") + } else { + (*v45).MarshalEasyJSON(out) } } out.RawByte(']') @@ -1092,29 +3596,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(out *jwriter.Writer, in S } // MarshalJSON supports json.Marshaler interface -func (v SetStyleTextsReturns) MarshalJSON() ([]byte, error) { +func (v GetLayoutTreeAndStylesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetStyleTextsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(w, v) +func (v GetLayoutTreeAndStylesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetStyleTextsReturns) UnmarshalJSON(data []byte) error { +func (v *GetLayoutTreeAndStylesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetStyleTextsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss9(l, v) +func (v *GetLayoutTreeAndStylesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(in *jlexer.Lexer, out *SetStyleTextsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(in *jlexer.Lexer, out *GetLayoutTreeAndStylesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1133,29 +3637,21 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(in *jlexer.Lexer, out *S continue } switch key { - case "edits": + case "computedStyleWhitelist": if in.IsNull() { in.Skip() - out.Edits = nil + out.ComputedStyleWhitelist = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.Edits = make([]*StyleDeclarationEdit, 0, 8) + out.ComputedStyleWhitelist = make([]string, 0, 4) } else { - out.Edits = []*StyleDeclarationEdit{} + out.ComputedStyleWhitelist = []string{} } for !in.IsDelim(']') { - var v13 *StyleDeclarationEdit - if in.IsNull() { - in.Skip() - v13 = nil - } else { - if v13 == nil { - v13 = new(StyleDeclarationEdit) - } - (*v13).UnmarshalEasyJSON(in) - } - out.Edits = append(out.Edits, v13) + var v46 string + v46 = string(in.String()) + out.ComputedStyleWhitelist = append(out.ComputedStyleWhitelist, v46) in.WantComma() } in.Delim(']') @@ -1170,7 +3666,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(out *jwriter.Writer, in SetStyleTextsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in GetLayoutTreeAndStylesParams) { out.RawByte('{') first := true _ = first @@ -1178,20 +3674,16 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(out *jwriter.Writer, in out.RawByte(',') } first = false - out.RawString("\"edits\":") - if in.Edits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"computedStyleWhitelist\":") + if in.ComputedStyleWhitelist == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v14, v15 := range in.Edits { - if v14 > 0 { + for v47, v48 := range in.ComputedStyleWhitelist { + if v47 > 0 { out.RawByte(',') } - if v15 == nil { - out.RawString("null") - } else { - (*v15).MarshalEasyJSON(out) - } + out.String(string(v48)) } out.RawByte(']') } @@ -1199,29 +3691,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v SetStyleTextsParams) MarshalJSON() ([]byte, error) { +func (v GetLayoutTreeAndStylesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetStyleTextsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(w, v) +func (v GetLayoutTreeAndStylesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetStyleTextsParams) UnmarshalJSON(data []byte) error { +func (v *GetLayoutTreeAndStylesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetStyleTextsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss10(l, v) +func (v *GetLayoutTreeAndStylesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(in *jlexer.Lexer, out *SetStyleSheetTextReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *GetBackgroundColorsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1240,159 +3732,24 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(in *jlexer.Lexer, out *S continue } switch key { - case "sourceMapURL": - out.SourceMapURL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss11(out *jwriter.Writer, in SetStyleSheetTextReturns) { - out.RawByte('{') - first := true - _ = first - if in.SourceMapURL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sourceMapURL\":") - out.String(string(in.SourceMapURL)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetStyleSheetTextReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetStyleSheetTextReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetStyleSheetTextReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetStyleSheetTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss12(in *jlexer.Lexer, out *SetStyleSheetTextParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - case "text": - out.Text = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss12(out *jwriter.Writer, in SetStyleSheetTextParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetStyleSheetTextParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetStyleSheetTextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetStyleSheetTextParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetStyleSheetTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(in *jlexer.Lexer, out *SetRuleSelectorReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "selectorList": + case "backgroundColors": if in.IsNull() { in.Skip() - out.SelectorList = nil + out.BackgroundColors = nil } else { - if out.SelectorList == nil { - out.SelectorList = new(SelectorList) + in.Delim('[') + if !in.IsDelim(']') { + out.BackgroundColors = make([]string, 0, 4) + } else { + out.BackgroundColors = []string{} } - (*out.SelectorList).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v49 string + v49 = string(in.String()) + out.BackgroundColors = append(out.BackgroundColors, v49) + in.WantComma() + } + in.Delim(']') } default: in.SkipRecursive() @@ -1404,49 +3761,558 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss13(out *jwriter.Writer, in SetRuleSelectorReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in GetBackgroundColorsReturns) { out.RawByte('{') first := true _ = first - if in.SelectorList != nil { + if len(in.BackgroundColors) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"selectorList\":") - if in.SelectorList == nil { + out.RawString("\"backgroundColors\":") + if in.BackgroundColors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { - (*in.SelectorList).MarshalEasyJSON(out) + out.RawByte('[') + for v50, v51 := range in.BackgroundColors { + if v50 > 0 { + out.RawByte(',') + } + out.String(string(v51)) + } + out.RawByte(']') } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetRuleSelectorReturns) MarshalJSON() ([]byte, error) { +func (v GetBackgroundColorsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss13(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetRuleSelectorReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss13(w, v) +func (v GetBackgroundColorsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetRuleSelectorReturns) UnmarshalJSON(data []byte) error { +func (v *GetBackgroundColorsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetRuleSelectorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss13(l, v) +func (v *GetBackgroundColorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(in *jlexer.Lexer, out *SetRuleSelectorParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *GetBackgroundColorsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in GetBackgroundColorsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetBackgroundColorsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetBackgroundColorsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetBackgroundColorsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetBackgroundColorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(in *jlexer.Lexer, out *SetEffectivePropertyValueForNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "propertyName": + out.PropertyName = string(in.String()) + case "value": + out.Value = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in SetEffectivePropertyValueForNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"propertyName\":") + out.String(string(in.PropertyName)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetEffectivePropertyValueForNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetEffectivePropertyValueForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetEffectivePropertyValueForNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetEffectivePropertyValueForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *GetMediaQueriesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "medias": + if in.IsNull() { + in.Skip() + out.Medias = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Medias = make([]*Media, 0, 8) + } else { + out.Medias = []*Media{} + } + for !in.IsDelim(']') { + var v52 *Media + if in.IsNull() { + in.Skip() + v52 = nil + } else { + if v52 == nil { + v52 = new(Media) + } + (*v52).UnmarshalEasyJSON(in) + } + out.Medias = append(out.Medias, v52) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in GetMediaQueriesReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Medias) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"medias\":") + if in.Medias == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v53, v54 := range in.Medias { + if v53 > 0 { + out.RawByte(',') + } + if v54 == nil { + out.RawString("null") + } else { + (*v54).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetMediaQueriesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetMediaQueriesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetMediaQueriesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetMediaQueriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *GetMediaQueriesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in GetMediaQueriesParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetMediaQueriesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetMediaQueriesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetMediaQueriesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetMediaQueriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(in *jlexer.Lexer, out *ForcePseudoStateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "forcedPseudoClasses": + if in.IsNull() { + in.Skip() + out.ForcedPseudoClasses = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ForcedPseudoClasses = make([]PseudoClass, 0, 4) + } else { + out.ForcedPseudoClasses = []PseudoClass{} + } + for !in.IsDelim(']') { + var v55 PseudoClass + (v55).UnmarshalEasyJSON(in) + out.ForcedPseudoClasses = append(out.ForcedPseudoClasses, v55) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(out *jwriter.Writer, in ForcePseudoStateParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"forcedPseudoClasses\":") + if in.ForcedPseudoClasses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v56, v57 := range in.ForcedPseudoClasses { + if v56 > 0 { + out.RawByte(',') + } + (v57).MarshalEasyJSON(out) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ForcePseudoStateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ForcePseudoStateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ForcePseudoStateParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ForcePseudoStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(in *jlexer.Lexer, out *AddRuleReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "rule": + if in.IsNull() { + in.Skip() + out.Rule = nil + } else { + if out.Rule == nil { + out.Rule = new(Rule) + } + (*out.Rule).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(out *jwriter.Writer, in AddRuleReturns) { + out.RawByte('{') + first := true + _ = first + if in.Rule != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"rule\":") + if in.Rule == nil { + out.RawString("null") + } else { + (*in.Rule).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddRuleReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddRuleReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddRuleReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddRuleReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(in *jlexer.Lexer, out *AddRuleParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1467,18 +4333,18 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(in *jlexer.Lexer, out *S switch key { case "styleSheetId": out.StyleSheetID = StyleSheetID(in.String()) - case "range": + case "ruleText": + out.RuleText = string(in.String()) + case "location": if in.IsNull() { in.Skip() - out.Range = nil + out.Location = nil } else { - if out.Range == nil { - out.Range = new(SourceRange) + if out.Location == nil { + out.Location = new(SourceRange) } - (*out.Range).UnmarshalEasyJSON(in) + (*out.Location).UnmarshalEasyJSON(in) } - case "selector": - out.Selector = string(in.String()) default: in.SkipRecursive() } @@ -1489,7 +4355,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(out *jwriter.Writer, in SetRuleSelectorParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(out *jwriter.Writer, in AddRuleParams) { out.RawByte('{') first := true _ = first @@ -1503,45 +4369,181 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(out *jwriter.Writer, in out.RawByte(',') } first = false - out.RawString("\"range\":") - if in.Range == nil { - out.RawString("null") - } else { - (*in.Range).MarshalEasyJSON(out) - } + out.RawString("\"ruleText\":") + out.String(string(in.RuleText)) if !first { out.RawByte(',') } first = false - out.RawString("\"selector\":") - out.String(string(in.Selector)) + out.RawString("\"location\":") + if in.Location == nil { + out.RawString("null") + } else { + (*in.Location).MarshalEasyJSON(out) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetRuleSelectorParams) MarshalJSON() ([]byte, error) { +func (v AddRuleParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetRuleSelectorParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss14(w, v) +func (v AddRuleParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetRuleSelectorParams) UnmarshalJSON(data []byte) error { +func (v *AddRuleParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetRuleSelectorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss14(l, v) +func (v *AddRuleParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(in *jlexer.Lexer, out *SetMediaTextReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(in *jlexer.Lexer, out *CreateStyleSheetReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(out *jwriter.Writer, in CreateStyleSheetReturns) { + out.RawByte('{') + first := true + _ = first + if in.StyleSheetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CreateStyleSheetReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CreateStyleSheetReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CreateStyleSheetReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CreateStyleSheetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(in *jlexer.Lexer, out *CreateStyleSheetParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(out *jwriter.Writer, in CreateStyleSheetParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CreateStyleSheetParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CreateStyleSheetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CreateStyleSheetParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CreateStyleSheetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *SetMediaTextReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1580,7 +4582,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(out *jwriter.Writer, in SetMediaTextReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in SetMediaTextReturns) { out.RawByte('{') first := true _ = first @@ -1602,27 +4604,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v SetMediaTextReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetMediaTextReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss15(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetMediaTextReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetMediaTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss15(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(in *jlexer.Lexer, out *SetMediaTextParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(in *jlexer.Lexer, out *SetMediaTextParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1665,7 +4667,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(out *jwriter.Writer, in SetMediaTextParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(out *jwriter.Writer, in SetMediaTextParams) { out.RawByte('{') first := true _ = first @@ -1697,27 +4699,243 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v SetMediaTextParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetMediaTextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss16(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetMediaTextParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetMediaTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss16(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(in *jlexer.Lexer, out *SetKeyframeKeyReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(in *jlexer.Lexer, out *SetStyleTextsReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styles": + if in.IsNull() { + in.Skip() + out.Styles = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Styles = make([]*Style, 0, 8) + } else { + out.Styles = []*Style{} + } + for !in.IsDelim(']') { + var v58 *Style + if in.IsNull() { + in.Skip() + v58 = nil + } else { + if v58 == nil { + v58 = new(Style) + } + (*v58).UnmarshalEasyJSON(in) + } + out.Styles = append(out.Styles, v58) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(out *jwriter.Writer, in SetStyleTextsReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Styles) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styles\":") + if in.Styles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v59, v60 := range in.Styles { + if v59 > 0 { + out.RawByte(',') + } + if v60 == nil { + out.RawString("null") + } else { + (*v60).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetStyleTextsReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetStyleTextsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetStyleTextsReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetStyleTextsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(in *jlexer.Lexer, out *SetStyleTextsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "edits": + if in.IsNull() { + in.Skip() + out.Edits = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Edits = make([]*StyleDeclarationEdit, 0, 8) + } else { + out.Edits = []*StyleDeclarationEdit{} + } + for !in.IsDelim(']') { + var v61 *StyleDeclarationEdit + if in.IsNull() { + in.Skip() + v61 = nil + } else { + if v61 == nil { + v61 = new(StyleDeclarationEdit) + } + (*v61).UnmarshalEasyJSON(in) + } + out.Edits = append(out.Edits, v61) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(out *jwriter.Writer, in SetStyleTextsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"edits\":") + if in.Edits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v62, v63 := range in.Edits { + if v62 > 0 { + out.RawByte(',') + } + if v63 == nil { + out.RawString("null") + } else { + (*v63).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetStyleTextsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetStyleTextsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetStyleTextsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetStyleTextsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(in *jlexer.Lexer, out *SetKeyframeKeyReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1756,7 +4974,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(out *jwriter.Writer, in SetKeyframeKeyReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(out *jwriter.Writer, in SetKeyframeKeyReturns) { out.RawByte('{') first := true _ = first @@ -1778,27 +4996,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v SetKeyframeKeyReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetKeyframeKeyReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss17(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetKeyframeKeyReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetKeyframeKeyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss17(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(in *jlexer.Lexer, out *SetKeyframeKeyParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(in *jlexer.Lexer, out *SetKeyframeKeyParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1841,7 +5059,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(out *jwriter.Writer, in SetKeyframeKeyParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(out *jwriter.Writer, in SetKeyframeKeyParams) { out.RawByte('{') first := true _ = first @@ -1873,27 +5091,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v SetKeyframeKeyParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetKeyframeKeyParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss18(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetKeyframeKeyParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetKeyframeKeyParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss18(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(in *jlexer.Lexer, out *SetEffectivePropertyValueForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *SetRuleSelectorReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1912,430 +5130,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(in *jlexer.Lexer, out *S continue } switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "propertyName": - out.PropertyName = string(in.String()) - case "value": - out.Value = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss19(out *jwriter.Writer, in SetEffectivePropertyValueForNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"propertyName\":") - out.String(string(in.PropertyName)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetEffectivePropertyValueForNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetEffectivePropertyValueForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetEffectivePropertyValueForNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetEffectivePropertyValueForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss20(in *jlexer.Lexer, out *SelectorList) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "selectors": - if in.IsNull() { - in.Skip() - out.Selectors = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Selectors = make([]*Value, 0, 8) - } else { - out.Selectors = []*Value{} - } - for !in.IsDelim(']') { - var v16 *Value - if in.IsNull() { - in.Skip() - v16 = nil - } else { - if v16 == nil { - v16 = new(Value) - } - (*v16).UnmarshalEasyJSON(in) - } - out.Selectors = append(out.Selectors, v16) - in.WantComma() - } - in.Delim(']') - } - case "text": - out.Text = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss20(out *jwriter.Writer, in SelectorList) { - out.RawByte('{') - first := true - _ = first - if len(in.Selectors) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"selectors\":") - if in.Selectors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.Selectors { - if v17 > 0 { - out.RawByte(',') - } - if v18 == nil { - out.RawString("null") - } else { - (*v18).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Text != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SelectorList) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss20(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SelectorList) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss20(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SelectorList) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss20(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SelectorList) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss20(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(in *jlexer.Lexer, out *RuleUsage) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - case "range": - if in.IsNull() { - in.Skip() - out.Range = nil - } else { - if out.Range == nil { - out.Range = new(SourceRange) - } - (*out.Range).UnmarshalEasyJSON(in) - } - case "used": - out.Used = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(out *jwriter.Writer, in RuleUsage) { - out.RawByte('{') - first := true - _ = first - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - if in.Range != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"range\":") - if in.Range == nil { - out.RawString("null") - } else { - (*in.Range).MarshalEasyJSON(out) - } - } - if in.Used { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"used\":") - out.Bool(bool(in.Used)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RuleUsage) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RuleUsage) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RuleUsage) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RuleUsage) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss22(in *jlexer.Lexer, out *RuleMatch) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "rule": - if in.IsNull() { - in.Skip() - out.Rule = nil - } else { - if out.Rule == nil { - out.Rule = new(Rule) - } - (*out.Rule).UnmarshalEasyJSON(in) - } - case "matchingSelectors": - if in.IsNull() { - in.Skip() - out.MatchingSelectors = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.MatchingSelectors = make([]int64, 0, 8) - } else { - out.MatchingSelectors = []int64{} - } - for !in.IsDelim(']') { - var v19 int64 - v19 = int64(in.Int64()) - out.MatchingSelectors = append(out.MatchingSelectors, v19) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(out *jwriter.Writer, in RuleMatch) { - out.RawByte('{') - first := true - _ = first - if in.Rule != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"rule\":") - if in.Rule == nil { - out.RawString("null") - } else { - (*in.Rule).MarshalEasyJSON(out) - } - } - if len(in.MatchingSelectors) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"matchingSelectors\":") - if in.MatchingSelectors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v20, v21 := range in.MatchingSelectors { - if v20 > 0 { - out.RawByte(',') - } - out.Int64(int64(v21)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RuleMatch) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RuleMatch) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RuleMatch) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RuleMatch) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(in *jlexer.Lexer, out *Rule) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) case "selectorList": if in.IsNull() { in.Skip() @@ -2346,45 +5140,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(in *jlexer.Lexer, out *R } (*out.SelectorList).UnmarshalEasyJSON(in) } - case "origin": - (out.Origin).UnmarshalEasyJSON(in) - case "style": - if in.IsNull() { - in.Skip() - out.Style = nil - } else { - if out.Style == nil { - out.Style = new(Style) - } - (*out.Style).UnmarshalEasyJSON(in) - } - case "media": - if in.IsNull() { - in.Skip() - out.Media = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Media = make([]*Media, 0, 8) - } else { - out.Media = []*Media{} - } - for !in.IsDelim(']') { - var v22 *Media - if in.IsNull() { - in.Skip() - v22 = nil - } else { - if v22 == nil { - v22 = new(Media) - } - (*v22).UnmarshalEasyJSON(in) - } - out.Media = append(out.Media, v22) - in.WantComma() - } - in.Delim(']') - } default: in.SkipRecursive() } @@ -2395,18 +5150,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(in *jlexer.Lexer, out *R in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(out *jwriter.Writer, in Rule) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in SetRuleSelectorReturns) { out.RawByte('{') first := true _ = first - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } if in.SelectorList != nil { if !first { out.RawByte(',') @@ -2419,1138 +5166,33 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(out *jwriter.Writer, in (*in.SelectorList).MarshalEasyJSON(out) } } - if in.Origin != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"origin\":") - (in.Origin).MarshalEasyJSON(out) - } - if in.Style != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"style\":") - if in.Style == nil { - out.RawString("null") - } else { - (*in.Style).MarshalEasyJSON(out) - } - } - if len(in.Media) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"media\":") - if in.Media == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v23, v24 := range in.Media { - if v23 > 0 { - out.RawByte(',') - } - if v24 == nil { - out.RawString("null") - } else { - (*v24).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v Rule) MarshalJSON() ([]byte, error) { +func (v SetRuleSelectorReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Rule) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(w, v) +func (v SetRuleSelectorReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Rule) UnmarshalJSON(data []byte) error { +func (v *SetRuleSelectorReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Rule) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss23(l, v) +func (v *SetRuleSelectorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss24(in *jlexer.Lexer, out *PseudoElementMatches) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "pseudoType": - (out.PseudoType).UnmarshalEasyJSON(in) - case "matches": - if in.IsNull() { - in.Skip() - out.Matches = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Matches = make([]*RuleMatch, 0, 8) - } else { - out.Matches = []*RuleMatch{} - } - for !in.IsDelim(']') { - var v25 *RuleMatch - if in.IsNull() { - in.Skip() - v25 = nil - } else { - if v25 == nil { - v25 = new(RuleMatch) - } - (*v25).UnmarshalEasyJSON(in) - } - out.Matches = append(out.Matches, v25) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(out *jwriter.Writer, in PseudoElementMatches) { - out.RawByte('{') - first := true - _ = first - if in.PseudoType != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pseudoType\":") - (in.PseudoType).MarshalEasyJSON(out) - } - if len(in.Matches) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"matches\":") - if in.Matches == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v26, v27 := range in.Matches { - if v26 > 0 { - out.RawByte(',') - } - if v27 == nil { - out.RawString("null") - } else { - (*v27).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PseudoElementMatches) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PseudoElementMatches) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PseudoElementMatches) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss24(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PseudoElementMatches) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss24(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss25(in *jlexer.Lexer, out *Property) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - case "value": - out.Value = string(in.String()) - case "important": - out.Important = bool(in.Bool()) - case "implicit": - out.Implicit = bool(in.Bool()) - case "text": - out.Text = string(in.String()) - case "parsedOk": - out.ParsedOk = bool(in.Bool()) - case "disabled": - out.Disabled = bool(in.Bool()) - case "range": - if in.IsNull() { - in.Skip() - out.Range = nil - } else { - if out.Range == nil { - out.Range = new(SourceRange) - } - (*out.Range).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(out *jwriter.Writer, in Property) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - } - if in.Important { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"important\":") - out.Bool(bool(in.Important)) - } - if in.Implicit { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"implicit\":") - out.Bool(bool(in.Implicit)) - } - if in.Text != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - } - if in.ParsedOk { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parsedOk\":") - out.Bool(bool(in.ParsedOk)) - } - if in.Disabled { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"disabled\":") - out.Bool(bool(in.Disabled)) - } - if in.Range != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"range\":") - if in.Range == nil { - out.RawString("null") - } else { - (*in.Range).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Property) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Property) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Property) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss26(in *jlexer.Lexer, out *PlatformFontUsage) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "familyName": - out.FamilyName = string(in.String()) - case "isCustomFont": - out.IsCustomFont = bool(in.Bool()) - case "glyphCount": - out.GlyphCount = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(out *jwriter.Writer, in PlatformFontUsage) { - out.RawByte('{') - first := true - _ = first - if in.FamilyName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"familyName\":") - out.String(string(in.FamilyName)) - } - if in.IsCustomFont { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"isCustomFont\":") - out.Bool(bool(in.IsCustomFont)) - } - if in.GlyphCount != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"glyphCount\":") - out.Float64(float64(in.GlyphCount)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PlatformFontUsage) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PlatformFontUsage) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PlatformFontUsage) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss26(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PlatformFontUsage) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss26(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss27(in *jlexer.Lexer, out *MediaQueryExpression) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "value": - out.Value = float64(in.Float64()) - case "unit": - out.Unit = string(in.String()) - case "feature": - out.Feature = string(in.String()) - case "valueRange": - if in.IsNull() { - in.Skip() - out.ValueRange = nil - } else { - if out.ValueRange == nil { - out.ValueRange = new(SourceRange) - } - (*out.ValueRange).UnmarshalEasyJSON(in) - } - case "computedLength": - out.ComputedLength = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(out *jwriter.Writer, in MediaQueryExpression) { - out.RawByte('{') - first := true - _ = first - if in.Value != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.Float64(float64(in.Value)) - } - if in.Unit != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"unit\":") - out.String(string(in.Unit)) - } - if in.Feature != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"feature\":") - out.String(string(in.Feature)) - } - if in.ValueRange != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"valueRange\":") - if in.ValueRange == nil { - out.RawString("null") - } else { - (*in.ValueRange).MarshalEasyJSON(out) - } - } - if in.ComputedLength != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"computedLength\":") - out.Float64(float64(in.ComputedLength)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v MediaQueryExpression) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v MediaQueryExpression) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *MediaQueryExpression) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss27(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MediaQueryExpression) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss27(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss28(in *jlexer.Lexer, out *MediaQuery) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "expressions": - if in.IsNull() { - in.Skip() - out.Expressions = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Expressions = make([]*MediaQueryExpression, 0, 8) - } else { - out.Expressions = []*MediaQueryExpression{} - } - for !in.IsDelim(']') { - var v28 *MediaQueryExpression - if in.IsNull() { - in.Skip() - v28 = nil - } else { - if v28 == nil { - v28 = new(MediaQueryExpression) - } - (*v28).UnmarshalEasyJSON(in) - } - out.Expressions = append(out.Expressions, v28) - in.WantComma() - } - in.Delim(']') - } - case "active": - out.Active = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(out *jwriter.Writer, in MediaQuery) { - out.RawByte('{') - first := true - _ = first - if len(in.Expressions) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"expressions\":") - if in.Expressions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v29, v30 := range in.Expressions { - if v29 > 0 { - out.RawByte(',') - } - if v30 == nil { - out.RawString("null") - } else { - (*v30).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Active { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"active\":") - out.Bool(bool(in.Active)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v MediaQuery) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v MediaQuery) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *MediaQuery) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss28(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MediaQuery) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss28(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss29(in *jlexer.Lexer, out *Media) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "text": - out.Text = string(in.String()) - case "source": - (out.Source).UnmarshalEasyJSON(in) - case "sourceURL": - out.SourceURL = string(in.String()) - case "range": - if in.IsNull() { - in.Skip() - out.Range = nil - } else { - if out.Range == nil { - out.Range = new(SourceRange) - } - (*out.Range).UnmarshalEasyJSON(in) - } - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - case "mediaList": - if in.IsNull() { - in.Skip() - out.MediaList = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.MediaList = make([]*MediaQuery, 0, 8) - } else { - out.MediaList = []*MediaQuery{} - } - for !in.IsDelim(']') { - var v31 *MediaQuery - if in.IsNull() { - in.Skip() - v31 = nil - } else { - if v31 == nil { - v31 = new(MediaQuery) - } - (*v31).UnmarshalEasyJSON(in) - } - out.MediaList = append(out.MediaList, v31) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(out *jwriter.Writer, in Media) { - out.RawByte('{') - first := true - _ = first - if in.Text != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - } - if in.Source != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"source\":") - (in.Source).MarshalEasyJSON(out) - } - if in.SourceURL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sourceURL\":") - out.String(string(in.SourceURL)) - } - if in.Range != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"range\":") - if in.Range == nil { - out.RawString("null") - } else { - (*in.Range).MarshalEasyJSON(out) - } - } - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - if len(in.MediaList) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"mediaList\":") - if in.MediaList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v32, v33 := range in.MediaList { - if v32 > 0 { - out.RawByte(',') - } - if v33 == nil { - out.RawString("null") - } else { - (*v33).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Media) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Media) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Media) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss29(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Media) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss29(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss30(in *jlexer.Lexer, out *LayoutTreeNode) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "boundingBox": - if in.IsNull() { - in.Skip() - out.BoundingBox = nil - } else { - if out.BoundingBox == nil { - out.BoundingBox = new(dom.Rect) - } - (*out.BoundingBox).UnmarshalEasyJSON(in) - } - case "layoutText": - out.LayoutText = string(in.String()) - case "inlineTextNodes": - if in.IsNull() { - in.Skip() - out.InlineTextNodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.InlineTextNodes = make([]*InlineTextBox, 0, 8) - } else { - out.InlineTextNodes = []*InlineTextBox{} - } - for !in.IsDelim(']') { - var v34 *InlineTextBox - if in.IsNull() { - in.Skip() - v34 = nil - } else { - if v34 == nil { - v34 = new(InlineTextBox) - } - (*v34).UnmarshalEasyJSON(in) - } - out.InlineTextNodes = append(out.InlineTextNodes, v34) - in.WantComma() - } - in.Delim(']') - } - case "styleIndex": - out.StyleIndex = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(out *jwriter.Writer, in LayoutTreeNode) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - if in.BoundingBox != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"boundingBox\":") - if in.BoundingBox == nil { - out.RawString("null") - } else { - (*in.BoundingBox).MarshalEasyJSON(out) - } - } - if in.LayoutText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layoutText\":") - out.String(string(in.LayoutText)) - } - if len(in.InlineTextNodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"inlineTextNodes\":") - if in.InlineTextNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v35, v36 := range in.InlineTextNodes { - if v35 > 0 { - out.RawByte(',') - } - if v36 == nil { - out.RawString("null") - } else { - (*v36).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.StyleIndex != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleIndex\":") - out.Int64(int64(in.StyleIndex)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v LayoutTreeNode) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss30(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss30(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(in *jlexer.Lexer, out *KeyframesRule) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "animationName": - if in.IsNull() { - in.Skip() - out.AnimationName = nil - } else { - if out.AnimationName == nil { - out.AnimationName = new(Value) - } - (*out.AnimationName).UnmarshalEasyJSON(in) - } - case "keyframes": - if in.IsNull() { - in.Skip() - out.Keyframes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Keyframes = make([]*KeyframeRule, 0, 8) - } else { - out.Keyframes = []*KeyframeRule{} - } - for !in.IsDelim(']') { - var v37 *KeyframeRule - if in.IsNull() { - in.Skip() - v37 = nil - } else { - if v37 == nil { - v37 = new(KeyframeRule) - } - (*v37).UnmarshalEasyJSON(in) - } - out.Keyframes = append(out.Keyframes, v37) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(out *jwriter.Writer, in KeyframesRule) { - out.RawByte('{') - first := true - _ = first - if in.AnimationName != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"animationName\":") - if in.AnimationName == nil { - out.RawString("null") - } else { - (*in.AnimationName).MarshalEasyJSON(out) - } - } - if len(in.Keyframes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyframes\":") - if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v38, v39 := range in.Keyframes { - if v38 > 0 { - out.RawByte(',') - } - if v39 == nil { - out.RawString("null") - } else { - (*v39).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v KeyframesRule) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *KeyframesRule) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss31(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(in *jlexer.Lexer, out *KeyframeRule) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(in *jlexer.Lexer, out *SetRuleSelectorParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3571,28 +5213,18 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(in *jlexer.Lexer, out *K switch key { case "styleSheetId": out.StyleSheetID = StyleSheetID(in.String()) - case "origin": - (out.Origin).UnmarshalEasyJSON(in) - case "keyText": + case "range": if in.IsNull() { in.Skip() - out.KeyText = nil + out.Range = nil } else { - if out.KeyText == nil { - out.KeyText = new(Value) + if out.Range == nil { + out.Range = new(SourceRange) } - (*out.KeyText).UnmarshalEasyJSON(in) - } - case "style": - if in.IsNull() { - in.Skip() - out.Style = nil - } else { - if out.Style == nil { - out.Style = new(Style) - } - (*out.Style).UnmarshalEasyJSON(in) + (*out.Range).UnmarshalEasyJSON(in) } + case "selector": + out.Selector = string(in.String()) default: in.SkipRecursive() } @@ -3603,77 +5235,59 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(in *jlexer.Lexer, out *K in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in KeyframeRule) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(out *jwriter.Writer, in SetRuleSelectorParams) { out.RawByte('{') first := true _ = first - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) + if !first { + out.RawByte(',') } - if in.Origin != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"origin\":") - (in.Origin).MarshalEasyJSON(out) + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + if !first { + out.RawByte(',') } - if in.KeyText != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyText\":") - if in.KeyText == nil { - out.RawString("null") - } else { - (*in.KeyText).MarshalEasyJSON(out) - } + first = false + out.RawString("\"range\":") + if in.Range == nil { + out.RawString("null") + } else { + (*in.Range).MarshalEasyJSON(out) } - if in.Style != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"style\":") - if in.Style == nil { - out.RawString("null") - } else { - (*in.Style).MarshalEasyJSON(out) - } + if !first { + out.RawByte(',') } + first = false + out.RawString("\"selector\":") + out.String(string(in.Selector)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v KeyframeRule) MarshalJSON() ([]byte, error) { +func (v SetRuleSelectorParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v KeyframeRule) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(w, v) +func (v SetRuleSelectorParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *KeyframeRule) UnmarshalJSON(data []byte) error { +func (v *SetRuleSelectorParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *KeyframeRule) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss32(l, v) +func (v *SetRuleSelectorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *InlineTextBox) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(in *jlexer.Lexer, out *SetStyleSheetTextReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3692,20 +5306,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *I continue } switch key { - case "boundingBox": - if in.IsNull() { - in.Skip() - out.BoundingBox = nil - } else { - if out.BoundingBox == nil { - out.BoundingBox = new(dom.Rect) - } - (*out.BoundingBox).UnmarshalEasyJSON(in) - } - case "startCharacterIndex": - out.StartCharacterIndex = int64(in.Int64()) - case "numCharacters": - out.NumCharacters = int64(in.Int64()) + case "sourceMapURL": + out.SourceMapURL = string(in.String()) default: in.SkipRecursive() } @@ -3716,65 +5318,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(in *jlexer.Lexer, out *I in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in InlineTextBox) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in SetStyleSheetTextReturns) { out.RawByte('{') first := true _ = first - if in.BoundingBox != nil { + if in.SourceMapURL != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"boundingBox\":") - if in.BoundingBox == nil { - out.RawString("null") - } else { - (*in.BoundingBox).MarshalEasyJSON(out) - } - } - if in.StartCharacterIndex != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startCharacterIndex\":") - out.Int64(int64(in.StartCharacterIndex)) - } - if in.NumCharacters != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"numCharacters\":") - out.Int64(int64(in.NumCharacters)) + out.RawString("\"sourceMapURL\":") + out.String(string(in.SourceMapURL)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v InlineTextBox) MarshalJSON() ([]byte, error) { +func (v SetStyleSheetTextReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(w, v) +func (v SetStyleSheetTextReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *InlineTextBox) UnmarshalJSON(data []byte) error { +func (v *SetStyleSheetTextReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss33(l, v) +func (v *SetStyleSheetTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *InheritedStyleEntry) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(in *jlexer.Lexer, out *SetStyleSheetTextParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3793,39 +5375,96 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *I continue } switch key { - case "inlineStyle": + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + case "text": + out.Text = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(out *jwriter.Writer, in SetStyleSheetTextParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"text\":") + out.String(string(in.Text)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetStyleSheetTextParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetStyleSheetTextParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetStyleSheetTextParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetStyleSheetTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(in *jlexer.Lexer, out *CollectClassNamesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "classNames": if in.IsNull() { in.Skip() - out.InlineStyle = nil - } else { - if out.InlineStyle == nil { - out.InlineStyle = new(Style) - } - (*out.InlineStyle).UnmarshalEasyJSON(in) - } - case "matchedCSSRules": - if in.IsNull() { - in.Skip() - out.MatchedCSSRules = nil + out.ClassNames = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.MatchedCSSRules = make([]*RuleMatch, 0, 8) + out.ClassNames = make([]string, 0, 4) } else { - out.MatchedCSSRules = []*RuleMatch{} + out.ClassNames = []string{} } for !in.IsDelim(']') { - var v40 *RuleMatch - if in.IsNull() { - in.Skip() - v40 = nil - } else { - if v40 == nil { - v40 = new(RuleMatch) - } - (*v40).UnmarshalEasyJSON(in) - } - out.MatchedCSSRules = append(out.MatchedCSSRules, v40) + var v64 string + v64 = string(in.String()) + out.ClassNames = append(out.ClassNames, v64) in.WantComma() } in.Delim(']') @@ -3840,41 +5479,25 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(in *jlexer.Lexer, out *I in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in InheritedStyleEntry) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in CollectClassNamesReturns) { out.RawByte('{') first := true _ = first - if in.InlineStyle != nil { + if len(in.ClassNames) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"inlineStyle\":") - if in.InlineStyle == nil { - out.RawString("null") - } else { - (*in.InlineStyle).MarshalEasyJSON(out) - } - } - if len(in.MatchedCSSRules) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"matchedCSSRules\":") - if in.MatchedCSSRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"classNames\":") + if in.ClassNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v41, v42 := range in.MatchedCSSRules { - if v41 > 0 { + for v65, v66 := range in.ClassNames { + if v65 > 0 { out.RawByte(',') } - if v42 == nil { - out.RawString("null") - } else { - (*v42).MarshalEasyJSON(out) - } + out.String(string(v66)) } out.RawByte(']') } @@ -3883,29 +5506,96 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v InheritedStyleEntry) MarshalJSON() ([]byte, error) { +func (v CollectClassNamesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v InheritedStyleEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(w, v) +func (v CollectClassNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *InheritedStyleEntry) UnmarshalJSON(data []byte) error { +func (v *CollectClassNamesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *InheritedStyleEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss34(l, v) +func (v *CollectClassNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(in *jlexer.Lexer, out *GetStyleSheetTextReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(in *jlexer.Lexer, out *CollectClassNamesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "styleSheetId": + out.StyleSheetID = StyleSheetID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(out *jwriter.Writer, in CollectClassNamesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"styleSheetId\":") + out.String(string(in.StyleSheetID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CollectClassNamesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CollectClassNamesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CollectClassNamesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CollectClassNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(in *jlexer.Lexer, out *GetStyleSheetTextReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3936,7 +5626,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in GetStyleSheetTextReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(out *jwriter.Writer, in GetStyleSheetTextReturns) { out.RawByte('{') first := true _ = first @@ -3954,27 +5644,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetStyleSheetTextReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetStyleSheetTextReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetStyleSheetTextReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetStyleSheetTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss35(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *GetStyleSheetTextParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(in *jlexer.Lexer, out *GetStyleSheetTextParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4005,7 +5695,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in GetStyleSheetTextParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(out *jwriter.Writer, in GetStyleSheetTextParams) { out.RawByte('{') first := true _ = first @@ -4021,27 +5711,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetStyleSheetTextParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetStyleSheetTextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss36(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetStyleSheetTextParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetStyleSheetTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss36(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *GetPlatformFontsForNodeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(in *jlexer.Lexer, out *GetPlatformFontsForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4072,17 +5762,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *G out.Fonts = []*PlatformFontUsage{} } for !in.IsDelim(']') { - var v43 *PlatformFontUsage + var v67 *PlatformFontUsage if in.IsNull() { in.Skip() - v43 = nil + v67 = nil } else { - if v43 == nil { - v43 = new(PlatformFontUsage) + if v67 == nil { + v67 = new(PlatformFontUsage) } - (*v43).UnmarshalEasyJSON(in) + (*v67).UnmarshalEasyJSON(in) } - out.Fonts = append(out.Fonts, v43) + out.Fonts = append(out.Fonts, v67) in.WantComma() } in.Delim(']') @@ -4097,7 +5787,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in GetPlatformFontsForNodeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(out *jwriter.Writer, in GetPlatformFontsForNodeReturns) { out.RawByte('{') first := true _ = first @@ -4111,14 +5801,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v44, v45 := range in.Fonts { - if v44 > 0 { + for v68, v69 := range in.Fonts { + if v68 > 0 { out.RawByte(',') } - if v45 == nil { + if v69 == nil { out.RawString("null") } else { - (*v45).MarshalEasyJSON(out) + (*v69).MarshalEasyJSON(out) } } out.RawByte(']') @@ -4130,27 +5820,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetPlatformFontsForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetPlatformFontsForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss37(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetPlatformFontsForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetPlatformFontsForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss37(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(in *jlexer.Lexer, out *GetPlatformFontsForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(in *jlexer.Lexer, out *GetPlatformFontsForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4181,7 +5871,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(out *jwriter.Writer, in GetPlatformFontsForNodeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(out *jwriter.Writer, in GetPlatformFontsForNodeParams) { out.RawByte('{') first := true _ = first @@ -4197,989 +5887,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetPlatformFontsForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetPlatformFontsForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss38(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetPlatformFontsForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetPlatformFontsForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss38(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(in *jlexer.Lexer, out *GetMediaQueriesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "medias": - if in.IsNull() { - in.Skip() - out.Medias = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Medias = make([]*Media, 0, 8) - } else { - out.Medias = []*Media{} - } - for !in.IsDelim(']') { - var v46 *Media - if in.IsNull() { - in.Skip() - v46 = nil - } else { - if v46 == nil { - v46 = new(Media) - } - (*v46).UnmarshalEasyJSON(in) - } - out.Medias = append(out.Medias, v46) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(out *jwriter.Writer, in GetMediaQueriesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Medias) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"medias\":") - if in.Medias == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v47, v48 := range in.Medias { - if v47 > 0 { - out.RawByte(',') - } - if v48 == nil { - out.RawString("null") - } else { - (*v48).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetMediaQueriesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetMediaQueriesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss39(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetMediaQueriesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetMediaQueriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss39(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(in *jlexer.Lexer, out *GetMediaQueriesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(out *jwriter.Writer, in GetMediaQueriesParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetMediaQueriesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetMediaQueriesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss40(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetMediaQueriesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetMediaQueriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss40(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(in *jlexer.Lexer, out *GetMatchedStylesForNodeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "inlineStyle": - if in.IsNull() { - in.Skip() - out.InlineStyle = nil - } else { - if out.InlineStyle == nil { - out.InlineStyle = new(Style) - } - (*out.InlineStyle).UnmarshalEasyJSON(in) - } - case "attributesStyle": - if in.IsNull() { - in.Skip() - out.AttributesStyle = nil - } else { - if out.AttributesStyle == nil { - out.AttributesStyle = new(Style) - } - (*out.AttributesStyle).UnmarshalEasyJSON(in) - } - case "matchedCSSRules": - if in.IsNull() { - in.Skip() - out.MatchedCSSRules = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.MatchedCSSRules = make([]*RuleMatch, 0, 8) - } else { - out.MatchedCSSRules = []*RuleMatch{} - } - for !in.IsDelim(']') { - var v49 *RuleMatch - if in.IsNull() { - in.Skip() - v49 = nil - } else { - if v49 == nil { - v49 = new(RuleMatch) - } - (*v49).UnmarshalEasyJSON(in) - } - out.MatchedCSSRules = append(out.MatchedCSSRules, v49) - in.WantComma() - } - in.Delim(']') - } - case "pseudoElements": - if in.IsNull() { - in.Skip() - out.PseudoElements = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.PseudoElements = make([]*PseudoElementMatches, 0, 8) - } else { - out.PseudoElements = []*PseudoElementMatches{} - } - for !in.IsDelim(']') { - var v50 *PseudoElementMatches - if in.IsNull() { - in.Skip() - v50 = nil - } else { - if v50 == nil { - v50 = new(PseudoElementMatches) - } - (*v50).UnmarshalEasyJSON(in) - } - out.PseudoElements = append(out.PseudoElements, v50) - in.WantComma() - } - in.Delim(']') - } - case "inherited": - if in.IsNull() { - in.Skip() - out.Inherited = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Inherited = make([]*InheritedStyleEntry, 0, 8) - } else { - out.Inherited = []*InheritedStyleEntry{} - } - for !in.IsDelim(']') { - var v51 *InheritedStyleEntry - if in.IsNull() { - in.Skip() - v51 = nil - } else { - if v51 == nil { - v51 = new(InheritedStyleEntry) - } - (*v51).UnmarshalEasyJSON(in) - } - out.Inherited = append(out.Inherited, v51) - in.WantComma() - } - in.Delim(']') - } - case "cssKeyframesRules": - if in.IsNull() { - in.Skip() - out.CSSKeyframesRules = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.CSSKeyframesRules = make([]*KeyframesRule, 0, 8) - } else { - out.CSSKeyframesRules = []*KeyframesRule{} - } - for !in.IsDelim(']') { - var v52 *KeyframesRule - if in.IsNull() { - in.Skip() - v52 = nil - } else { - if v52 == nil { - v52 = new(KeyframesRule) - } - (*v52).UnmarshalEasyJSON(in) - } - out.CSSKeyframesRules = append(out.CSSKeyframesRules, v52) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(out *jwriter.Writer, in GetMatchedStylesForNodeReturns) { - out.RawByte('{') - first := true - _ = first - if in.InlineStyle != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"inlineStyle\":") - if in.InlineStyle == nil { - out.RawString("null") - } else { - (*in.InlineStyle).MarshalEasyJSON(out) - } - } - if in.AttributesStyle != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"attributesStyle\":") - if in.AttributesStyle == nil { - out.RawString("null") - } else { - (*in.AttributesStyle).MarshalEasyJSON(out) - } - } - if len(in.MatchedCSSRules) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"matchedCSSRules\":") - if in.MatchedCSSRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v53, v54 := range in.MatchedCSSRules { - if v53 > 0 { - out.RawByte(',') - } - if v54 == nil { - out.RawString("null") - } else { - (*v54).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.PseudoElements) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pseudoElements\":") - if in.PseudoElements == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v55, v56 := range in.PseudoElements { - if v55 > 0 { - out.RawByte(',') - } - if v56 == nil { - out.RawString("null") - } else { - (*v56).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.Inherited) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"inherited\":") - if in.Inherited == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v57, v58 := range in.Inherited { - if v57 > 0 { - out.RawByte(',') - } - if v58 == nil { - out.RawString("null") - } else { - (*v58).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.CSSKeyframesRules) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cssKeyframesRules\":") - if in.CSSKeyframesRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v59, v60 := range in.CSSKeyframesRules { - if v59 > 0 { - out.RawByte(',') - } - if v60 == nil { - out.RawString("null") - } else { - (*v60).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetMatchedStylesForNodeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetMatchedStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss41(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetMatchedStylesForNodeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetMatchedStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss41(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(in *jlexer.Lexer, out *GetMatchedStylesForNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(out *jwriter.Writer, in GetMatchedStylesForNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetMatchedStylesForNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetMatchedStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss42(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetMatchedStylesForNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetMatchedStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss42(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(in *jlexer.Lexer, out *GetLayoutTreeAndStylesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "layoutTreeNodes": - if in.IsNull() { - in.Skip() - out.LayoutTreeNodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.LayoutTreeNodes = make([]*LayoutTreeNode, 0, 8) - } else { - out.LayoutTreeNodes = []*LayoutTreeNode{} - } - for !in.IsDelim(']') { - var v61 *LayoutTreeNode - if in.IsNull() { - in.Skip() - v61 = nil - } else { - if v61 == nil { - v61 = new(LayoutTreeNode) - } - (*v61).UnmarshalEasyJSON(in) - } - out.LayoutTreeNodes = append(out.LayoutTreeNodes, v61) - in.WantComma() - } - in.Delim(']') - } - case "computedStyles": - if in.IsNull() { - in.Skip() - out.ComputedStyles = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ComputedStyles = make([]*ComputedStyle, 0, 8) - } else { - out.ComputedStyles = []*ComputedStyle{} - } - for !in.IsDelim(']') { - var v62 *ComputedStyle - if in.IsNull() { - in.Skip() - v62 = nil - } else { - if v62 == nil { - v62 = new(ComputedStyle) - } - (*v62).UnmarshalEasyJSON(in) - } - out.ComputedStyles = append(out.ComputedStyles, v62) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(out *jwriter.Writer, in GetLayoutTreeAndStylesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.LayoutTreeNodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layoutTreeNodes\":") - if in.LayoutTreeNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v63, v64 := range in.LayoutTreeNodes { - if v63 > 0 { - out.RawByte(',') - } - if v64 == nil { - out.RawString("null") - } else { - (*v64).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.ComputedStyles) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"computedStyles\":") - if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v65, v66 := range in.ComputedStyles { - if v65 > 0 { - out.RawByte(',') - } - if v66 == nil { - out.RawString("null") - } else { - (*v66).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetLayoutTreeAndStylesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetLayoutTreeAndStylesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss43(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetLayoutTreeAndStylesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetLayoutTreeAndStylesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss43(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(in *jlexer.Lexer, out *GetLayoutTreeAndStylesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "computedStyleWhitelist": - if in.IsNull() { - in.Skip() - out.ComputedStyleWhitelist = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ComputedStyleWhitelist = make([]string, 0, 4) - } else { - out.ComputedStyleWhitelist = []string{} - } - for !in.IsDelim(']') { - var v67 string - v67 = string(in.String()) - out.ComputedStyleWhitelist = append(out.ComputedStyleWhitelist, v67) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(out *jwriter.Writer, in GetLayoutTreeAndStylesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"computedStyleWhitelist\":") - if in.ComputedStyleWhitelist == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v68, v69 := range in.ComputedStyleWhitelist { - if v68 > 0 { - out.RawByte(',') - } - out.String(string(v69)) - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetLayoutTreeAndStylesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetLayoutTreeAndStylesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss44(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetLayoutTreeAndStylesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetLayoutTreeAndStylesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss44(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(in *jlexer.Lexer, out *GetInlineStylesForNodeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "inlineStyle": - if in.IsNull() { - in.Skip() - out.InlineStyle = nil - } else { - if out.InlineStyle == nil { - out.InlineStyle = new(Style) - } - (*out.InlineStyle).UnmarshalEasyJSON(in) - } - case "attributesStyle": - if in.IsNull() { - in.Skip() - out.AttributesStyle = nil - } else { - if out.AttributesStyle == nil { - out.AttributesStyle = new(Style) - } - (*out.AttributesStyle).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(out *jwriter.Writer, in GetInlineStylesForNodeReturns) { - out.RawByte('{') - first := true - _ = first - if in.InlineStyle != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"inlineStyle\":") - if in.InlineStyle == nil { - out.RawString("null") - } else { - (*in.InlineStyle).MarshalEasyJSON(out) - } - } - if in.AttributesStyle != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"attributesStyle\":") - if in.AttributesStyle == nil { - out.RawString("null") - } else { - (*in.AttributesStyle).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetInlineStylesForNodeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetInlineStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss45(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetInlineStylesForNodeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetInlineStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss45(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(in *jlexer.Lexer, out *GetInlineStylesForNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(out *jwriter.Writer, in GetInlineStylesForNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetInlineStylesForNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetInlineStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss46(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetInlineStylesForNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetInlineStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss46(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(in *jlexer.Lexer, out *GetComputedStyleForNodeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(in *jlexer.Lexer, out *GetComputedStyleForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5235,7 +5963,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(out *jwriter.Writer, in GetComputedStyleForNodeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(out *jwriter.Writer, in GetComputedStyleForNodeReturns) { out.RawByte('{') first := true _ = first @@ -5268,27 +5996,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetComputedStyleForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetComputedStyleForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss47(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetComputedStyleForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetComputedStyleForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss47(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(in *jlexer.Lexer, out *GetComputedStyleForNodeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(in *jlexer.Lexer, out *GetComputedStyleForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5319,7 +6047,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(out *jwriter.Writer, in GetComputedStyleForNodeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(out *jwriter.Writer, in GetComputedStyleForNodeParams) { out.RawByte('{') first := true _ = first @@ -5335,27 +6063,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetComputedStyleForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetComputedStyleForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss48(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetComputedStyleForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetComputedStyleForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss48(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *GetBackgroundColorsReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(in *jlexer.Lexer, out *GetInlineStylesForNodeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5374,21 +6102,300 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *G continue } switch key { - case "backgroundColors": + case "inlineStyle": if in.IsNull() { in.Skip() - out.BackgroundColors = nil + out.InlineStyle = nil + } else { + if out.InlineStyle == nil { + out.InlineStyle = new(Style) + } + (*out.InlineStyle).UnmarshalEasyJSON(in) + } + case "attributesStyle": + if in.IsNull() { + in.Skip() + out.AttributesStyle = nil + } else { + if out.AttributesStyle == nil { + out.AttributesStyle = new(Style) + } + (*out.AttributesStyle).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(out *jwriter.Writer, in GetInlineStylesForNodeReturns) { + out.RawByte('{') + first := true + _ = first + if in.InlineStyle != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"inlineStyle\":") + if in.InlineStyle == nil { + out.RawString("null") + } else { + (*in.InlineStyle).MarshalEasyJSON(out) + } + } + if in.AttributesStyle != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"attributesStyle\":") + if in.AttributesStyle == nil { + out.RawString("null") + } else { + (*in.AttributesStyle).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetInlineStylesForNodeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetInlineStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetInlineStylesForNodeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetInlineStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(in *jlexer.Lexer, out *GetInlineStylesForNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(out *jwriter.Writer, in GetInlineStylesForNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetInlineStylesForNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetInlineStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetInlineStylesForNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetInlineStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(in *jlexer.Lexer, out *GetMatchedStylesForNodeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "inlineStyle": + if in.IsNull() { + in.Skip() + out.InlineStyle = nil + } else { + if out.InlineStyle == nil { + out.InlineStyle = new(Style) + } + (*out.InlineStyle).UnmarshalEasyJSON(in) + } + case "attributesStyle": + if in.IsNull() { + in.Skip() + out.AttributesStyle = nil + } else { + if out.AttributesStyle == nil { + out.AttributesStyle = new(Style) + } + (*out.AttributesStyle).UnmarshalEasyJSON(in) + } + case "matchedCSSRules": + if in.IsNull() { + in.Skip() + out.MatchedCSSRules = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.BackgroundColors = make([]string, 0, 4) + out.MatchedCSSRules = make([]*RuleMatch, 0, 8) } else { - out.BackgroundColors = []string{} + out.MatchedCSSRules = []*RuleMatch{} } for !in.IsDelim(']') { - var v73 string - v73 = string(in.String()) - out.BackgroundColors = append(out.BackgroundColors, v73) + var v73 *RuleMatch + if in.IsNull() { + in.Skip() + v73 = nil + } else { + if v73 == nil { + v73 = new(RuleMatch) + } + (*v73).UnmarshalEasyJSON(in) + } + out.MatchedCSSRules = append(out.MatchedCSSRules, v73) + in.WantComma() + } + in.Delim(']') + } + case "pseudoElements": + if in.IsNull() { + in.Skip() + out.PseudoElements = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.PseudoElements = make([]*PseudoElementMatches, 0, 8) + } else { + out.PseudoElements = []*PseudoElementMatches{} + } + for !in.IsDelim(']') { + var v74 *PseudoElementMatches + if in.IsNull() { + in.Skip() + v74 = nil + } else { + if v74 == nil { + v74 = new(PseudoElementMatches) + } + (*v74).UnmarshalEasyJSON(in) + } + out.PseudoElements = append(out.PseudoElements, v74) + in.WantComma() + } + in.Delim(']') + } + case "inherited": + if in.IsNull() { + in.Skip() + out.Inherited = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Inherited = make([]*InheritedStyleEntry, 0, 8) + } else { + out.Inherited = []*InheritedStyleEntry{} + } + for !in.IsDelim(']') { + var v75 *InheritedStyleEntry + if in.IsNull() { + in.Skip() + v75 = nil + } else { + if v75 == nil { + v75 = new(InheritedStyleEntry) + } + (*v75).UnmarshalEasyJSON(in) + } + out.Inherited = append(out.Inherited, v75) + in.WantComma() + } + in.Delim(']') + } + case "cssKeyframesRules": + if in.IsNull() { + in.Skip() + out.CSSKeyframesRules = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.CSSKeyframesRules = make([]*KeyframesRule, 0, 8) + } else { + out.CSSKeyframesRules = []*KeyframesRule{} + } + for !in.IsDelim(']') { + var v76 *KeyframesRule + if in.IsNull() { + in.Skip() + v76 = nil + } else { + if v76 == nil { + v76 = new(KeyframesRule) + } + (*v76).UnmarshalEasyJSON(in) + } + out.CSSKeyframesRules = append(out.CSSKeyframesRules, v76) in.WantComma() } in.Delim(']') @@ -5403,25 +6410,122 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in GetBackgroundColorsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(out *jwriter.Writer, in GetMatchedStylesForNodeReturns) { out.RawByte('{') first := true _ = first - if len(in.BackgroundColors) != 0 { + if in.InlineStyle != nil { if !first { out.RawByte(',') } first = false - out.RawString("\"backgroundColors\":") - if in.BackgroundColors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"inlineStyle\":") + if in.InlineStyle == nil { + out.RawString("null") + } else { + (*in.InlineStyle).MarshalEasyJSON(out) + } + } + if in.AttributesStyle != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"attributesStyle\":") + if in.AttributesStyle == nil { + out.RawString("null") + } else { + (*in.AttributesStyle).MarshalEasyJSON(out) + } + } + if len(in.MatchedCSSRules) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"matchedCSSRules\":") + if in.MatchedCSSRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v74, v75 := range in.BackgroundColors { - if v74 > 0 { + for v77, v78 := range in.MatchedCSSRules { + if v77 > 0 { out.RawByte(',') } - out.String(string(v75)) + if v78 == nil { + out.RawString("null") + } else { + (*v78).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.PseudoElements) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pseudoElements\":") + if in.PseudoElements == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v79, v80 := range in.PseudoElements { + if v79 > 0 { + out.RawByte(',') + } + if v80 == nil { + out.RawString("null") + } else { + (*v80).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.Inherited) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"inherited\":") + if in.Inherited == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v81, v82 := range in.Inherited { + if v81 > 0 { + out.RawByte(',') + } + if v82 == nil { + out.RawString("null") + } else { + (*v82).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.CSSKeyframesRules) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cssKeyframesRules\":") + if in.CSSKeyframesRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v83, v84 := range in.CSSKeyframesRules { + if v83 > 0 { + out.RawByte(',') + } + if v84 == nil { + out.RawString("null") + } else { + (*v84).MarshalEasyJSON(out) + } } out.RawByte(']') } @@ -5430,29 +6534,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v GetBackgroundColorsReturns) MarshalJSON() ([]byte, error) { +func (v GetMatchedStylesForNodeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetBackgroundColorsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss49(w, v) +func (v GetMatchedStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetBackgroundColorsReturns) UnmarshalJSON(data []byte) error { +func (v *GetMatchedStylesForNodeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetBackgroundColorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss49(l, v) +func (v *GetMatchedStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(in *jlexer.Lexer, out *GetBackgroundColorsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(in *jlexer.Lexer, out *GetMatchedStylesForNodeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5483,7 +6587,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(out *jwriter.Writer, in GetBackgroundColorsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(out *jwriter.Writer, in GetMatchedStylesForNodeParams) { out.RawByte('{') first := true _ = first @@ -5497,351 +6601,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v GetBackgroundColorsParams) MarshalJSON() ([]byte, error) { +func (v GetMatchedStylesForNodeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetBackgroundColorsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss50(w, v) +func (v GetMatchedStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetBackgroundColorsParams) UnmarshalJSON(data []byte) error { +func (v *GetMatchedStylesForNodeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetBackgroundColorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss50(l, v) +func (v *GetMatchedStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(in *jlexer.Lexer, out *ForcePseudoStateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "forcedPseudoClasses": - if in.IsNull() { - in.Skip() - out.ForcedPseudoClasses = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ForcedPseudoClasses = make([]PseudoClass, 0, 4) - } else { - out.ForcedPseudoClasses = []PseudoClass{} - } - for !in.IsDelim(']') { - var v76 PseudoClass - (v76).UnmarshalEasyJSON(in) - out.ForcedPseudoClasses = append(out.ForcedPseudoClasses, v76) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in ForcePseudoStateParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"forcedPseudoClasses\":") - if in.ForcedPseudoClasses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v77, v78 := range in.ForcedPseudoClasses { - if v77 > 0 { - out.RawByte(',') - } - (v78).MarshalEasyJSON(out) - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ForcePseudoStateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ForcePseudoStateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ForcePseudoStateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ForcePseudoStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss51(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(in *jlexer.Lexer, out *EventStyleSheetRemoved) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(out *jwriter.Writer, in EventStyleSheetRemoved) { - out.RawByte('{') - first := true - _ = first - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventStyleSheetRemoved) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventStyleSheetRemoved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventStyleSheetRemoved) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventStyleSheetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss52(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(in *jlexer.Lexer, out *EventStyleSheetChanged) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in EventStyleSheetChanged) { - out.RawByte('{') - first := true - _ = first - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventStyleSheetChanged) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventStyleSheetChanged) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventStyleSheetChanged) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventStyleSheetChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss53(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(in *jlexer.Lexer, out *EventStyleSheetAdded) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "header": - if in.IsNull() { - in.Skip() - out.Header = nil - } else { - if out.Header == nil { - out.Header = new(StyleSheetHeader) - } - (*out.Header).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(out *jwriter.Writer, in EventStyleSheetAdded) { - out.RawByte('{') - first := true - _ = first - if in.Header != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"header\":") - if in.Header == nil { - out.RawString("null") - } else { - (*in.Header).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventStyleSheetAdded) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventStyleSheetAdded) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss54(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventStyleSheetAdded) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventStyleSheetAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss54(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(in *jlexer.Lexer, out *EventMediaQueryResultChanged) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5870,184 +6652,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(out *jwriter.Writer, in EventMediaQueryResultChanged) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventMediaQueryResultChanged) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventMediaQueryResultChanged) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss55(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventMediaQueryResultChanged) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventMediaQueryResultChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss55(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(in *jlexer.Lexer, out *EventFontsUpdated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(out *jwriter.Writer, in EventFontsUpdated) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventFontsUpdated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventFontsUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss56(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventFontsUpdated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventFontsUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss56(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss57(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss57(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first @@ -6056,597 +6661,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v DisableParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss58(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss58(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(in *jlexer.Lexer, out *CreateStyleSheetReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(out *jwriter.Writer, in CreateStyleSheetReturns) { - out.RawByte('{') - first := true - _ = first - if in.StyleSheetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CreateStyleSheetReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CreateStyleSheetReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss59(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CreateStyleSheetReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CreateStyleSheetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss59(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(in *jlexer.Lexer, out *CreateStyleSheetParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(out *jwriter.Writer, in CreateStyleSheetParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CreateStyleSheetParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CreateStyleSheetParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CreateStyleSheetParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CreateStyleSheetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss60(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(in *jlexer.Lexer, out *ComputedStyle) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "properties": - if in.IsNull() { - in.Skip() - out.Properties = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Properties = make([]*ComputedProperty, 0, 8) - } else { - out.Properties = []*ComputedProperty{} - } - for !in.IsDelim(']') { - var v79 *ComputedProperty - if in.IsNull() { - in.Skip() - v79 = nil - } else { - if v79 == nil { - v79 = new(ComputedProperty) - } - (*v79).UnmarshalEasyJSON(in) - } - out.Properties = append(out.Properties, v79) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(out *jwriter.Writer, in ComputedStyle) { - out.RawByte('{') - first := true - _ = first - if len(in.Properties) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"properties\":") - if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v80, v81 := range in.Properties { - if v80 > 0 { - out.RawByte(',') - } - if v81 == nil { - out.RawString("null") - } else { - (*v81).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ComputedStyle) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss61(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ComputedStyle) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss61(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(in *jlexer.Lexer, out *ComputedProperty) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - case "value": - out.Value = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(out *jwriter.Writer, in ComputedProperty) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ComputedProperty) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ComputedProperty) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss62(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ComputedProperty) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ComputedProperty) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss62(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(in *jlexer.Lexer, out *CollectClassNamesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "classNames": - if in.IsNull() { - in.Skip() - out.ClassNames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ClassNames = make([]string, 0, 4) - } else { - out.ClassNames = []string{} - } - for !in.IsDelim(']') { - var v82 string - v82 = string(in.String()) - out.ClassNames = append(out.ClassNames, v82) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(out *jwriter.Writer, in CollectClassNamesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.ClassNames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"classNames\":") - if in.ClassNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v83, v84 := range in.ClassNames { - if v83 > 0 { - out.RawByte(',') - } - out.String(string(v84)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CollectClassNamesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CollectClassNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss63(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CollectClassNamesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CollectClassNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss63(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(in *jlexer.Lexer, out *CollectClassNamesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(out *jwriter.Writer, in CollectClassNamesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CollectClassNamesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CollectClassNamesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss64(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CollectClassNamesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CollectClassNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss64(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(in *jlexer.Lexer, out *AddRuleReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "rule": - if in.IsNull() { - in.Skip() - out.Rule = nil - } else { - if out.Rule == nil { - out.Rule = new(Rule) - } - (*out.Rule).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(out *jwriter.Writer, in AddRuleReturns) { - out.RawByte('{') - first := true - _ = first - if in.Rule != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"rule\":") - if in.Rule == nil { - out.RawString("null") - } else { - (*in.Rule).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AddRuleReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddRuleReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss65(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AddRuleReturns) UnmarshalJSON(data []byte) error { +func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddRuleReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss65(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(in *jlexer.Lexer, out *AddRuleParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6665,20 +6701,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(in *jlexer.Lexer, out *A continue } switch key { - case "styleSheetId": - out.StyleSheetID = StyleSheetID(in.String()) - case "ruleText": - out.RuleText = string(in.String()) - case "location": - if in.IsNull() { - in.Skip() - out.Location = nil - } else { - if out.Location == nil { - out.Location = new(SourceRange) - } - (*out.Location).UnmarshalEasyJSON(in) - } default: in.SkipRecursive() } @@ -6689,55 +6711,33 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(in *jlexer.Lexer, out *A in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(out *jwriter.Writer, in AddRuleParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"styleSheetId\":") - out.String(string(in.StyleSheetID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"ruleText\":") - out.String(string(in.RuleText)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"location\":") - if in.Location == nil { - out.RawString("null") - } else { - (*in.Location).MarshalEasyJSON(out) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v AddRuleParams) MarshalJSON() ([]byte, error) { +func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddRuleParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss66(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AddRuleParams) UnmarshalJSON(data []byte) error { +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddRuleParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss66(l, v) } diff --git a/cdp/database/database.go b/cdp/database/database.go index 3ce2bb8..efaf4fb 100644 --- a/cdp/database/database.go +++ b/cdp/database/database.go @@ -26,33 +26,7 @@ func Enable() *EnableParams { // Do executes Database.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDatabaseEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDatabaseEnable, nil, nil) } // DisableParams disables database tracking, prevents database events from @@ -68,33 +42,7 @@ func Disable() *DisableParams { // Do executes Database.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDatabaseDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDatabaseDisable, nil, nil) } // GetDatabaseTableNamesParams [no description]. @@ -123,46 +71,14 @@ type GetDatabaseTableNamesReturns struct { // returns: // tableNames func (p *GetDatabaseTableNamesParams) Do(ctxt context.Context, h cdp.Handler) (tableNames []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetDatabaseTableNamesReturns + err = h.Execute(ctxt, cdp.CommandDatabaseGetDatabaseTableNames, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDatabaseGetDatabaseTableNames, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetDatabaseTableNamesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.TableNames, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.TableNames, nil } // ExecuteSQLParams [no description]. @@ -198,44 +114,12 @@ type ExecuteSQLReturns struct { // values // sqlError func (p *ExecuteSQLParams) Do(ctxt context.Context, h cdp.Handler) (columnNames []string, values []easyjson.RawMessage, sqlError *Error, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res ExecuteSQLReturns + err = h.Execute(ctxt, cdp.CommandDatabaseExecuteSQL, p, &res) if err != nil { return nil, nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDatabaseExecuteSQL, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r ExecuteSQLReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, nil, cdp.ErrInvalidResult - } - - return r.ColumnNames, r.Values, r.SQLError, nil - - case error: - return nil, nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, nil, ctxt.Err() - } - - return nil, nil, nil, cdp.ErrUnknownResult + return res.ColumnNames, res.Values, res.SQLError, nil } diff --git a/cdp/database/easyjson.go b/cdp/database/easyjson.go index 3394db1..62ef1c8 100644 --- a/cdp/database/easyjson.go +++ b/cdp/database/easyjson.go @@ -17,7 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase(in *jlexer.Lexer, out *GetDatabaseTableNamesReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase(in *jlexer.Lexer, out *Error) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -36,25 +36,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase(in *jlexer.Lexer, out continue } switch key { - case "tableNames": - if in.IsNull() { - in.Skip() - out.TableNames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.TableNames = make([]string, 0, 4) - } else { - out.TableNames = []string{} - } - for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.TableNames = append(out.TableNames, v1) - in.WantComma() - } - in.Delim(']') - } + case "message": + out.Message = string(in.String()) + case "code": + out.Code = int64(in.Int64()) default: in.SkipRecursive() } @@ -65,56 +50,53 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase(out *jwriter.Writer, in GetDatabaseTableNamesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase(out *jwriter.Writer, in Error) { out.RawByte('{') first := true _ = first - if len(in.TableNames) != 0 { + if in.Message != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"tableNames\":") - if in.TableNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.TableNames { - if v2 > 0 { - out.RawByte(',') - } - out.String(string(v3)) - } - out.RawByte(']') + out.RawString("\"message\":") + out.String(string(in.Message)) + } + if in.Code != 0 { + if !first { + out.RawByte(',') } + first = false + out.RawString("\"code\":") + out.Int64(int64(in.Code)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetDatabaseTableNamesReturns) MarshalJSON() ([]byte, error) { +func (v Error) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetDatabaseTableNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v Error) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetDatabaseTableNamesReturns) UnmarshalJSON(data []byte) error { +func (v *Error) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetDatabaseTableNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase1(in *jlexer.Lexer, out *GetDatabaseTableNamesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase1(in *jlexer.Lexer, out *Database) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -133,8 +115,14 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase1(in *jlexer.Lexer, ou continue } switch key { - case "databaseId": - out.DatabaseID = ID(in.String()) + case "id": + out.ID = ID(in.String()) + case "domain": + out.Domain = string(in.String()) + case "name": + out.Name = string(in.String()) + case "version": + out.Version = string(in.String()) default: in.SkipRecursive() } @@ -145,275 +133,69 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase1(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase1(out *jwriter.Writer, in GetDatabaseTableNamesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase1(out *jwriter.Writer, in Database) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.ID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"id\":") + out.String(string(in.ID)) + } + if in.Domain != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"domain\":") + out.String(string(in.Domain)) + } + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Version != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"version\":") + out.String(string(in.Version)) } - first = false - out.RawString("\"databaseId\":") - out.String(string(in.DatabaseID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetDatabaseTableNamesParams) MarshalJSON() ([]byte, error) { +func (v Database) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetDatabaseTableNamesParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Database) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetDatabaseTableNamesParams) UnmarshalJSON(data []byte) error { +func (v *Database) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetDatabaseTableNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Database) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase2(in *jlexer.Lexer, out *ExecuteSQLReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "columnNames": - if in.IsNull() { - in.Skip() - out.ColumnNames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ColumnNames = make([]string, 0, 4) - } else { - out.ColumnNames = []string{} - } - for !in.IsDelim(']') { - var v4 string - v4 = string(in.String()) - out.ColumnNames = append(out.ColumnNames, v4) - in.WantComma() - } - in.Delim(']') - } - case "values": - if in.IsNull() { - in.Skip() - out.Values = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Values = make([]easyjson.RawMessage, 0, 2) - } else { - out.Values = []easyjson.RawMessage{} - } - for !in.IsDelim(']') { - var v5 easyjson.RawMessage - (v5).UnmarshalEasyJSON(in) - out.Values = append(out.Values, v5) - in.WantComma() - } - in.Delim(']') - } - case "sqlError": - if in.IsNull() { - in.Skip() - out.SQLError = nil - } else { - if out.SQLError == nil { - out.SQLError = new(Error) - } - (*out.SQLError).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase2(out *jwriter.Writer, in ExecuteSQLReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.ColumnNames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"columnNames\":") - if in.ColumnNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v6, v7 := range in.ColumnNames { - if v6 > 0 { - out.RawByte(',') - } - out.String(string(v7)) - } - out.RawByte(']') - } - } - if len(in.Values) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"values\":") - if in.Values == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Values { - if v8 > 0 { - out.RawByte(',') - } - (v9).MarshalEasyJSON(out) - } - out.RawByte(']') - } - } - if in.SQLError != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sqlError\":") - if in.SQLError == nil { - out.RawString("null") - } else { - (*in.SQLError).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ExecuteSQLReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ExecuteSQLReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ExecuteSQLReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ExecuteSQLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase3(in *jlexer.Lexer, out *ExecuteSQLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "databaseId": - out.DatabaseID = ID(in.String()) - case "query": - out.Query = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase3(out *jwriter.Writer, in ExecuteSQLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"databaseId\":") - out.String(string(in.DatabaseID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"query\":") - out.String(string(in.Query)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ExecuteSQLParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ExecuteSQLParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ExecuteSQLParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ExecuteSQLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase4(in *jlexer.Lexer, out *EventAddDatabase) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase2(in *jlexer.Lexer, out *EventAddDatabase) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -452,7 +234,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase4(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(out *jwriter.Writer, in EventAddDatabase) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase2(out *jwriter.Writer, in EventAddDatabase) { out.RawByte('{') first := true _ = first @@ -474,27 +256,259 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventAddDatabase) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventAddDatabase) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventAddDatabase) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAddDatabase) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase3(in *jlexer.Lexer, out *ExecuteSQLReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "columnNames": + if in.IsNull() { + in.Skip() + out.ColumnNames = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ColumnNames = make([]string, 0, 4) + } else { + out.ColumnNames = []string{} + } + for !in.IsDelim(']') { + var v1 string + v1 = string(in.String()) + out.ColumnNames = append(out.ColumnNames, v1) + in.WantComma() + } + in.Delim(']') + } + case "values": + if in.IsNull() { + in.Skip() + out.Values = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Values = make([]easyjson.RawMessage, 0, 2) + } else { + out.Values = []easyjson.RawMessage{} + } + for !in.IsDelim(']') { + var v2 easyjson.RawMessage + (v2).UnmarshalEasyJSON(in) + out.Values = append(out.Values, v2) + in.WantComma() + } + in.Delim(']') + } + case "sqlError": + if in.IsNull() { + in.Skip() + out.SQLError = nil + } else { + if out.SQLError == nil { + out.SQLError = new(Error) + } + (*out.SQLError).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase3(out *jwriter.Writer, in ExecuteSQLReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.ColumnNames) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNames\":") + if in.ColumnNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v3, v4 := range in.ColumnNames { + if v3 > 0 { + out.RawByte(',') + } + out.String(string(v4)) + } + out.RawByte(']') + } + } + if len(in.Values) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"values\":") + if in.Values == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v5, v6 := range in.Values { + if v5 > 0 { + out.RawByte(',') + } + (v6).MarshalEasyJSON(out) + } + out.RawByte(']') + } + } + if in.SQLError != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sqlError\":") + if in.SQLError == nil { + out.RawString("null") + } else { + (*in.SQLError).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ExecuteSQLReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ExecuteSQLReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ExecuteSQLReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ExecuteSQLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase4(in *jlexer.Lexer, out *ExecuteSQLParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "databaseId": + out.DatabaseID = ID(in.String()) + case "query": + out.Query = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(out *jwriter.Writer, in ExecuteSQLParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"databaseId\":") + out.String(string(in.DatabaseID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"query\":") + out.String(string(in.Query)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ExecuteSQLParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ExecuteSQLParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ExecuteSQLParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAddDatabase) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ExecuteSQLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase5(in *jlexer.Lexer, out *Error) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase5(in *jlexer.Lexer, out *GetDatabaseTableNamesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -513,10 +527,25 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase5(in *jlexer.Lexer, ou continue } switch key { - case "message": - out.Message = string(in.String()) - case "code": - out.Code = int64(in.Int64()) + case "tableNames": + if in.IsNull() { + in.Skip() + out.TableNames = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.TableNames = make([]string, 0, 4) + } else { + out.TableNames = []string{} + } + for !in.IsDelim(']') { + var v7 string + v7 = string(in.String()) + out.TableNames = append(out.TableNames, v7) + in.WantComma() + } + in.Delim(']') + } default: in.SkipRecursive() } @@ -527,53 +556,56 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase5(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase5(out *jwriter.Writer, in Error) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase5(out *jwriter.Writer, in GetDatabaseTableNamesReturns) { out.RawByte('{') first := true _ = first - if in.Message != "" { + if len(in.TableNames) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"message\":") - out.String(string(in.Message)) - } - if in.Code != 0 { - if !first { - out.RawByte(',') + out.RawString("\"tableNames\":") + if in.TableNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.TableNames { + if v8 > 0 { + out.RawByte(',') + } + out.String(string(v9)) + } + out.RawByte(']') } - first = false - out.RawString("\"code\":") - out.Int64(int64(in.Code)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v Error) MarshalJSON() ([]byte, error) { +func (v GetDatabaseTableNamesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Error) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetDatabaseTableNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Error) UnmarshalJSON(data []byte) error { +func (v *GetDatabaseTableNamesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetDatabaseTableNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase6(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase6(in *jlexer.Lexer, out *GetDatabaseTableNamesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -592,6 +624,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase6(in *jlexer.Lexer, ou continue } switch key { + case "databaseId": + out.DatabaseID = ID(in.String()) default: in.SkipRecursive() } @@ -602,34 +636,40 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase6(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase6(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase6(out *jwriter.Writer, in GetDatabaseTableNamesParams) { out.RawByte('{') first := true _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"databaseId\":") + out.String(string(in.DatabaseID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EnableParams) MarshalJSON() ([]byte, error) { +func (v GetDatabaseTableNamesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetDatabaseTableNamesParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { +func (v *GetDatabaseTableNamesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetDatabaseTableNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase6(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase7(in *jlexer.Lexer, out *DisableParams) { @@ -691,7 +731,7 @@ func (v *DisableParams) UnmarshalJSON(data []byte) error { func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase8(in *jlexer.Lexer, out *Database) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase8(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -710,14 +750,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase8(in *jlexer.Lexer, ou continue } switch key { - case "id": - out.ID = ID(in.String()) - case "domain": - out.Domain = string(in.String()) - case "name": - out.Name = string(in.String()) - case "version": - out.Version = string(in.String()) default: in.SkipRecursive() } @@ -728,65 +760,33 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase8(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase8(out *jwriter.Writer, in Database) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase8(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first - if in.ID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"id\":") - out.String(string(in.ID)) - } - if in.Domain != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"domain\":") - out.String(string(in.Domain)) - } - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Version != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"version\":") - out.String(string(in.Version)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v Database) MarshalJSON() ([]byte, error) { +func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Database) MarshalEasyJSON(w *jwriter.Writer) { +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Database) UnmarshalJSON(data []byte) error { +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Database) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDatabase8(l, v) } diff --git a/cdp/debugger/debugger.go b/cdp/debugger/debugger.go index 55361e3..d3aba52 100644 --- a/cdp/debugger/debugger.go +++ b/cdp/debugger/debugger.go @@ -15,7 +15,6 @@ import ( cdp "github.com/knq/chromedp/cdp" "github.com/knq/chromedp/cdp/runtime" - "github.com/mailru/easyjson" ) // EnableParams enables debugger for the given page. Clients should not @@ -32,33 +31,7 @@ func Enable() *EnableParams { // Do executes Debugger.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerEnable, nil, nil) } // DisableParams disables debugger for given page. @@ -72,33 +45,7 @@ func Disable() *DisableParams { // Do executes Debugger.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerDisable, nil, nil) } // SetBreakpointsActiveParams activates / deactivates all breakpoints on the @@ -120,39 +67,7 @@ func SetBreakpointsActive(active bool) *SetBreakpointsActiveParams { // Do executes Debugger.setBreakpointsActive against the provided context and // target handler. func (p *SetBreakpointsActiveParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetBreakpointsActive, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetBreakpointsActive, p, nil) } // SetSkipAllPausesParams makes page not interrupt on any pauses (breakpoint, @@ -175,39 +90,7 @@ func SetSkipAllPauses(skip bool) *SetSkipAllPausesParams { // Do executes Debugger.setSkipAllPauses against the provided context and // target handler. func (p *SetSkipAllPausesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetSkipAllPauses, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetSkipAllPauses, p, nil) } // SetBreakpointByURLParams sets JavaScript breakpoint at given location @@ -278,46 +161,14 @@ type SetBreakpointByURLReturns struct { // breakpointID - Id of the created breakpoint for further reference. // locations - List of the locations this breakpoint resolved into upon addition. func (p *SetBreakpointByURLParams) Do(ctxt context.Context, h cdp.Handler) (breakpointID BreakpointID, locations []*Location, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetBreakpointByURLReturns + err = h.Execute(ctxt, cdp.CommandDebuggerSetBreakpointByURL, p, &res) if err != nil { return "", nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetBreakpointByURL, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetBreakpointByURLReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", nil, cdp.ErrInvalidResult - } - - return r.BreakpointID, r.Locations, nil - - case error: - return "", nil, v - } - - case <-ctxt.Done(): - return "", nil, ctxt.Err() - } - - return "", nil, cdp.ErrUnknownResult + return res.BreakpointID, res.Locations, nil } // SetBreakpointParams sets JavaScript breakpoint at a given location. @@ -357,46 +208,14 @@ type SetBreakpointReturns struct { // breakpointID - Id of the created breakpoint for further reference. // actualLocation - Location this breakpoint resolved into. func (p *SetBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (breakpointID BreakpointID, actualLocation *Location, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetBreakpointReturns + err = h.Execute(ctxt, cdp.CommandDebuggerSetBreakpoint, p, &res) if err != nil { return "", nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetBreakpointReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", nil, cdp.ErrInvalidResult - } - - return r.BreakpointID, r.ActualLocation, nil - - case error: - return "", nil, v - } - - case <-ctxt.Done(): - return "", nil, ctxt.Err() - } - - return "", nil, cdp.ErrUnknownResult + return res.BreakpointID, res.ActualLocation, nil } // RemoveBreakpointParams removes JavaScript breakpoint. @@ -417,39 +236,7 @@ func RemoveBreakpoint(breakpointID BreakpointID) *RemoveBreakpointParams { // Do executes Debugger.removeBreakpoint against the provided context and // target handler. func (p *RemoveBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerRemoveBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerRemoveBreakpoint, p, nil) } // GetPossibleBreakpointsParams returns possible locations for breakpoint. @@ -488,46 +275,14 @@ type GetPossibleBreakpointsReturns struct { // returns: // locations - List of the possible breakpoint locations. func (p *GetPossibleBreakpointsParams) Do(ctxt context.Context, h cdp.Handler) (locations []*Location, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetPossibleBreakpointsReturns + err = h.Execute(ctxt, cdp.CommandDebuggerGetPossibleBreakpoints, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerGetPossibleBreakpoints, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetPossibleBreakpointsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Locations, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Locations, nil } // ContinueToLocationParams continues execution until specific location is @@ -549,39 +304,7 @@ func ContinueToLocation(location *Location) *ContinueToLocationParams { // Do executes Debugger.continueToLocation against the provided context and // target handler. func (p *ContinueToLocationParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerContinueToLocation, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerContinueToLocation, p, nil) } // StepOverParams steps over the statement. @@ -595,33 +318,7 @@ func StepOver() *StepOverParams { // Do executes Debugger.stepOver against the provided context and // target handler. func (p *StepOverParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerStepOver, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerStepOver, nil, nil) } // StepIntoParams steps into the function call. @@ -635,33 +332,7 @@ func StepInto() *StepIntoParams { // Do executes Debugger.stepInto against the provided context and // target handler. func (p *StepIntoParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerStepInto, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerStepInto, nil, nil) } // StepOutParams steps out of the function call. @@ -675,33 +346,7 @@ func StepOut() *StepOutParams { // Do executes Debugger.stepOut against the provided context and // target handler. func (p *StepOutParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerStepOut, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerStepOut, nil, nil) } // PauseParams stops on the next JavaScript statement. @@ -715,33 +360,7 @@ func Pause() *PauseParams { // Do executes Debugger.pause against the provided context and // target handler. func (p *PauseParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerPause, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerPause, nil, nil) } // ResumeParams resumes JavaScript execution. @@ -755,33 +374,7 @@ func Resume() *ResumeParams { // Do executes Debugger.resume against the provided context and // target handler. func (p *ResumeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerResume, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerResume, nil, nil) } // SearchInContentParams searches for given string in script content. @@ -827,46 +420,14 @@ type SearchInContentReturns struct { // returns: // result - List of search matches. func (p *SearchInContentParams) Do(ctxt context.Context, h cdp.Handler) (result []*SearchMatch, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SearchInContentReturns + err = h.Execute(ctxt, cdp.CommandDebuggerSearchInContent, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSearchInContent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SearchInContentReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Result, nil } // SetScriptSourceParams edits JavaScript source live. @@ -912,46 +473,14 @@ type SetScriptSourceReturns struct { // asyncStackTrace - Async stack trace, if any. // exceptionDetails - Exception details if any. func (p *SetScriptSourceParams) Do(ctxt context.Context, h cdp.Handler) (callFrames []*CallFrame, stackChanged bool, asyncStackTrace *runtime.StackTrace, exceptionDetails *runtime.ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetScriptSourceReturns + err = h.Execute(ctxt, cdp.CommandDebuggerSetScriptSource, p, &res) if err != nil { return nil, false, nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetScriptSource, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, false, nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetScriptSourceReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, false, nil, nil, cdp.ErrInvalidResult - } - - return r.CallFrames, r.StackChanged, r.AsyncStackTrace, r.ExceptionDetails, nil - - case error: - return nil, false, nil, nil, v - } - - case <-ctxt.Done(): - return nil, false, nil, nil, ctxt.Err() - } - - return nil, false, nil, nil, cdp.ErrUnknownResult + return res.CallFrames, res.StackChanged, res.AsyncStackTrace, res.ExceptionDetails, nil } // RestartFrameParams restarts particular call frame from the beginning. @@ -982,46 +511,14 @@ type RestartFrameReturns struct { // callFrames - New stack trace. // asyncStackTrace - Async stack trace, if any. func (p *RestartFrameParams) Do(ctxt context.Context, h cdp.Handler) (callFrames []*CallFrame, asyncStackTrace *runtime.StackTrace, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RestartFrameReturns + err = h.Execute(ctxt, cdp.CommandDebuggerRestartFrame, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerRestartFrame, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RestartFrameReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.CallFrames, r.AsyncStackTrace, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.CallFrames, res.AsyncStackTrace, nil } // GetScriptSourceParams returns source for the script with given id. @@ -1050,46 +547,14 @@ type GetScriptSourceReturns struct { // returns: // scriptSource - Script source. func (p *GetScriptSourceParams) Do(ctxt context.Context, h cdp.Handler) (scriptSource string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetScriptSourceReturns + err = h.Execute(ctxt, cdp.CommandDebuggerGetScriptSource, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerGetScriptSource, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetScriptSourceReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.ScriptSource, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.ScriptSource, nil } // SetPauseOnExceptionsParams defines pause on exceptions state. Can be set @@ -1114,39 +579,7 @@ func SetPauseOnExceptions(state ExceptionsState) *SetPauseOnExceptionsParams { // Do executes Debugger.setPauseOnExceptions against the provided context and // target handler. func (p *SetPauseOnExceptionsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetPauseOnExceptions, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetPauseOnExceptions, p, nil) } // EvaluateOnCallFrameParams evaluates expression on a given call frame. @@ -1227,46 +660,14 @@ type EvaluateOnCallFrameReturns struct { // result - Object wrapper for the evaluation result. // exceptionDetails - Exception details. func (p *EvaluateOnCallFrameParams) Do(ctxt context.Context, h cdp.Handler) (result *runtime.RemoteObject, exceptionDetails *runtime.ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res EvaluateOnCallFrameReturns + err = h.Execute(ctxt, cdp.CommandDebuggerEvaluateOnCallFrame, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerEvaluateOnCallFrame, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r EvaluateOnCallFrameReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.Result, r.ExceptionDetails, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.Result, res.ExceptionDetails, nil } // SetVariableValueParams changes value of variable in a callframe. @@ -1298,39 +699,7 @@ func SetVariableValue(scopeNumber int64, variableName string, newValue *runtime. // Do executes Debugger.setVariableValue against the provided context and // target handler. func (p *SetVariableValueParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetVariableValue, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetVariableValue, p, nil) } // SetAsyncCallStackDepthParams enables or disables async call stacks @@ -1352,39 +721,7 @@ func SetAsyncCallStackDepth(maxDepth int64) *SetAsyncCallStackDepthParams { // Do executes Debugger.setAsyncCallStackDepth against the provided context and // target handler. func (p *SetAsyncCallStackDepthParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetAsyncCallStackDepth, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetAsyncCallStackDepth, p, nil) } // SetBlackboxPatternsParams replace previous blackbox patterns with passed @@ -1411,39 +748,7 @@ func SetBlackboxPatterns(patterns []string) *SetBlackboxPatternsParams { // Do executes Debugger.setBlackboxPatterns against the provided context and // target handler. func (p *SetBlackboxPatternsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetBlackboxPatterns, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetBlackboxPatterns, p, nil) } // SetBlackboxedRangesParams makes backend skip steps in the script in @@ -1475,37 +780,5 @@ func SetBlackboxedRanges(scriptID runtime.ScriptID, positions []*ScriptPosition) // Do executes Debugger.setBlackboxedRanges against the provided context and // target handler. func (p *SetBlackboxedRangesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDebuggerSetBlackboxedRanges, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDebuggerSetBlackboxedRanges, p, nil) } diff --git a/cdp/debugger/easyjson.go b/cdp/debugger/easyjson.go index 86afd23..1bb543d 100644 --- a/cdp/debugger/easyjson.go +++ b/cdp/debugger/easyjson.go @@ -18,1419 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger(in *jlexer.Lexer, out *StepOverParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger(out *jwriter.Writer, in StepOverParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StepOverParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StepOverParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StepOverParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StepOverParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger1(in *jlexer.Lexer, out *StepOutParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger1(out *jwriter.Writer, in StepOutParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StepOutParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StepOutParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StepOutParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StepOutParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger2(in *jlexer.Lexer, out *StepIntoParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger2(out *jwriter.Writer, in StepIntoParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StepIntoParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StepIntoParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StepIntoParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StepIntoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger3(in *jlexer.Lexer, out *SetVariableValueParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scopeNumber": - out.ScopeNumber = int64(in.Int64()) - case "variableName": - out.VariableName = string(in.String()) - case "newValue": - if in.IsNull() { - in.Skip() - out.NewValue = nil - } else { - if out.NewValue == nil { - out.NewValue = new(runtime.CallArgument) - } - (*out.NewValue).UnmarshalEasyJSON(in) - } - case "callFrameId": - out.CallFrameID = CallFrameID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger3(out *jwriter.Writer, in SetVariableValueParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scopeNumber\":") - out.Int64(int64(in.ScopeNumber)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"variableName\":") - out.String(string(in.VariableName)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"newValue\":") - if in.NewValue == nil { - out.RawString("null") - } else { - (*in.NewValue).MarshalEasyJSON(out) - } - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"callFrameId\":") - out.String(string(in.CallFrameID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetVariableValueParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetVariableValueParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetVariableValueParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetVariableValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger4(in *jlexer.Lexer, out *SetSkipAllPausesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "skip": - out.Skip = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger4(out *jwriter.Writer, in SetSkipAllPausesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"skip\":") - out.Bool(bool(in.Skip)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetSkipAllPausesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetSkipAllPausesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetSkipAllPausesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetSkipAllPausesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger5(in *jlexer.Lexer, out *SetScriptSourceReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "callFrames": - if in.IsNull() { - in.Skip() - out.CallFrames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.CallFrames = make([]*CallFrame, 0, 8) - } else { - out.CallFrames = []*CallFrame{} - } - for !in.IsDelim(']') { - var v1 *CallFrame - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(CallFrame) - } - (*v1).UnmarshalEasyJSON(in) - } - out.CallFrames = append(out.CallFrames, v1) - in.WantComma() - } - in.Delim(']') - } - case "stackChanged": - out.StackChanged = bool(in.Bool()) - case "asyncStackTrace": - if in.IsNull() { - in.Skip() - out.AsyncStackTrace = nil - } else { - if out.AsyncStackTrace == nil { - out.AsyncStackTrace = new(runtime.StackTrace) - } - (*out.AsyncStackTrace).UnmarshalEasyJSON(in) - } - case "exceptionDetails": - if in.IsNull() { - in.Skip() - out.ExceptionDetails = nil - } else { - if out.ExceptionDetails == nil { - out.ExceptionDetails = new(runtime.ExceptionDetails) - } - (*out.ExceptionDetails).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger5(out *jwriter.Writer, in SetScriptSourceReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.CallFrames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"callFrames\":") - if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.CallFrames { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.StackChanged { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"stackChanged\":") - out.Bool(bool(in.StackChanged)) - } - if in.AsyncStackTrace != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"asyncStackTrace\":") - if in.AsyncStackTrace == nil { - out.RawString("null") - } else { - (*in.AsyncStackTrace).MarshalEasyJSON(out) - } - } - if in.ExceptionDetails != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionDetails\":") - if in.ExceptionDetails == nil { - out.RawString("null") - } else { - (*in.ExceptionDetails).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetScriptSourceReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetScriptSourceReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger6(in *jlexer.Lexer, out *SetScriptSourceParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scriptId": - out.ScriptID = runtime.ScriptID(in.String()) - case "scriptSource": - out.ScriptSource = string(in.String()) - case "dryRun": - out.DryRun = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger6(out *jwriter.Writer, in SetScriptSourceParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptSource\":") - out.String(string(in.ScriptSource)) - if in.DryRun { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"dryRun\":") - out.Bool(bool(in.DryRun)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetScriptSourceParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetScriptSourceParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger7(in *jlexer.Lexer, out *SetPauseOnExceptionsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "state": - (out.State).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger7(out *jwriter.Writer, in SetPauseOnExceptionsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"state\":") - (in.State).MarshalEasyJSON(out) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetPauseOnExceptionsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetPauseOnExceptionsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetPauseOnExceptionsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetPauseOnExceptionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger8(in *jlexer.Lexer, out *SetBreakpointsActiveParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "active": - out.Active = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger8(out *jwriter.Writer, in SetBreakpointsActiveParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"active\":") - out.Bool(bool(in.Active)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBreakpointsActiveParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBreakpointsActiveParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBreakpointsActiveParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBreakpointsActiveParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger9(in *jlexer.Lexer, out *SetBreakpointReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "breakpointId": - out.BreakpointID = BreakpointID(in.String()) - case "actualLocation": - if in.IsNull() { - in.Skip() - out.ActualLocation = nil - } else { - if out.ActualLocation == nil { - out.ActualLocation = new(Location) - } - (*out.ActualLocation).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger9(out *jwriter.Writer, in SetBreakpointReturns) { - out.RawByte('{') - first := true - _ = first - if in.BreakpointID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"breakpointId\":") - out.String(string(in.BreakpointID)) - } - if in.ActualLocation != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"actualLocation\":") - if in.ActualLocation == nil { - out.RawString("null") - } else { - (*in.ActualLocation).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBreakpointReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBreakpointReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBreakpointReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBreakpointReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger10(in *jlexer.Lexer, out *SetBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "location": - if in.IsNull() { - in.Skip() - out.Location = nil - } else { - if out.Location == nil { - out.Location = new(Location) - } - (*out.Location).UnmarshalEasyJSON(in) - } - case "condition": - out.Condition = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger10(out *jwriter.Writer, in SetBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"location\":") - if in.Location == nil { - out.RawString("null") - } else { - (*in.Location).MarshalEasyJSON(out) - } - if in.Condition != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"condition\":") - out.String(string(in.Condition)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger11(in *jlexer.Lexer, out *SetBreakpointByURLReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "breakpointId": - out.BreakpointID = BreakpointID(in.String()) - case "locations": - if in.IsNull() { - in.Skip() - out.Locations = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Locations = make([]*Location, 0, 8) - } else { - out.Locations = []*Location{} - } - for !in.IsDelim(']') { - var v4 *Location - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(Location) - } - (*v4).UnmarshalEasyJSON(in) - } - out.Locations = append(out.Locations, v4) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger11(out *jwriter.Writer, in SetBreakpointByURLReturns) { - out.RawByte('{') - first := true - _ = first - if in.BreakpointID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"breakpointId\":") - out.String(string(in.BreakpointID)) - } - if len(in.Locations) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"locations\":") - if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v5, v6 := range in.Locations { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBreakpointByURLReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBreakpointByURLReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBreakpointByURLReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBreakpointByURLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(in *jlexer.Lexer, out *SetBreakpointByURLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "lineNumber": - out.LineNumber = int64(in.Int64()) - case "url": - out.URL = string(in.String()) - case "urlRegex": - out.URLRegex = string(in.String()) - case "columnNumber": - out.ColumnNumber = int64(in.Int64()) - case "condition": - out.Condition = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(out *jwriter.Writer, in SetBreakpointByURLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lineNumber\":") - out.Int64(int64(in.LineNumber)) - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.URLRegex != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"urlRegex\":") - out.String(string(in.URLRegex)) - } - if in.ColumnNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"columnNumber\":") - out.Int64(int64(in.ColumnNumber)) - } - if in.Condition != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"condition\":") - out.String(string(in.Condition)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBreakpointByURLParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBreakpointByURLParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBreakpointByURLParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBreakpointByURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger13(in *jlexer.Lexer, out *SetBlackboxedRangesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scriptId": - out.ScriptID = runtime.ScriptID(in.String()) - case "positions": - if in.IsNull() { - in.Skip() - out.Positions = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Positions = make([]*ScriptPosition, 0, 8) - } else { - out.Positions = []*ScriptPosition{} - } - for !in.IsDelim(']') { - var v7 *ScriptPosition - if in.IsNull() { - in.Skip() - v7 = nil - } else { - if v7 == nil { - v7 = new(ScriptPosition) - } - (*v7).UnmarshalEasyJSON(in) - } - out.Positions = append(out.Positions, v7) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger13(out *jwriter.Writer, in SetBlackboxedRangesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"positions\":") - if in.Positions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Positions { - 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 SetBlackboxedRangesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBlackboxedRangesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBlackboxedRangesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBlackboxedRangesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger14(in *jlexer.Lexer, out *SetBlackboxPatternsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "patterns": - if in.IsNull() { - in.Skip() - out.Patterns = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Patterns = make([]string, 0, 4) - } else { - out.Patterns = []string{} - } - for !in.IsDelim(']') { - var v10 string - v10 = string(in.String()) - out.Patterns = append(out.Patterns, v10) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger14(out *jwriter.Writer, in SetBlackboxPatternsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"patterns\":") - if in.Patterns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v11, v12 := range in.Patterns { - if v11 > 0 { - out.RawByte(',') - } - out.String(string(v12)) - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBlackboxPatternsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBlackboxPatternsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBlackboxPatternsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBlackboxPatternsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger14(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger15(in *jlexer.Lexer, out *SetAsyncCallStackDepthParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "maxDepth": - out.MaxDepth = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger15(out *jwriter.Writer, in SetAsyncCallStackDepthParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"maxDepth\":") - out.Int64(int64(in.MaxDepth)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetAsyncCallStackDepthParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger15(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetAsyncCallStackDepthParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger15(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetAsyncCallStackDepthParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger15(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetAsyncCallStackDepthParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger15(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(in *jlexer.Lexer, out *SearchMatch) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger(in *jlexer.Lexer, out *SearchMatch) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1463,7 +51,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(out *jwriter.Writer, in SearchMatch) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger(out *jwriter.Writer, in SearchMatch) { out.RawByte('{') first := true _ = first @@ -1489,310 +77,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v SearchMatch) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SearchMatch) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SearchMatch) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SearchMatch) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger17(in *jlexer.Lexer, out *SearchInContentReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - if in.IsNull() { - in.Skip() - out.Result = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Result = make([]*SearchMatch, 0, 8) - } else { - out.Result = []*SearchMatch{} - } - for !in.IsDelim(']') { - var v13 *SearchMatch - if in.IsNull() { - in.Skip() - v13 = nil - } else { - if v13 == nil { - v13 = new(SearchMatch) - } - (*v13).UnmarshalEasyJSON(in) - } - out.Result = append(out.Result, v13) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger17(out *jwriter.Writer, in SearchInContentReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Result) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.Result { - if v14 > 0 { - out.RawByte(',') - } - if v15 == nil { - out.RawString("null") - } else { - (*v15).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SearchInContentReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SearchInContentReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SearchInContentReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SearchInContentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger18(in *jlexer.Lexer, out *SearchInContentParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scriptId": - out.ScriptID = runtime.ScriptID(in.String()) - case "query": - out.Query = string(in.String()) - case "caseSensitive": - out.CaseSensitive = bool(in.Bool()) - case "isRegex": - out.IsRegex = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger18(out *jwriter.Writer, in SearchInContentParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"query\":") - out.String(string(in.Query)) - if in.CaseSensitive { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"caseSensitive\":") - out.Bool(bool(in.CaseSensitive)) - } - if in.IsRegex { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"isRegex\":") - out.Bool(bool(in.IsRegex)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SearchInContentParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SearchInContentParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SearchInContentParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SearchInContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger19(in *jlexer.Lexer, out *ScriptPosition) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "lineNumber": - out.LineNumber = int64(in.Int64()) - case "columnNumber": - out.ColumnNumber = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(out *jwriter.Writer, in ScriptPosition) { - out.RawByte('{') - first := true - _ = first - if in.LineNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lineNumber\":") - out.Int64(int64(in.LineNumber)) - } - if in.ColumnNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"columnNumber\":") - out.Int64(int64(in.ColumnNumber)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ScriptPosition) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ScriptPosition) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ScriptPosition) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ScriptPosition) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(in *jlexer.Lexer, out *Scope) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger1(in *jlexer.Lexer, out *Scope) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1855,7 +160,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(out *jwriter.Writer, in Scope) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger1(out *jwriter.Writer, in Scope) { out.RawByte('{') first := true _ = first @@ -1917,217 +222,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v Scope) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Scope) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Scope) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Scope) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(in *jlexer.Lexer, out *ResumeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(out *jwriter.Writer, in ResumeParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ResumeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ResumeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ResumeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ResumeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(in *jlexer.Lexer, out *RestartFrameReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "callFrames": - if in.IsNull() { - in.Skip() - out.CallFrames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.CallFrames = make([]*CallFrame, 0, 8) - } else { - out.CallFrames = []*CallFrame{} - } - for !in.IsDelim(']') { - var v16 *CallFrame - if in.IsNull() { - in.Skip() - v16 = nil - } else { - if v16 == nil { - v16 = new(CallFrame) - } - (*v16).UnmarshalEasyJSON(in) - } - out.CallFrames = append(out.CallFrames, v16) - in.WantComma() - } - in.Delim(']') - } - case "asyncStackTrace": - if in.IsNull() { - in.Skip() - out.AsyncStackTrace = nil - } else { - if out.AsyncStackTrace == nil { - out.AsyncStackTrace = new(runtime.StackTrace) - } - (*out.AsyncStackTrace).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(out *jwriter.Writer, in RestartFrameReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.CallFrames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"callFrames\":") - if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.CallFrames { - if v17 > 0 { - out.RawByte(',') - } - if v18 == nil { - out.RawString("null") - } else { - (*v18).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.AsyncStackTrace != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"asyncStackTrace\":") - if in.AsyncStackTrace == nil { - out.RawString("null") - } else { - (*in.AsyncStackTrace).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RestartFrameReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RestartFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RestartFrameReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RestartFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, out *RestartFrameParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger2(in *jlexer.Lexer, out *CallFrame) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2148,6 +263,75 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, o switch key { case "callFrameId": out.CallFrameID = CallFrameID(in.String()) + case "functionName": + out.FunctionName = string(in.String()) + case "functionLocation": + if in.IsNull() { + in.Skip() + out.FunctionLocation = nil + } else { + if out.FunctionLocation == nil { + out.FunctionLocation = new(Location) + } + (*out.FunctionLocation).UnmarshalEasyJSON(in) + } + case "location": + if in.IsNull() { + in.Skip() + out.Location = nil + } else { + if out.Location == nil { + out.Location = new(Location) + } + (*out.Location).UnmarshalEasyJSON(in) + } + case "scopeChain": + if in.IsNull() { + in.Skip() + out.ScopeChain = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ScopeChain = make([]*Scope, 0, 8) + } else { + out.ScopeChain = []*Scope{} + } + for !in.IsDelim(']') { + var v1 *Scope + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(Scope) + } + (*v1).UnmarshalEasyJSON(in) + } + out.ScopeChain = append(out.ScopeChain, v1) + in.WantComma() + } + in.Delim(']') + } + case "this": + if in.IsNull() { + in.Skip() + out.This = nil + } else { + if out.This == nil { + out.This = new(runtime.RemoteObject) + } + (*out.This).UnmarshalEasyJSON(in) + } + case "returnValue": + if in.IsNull() { + in.Skip() + out.ReturnValue = nil + } else { + if out.ReturnValue == nil { + out.ReturnValue = new(runtime.RemoteObject) + } + (*out.ReturnValue).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -2158,43 +342,124 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(out *jwriter.Writer, in RestartFrameParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger2(out *jwriter.Writer, in CallFrame) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.CallFrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"callFrameId\":") + out.String(string(in.CallFrameID)) + } + if in.FunctionName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"functionName\":") + out.String(string(in.FunctionName)) + } + if in.FunctionLocation != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"functionLocation\":") + if in.FunctionLocation == nil { + out.RawString("null") + } else { + (*in.FunctionLocation).MarshalEasyJSON(out) + } + } + if in.Location != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"location\":") + if in.Location == nil { + out.RawString("null") + } else { + (*in.Location).MarshalEasyJSON(out) + } + } + if len(in.ScopeChain) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scopeChain\":") + if in.ScopeChain == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.ScopeChain { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.This != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"this\":") + if in.This == nil { + out.RawString("null") + } else { + (*in.This).MarshalEasyJSON(out) + } + } + if in.ReturnValue != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"returnValue\":") + if in.ReturnValue == nil { + out.RawString("null") + } else { + (*in.ReturnValue).MarshalEasyJSON(out) + } } - first = false - out.RawString("\"callFrameId\":") - out.String(string(in.CallFrameID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v RestartFrameParams) MarshalJSON() ([]byte, error) { +func (v CallFrame) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v RestartFrameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(w, v) +func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *RestartFrameParams) UnmarshalJSON(data []byte) error { +func (v *CallFrame) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RestartFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(l, v) +func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, out *RemoveBreakpointParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger3(in *jlexer.Lexer, out *ScriptPosition) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2213,8 +478,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, o continue } switch key { - case "breakpointId": - out.BreakpointID = BreakpointID(in.String()) + case "lineNumber": + out.LineNumber = int64(in.Int64()) + case "columnNumber": + out.ColumnNumber = int64(in.Int64()) default: in.SkipRecursive() } @@ -2225,102 +492,53 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(out *jwriter.Writer, in RemoveBreakpointParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger3(out *jwriter.Writer, in ScriptPosition) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.LineNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Int64(int64(in.LineNumber)) + } + if in.ColumnNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNumber\":") + out.Int64(int64(in.ColumnNumber)) } - first = false - out.RawString("\"breakpointId\":") - out.String(string(in.BreakpointID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v RemoveBreakpointParams) MarshalJSON() ([]byte, error) { +func (v ScriptPosition) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(w, v) +func (v ScriptPosition) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveBreakpointParams) UnmarshalJSON(data []byte) error { +func (v *ScriptPosition) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(l, v) +func (v *ScriptPosition) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(in *jlexer.Lexer, out *PauseParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(out *jwriter.Writer, in PauseParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PauseParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PauseParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PauseParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PauseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(in *jlexer.Lexer, out *Location) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger4(in *jlexer.Lexer, out *Location) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2355,7 +573,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(out *jwriter.Writer, in Location) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger4(out *jwriter.Writer, in Location) { out.RawByte('{') first := true _ = first @@ -2389,27 +607,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v Location) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Location) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Location) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Location) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, out *GetScriptSourceReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger5(in *jlexer.Lexer, out *EventResumed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2428,8 +646,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, o continue } switch key { - case "scriptSource": - out.ScriptSource = string(in.String()) default: in.SkipRecursive() } @@ -2440,45 +656,317 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer, in GetScriptSourceReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger5(out *jwriter.Writer, in EventResumed) { out.RawByte('{') first := true _ = first - if in.ScriptSource != "" { + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventResumed) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventResumed) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventResumed) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventResumed) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger6(in *jlexer.Lexer, out *EventPaused) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "callFrames": + if in.IsNull() { + in.Skip() + out.CallFrames = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.CallFrames = make([]*CallFrame, 0, 8) + } else { + out.CallFrames = []*CallFrame{} + } + for !in.IsDelim(']') { + var v4 *CallFrame + if in.IsNull() { + in.Skip() + v4 = nil + } else { + if v4 == nil { + v4 = new(CallFrame) + } + (*v4).UnmarshalEasyJSON(in) + } + out.CallFrames = append(out.CallFrames, v4) + in.WantComma() + } + in.Delim(']') + } + case "reason": + (out.Reason).UnmarshalEasyJSON(in) + case "data": + (out.Data).UnmarshalEasyJSON(in) + case "hitBreakpoints": + if in.IsNull() { + in.Skip() + out.HitBreakpoints = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.HitBreakpoints = make([]string, 0, 4) + } else { + out.HitBreakpoints = []string{} + } + for !in.IsDelim(']') { + var v5 string + v5 = string(in.String()) + out.HitBreakpoints = append(out.HitBreakpoints, v5) + in.WantComma() + } + in.Delim(']') + } + case "asyncStackTrace": + if in.IsNull() { + in.Skip() + out.AsyncStackTrace = nil + } else { + if out.AsyncStackTrace == nil { + out.AsyncStackTrace = new(runtime.StackTrace) + } + (*out.AsyncStackTrace).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger6(out *jwriter.Writer, in EventPaused) { + out.RawByte('{') + first := true + _ = first + if len(in.CallFrames) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"scriptSource\":") - out.String(string(in.ScriptSource)) + out.RawString("\"callFrames\":") + if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v6, v7 := range in.CallFrames { + if v6 > 0 { + out.RawByte(',') + } + if v7 == nil { + out.RawString("null") + } else { + (*v7).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Reason != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"reason\":") + (in.Reason).MarshalEasyJSON(out) + } + if (in.Data).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"data\":") + (in.Data).MarshalEasyJSON(out) + } + if len(in.HitBreakpoints) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hitBreakpoints\":") + if in.HitBreakpoints == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.HitBreakpoints { + if v8 > 0 { + out.RawByte(',') + } + out.String(string(v9)) + } + out.RawByte(']') + } + } + if in.AsyncStackTrace != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"asyncStackTrace\":") + if in.AsyncStackTrace == nil { + out.RawString("null") + } else { + (*in.AsyncStackTrace).MarshalEasyJSON(out) + } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetScriptSourceReturns) MarshalJSON() ([]byte, error) { +func (v EventPaused) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(w, v) +func (v EventPaused) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetScriptSourceReturns) UnmarshalJSON(data []byte) error { +func (v *EventPaused) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(l, v) +func (v *EventPaused) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, out *GetScriptSourceParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger7(in *jlexer.Lexer, out *EventBreakpointResolved) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "breakpointId": + out.BreakpointID = BreakpointID(in.String()) + case "location": + if in.IsNull() { + in.Skip() + out.Location = nil + } else { + if out.Location == nil { + out.Location = new(Location) + } + (*out.Location).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger7(out *jwriter.Writer, in EventBreakpointResolved) { + out.RawByte('{') + first := true + _ = first + if in.BreakpointID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"breakpointId\":") + out.String(string(in.BreakpointID)) + } + if in.Location != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"location\":") + if in.Location == nil { + out.RawString("null") + } else { + (*in.Location).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventBreakpointResolved) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventBreakpointResolved) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventBreakpointResolved) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventBreakpointResolved) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger8(in *jlexer.Lexer, out *EventScriptFailedToParse) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2499,6 +987,28 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, o switch key { case "scriptId": out.ScriptID = runtime.ScriptID(in.String()) + case "url": + out.URL = string(in.String()) + case "startLine": + out.StartLine = int64(in.Int64()) + case "startColumn": + out.StartColumn = int64(in.Int64()) + case "endLine": + out.EndLine = int64(in.Int64()) + case "endColumn": + out.EndColumn = int64(in.Int64()) + case "executionContextId": + out.ExecutionContextID = runtime.ExecutionContextID(in.Int64()) + case "hash": + out.Hash = string(in.String()) + case "executionContextAuxData": + (out.ExecutionContextAuxData).UnmarshalEasyJSON(in) + case "sourceMapURL": + out.SourceMapURL = string(in.String()) + case "hasSourceURL": + out.HasSourceURL = bool(in.Bool()) + case "isModule": + out.IsModule = bool(in.Bool()) default: in.SkipRecursive() } @@ -2509,253 +1019,133 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(out *jwriter.Writer, in GetScriptSourceParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger8(out *jwriter.Writer, in EventScriptFailedToParse) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetScriptSourceParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetScriptSourceParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(in *jlexer.Lexer, out *GetPossibleBreakpointsReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "locations": - if in.IsNull() { - in.Skip() - out.Locations = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Locations = make([]*Location, 0, 8) - } else { - out.Locations = []*Location{} - } - for !in.IsDelim(']') { - var v19 *Location - if in.IsNull() { - in.Skip() - v19 = nil - } else { - if v19 == nil { - v19 = new(Location) - } - (*v19).UnmarshalEasyJSON(in) - } - out.Locations = append(out.Locations, v19) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(out *jwriter.Writer, in GetPossibleBreakpointsReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Locations) != 0 { + if in.ScriptID != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"locations\":") - if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v20, v21 := range in.Locations { - if v20 > 0 { - out.RawByte(',') - } - if v21 == nil { - out.RawString("null") - } else { - (*v21).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetPossibleBreakpointsReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPossibleBreakpointsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPossibleBreakpointsReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPossibleBreakpointsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(in *jlexer.Lexer, out *GetPossibleBreakpointsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "start": - if in.IsNull() { - in.Skip() - out.Start = nil - } else { - if out.Start == nil { - out.Start = new(Location) - } - (*out.Start).UnmarshalEasyJSON(in) - } - case "end": - if in.IsNull() { - in.Skip() - out.End = nil - } else { - if out.End == nil { - out.End = new(Location) - } - (*out.End).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(out *jwriter.Writer, in GetPossibleBreakpointsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"start\":") - if in.Start == nil { - out.RawString("null") - } else { - (*in.Start).MarshalEasyJSON(out) - } - if in.End != nil { + if in.URL != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"end\":") - if in.End == nil { - out.RawString("null") - } else { - (*in.End).MarshalEasyJSON(out) + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.StartLine != 0 { + if !first { + out.RawByte(',') } + first = false + out.RawString("\"startLine\":") + out.Int64(int64(in.StartLine)) + } + if in.StartColumn != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"startColumn\":") + out.Int64(int64(in.StartColumn)) + } + if in.EndLine != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"endLine\":") + out.Int64(int64(in.EndLine)) + } + if in.EndColumn != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"endColumn\":") + out.Int64(int64(in.EndColumn)) + } + if in.ExecutionContextID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"executionContextId\":") + out.Int64(int64(in.ExecutionContextID)) + } + if in.Hash != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hash\":") + out.String(string(in.Hash)) + } + if (in.ExecutionContextAuxData).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"executionContextAuxData\":") + (in.ExecutionContextAuxData).MarshalEasyJSON(out) + } + if in.SourceMapURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sourceMapURL\":") + out.String(string(in.SourceMapURL)) + } + if in.HasSourceURL { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hasSourceURL\":") + out.Bool(bool(in.HasSourceURL)) + } + if in.IsModule { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isModule\":") + out.Bool(bool(in.IsModule)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetPossibleBreakpointsParams) MarshalJSON() ([]byte, error) { +func (v EventScriptFailedToParse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPossibleBreakpointsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(w, v) +func (v EventScriptFailedToParse) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPossibleBreakpointsParams) UnmarshalJSON(data []byte) error { +func (v *EventScriptFailedToParse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPossibleBreakpointsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(l, v) +func (v *EventScriptFailedToParse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, out *EventScriptParsed) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger9(in *jlexer.Lexer, out *EventScriptParsed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2810,7 +1200,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(out *jwriter.Writer, in EventScriptParsed) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger9(out *jwriter.Writer, in EventScriptParsed) { out.RawByte('{') first := true _ = first @@ -2924,27 +1314,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EventScriptParsed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventScriptParsed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventScriptParsed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventScriptParsed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, out *EventScriptFailedToParse) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger10(in *jlexer.Lexer, out *SetBlackboxedRangesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2965,302 +1355,33 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, o switch key { case "scriptId": out.ScriptID = runtime.ScriptID(in.String()) - case "url": - out.URL = string(in.String()) - case "startLine": - out.StartLine = int64(in.Int64()) - case "startColumn": - out.StartColumn = int64(in.Int64()) - case "endLine": - out.EndLine = int64(in.Int64()) - case "endColumn": - out.EndColumn = int64(in.Int64()) - case "executionContextId": - out.ExecutionContextID = runtime.ExecutionContextID(in.Int64()) - case "hash": - out.Hash = string(in.String()) - case "executionContextAuxData": - (out.ExecutionContextAuxData).UnmarshalEasyJSON(in) - case "sourceMapURL": - out.SourceMapURL = string(in.String()) - case "hasSourceURL": - out.HasSourceURL = bool(in.Bool()) - case "isModule": - out.IsModule = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer, in EventScriptFailedToParse) { - out.RawByte('{') - first := true - _ = first - if in.ScriptID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - } - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.StartLine != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startLine\":") - out.Int64(int64(in.StartLine)) - } - if in.StartColumn != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startColumn\":") - out.Int64(int64(in.StartColumn)) - } - if in.EndLine != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endLine\":") - out.Int64(int64(in.EndLine)) - } - if in.EndColumn != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endColumn\":") - out.Int64(int64(in.EndColumn)) - } - if in.ExecutionContextID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"executionContextId\":") - out.Int64(int64(in.ExecutionContextID)) - } - if in.Hash != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hash\":") - out.String(string(in.Hash)) - } - if (in.ExecutionContextAuxData).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"executionContextAuxData\":") - (in.ExecutionContextAuxData).MarshalEasyJSON(out) - } - if in.SourceMapURL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sourceMapURL\":") - out.String(string(in.SourceMapURL)) - } - if in.HasSourceURL { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hasSourceURL\":") - out.Bool(bool(in.HasSourceURL)) - } - if in.IsModule { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"isModule\":") - out.Bool(bool(in.IsModule)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventScriptFailedToParse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventScriptFailedToParse) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventScriptFailedToParse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventScriptFailedToParse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(in *jlexer.Lexer, out *EventResumed) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer, in EventResumed) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventResumed) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventResumed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventResumed) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventResumed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(in *jlexer.Lexer, out *EventPaused) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "callFrames": + case "positions": if in.IsNull() { in.Skip() - out.CallFrames = nil + out.Positions = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.CallFrames = make([]*CallFrame, 0, 8) + out.Positions = make([]*ScriptPosition, 0, 8) } else { - out.CallFrames = []*CallFrame{} + out.Positions = []*ScriptPosition{} } for !in.IsDelim(']') { - var v22 *CallFrame + var v10 *ScriptPosition if in.IsNull() { in.Skip() - v22 = nil + v10 = nil } else { - if v22 == nil { - v22 = new(CallFrame) + if v10 == nil { + v10 = new(ScriptPosition) } - (*v22).UnmarshalEasyJSON(in) + (*v10).UnmarshalEasyJSON(in) } - out.CallFrames = append(out.CallFrames, v22) + out.Positions = append(out.Positions, v10) in.WantComma() } in.Delim(']') } - case "reason": - (out.Reason).UnmarshalEasyJSON(in) - case "data": - (out.Data).UnmarshalEasyJSON(in) - case "hitBreakpoints": - if in.IsNull() { - in.Skip() - out.HitBreakpoints = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.HitBreakpoints = make([]string, 0, 4) - } else { - out.HitBreakpoints = []string{} - } - for !in.IsDelim(']') { - var v23 string - v23 = string(in.String()) - out.HitBreakpoints = append(out.HitBreakpoints, v23) - in.WantComma() - } - in.Delim(']') - } - case "asyncStackTrace": - if in.IsNull() { - in.Skip() - out.AsyncStackTrace = nil - } else { - if out.AsyncStackTrace == nil { - out.AsyncStackTrace = new(runtime.StackTrace) - } - (*out.AsyncStackTrace).UnmarshalEasyJSON(in) - } default: in.SkipRecursive() } @@ -3271,107 +1392,64 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(out *jwriter.Writer, in EventPaused) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger10(out *jwriter.Writer, in SetBlackboxedRangesParams) { out.RawByte('{') first := true _ = first - if len(in.CallFrames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"callFrames\":") - if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v24, v25 := range in.CallFrames { - if v24 > 0 { - out.RawByte(',') - } - if v25 == nil { - out.RawString("null") - } else { - (*v25).MarshalEasyJSON(out) - } + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"positions\":") + if in.Positions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Positions { + if v11 > 0 { + out.RawByte(',') } - out.RawByte(']') - } - } - if in.Reason != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"reason\":") - (in.Reason).MarshalEasyJSON(out) - } - if (in.Data).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"data\":") - (in.Data).MarshalEasyJSON(out) - } - if len(in.HitBreakpoints) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hitBreakpoints\":") - if in.HitBreakpoints == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v26, v27 := range in.HitBreakpoints { - if v26 > 0 { - out.RawByte(',') - } - out.String(string(v27)) + if v12 == nil { + out.RawString("null") + } else { + (*v12).MarshalEasyJSON(out) } - out.RawByte(']') - } - } - if in.AsyncStackTrace != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"asyncStackTrace\":") - if in.AsyncStackTrace == nil { - out.RawString("null") - } else { - (*in.AsyncStackTrace).MarshalEasyJSON(out) } + out.RawByte(']') } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventPaused) MarshalJSON() ([]byte, error) { +func (v SetBlackboxedRangesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventPaused) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(w, v) +func (v SetBlackboxedRangesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventPaused) UnmarshalJSON(data []byte) error { +func (v *SetBlackboxedRangesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventPaused) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(l, v) +func (v *SetBlackboxedRangesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger10(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, out *EventBreakpointResolved) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger11(in *jlexer.Lexer, out *SetBlackboxPatternsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3390,17 +1468,24 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, o continue } switch key { - case "breakpointId": - out.BreakpointID = BreakpointID(in.String()) - case "location": + case "patterns": if in.IsNull() { in.Skip() - out.Location = nil + out.Patterns = nil } else { - if out.Location == nil { - out.Location = new(Location) + in.Delim('[') + if !in.IsDelim(']') { + out.Patterns = make([]string, 0, 4) + } else { + out.Patterns = []string{} } - (*out.Location).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v13 string + v13 = string(in.String()) + out.Patterns = append(out.Patterns, v13) + in.WantComma() + } + in.Delim(']') } default: in.SkipRecursive() @@ -3412,57 +1497,224 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer, in EventBreakpointResolved) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger11(out *jwriter.Writer, in SetBlackboxPatternsParams) { out.RawByte('{') first := true _ = first - if in.BreakpointID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"breakpointId\":") - out.String(string(in.BreakpointID)) + if !first { + out.RawByte(',') } - if in.Location != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"location\":") - if in.Location == nil { - out.RawString("null") - } else { - (*in.Location).MarshalEasyJSON(out) + first = false + out.RawString("\"patterns\":") + if in.Patterns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.Patterns { + if v14 > 0 { + out.RawByte(',') + } + out.String(string(v15)) } + out.RawByte(']') } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventBreakpointResolved) MarshalJSON() ([]byte, error) { +func (v SetBlackboxPatternsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventBreakpointResolved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(w, v) +func (v SetBlackboxPatternsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventBreakpointResolved) UnmarshalJSON(data []byte) error { +func (v *SetBlackboxPatternsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventBreakpointResolved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(l, v) +func (v *SetBlackboxPatternsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger11(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(in *jlexer.Lexer, out *EvaluateOnCallFrameReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(in *jlexer.Lexer, out *SetAsyncCallStackDepthParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "maxDepth": + out.MaxDepth = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(out *jwriter.Writer, in SetAsyncCallStackDepthParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"maxDepth\":") + out.Int64(int64(in.MaxDepth)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetAsyncCallStackDepthParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetAsyncCallStackDepthParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetAsyncCallStackDepthParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetAsyncCallStackDepthParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger13(in *jlexer.Lexer, out *SetVariableValueParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scopeNumber": + out.ScopeNumber = int64(in.Int64()) + case "variableName": + out.VariableName = string(in.String()) + case "newValue": + if in.IsNull() { + in.Skip() + out.NewValue = nil + } else { + if out.NewValue == nil { + out.NewValue = new(runtime.CallArgument) + } + (*out.NewValue).UnmarshalEasyJSON(in) + } + case "callFrameId": + out.CallFrameID = CallFrameID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger13(out *jwriter.Writer, in SetVariableValueParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scopeNumber\":") + out.Int64(int64(in.ScopeNumber)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"variableName\":") + out.String(string(in.VariableName)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"newValue\":") + if in.NewValue == nil { + out.RawString("null") + } else { + (*in.NewValue).MarshalEasyJSON(out) + } + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"callFrameId\":") + out.String(string(in.CallFrameID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetVariableValueParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetVariableValueParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetVariableValueParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetVariableValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger14(in *jlexer.Lexer, out *EvaluateOnCallFrameReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3511,7 +1763,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer, in EvaluateOnCallFrameReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger14(out *jwriter.Writer, in EvaluateOnCallFrameReturns) { out.RawByte('{') first := true _ = first @@ -3545,27 +1797,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EvaluateOnCallFrameReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EvaluateOnCallFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EvaluateOnCallFrameReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EvaluateOnCallFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger14(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(in *jlexer.Lexer, out *EvaluateOnCallFrameParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger15(in *jlexer.Lexer, out *EvaluateOnCallFrameParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3610,7 +1862,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(out *jwriter.Writer, in EvaluateOnCallFrameParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger15(out *jwriter.Writer, in EvaluateOnCallFrameParams) { out.RawByte('{') first := true _ = first @@ -3680,27 +1932,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EvaluateOnCallFrameParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EvaluateOnCallFrameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EvaluateOnCallFrameParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger15(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EvaluateOnCallFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger15(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(in *jlexer.Lexer, out *SetPauseOnExceptionsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3719,6 +1971,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, o continue } switch key { + case "state": + (out.State).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -3729,37 +1983,43 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(out *jwriter.Writer, in SetPauseOnExceptionsParams) { out.RawByte('{') first := true _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"state\":") + (in.State).MarshalEasyJSON(out) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EnableParams) MarshalJSON() ([]byte, error) { +func (v SetPauseOnExceptionsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(w, v) +func (v SetPauseOnExceptionsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { +func (v *SetPauseOnExceptionsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(l, v) +func (v *SetPauseOnExceptionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, out *DisableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger17(in *jlexer.Lexer, out *GetScriptSourceReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3778,6 +2038,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, o continue } switch key { + case "scriptSource": + out.ScriptSource = string(in.String()) default: in.SkipRecursive() } @@ -3788,37 +2050,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger17(out *jwriter.Writer, in GetScriptSourceReturns) { out.RawByte('{') first := true _ = first + if in.ScriptSource != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptSource\":") + out.String(string(in.ScriptSource)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v DisableParams) MarshalJSON() ([]byte, error) { +func (v GetScriptSourceReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger17(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(w, v) +func (v GetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger17(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { +func (v *GetScriptSourceReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger17(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(l, v) +func (v *GetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger17(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(in *jlexer.Lexer, out *ContinueToLocationParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger18(in *jlexer.Lexer, out *GetScriptSourceParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3837,15 +2107,109 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(in *jlexer.Lexer, o continue } switch key { - case "location": + case "scriptId": + out.ScriptID = runtime.ScriptID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger18(out *jwriter.Writer, in GetScriptSourceParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetScriptSourceParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetScriptSourceParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger19(in *jlexer.Lexer, out *RestartFrameReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "callFrames": if in.IsNull() { in.Skip() - out.Location = nil + out.CallFrames = nil } else { - if out.Location == nil { - out.Location = new(Location) + in.Delim('[') + if !in.IsDelim(']') { + out.CallFrames = make([]*CallFrame, 0, 8) + } else { + out.CallFrames = []*CallFrame{} } - (*out.Location).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v16 *CallFrame + if in.IsNull() { + in.Skip() + v16 = nil + } else { + if v16 == nil { + v16 = new(CallFrame) + } + (*v16).UnmarshalEasyJSON(in) + } + out.CallFrames = append(out.CallFrames, v16) + in.WantComma() + } + in.Delim(']') + } + case "asyncStackTrace": + if in.IsNull() { + in.Skip() + out.AsyncStackTrace = nil + } else { + if out.AsyncStackTrace == nil { + out.AsyncStackTrace = new(runtime.StackTrace) + } + (*out.AsyncStackTrace).UnmarshalEasyJSON(in) } default: in.SkipRecursive() @@ -3857,47 +2221,72 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(out *jwriter.Writer, in ContinueToLocationParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(out *jwriter.Writer, in RestartFrameReturns) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if len(in.CallFrames) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"callFrames\":") + if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v17, v18 := range in.CallFrames { + if v17 > 0 { + out.RawByte(',') + } + if v18 == nil { + out.RawString("null") + } else { + (*v18).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } } - first = false - out.RawString("\"location\":") - if in.Location == nil { - out.RawString("null") - } else { - (*in.Location).MarshalEasyJSON(out) + if in.AsyncStackTrace != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"asyncStackTrace\":") + if in.AsyncStackTrace == nil { + out.RawString("null") + } else { + (*in.AsyncStackTrace).MarshalEasyJSON(out) + } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v ContinueToLocationParams) MarshalJSON() ([]byte, error) { +func (v RestartFrameReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v ContinueToLocationParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(w, v) +func (v RestartFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *ContinueToLocationParams) UnmarshalJSON(data []byte) error { +func (v *RestartFrameReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger19(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ContinueToLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(l, v) +func (v *RestartFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger19(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, out *CallFrame) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(in *jlexer.Lexer, out *RestartFrameParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3918,74 +2307,119 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, o switch key { case "callFrameId": out.CallFrameID = CallFrameID(in.String()) - case "functionName": - out.FunctionName = string(in.String()) - case "functionLocation": + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(out *jwriter.Writer, in RestartFrameParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"callFrameId\":") + out.String(string(in.CallFrameID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RestartFrameParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RestartFrameParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RestartFrameParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RestartFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(in *jlexer.Lexer, out *SetScriptSourceReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "callFrames": if in.IsNull() { in.Skip() - out.FunctionLocation = nil - } else { - if out.FunctionLocation == nil { - out.FunctionLocation = new(Location) - } - (*out.FunctionLocation).UnmarshalEasyJSON(in) - } - case "location": - if in.IsNull() { - in.Skip() - out.Location = nil - } else { - if out.Location == nil { - out.Location = new(Location) - } - (*out.Location).UnmarshalEasyJSON(in) - } - case "scopeChain": - if in.IsNull() { - in.Skip() - out.ScopeChain = nil + out.CallFrames = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.ScopeChain = make([]*Scope, 0, 8) + out.CallFrames = make([]*CallFrame, 0, 8) } else { - out.ScopeChain = []*Scope{} + out.CallFrames = []*CallFrame{} } for !in.IsDelim(']') { - var v28 *Scope + var v19 *CallFrame if in.IsNull() { in.Skip() - v28 = nil + v19 = nil } else { - if v28 == nil { - v28 = new(Scope) + if v19 == nil { + v19 = new(CallFrame) } - (*v28).UnmarshalEasyJSON(in) + (*v19).UnmarshalEasyJSON(in) } - out.ScopeChain = append(out.ScopeChain, v28) + out.CallFrames = append(out.CallFrames, v19) in.WantComma() } in.Delim(']') } - case "this": + case "stackChanged": + out.StackChanged = bool(in.Bool()) + case "asyncStackTrace": if in.IsNull() { in.Skip() - out.This = nil + out.AsyncStackTrace = nil } else { - if out.This == nil { - out.This = new(runtime.RemoteObject) + if out.AsyncStackTrace == nil { + out.AsyncStackTrace = new(runtime.StackTrace) } - (*out.This).UnmarshalEasyJSON(in) + (*out.AsyncStackTrace).UnmarshalEasyJSON(in) } - case "returnValue": + case "exceptionDetails": if in.IsNull() { in.Skip() - out.ReturnValue = nil + out.ExceptionDetails = nil } else { - if out.ReturnValue == nil { - out.ReturnValue = new(runtime.RemoteObject) + if out.ExceptionDetails == nil { + out.ExceptionDetails = new(runtime.ExceptionDetails) } - (*out.ReturnValue).UnmarshalEasyJSON(in) + (*out.ExceptionDetails).UnmarshalEasyJSON(in) } default: in.SkipRecursive() @@ -3997,61 +2431,1292 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(out *jwriter.Writer, in CallFrame) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(out *jwriter.Writer, in SetScriptSourceReturns) { out.RawByte('{') first := true _ = first - if in.CallFrameID != "" { + if len(in.CallFrames) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"callFrameId\":") - out.String(string(in.CallFrameID)) - } - if in.FunctionName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"functionName\":") - out.String(string(in.FunctionName)) - } - if in.FunctionLocation != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"functionLocation\":") - if in.FunctionLocation == nil { - out.RawString("null") - } else { - (*in.FunctionLocation).MarshalEasyJSON(out) - } - } - if in.Location != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"location\":") - if in.Location == nil { - out.RawString("null") - } else { - (*in.Location).MarshalEasyJSON(out) - } - } - if len(in.ScopeChain) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scopeChain\":") - if in.ScopeChain == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"callFrames\":") + if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v29, v30 := range in.ScopeChain { + for v20, v21 := range in.CallFrames { + if v20 > 0 { + out.RawByte(',') + } + if v21 == nil { + out.RawString("null") + } else { + (*v21).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.StackChanged { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"stackChanged\":") + out.Bool(bool(in.StackChanged)) + } + if in.AsyncStackTrace != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"asyncStackTrace\":") + if in.AsyncStackTrace == nil { + out.RawString("null") + } else { + (*in.AsyncStackTrace).MarshalEasyJSON(out) + } + } + if in.ExceptionDetails != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionDetails\":") + if in.ExceptionDetails == nil { + out.RawString("null") + } else { + (*in.ExceptionDetails).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetScriptSourceReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetScriptSourceReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(in *jlexer.Lexer, out *SetScriptSourceParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scriptId": + out.ScriptID = runtime.ScriptID(in.String()) + case "scriptSource": + out.ScriptSource = string(in.String()) + case "dryRun": + out.DryRun = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(out *jwriter.Writer, in SetScriptSourceParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptSource\":") + out.String(string(in.ScriptSource)) + if in.DryRun { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"dryRun\":") + out.Bool(bool(in.DryRun)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetScriptSourceParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetScriptSourceParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, out *SearchInContentReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + if in.IsNull() { + in.Skip() + out.Result = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Result = make([]*SearchMatch, 0, 8) + } else { + out.Result = []*SearchMatch{} + } + for !in.IsDelim(']') { + var v22 *SearchMatch + if in.IsNull() { + in.Skip() + v22 = nil + } else { + if v22 == nil { + v22 = new(SearchMatch) + } + (*v22).UnmarshalEasyJSON(in) + } + out.Result = append(out.Result, v22) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(out *jwriter.Writer, in SearchInContentReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Result) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v23, v24 := range in.Result { + if v23 > 0 { + out.RawByte(',') + } + if v24 == nil { + out.RawString("null") + } else { + (*v24).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SearchInContentReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SearchInContentReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SearchInContentReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SearchInContentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, out *SearchInContentParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scriptId": + out.ScriptID = runtime.ScriptID(in.String()) + case "query": + out.Query = string(in.String()) + case "caseSensitive": + out.CaseSensitive = bool(in.Bool()) + case "isRegex": + out.IsRegex = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(out *jwriter.Writer, in SearchInContentParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"query\":") + out.String(string(in.Query)) + if in.CaseSensitive { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"caseSensitive\":") + out.Bool(bool(in.CaseSensitive)) + } + if in.IsRegex { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isRegex\":") + out.Bool(bool(in.IsRegex)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SearchInContentParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SearchInContentParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SearchInContentParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SearchInContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(in *jlexer.Lexer, out *ResumeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(out *jwriter.Writer, in ResumeParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ResumeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ResumeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ResumeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ResumeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(in *jlexer.Lexer, out *PauseParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(out *jwriter.Writer, in PauseParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PauseParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PauseParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PauseParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PauseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, out *StepOutParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer, in StepOutParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StepOutParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StepOutParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StepOutParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StepOutParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, out *StepIntoParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(out *jwriter.Writer, in StepIntoParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StepIntoParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StepIntoParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StepIntoParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StepIntoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(in *jlexer.Lexer, out *StepOverParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(out *jwriter.Writer, in StepOverParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StepOverParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StepOverParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StepOverParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StepOverParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(in *jlexer.Lexer, out *ContinueToLocationParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "location": + if in.IsNull() { + in.Skip() + out.Location = nil + } else { + if out.Location == nil { + out.Location = new(Location) + } + (*out.Location).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(out *jwriter.Writer, in ContinueToLocationParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"location\":") + if in.Location == nil { + out.RawString("null") + } else { + (*in.Location).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ContinueToLocationParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ContinueToLocationParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ContinueToLocationParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ContinueToLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, out *GetPossibleBreakpointsReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "locations": + if in.IsNull() { + in.Skip() + out.Locations = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Locations = make([]*Location, 0, 8) + } else { + out.Locations = []*Location{} + } + for !in.IsDelim(']') { + var v25 *Location + if in.IsNull() { + in.Skip() + v25 = nil + } else { + if v25 == nil { + v25 = new(Location) + } + (*v25).UnmarshalEasyJSON(in) + } + out.Locations = append(out.Locations, v25) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(out *jwriter.Writer, in GetPossibleBreakpointsReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Locations) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"locations\":") + if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v26, v27 := range in.Locations { + if v26 > 0 { + out.RawByte(',') + } + if v27 == nil { + out.RawString("null") + } else { + (*v27).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetPossibleBreakpointsReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetPossibleBreakpointsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetPossibleBreakpointsReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetPossibleBreakpointsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, out *GetPossibleBreakpointsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "start": + if in.IsNull() { + in.Skip() + out.Start = nil + } else { + if out.Start == nil { + out.Start = new(Location) + } + (*out.Start).UnmarshalEasyJSON(in) + } + case "end": + if in.IsNull() { + in.Skip() + out.End = nil + } else { + if out.End == nil { + out.End = new(Location) + } + (*out.End).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer, in GetPossibleBreakpointsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"start\":") + if in.Start == nil { + out.RawString("null") + } else { + (*in.Start).MarshalEasyJSON(out) + } + if in.End != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"end\":") + if in.End == nil { + out.RawString("null") + } else { + (*in.End).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetPossibleBreakpointsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetPossibleBreakpointsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetPossibleBreakpointsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetPossibleBreakpointsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(in *jlexer.Lexer, out *RemoveBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "breakpointId": + out.BreakpointID = BreakpointID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer, in RemoveBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"breakpointId\":") + out.String(string(in.BreakpointID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(in *jlexer.Lexer, out *SetBreakpointReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "breakpointId": + out.BreakpointID = BreakpointID(in.String()) + case "actualLocation": + if in.IsNull() { + in.Skip() + out.ActualLocation = nil + } else { + if out.ActualLocation == nil { + out.ActualLocation = new(Location) + } + (*out.ActualLocation).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(out *jwriter.Writer, in SetBreakpointReturns) { + out.RawByte('{') + first := true + _ = first + if in.BreakpointID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"breakpointId\":") + out.String(string(in.BreakpointID)) + } + if in.ActualLocation != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"actualLocation\":") + if in.ActualLocation == nil { + out.RawString("null") + } else { + (*in.ActualLocation).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetBreakpointReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBreakpointReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBreakpointReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBreakpointReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, out *SetBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "location": + if in.IsNull() { + in.Skip() + out.Location = nil + } else { + if out.Location == nil { + out.Location = new(Location) + } + (*out.Location).UnmarshalEasyJSON(in) + } + case "condition": + out.Condition = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer, in SetBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"location\":") + if in.Location == nil { + out.RawString("null") + } else { + (*in.Location).MarshalEasyJSON(out) + } + if in.Condition != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"condition\":") + out.String(string(in.Condition)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(in *jlexer.Lexer, out *SetBreakpointByURLReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "breakpointId": + out.BreakpointID = BreakpointID(in.String()) + case "locations": + if in.IsNull() { + in.Skip() + out.Locations = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Locations = make([]*Location, 0, 8) + } else { + out.Locations = []*Location{} + } + for !in.IsDelim(']') { + var v28 *Location + if in.IsNull() { + in.Skip() + v28 = nil + } else { + if v28 == nil { + v28 = new(Location) + } + (*v28).UnmarshalEasyJSON(in) + } + out.Locations = append(out.Locations, v28) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer, in SetBreakpointByURLReturns) { + out.RawByte('{') + first := true + _ = first + if in.BreakpointID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"breakpointId\":") + out.String(string(in.BreakpointID)) + } + if len(in.Locations) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"locations\":") + if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v29, v30 := range in.Locations { if v29 > 0 { out.RawByte(',') } @@ -4064,53 +3729,388 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(out *jwriter.Writer out.RawByte(']') } } - if in.This != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"this\":") - if in.This == nil { - out.RawString("null") - } else { - (*in.This).MarshalEasyJSON(out) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetBreakpointByURLReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBreakpointByURLReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBreakpointByURLReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBreakpointByURLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(in *jlexer.Lexer, out *SetBreakpointByURLParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() } + in.Skip() + return } - if in.ReturnValue != nil { + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "lineNumber": + out.LineNumber = int64(in.Int64()) + case "url": + out.URL = string(in.String()) + case "urlRegex": + out.URLRegex = string(in.String()) + case "columnNumber": + out.ColumnNumber = int64(in.Int64()) + case "condition": + out.Condition = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(out *jwriter.Writer, in SetBreakpointByURLParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Int64(int64(in.LineNumber)) + if in.URL != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"returnValue\":") - if in.ReturnValue == nil { - out.RawString("null") - } else { - (*in.ReturnValue).MarshalEasyJSON(out) + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.URLRegex != "" { + if !first { + out.RawByte(',') } + first = false + out.RawString("\"urlRegex\":") + out.String(string(in.URLRegex)) + } + if in.ColumnNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNumber\":") + out.Int64(int64(in.ColumnNumber)) + } + if in.Condition != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"condition\":") + out.String(string(in.Condition)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v CallFrame) MarshalJSON() ([]byte, error) { +func (v SetBreakpointByURLParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBreakpointByURLParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBreakpointByURLParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBreakpointByURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, out *SetSkipAllPausesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "skip": + out.Skip = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(out *jwriter.Writer, in SetSkipAllPausesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"skip\":") + out.Bool(bool(in.Skip)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetSkipAllPausesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetSkipAllPausesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetSkipAllPausesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetSkipAllPausesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, out *SetBreakpointsActiveParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "active": + out.Active = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(out *jwriter.Writer, in SetBreakpointsActiveParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"active\":") + out.Bool(bool(in.Active)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetBreakpointsActiveParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBreakpointsActiveParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBreakpointsActiveParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBreakpointsActiveParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) { +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CallFrame) UnmarshalJSON(data []byte) error { +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(l, v) } diff --git a/cdp/deviceorientation/deviceorientation.go b/cdp/deviceorientation/deviceorientation.go index 620ff49..7cd682e 100644 --- a/cdp/deviceorientation/deviceorientation.go +++ b/cdp/deviceorientation/deviceorientation.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // SetDeviceOrientationOverrideParams overrides the Device Orientation. @@ -37,39 +36,7 @@ func SetDeviceOrientationOverride(alpha float64, beta float64, gamma float64) *S // Do executes DeviceOrientation.setDeviceOrientationOverride against the provided context and // target handler. func (p *SetDeviceOrientationOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDeviceOrientationSetDeviceOrientationOverride, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDeviceOrientationSetDeviceOrientationOverride, p, nil) } // ClearDeviceOrientationOverrideParams clears the overridden Device @@ -84,31 +51,5 @@ func ClearDeviceOrientationOverride() *ClearDeviceOrientationOverrideParams { // Do executes DeviceOrientation.clearDeviceOrientationOverride against the provided context and // target handler. func (p *ClearDeviceOrientationOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDeviceOrientationClearDeviceOrientationOverride, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDeviceOrientationClearDeviceOrientationOverride, nil, nil) } diff --git a/cdp/deviceorientation/easyjson.go b/cdp/deviceorientation/easyjson.go index 75e5b6c..b6a5e8e 100644 --- a/cdp/deviceorientation/easyjson.go +++ b/cdp/deviceorientation/easyjson.go @@ -17,7 +17,66 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(in *jlexer.Lexer, out *SetDeviceOrientationOverrideParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(in *jlexer.Lexer, out *ClearDeviceOrientationOverrideParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(out *jwriter.Writer, in ClearDeviceOrientationOverrideParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ClearDeviceOrientationOverrideParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClearDeviceOrientationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClearDeviceOrientationOverrideParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClearDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation1(in *jlexer.Lexer, out *SetDeviceOrientationOverrideParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -52,7 +111,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(in *jlexer.L in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(out *jwriter.Writer, in SetDeviceOrientationOverrideParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation1(out *jwriter.Writer, in SetDeviceOrientationOverrideParams) { out.RawByte('{') first := true _ = first @@ -79,83 +138,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(out *jwriter // MarshalJSON supports json.Marshaler interface func (v SetDeviceOrientationOverrideParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetDeviceOrientationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetDeviceOrientationOverrideParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation1(in *jlexer.Lexer, out *ClearDeviceOrientationOverrideParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation1(out *jwriter.Writer, in ClearDeviceOrientationOverrideParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ClearDeviceOrientationOverrideParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearDeviceOrientationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v SetDeviceOrientationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDeviceorientation1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearDeviceOrientationOverrideParams) UnmarshalJSON(data []byte) error { +func (v *SetDeviceOrientationOverrideParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation1(l, v) } diff --git a/cdp/dom/dom.go b/cdp/dom/dom.go index 2441fa7..31c046d 100644 --- a/cdp/dom/dom.go +++ b/cdp/dom/dom.go @@ -35,33 +35,7 @@ func Enable() *EnableParams { // Do executes DOM.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMEnable, nil, nil) } // DisableParams disables DOM agent for the given page. @@ -75,33 +49,7 @@ func Disable() *DisableParams { // Do executes DOM.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDisable, nil, nil) } // GetDocumentParams returns the root DOM node (and optionally the subtree) @@ -145,46 +93,14 @@ type GetDocumentReturns struct { // returns: // root - Resulting node. func (p *GetDocumentParams) Do(ctxt context.Context, h cdp.Handler) (root *cdp.Node, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetDocumentReturns + err = h.Execute(ctxt, cdp.CommandDOMGetDocument, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetDocument, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetDocumentReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Root, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Root, nil } // GetFlattenedDocumentParams returns the root DOM node (and optionally the @@ -228,46 +144,14 @@ type GetFlattenedDocumentReturns struct { // returns: // nodes - Resulting node. func (p *GetFlattenedDocumentParams) Do(ctxt context.Context, h cdp.Handler) (nodes []*cdp.Node, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetFlattenedDocumentReturns + err = h.Execute(ctxt, cdp.CommandDOMGetFlattenedDocument, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetFlattenedDocument, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetFlattenedDocumentReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Nodes, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Nodes, nil } // CollectClassNamesFromSubtreeParams collects class names for the node with @@ -298,46 +182,14 @@ type CollectClassNamesFromSubtreeReturns struct { // returns: // classNames - Class name list. func (p *CollectClassNamesFromSubtreeParams) Do(ctxt context.Context, h cdp.Handler) (classNames []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CollectClassNamesFromSubtreeReturns + err = h.Execute(ctxt, cdp.CommandDOMCollectClassNamesFromSubtree, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMCollectClassNamesFromSubtree, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CollectClassNamesFromSubtreeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.ClassNames, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.ClassNames, nil } // RequestChildNodesParams requests that children of the node with given id @@ -381,39 +233,7 @@ func (p RequestChildNodesParams) WithPierce(pierce bool) *RequestChildNodesParam // Do executes DOM.requestChildNodes against the provided context and // target handler. func (p *RequestChildNodesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMRequestChildNodes, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMRequestChildNodes, p, nil) } // QuerySelectorParams executes querySelector on a given node. @@ -445,46 +265,14 @@ type QuerySelectorReturns struct { // returns: // nodeID - Query selector result. func (p *QuerySelectorParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res QuerySelectorReturns + err = h.Execute(ctxt, cdp.CommandDOMQuerySelector, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMQuerySelector, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r QuerySelectorReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // QuerySelectorAllParams executes querySelectorAll on a given node. @@ -516,46 +304,14 @@ type QuerySelectorAllReturns struct { // returns: // nodeIds - Query selector result. func (p *QuerySelectorAllParams) Do(ctxt context.Context, h cdp.Handler) (nodeIds []cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res QuerySelectorAllReturns + err = h.Execute(ctxt, cdp.CommandDOMQuerySelectorAll, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMQuerySelectorAll, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r QuerySelectorAllReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.NodeIds, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.NodeIds, nil } // SetNodeNameParams sets node name for a node with given id. @@ -587,46 +343,14 @@ type SetNodeNameReturns struct { // returns: // nodeID - New node's id. func (p *SetNodeNameParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetNodeNameReturns + err = h.Execute(ctxt, cdp.CommandDOMSetNodeName, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetNodeName, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetNodeNameReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // SetNodeValueParams sets node value for a node with given id. @@ -650,39 +374,7 @@ func SetNodeValue(nodeID cdp.NodeID, value string) *SetNodeValueParams { // Do executes DOM.setNodeValue against the provided context and // target handler. func (p *SetNodeValueParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetNodeValue, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetNodeValue, p, nil) } // RemoveNodeParams removes node with given id. @@ -703,39 +395,7 @@ func RemoveNode(nodeID cdp.NodeID) *RemoveNodeParams { // Do executes DOM.removeNode against the provided context and // target handler. func (p *RemoveNodeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMRemoveNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMRemoveNode, p, nil) } // SetAttributeValueParams sets attribute for an element with given id. @@ -762,39 +422,7 @@ func SetAttributeValue(nodeID cdp.NodeID, name string, value string) *SetAttribu // Do executes DOM.setAttributeValue against the provided context and // target handler. func (p *SetAttributeValueParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetAttributeValue, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetAttributeValue, p, nil) } // SetAttributesAsTextParams sets attributes on element with given id. This @@ -830,39 +458,7 @@ func (p SetAttributesAsTextParams) WithName(name string) *SetAttributesAsTextPar // Do executes DOM.setAttributesAsText against the provided context and // target handler. func (p *SetAttributesAsTextParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetAttributesAsText, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetAttributesAsText, p, nil) } // RemoveAttributeParams removes attribute with given name from an element @@ -888,39 +484,7 @@ func RemoveAttribute(nodeID cdp.NodeID, name string) *RemoveAttributeParams { // Do executes DOM.removeAttribute against the provided context and // target handler. func (p *RemoveAttributeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMRemoveAttribute, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMRemoveAttribute, p, nil) } // GetOuterHTMLParams returns node's HTML markup. @@ -949,46 +513,14 @@ type GetOuterHTMLReturns struct { // returns: // outerHTML - Outer HTML markup. func (p *GetOuterHTMLParams) Do(ctxt context.Context, h cdp.Handler) (outerHTML string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetOuterHTMLReturns + err = h.Execute(ctxt, cdp.CommandDOMGetOuterHTML, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetOuterHTML, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetOuterHTMLReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.OuterHTML, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.OuterHTML, nil } // SetOuterHTMLParams sets node HTML markup, returns new node id. @@ -1012,39 +544,7 @@ func SetOuterHTML(nodeID cdp.NodeID, outerHTML string) *SetOuterHTMLParams { // Do executes DOM.setOuterHTML against the provided context and // target handler. func (p *SetOuterHTMLParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetOuterHTML, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetOuterHTML, p, nil) } // PerformSearchParams searches for a given string in the DOM tree. Use @@ -1086,46 +586,14 @@ type PerformSearchReturns struct { // searchID - Unique search session identifier. // resultCount - Number of search results. func (p *PerformSearchParams) Do(ctxt context.Context, h cdp.Handler) (searchID string, resultCount int64, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res PerformSearchReturns + err = h.Execute(ctxt, cdp.CommandDOMPerformSearch, p, &res) if err != nil { return "", 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMPerformSearch, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r PerformSearchReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", 0, cdp.ErrInvalidResult - } - - return r.SearchID, r.ResultCount, nil - - case error: - return "", 0, v - } - - case <-ctxt.Done(): - return "", 0, ctxt.Err() - } - - return "", 0, cdp.ErrUnknownResult + return res.SearchID, res.ResultCount, nil } // GetSearchResultsParams returns search results from given fromIndex to @@ -1162,46 +630,14 @@ type GetSearchResultsReturns struct { // returns: // nodeIds - Ids of the search result nodes. func (p *GetSearchResultsParams) Do(ctxt context.Context, h cdp.Handler) (nodeIds []cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetSearchResultsReturns + err = h.Execute(ctxt, cdp.CommandDOMGetSearchResults, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetSearchResults, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetSearchResultsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.NodeIds, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.NodeIds, nil } // DiscardSearchResultsParams discards search results from the session with @@ -1224,39 +660,7 @@ func DiscardSearchResults(searchID string) *DiscardSearchResultsParams { // Do executes DOM.discardSearchResults against the provided context and // target handler. func (p *DiscardSearchResultsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDiscardSearchResults, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDiscardSearchResults, p, nil) } // RequestNodeParams requests that the node is sent to the caller given the @@ -1291,46 +695,14 @@ type RequestNodeReturns struct { // returns: // nodeID - Node id for given object. func (p *RequestNodeParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RequestNodeReturns + err = h.Execute(ctxt, cdp.CommandDOMRequestNode, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMRequestNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestNodeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // SetInspectModeParams enters the 'inspect' mode. In this mode, elements @@ -1363,39 +735,7 @@ func (p SetInspectModeParams) WithHighlightConfig(highlightConfig *HighlightConf // Do executes DOM.setInspectMode against the provided context and // target handler. func (p *SetInspectModeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetInspectMode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetInspectMode, p, nil) } // HighlightRectParams highlights given rectangle. Coordinates are absolute @@ -1441,39 +781,7 @@ func (p HighlightRectParams) WithOutlineColor(outlineColor *cdp.RGBA) *Highlight // Do executes DOM.highlightRect against the provided context and // target handler. func (p *HighlightRectParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMHighlightRect, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMHighlightRect, p, nil) } // HighlightQuadParams highlights given quad. Coordinates are absolute with @@ -1510,39 +818,7 @@ func (p HighlightQuadParams) WithOutlineColor(outlineColor *cdp.RGBA) *Highlight // Do executes DOM.highlightQuad against the provided context and // target handler. func (p *HighlightQuadParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMHighlightQuad, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMHighlightQuad, p, nil) } // HighlightNodeParams highlights DOM node with given id or with the given @@ -1586,39 +862,7 @@ func (p HighlightNodeParams) WithObjectID(objectID runtime.RemoteObjectID) *High // Do executes DOM.highlightNode against the provided context and // target handler. func (p *HighlightNodeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMHighlightNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMHighlightNode, p, nil) } // HideHighlightParams hides DOM node highlight. @@ -1632,33 +876,7 @@ func HideHighlight() *HideHighlightParams { // Do executes DOM.hideHighlight against the provided context and // target handler. func (p *HideHighlightParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMHideHighlight, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMHideHighlight, nil, nil) } // HighlightFrameParams highlights owner element of the frame with given id. @@ -1695,39 +913,7 @@ func (p HighlightFrameParams) WithContentOutlineColor(contentOutlineColor *cdp.R // Do executes DOM.highlightFrame against the provided context and // target handler. func (p *HighlightFrameParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMHighlightFrame, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMHighlightFrame, p, nil) } // PushNodeByPathToFrontendParams requests that the node is sent to the @@ -1758,46 +944,14 @@ type PushNodeByPathToFrontendReturns struct { // returns: // nodeID - Id of the node for given path. func (p *PushNodeByPathToFrontendParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res PushNodeByPathToFrontendReturns + err = h.Execute(ctxt, cdp.CommandDOMPushNodeByPathToFrontend, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMPushNodeByPathToFrontend, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r PushNodeByPathToFrontendReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // PushNodesByBackendIdsToFrontendParams requests that a batch of nodes is @@ -1828,46 +982,14 @@ type PushNodesByBackendIdsToFrontendReturns struct { // returns: // nodeIds - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. func (p *PushNodesByBackendIdsToFrontendParams) Do(ctxt context.Context, h cdp.Handler) (nodeIds []cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res PushNodesByBackendIdsToFrontendReturns + err = h.Execute(ctxt, cdp.CommandDOMPushNodesByBackendIdsToFrontend, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMPushNodesByBackendIdsToFrontend, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r PushNodesByBackendIdsToFrontendReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.NodeIds, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.NodeIds, nil } // SetInspectedNodeParams enables console to refer to the node with given id @@ -1890,39 +1012,7 @@ func SetInspectedNode(nodeID cdp.NodeID) *SetInspectedNodeParams { // Do executes DOM.setInspectedNode against the provided context and // target handler. func (p *SetInspectedNodeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetInspectedNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetInspectedNode, p, nil) } // ResolveNodeParams resolves JavaScript node object for given node id. @@ -1959,46 +1049,14 @@ type ResolveNodeReturns struct { // returns: // object - JavaScript object wrapper for given node. func (p *ResolveNodeParams) Do(ctxt context.Context, h cdp.Handler) (object *runtime.RemoteObject, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res ResolveNodeReturns + err = h.Execute(ctxt, cdp.CommandDOMResolveNode, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMResolveNode, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r ResolveNodeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Object, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Object, nil } // GetAttributesParams returns attributes for the specified node. @@ -2027,46 +1085,14 @@ type GetAttributesReturns struct { // returns: // attributes - An interleaved array of node attribute names and values. func (p *GetAttributesParams) Do(ctxt context.Context, h cdp.Handler) (attributes []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetAttributesReturns + err = h.Execute(ctxt, cdp.CommandDOMGetAttributes, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetAttributes, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetAttributesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Attributes, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Attributes, nil } // CopyToParams creates a deep copy of the specified node and places it into @@ -2108,46 +1134,14 @@ type CopyToReturns struct { // returns: // nodeID - Id of the node clone. func (p *CopyToParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CopyToReturns + err = h.Execute(ctxt, cdp.CommandDOMCopyTo, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMCopyTo, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CopyToReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // MoveToParams moves node into the new container, places it before the given @@ -2189,46 +1183,14 @@ type MoveToReturns struct { // returns: // nodeID - New id of the moved node. func (p *MoveToParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res MoveToReturns + err = h.Execute(ctxt, cdp.CommandDOMMoveTo, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMMoveTo, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r MoveToReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // UndoParams undoes the last performed action. @@ -2242,33 +1204,7 @@ func Undo() *UndoParams { // Do executes DOM.undo against the provided context and // target handler. func (p *UndoParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMUndo, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMUndo, nil, nil) } // RedoParams re-does the last undone action. @@ -2282,33 +1218,7 @@ func Redo() *RedoParams { // Do executes DOM.redo against the provided context and // target handler. func (p *RedoParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMRedo, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMRedo, nil, nil) } // MarkUndoableStateParams marks last undoable state. @@ -2322,33 +1232,7 @@ func MarkUndoableState() *MarkUndoableStateParams { // Do executes DOM.markUndoableState against the provided context and // target handler. func (p *MarkUndoableStateParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMMarkUndoableState, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMMarkUndoableState, nil, nil) } // FocusParams focuses the given element. @@ -2369,39 +1253,7 @@ func Focus(nodeID cdp.NodeID) *FocusParams { // Do executes DOM.focus against the provided context and // target handler. func (p *FocusParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMFocus, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMFocus, p, nil) } // SetFileInputFilesParams sets files for the given file input element. @@ -2425,39 +1277,7 @@ func SetFileInputFiles(nodeID cdp.NodeID, files []string) *SetFileInputFilesPara // Do executes DOM.setFileInputFiles against the provided context and // target handler. func (p *SetFileInputFilesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMSetFileInputFiles, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMSetFileInputFiles, p, nil) } // GetBoxModelParams returns boxes for the currently selected nodes. @@ -2486,46 +1306,14 @@ type GetBoxModelReturns struct { // returns: // model - Box model for the node. func (p *GetBoxModelParams) Do(ctxt context.Context, h cdp.Handler) (model *BoxModel, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetBoxModelReturns + err = h.Execute(ctxt, cdp.CommandDOMGetBoxModel, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetBoxModel, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetBoxModelReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Model, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Model, nil } // GetNodeForLocationParams returns node id at given location. @@ -2557,46 +1345,14 @@ type GetNodeForLocationReturns struct { // returns: // nodeID - Id of the node at given coordinates. func (p *GetNodeForLocationParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetNodeForLocationReturns + err = h.Execute(ctxt, cdp.CommandDOMGetNodeForLocation, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetNodeForLocation, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetNodeForLocationReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // GetRelayoutBoundaryParams returns the id of the nearest ancestor that is a @@ -2627,46 +1383,14 @@ type GetRelayoutBoundaryReturns struct { // returns: // nodeID - Relayout boundary node id for the given node. func (p *GetRelayoutBoundaryParams) Do(ctxt context.Context, h cdp.Handler) (nodeID cdp.NodeID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetRelayoutBoundaryReturns + err = h.Execute(ctxt, cdp.CommandDOMGetRelayoutBoundary, p, &res) if err != nil { return 0, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetRelayoutBoundary, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetRelayoutBoundaryReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, cdp.ErrInvalidResult - } - - return r.NodeID, nil - - case error: - return 0, v - } - - case <-ctxt.Done(): - return 0, ctxt.Err() - } - - return 0, cdp.ErrUnknownResult + return res.NodeID, nil } // GetHighlightObjectForTestParams for testing. @@ -2695,44 +1419,12 @@ type GetHighlightObjectForTestReturns struct { // returns: // highlight - Highlight data for the node. func (p *GetHighlightObjectForTestParams) Do(ctxt context.Context, h cdp.Handler) (highlight easyjson.RawMessage, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetHighlightObjectForTestReturns + err = h.Execute(ctxt, cdp.CommandDOMGetHighlightObjectForTest, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMGetHighlightObjectForTest, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetHighlightObjectForTestReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Highlight, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Highlight, nil } diff --git a/cdp/dom/easyjson.go b/cdp/dom/easyjson.go index 4051c07..cc72c81 100644 --- a/cdp/dom/easyjson.go +++ b/cdp/dom/easyjson.go @@ -19,3148 +19,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom(in *jlexer.Lexer, out *UndoParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom(out *jwriter.Writer, in UndoParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v UndoParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v UndoParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *UndoParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *UndoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom1(in *jlexer.Lexer, out *ShapeOutsideInfo) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "bounds": - if in.IsNull() { - in.Skip() - out.Bounds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Bounds = make(Quad, 0, 8) - } else { - out.Bounds = Quad{} - } - for !in.IsDelim(']') { - var v1 float64 - v1 = float64(in.Float64()) - out.Bounds = append(out.Bounds, v1) - in.WantComma() - } - in.Delim(']') - } - case "shape": - if in.IsNull() { - in.Skip() - out.Shape = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Shape = make([]easyjson.RawMessage, 0, 2) - } else { - out.Shape = []easyjson.RawMessage{} - } - for !in.IsDelim(']') { - var v2 easyjson.RawMessage - (v2).UnmarshalEasyJSON(in) - out.Shape = append(out.Shape, v2) - in.WantComma() - } - in.Delim(']') - } - case "marginShape": - if in.IsNull() { - in.Skip() - out.MarginShape = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.MarginShape = make([]easyjson.RawMessage, 0, 2) - } else { - out.MarginShape = []easyjson.RawMessage{} - } - for !in.IsDelim(']') { - var v3 easyjson.RawMessage - (v3).UnmarshalEasyJSON(in) - out.MarginShape = append(out.MarginShape, v3) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in ShapeOutsideInfo) { - out.RawByte('{') - first := true - _ = first - if len(in.Bounds) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"bounds\":") - if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v4, v5 := range in.Bounds { - if v4 > 0 { - out.RawByte(',') - } - out.Float64(float64(v5)) - } - out.RawByte(']') - } - } - if len(in.Shape) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"shape\":") - if in.Shape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v6, v7 := range in.Shape { - if v6 > 0 { - out.RawByte(',') - } - (v7).MarshalEasyJSON(out) - } - out.RawByte(']') - } - } - if len(in.MarginShape) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"marginShape\":") - if in.MarginShape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.MarginShape { - if v8 > 0 { - out.RawByte(',') - } - (v9).MarshalEasyJSON(out) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ShapeOutsideInfo) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ShapeOutsideInfo) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ShapeOutsideInfo) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ShapeOutsideInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom2(in *jlexer.Lexer, out *SetOuterHTMLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "outerHTML": - out.OuterHTML = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom2(out *jwriter.Writer, in SetOuterHTMLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"outerHTML\":") - out.String(string(in.OuterHTML)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetOuterHTMLParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetOuterHTMLParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetOuterHTMLParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetOuterHTMLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom3(in *jlexer.Lexer, out *SetNodeValueParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "value": - out.Value = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom3(out *jwriter.Writer, in SetNodeValueParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetNodeValueParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetNodeValueParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetNodeValueParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetNodeValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom4(in *jlexer.Lexer, out *SetNodeNameReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom4(out *jwriter.Writer, in SetNodeNameReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetNodeNameReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetNodeNameReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetNodeNameReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetNodeNameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom5(in *jlexer.Lexer, out *SetNodeNameParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "name": - out.Name = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom5(out *jwriter.Writer, in SetNodeNameParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetNodeNameParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetNodeNameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetNodeNameParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetNodeNameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom6(in *jlexer.Lexer, out *SetInspectedNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom6(out *jwriter.Writer, in SetInspectedNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetInspectedNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetInspectedNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetInspectedNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetInspectedNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom7(in *jlexer.Lexer, out *SetInspectModeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "mode": - (out.Mode).UnmarshalEasyJSON(in) - case "highlightConfig": - if in.IsNull() { - in.Skip() - out.HighlightConfig = nil - } else { - if out.HighlightConfig == nil { - out.HighlightConfig = new(HighlightConfig) - } - (*out.HighlightConfig).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom7(out *jwriter.Writer, in SetInspectModeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"mode\":") - (in.Mode).MarshalEasyJSON(out) - if in.HighlightConfig != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"highlightConfig\":") - if in.HighlightConfig == nil { - out.RawString("null") - } else { - (*in.HighlightConfig).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetInspectModeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetInspectModeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetInspectModeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetInspectModeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom8(in *jlexer.Lexer, out *SetFileInputFilesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "files": - if in.IsNull() { - in.Skip() - out.Files = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Files = make([]string, 0, 4) - } else { - out.Files = []string{} - } - for !in.IsDelim(']') { - var v10 string - v10 = string(in.String()) - out.Files = append(out.Files, v10) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom8(out *jwriter.Writer, in SetFileInputFilesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"files\":") - if in.Files == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v11, v12 := range in.Files { - if v11 > 0 { - out.RawByte(',') - } - out.String(string(v12)) - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetFileInputFilesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetFileInputFilesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetFileInputFilesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetFileInputFilesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom9(in *jlexer.Lexer, out *SetAttributesAsTextParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "text": - out.Text = string(in.String()) - case "name": - out.Name = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom9(out *jwriter.Writer, in SetAttributesAsTextParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetAttributesAsTextParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetAttributesAsTextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetAttributesAsTextParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetAttributesAsTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom10(in *jlexer.Lexer, out *SetAttributeValueParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "name": - out.Name = string(in.String()) - case "value": - out.Value = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom10(out *jwriter.Writer, in SetAttributeValueParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetAttributeValueParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetAttributeValueParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetAttributeValueParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetAttributeValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom11(in *jlexer.Lexer, out *ResolveNodeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "object": - if in.IsNull() { - in.Skip() - out.Object = nil - } else { - if out.Object == nil { - out.Object = new(runtime.RemoteObject) - } - (*out.Object).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom11(out *jwriter.Writer, in ResolveNodeReturns) { - out.RawByte('{') - first := true - _ = first - if in.Object != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"object\":") - if in.Object == nil { - out.RawString("null") - } else { - (*in.Object).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ResolveNodeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ResolveNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ResolveNodeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ResolveNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom12(in *jlexer.Lexer, out *ResolveNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "objectGroup": - out.ObjectGroup = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom12(out *jwriter.Writer, in ResolveNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if in.ObjectGroup != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectGroup\":") - out.String(string(in.ObjectGroup)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ResolveNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ResolveNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ResolveNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ResolveNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom13(in *jlexer.Lexer, out *RequestNodeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom13(out *jwriter.Writer, in RequestNodeReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestNodeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestNodeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom14(in *jlexer.Lexer, out *RequestNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "objectId": - out.ObjectID = runtime.RemoteObjectID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom14(out *jwriter.Writer, in RequestNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom14(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom15(in *jlexer.Lexer, out *RequestChildNodesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "depth": - out.Depth = int64(in.Int64()) - case "pierce": - out.Pierce = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom15(out *jwriter.Writer, in RequestChildNodesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if in.Depth != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"depth\":") - out.Int64(int64(in.Depth)) - } - if in.Pierce { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pierce\":") - out.Bool(bool(in.Pierce)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestChildNodesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom15(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestChildNodesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom15(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestChildNodesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom15(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestChildNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom15(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom16(in *jlexer.Lexer, out *RemoveNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom16(out *jwriter.Writer, in RemoveNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom17(in *jlexer.Lexer, out *RemoveAttributeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "name": - out.Name = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom17(out *jwriter.Writer, in RemoveAttributeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveAttributeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveAttributeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveAttributeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveAttributeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom18(in *jlexer.Lexer, out *RedoParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(out *jwriter.Writer, in RedoParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RedoParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RedoParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RedoParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RedoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom19(in *jlexer.Lexer, out *Rect) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "x": - out.X = float64(in.Float64()) - case "y": - out.Y = float64(in.Float64()) - case "width": - out.Width = float64(in.Float64()) - case "height": - out.Height = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom19(out *jwriter.Writer, in Rect) { - out.RawByte('{') - first := true - _ = first - if in.X != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"x\":") - out.Float64(float64(in.X)) - } - if in.Y != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"y\":") - out.Float64(float64(in.Y)) - } - if in.Width != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"width\":") - out.Float64(float64(in.Width)) - } - if in.Height != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"height\":") - out.Float64(float64(in.Height)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Rect) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Rect) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Rect) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Rect) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom20(in *jlexer.Lexer, out *QuerySelectorReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom20(out *jwriter.Writer, in QuerySelectorReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QuerySelectorReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom20(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QuerySelectorReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom20(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QuerySelectorReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom20(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QuerySelectorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom20(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom21(in *jlexer.Lexer, out *QuerySelectorParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "selector": - out.Selector = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom21(out *jwriter.Writer, in QuerySelectorParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"selector\":") - out.String(string(in.Selector)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QuerySelectorParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QuerySelectorParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QuerySelectorParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QuerySelectorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom22(in *jlexer.Lexer, out *QuerySelectorAllReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeIds": - if in.IsNull() { - in.Skip() - out.NodeIds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) - } else { - out.NodeIds = []cdp.NodeID{} - } - for !in.IsDelim(']') { - var v13 cdp.NodeID - (v13).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v13) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom22(out *jwriter.Writer, in QuerySelectorAllReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.NodeIds) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeIds\":") - if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.NodeIds { - if v14 > 0 { - out.RawByte(',') - } - out.Int64(int64(v15)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QuerySelectorAllReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QuerySelectorAllReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QuerySelectorAllReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QuerySelectorAllReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom23(in *jlexer.Lexer, out *QuerySelectorAllParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "selector": - out.Selector = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom23(out *jwriter.Writer, in QuerySelectorAllParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"selector\":") - out.String(string(in.Selector)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QuerySelectorAllParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom23(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QuerySelectorAllParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom23(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QuerySelectorAllParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom23(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QuerySelectorAllParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom23(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom24(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeIds": - if in.IsNull() { - in.Skip() - out.NodeIds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) - } else { - out.NodeIds = []cdp.NodeID{} - } - for !in.IsDelim(']') { - var v16 cdp.NodeID - (v16).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v16) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom24(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.NodeIds) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeIds\":") - if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.NodeIds { - if v17 > 0 { - out.RawByte(',') - } - out.Int64(int64(v18)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PushNodesByBackendIdsToFrontendReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom24(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PushNodesByBackendIdsToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom24(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom24(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom24(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom25(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "backendNodeIds": - if in.IsNull() { - in.Skip() - out.BackendNodeIds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.BackendNodeIds = make([]cdp.BackendNodeID, 0, 8) - } else { - out.BackendNodeIds = []cdp.BackendNodeID{} - } - for !in.IsDelim(']') { - var v19 cdp.BackendNodeID - (v19).UnmarshalEasyJSON(in) - out.BackendNodeIds = append(out.BackendNodeIds, v19) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom25(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendNodeIds\":") - if in.BackendNodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v20, v21 := range in.BackendNodeIds { - if v20 > 0 { - out.RawByte(',') - } - out.Int64(int64(v21)) - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PushNodesByBackendIdsToFrontendParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PushNodesByBackendIdsToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom26(in *jlexer.Lexer, out *PushNodeByPathToFrontendReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom26(out *jwriter.Writer, in PushNodeByPathToFrontendReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PushNodeByPathToFrontendReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom26(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PushNodeByPathToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom26(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PushNodeByPathToFrontendReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom26(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PushNodeByPathToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom26(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom27(in *jlexer.Lexer, out *PushNodeByPathToFrontendParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "path": - out.Path = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom27(out *jwriter.Writer, in PushNodeByPathToFrontendParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"path\":") - out.String(string(in.Path)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PushNodeByPathToFrontendParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom27(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PushNodeByPathToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom27(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PushNodeByPathToFrontendParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom27(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PushNodeByPathToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom27(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom28(in *jlexer.Lexer, out *PerformSearchReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "searchId": - out.SearchID = string(in.String()) - case "resultCount": - out.ResultCount = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom28(out *jwriter.Writer, in PerformSearchReturns) { - out.RawByte('{') - first := true - _ = first - if in.SearchID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"searchId\":") - out.String(string(in.SearchID)) - } - if in.ResultCount != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"resultCount\":") - out.Int64(int64(in.ResultCount)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PerformSearchReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom28(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PerformSearchReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom28(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PerformSearchReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom28(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PerformSearchReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom28(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom29(in *jlexer.Lexer, out *PerformSearchParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "query": - out.Query = string(in.String()) - case "includeUserAgentShadowDOM": - out.IncludeUserAgentShadowDOM = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom29(out *jwriter.Writer, in PerformSearchParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"query\":") - out.String(string(in.Query)) - if in.IncludeUserAgentShadowDOM { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"includeUserAgentShadowDOM\":") - out.Bool(bool(in.IncludeUserAgentShadowDOM)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v PerformSearchParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom29(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v PerformSearchParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom29(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *PerformSearchParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom29(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PerformSearchParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom29(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom30(in *jlexer.Lexer, out *MoveToReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom30(out *jwriter.Writer, in MoveToReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v MoveToReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom30(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v MoveToReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom30(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *MoveToReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom30(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MoveToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom30(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom31(in *jlexer.Lexer, out *MoveToParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "targetNodeId": - (out.TargetNodeID).UnmarshalEasyJSON(in) - case "insertBeforeNodeId": - (out.InsertBeforeNodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom31(out *jwriter.Writer, in MoveToParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetNodeId\":") - out.Int64(int64(in.TargetNodeID)) - if in.InsertBeforeNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"insertBeforeNodeId\":") - out.Int64(int64(in.InsertBeforeNodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v MoveToParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom31(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v MoveToParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom31(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *MoveToParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom31(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MoveToParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom31(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom32(in *jlexer.Lexer, out *MarkUndoableStateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom32(out *jwriter.Writer, in MarkUndoableStateParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v MarkUndoableStateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom32(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v MarkUndoableStateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom32(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *MarkUndoableStateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom32(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MarkUndoableStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom32(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom33(in *jlexer.Lexer, out *HighlightRectParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "x": - out.X = int64(in.Int64()) - case "y": - out.Y = int64(in.Int64()) - case "width": - out.Width = int64(in.Int64()) - case "height": - out.Height = int64(in.Int64()) - case "color": - if in.IsNull() { - in.Skip() - out.Color = nil - } else { - if out.Color == nil { - out.Color = new(cdp.RGBA) - } - (*out.Color).UnmarshalEasyJSON(in) - } - case "outlineColor": - if in.IsNull() { - in.Skip() - out.OutlineColor = nil - } else { - if out.OutlineColor == nil { - out.OutlineColor = new(cdp.RGBA) - } - (*out.OutlineColor).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom33(out *jwriter.Writer, in HighlightRectParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"x\":") - out.Int64(int64(in.X)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"y\":") - out.Int64(int64(in.Y)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"width\":") - out.Int64(int64(in.Width)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"height\":") - out.Int64(int64(in.Height)) - if in.Color != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"color\":") - if in.Color == nil { - out.RawString("null") - } else { - (*in.Color).MarshalEasyJSON(out) - } - } - if in.OutlineColor != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"outlineColor\":") - if in.OutlineColor == nil { - out.RawString("null") - } else { - (*in.OutlineColor).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v HighlightRectParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom33(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v HighlightRectParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom33(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *HighlightRectParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom33(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HighlightRectParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom33(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom34(in *jlexer.Lexer, out *HighlightQuadParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "quad": - if in.IsNull() { - in.Skip() - out.Quad = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Quad = make(Quad, 0, 8) - } else { - out.Quad = Quad{} - } - for !in.IsDelim(']') { - var v22 float64 - v22 = float64(in.Float64()) - out.Quad = append(out.Quad, v22) - in.WantComma() - } - in.Delim(']') - } - case "color": - if in.IsNull() { - in.Skip() - out.Color = nil - } else { - if out.Color == nil { - out.Color = new(cdp.RGBA) - } - (*out.Color).UnmarshalEasyJSON(in) - } - case "outlineColor": - if in.IsNull() { - in.Skip() - out.OutlineColor = nil - } else { - if out.OutlineColor == nil { - out.OutlineColor = new(cdp.RGBA) - } - (*out.OutlineColor).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom34(out *jwriter.Writer, in HighlightQuadParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"quad\":") - if in.Quad == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v23, v24 := range in.Quad { - if v23 > 0 { - out.RawByte(',') - } - out.Float64(float64(v24)) - } - out.RawByte(']') - } - if in.Color != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"color\":") - if in.Color == nil { - out.RawString("null") - } else { - (*in.Color).MarshalEasyJSON(out) - } - } - if in.OutlineColor != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"outlineColor\":") - if in.OutlineColor == nil { - out.RawString("null") - } else { - (*in.OutlineColor).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v HighlightQuadParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom34(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v HighlightQuadParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom34(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *HighlightQuadParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom34(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HighlightQuadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom34(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom35(in *jlexer.Lexer, out *HighlightNodeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "highlightConfig": - if in.IsNull() { - in.Skip() - out.HighlightConfig = nil - } else { - if out.HighlightConfig == nil { - out.HighlightConfig = new(HighlightConfig) - } - (*out.HighlightConfig).UnmarshalEasyJSON(in) - } - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) - case "objectId": - out.ObjectID = runtime.RemoteObjectID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom35(out *jwriter.Writer, in HighlightNodeParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"highlightConfig\":") - if in.HighlightConfig == nil { - out.RawString("null") - } else { - (*in.HighlightConfig).MarshalEasyJSON(out) - } - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - if in.BackendNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendNodeId\":") - out.Int64(int64(in.BackendNodeID)) - } - if in.ObjectID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v HighlightNodeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom35(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v HighlightNodeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom35(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *HighlightNodeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom35(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HighlightNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom35(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom36(in *jlexer.Lexer, out *HighlightFrameParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - case "contentColor": - if in.IsNull() { - in.Skip() - out.ContentColor = nil - } else { - if out.ContentColor == nil { - out.ContentColor = new(cdp.RGBA) - } - (*out.ContentColor).UnmarshalEasyJSON(in) - } - case "contentOutlineColor": - if in.IsNull() { - in.Skip() - out.ContentOutlineColor = nil - } else { - if out.ContentOutlineColor == nil { - out.ContentOutlineColor = new(cdp.RGBA) - } - (*out.ContentOutlineColor).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom36(out *jwriter.Writer, in HighlightFrameParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - if in.ContentColor != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"contentColor\":") - if in.ContentColor == nil { - out.RawString("null") - } else { - (*in.ContentColor).MarshalEasyJSON(out) - } - } - if in.ContentOutlineColor != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"contentOutlineColor\":") - if in.ContentOutlineColor == nil { - out.RawString("null") - } else { - (*in.ContentOutlineColor).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v HighlightFrameParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom36(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v HighlightFrameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom36(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *HighlightFrameParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom36(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HighlightFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom36(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(in *jlexer.Lexer, out *HighlightConfig) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom(in *jlexer.Lexer, out *HighlightConfig) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3269,7 +128,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(in *jlexer.Lexer, out *H in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(out *jwriter.Writer, in HighlightConfig) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom(out *jwriter.Writer, in HighlightConfig) { out.RawByte('{') first := true _ = first @@ -3403,27 +262,1286 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v HighlightConfig) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v HighlightConfig) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *HighlightConfig) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *HighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom38(in *jlexer.Lexer, out *HideHighlightParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom1(in *jlexer.Lexer, out *Rect) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "x": + out.X = float64(in.Float64()) + case "y": + out.Y = float64(in.Float64()) + case "width": + out.Width = float64(in.Float64()) + case "height": + out.Height = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in Rect) { + out.RawByte('{') + first := true + _ = first + if in.X != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"x\":") + out.Float64(float64(in.X)) + } + if in.Y != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"y\":") + out.Float64(float64(in.Y)) + } + if in.Width != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"width\":") + out.Float64(float64(in.Width)) + } + if in.Height != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"height\":") + out.Float64(float64(in.Height)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Rect) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Rect) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Rect) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Rect) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom2(in *jlexer.Lexer, out *ShapeOutsideInfo) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "bounds": + if in.IsNull() { + in.Skip() + out.Bounds = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Bounds = make(Quad, 0, 8) + } else { + out.Bounds = Quad{} + } + for !in.IsDelim(']') { + var v1 float64 + v1 = float64(in.Float64()) + out.Bounds = append(out.Bounds, v1) + in.WantComma() + } + in.Delim(']') + } + case "shape": + if in.IsNull() { + in.Skip() + out.Shape = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Shape = make([]easyjson.RawMessage, 0, 2) + } else { + out.Shape = []easyjson.RawMessage{} + } + for !in.IsDelim(']') { + var v2 easyjson.RawMessage + (v2).UnmarshalEasyJSON(in) + out.Shape = append(out.Shape, v2) + in.WantComma() + } + in.Delim(']') + } + case "marginShape": + if in.IsNull() { + in.Skip() + out.MarginShape = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.MarginShape = make([]easyjson.RawMessage, 0, 2) + } else { + out.MarginShape = []easyjson.RawMessage{} + } + for !in.IsDelim(']') { + var v3 easyjson.RawMessage + (v3).UnmarshalEasyJSON(in) + out.MarginShape = append(out.MarginShape, v3) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom2(out *jwriter.Writer, in ShapeOutsideInfo) { + out.RawByte('{') + first := true + _ = first + if len(in.Bounds) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"bounds\":") + if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v4, v5 := range in.Bounds { + if v4 > 0 { + out.RawByte(',') + } + out.Float64(float64(v5)) + } + out.RawByte(']') + } + } + if len(in.Shape) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"shape\":") + if in.Shape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v6, v7 := range in.Shape { + if v6 > 0 { + out.RawByte(',') + } + (v7).MarshalEasyJSON(out) + } + out.RawByte(']') + } + } + if len(in.MarginShape) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"marginShape\":") + if in.MarginShape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.MarginShape { + if v8 > 0 { + out.RawByte(',') + } + (v9).MarshalEasyJSON(out) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ShapeOutsideInfo) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ShapeOutsideInfo) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ShapeOutsideInfo) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ShapeOutsideInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom3(in *jlexer.Lexer, out *BoxModel) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "content": + if in.IsNull() { + in.Skip() + out.Content = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Content = make(Quad, 0, 8) + } else { + out.Content = Quad{} + } + for !in.IsDelim(']') { + var v10 float64 + v10 = float64(in.Float64()) + out.Content = append(out.Content, v10) + in.WantComma() + } + in.Delim(']') + } + case "padding": + if in.IsNull() { + in.Skip() + out.Padding = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Padding = make(Quad, 0, 8) + } else { + out.Padding = Quad{} + } + for !in.IsDelim(']') { + var v11 float64 + v11 = float64(in.Float64()) + out.Padding = append(out.Padding, v11) + in.WantComma() + } + in.Delim(']') + } + case "border": + if in.IsNull() { + in.Skip() + out.Border = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Border = make(Quad, 0, 8) + } else { + out.Border = Quad{} + } + for !in.IsDelim(']') { + var v12 float64 + v12 = float64(in.Float64()) + out.Border = append(out.Border, v12) + in.WantComma() + } + in.Delim(']') + } + case "margin": + if in.IsNull() { + in.Skip() + out.Margin = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Margin = make(Quad, 0, 8) + } else { + out.Margin = Quad{} + } + for !in.IsDelim(']') { + var v13 float64 + v13 = float64(in.Float64()) + out.Margin = append(out.Margin, v13) + in.WantComma() + } + in.Delim(']') + } + case "width": + out.Width = int64(in.Int64()) + case "height": + out.Height = int64(in.Int64()) + case "shapeOutside": + if in.IsNull() { + in.Skip() + out.ShapeOutside = nil + } else { + if out.ShapeOutside == nil { + out.ShapeOutside = new(ShapeOutsideInfo) + } + (*out.ShapeOutside).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom3(out *jwriter.Writer, in BoxModel) { + out.RawByte('{') + first := true + _ = first + if len(in.Content) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"content\":") + if in.Content == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.Content { + if v14 > 0 { + out.RawByte(',') + } + out.Float64(float64(v15)) + } + out.RawByte(']') + } + } + if len(in.Padding) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"padding\":") + if in.Padding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v16, v17 := range in.Padding { + if v16 > 0 { + out.RawByte(',') + } + out.Float64(float64(v17)) + } + out.RawByte(']') + } + } + if len(in.Border) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"border\":") + if in.Border == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v18, v19 := range in.Border { + if v18 > 0 { + out.RawByte(',') + } + out.Float64(float64(v19)) + } + out.RawByte(']') + } + } + if len(in.Margin) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"margin\":") + if in.Margin == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v20, v21 := range in.Margin { + if v20 > 0 { + out.RawByte(',') + } + out.Float64(float64(v21)) + } + out.RawByte(']') + } + } + if in.Width != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"width\":") + out.Int64(int64(in.Width)) + } + if in.Height != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"height\":") + out.Int64(int64(in.Height)) + } + if in.ShapeOutside != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"shapeOutside\":") + if in.ShapeOutside == nil { + out.RawString("null") + } else { + (*in.ShapeOutside).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BoxModel) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BoxModel) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BoxModel) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BoxModel) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom4(in *jlexer.Lexer, out *GetHighlightObjectForTestReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "highlight": + (out.Highlight).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom4(out *jwriter.Writer, in GetHighlightObjectForTestReturns) { + out.RawByte('{') + first := true + _ = first + if (in.Highlight).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"highlight\":") + (in.Highlight).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetHighlightObjectForTestReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetHighlightObjectForTestReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetHighlightObjectForTestReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetHighlightObjectForTestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom5(in *jlexer.Lexer, out *GetHighlightObjectForTestParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom5(out *jwriter.Writer, in GetHighlightObjectForTestParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetHighlightObjectForTestParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetHighlightObjectForTestParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetHighlightObjectForTestParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetHighlightObjectForTestParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom6(in *jlexer.Lexer, out *GetRelayoutBoundaryReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom6(out *jwriter.Writer, in GetRelayoutBoundaryReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetRelayoutBoundaryReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetRelayoutBoundaryReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetRelayoutBoundaryReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetRelayoutBoundaryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom7(in *jlexer.Lexer, out *GetRelayoutBoundaryParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom7(out *jwriter.Writer, in GetRelayoutBoundaryParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetRelayoutBoundaryParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetRelayoutBoundaryParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetRelayoutBoundaryParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetRelayoutBoundaryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom8(in *jlexer.Lexer, out *GetNodeForLocationReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom8(out *jwriter.Writer, in GetNodeForLocationReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetNodeForLocationReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetNodeForLocationReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetNodeForLocationReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetNodeForLocationReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom9(in *jlexer.Lexer, out *GetNodeForLocationParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "x": + out.X = int64(in.Int64()) + case "y": + out.Y = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom9(out *jwriter.Writer, in GetNodeForLocationParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"x\":") + out.Int64(int64(in.X)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"y\":") + out.Int64(int64(in.Y)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetNodeForLocationParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetNodeForLocationParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetNodeForLocationParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetNodeForLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom10(in *jlexer.Lexer, out *GetBoxModelReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "model": + if in.IsNull() { + in.Skip() + out.Model = nil + } else { + if out.Model == nil { + out.Model = new(BoxModel) + } + (*out.Model).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom10(out *jwriter.Writer, in GetBoxModelReturns) { + out.RawByte('{') + first := true + _ = first + if in.Model != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"model\":") + if in.Model == nil { + out.RawString("null") + } else { + (*in.Model).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetBoxModelReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetBoxModelReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetBoxModelReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetBoxModelReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom11(in *jlexer.Lexer, out *GetBoxModelParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom11(out *jwriter.Writer, in GetBoxModelParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetBoxModelParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetBoxModelParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetBoxModelParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetBoxModelParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom12(in *jlexer.Lexer, out *SetFileInputFilesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "files": + if in.IsNull() { + in.Skip() + out.Files = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Files = make([]string, 0, 4) + } else { + out.Files = []string{} + } + for !in.IsDelim(']') { + var v22 string + v22 = string(in.String()) + out.Files = append(out.Files, v22) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom12(out *jwriter.Writer, in SetFileInputFilesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"files\":") + if in.Files == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v23, v24 := range in.Files { + if v23 > 0 { + out.RawByte(',') + } + out.String(string(v24)) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetFileInputFilesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetFileInputFilesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetFileInputFilesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetFileInputFilesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom13(in *jlexer.Lexer, out *FocusParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom13(out *jwriter.Writer, in FocusParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v FocusParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v FocusParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *FocusParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *FocusParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom14(in *jlexer.Lexer, out *MarkUndoableStateParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3452,7 +1570,1320 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom38(in *jlexer.Lexer, out *H in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(out *jwriter.Writer, in HideHighlightParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom14(out *jwriter.Writer, in MarkUndoableStateParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MarkUndoableStateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MarkUndoableStateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MarkUndoableStateParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MarkUndoableStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom15(in *jlexer.Lexer, out *RedoParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom15(out *jwriter.Writer, in RedoParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RedoParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RedoParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RedoParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RedoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom16(in *jlexer.Lexer, out *UndoParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom16(out *jwriter.Writer, in UndoParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v UndoParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v UndoParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *UndoParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *UndoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom16(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom17(in *jlexer.Lexer, out *MoveToReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom17(out *jwriter.Writer, in MoveToReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MoveToReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MoveToReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MoveToReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MoveToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom18(in *jlexer.Lexer, out *MoveToParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "targetNodeId": + (out.TargetNodeID).UnmarshalEasyJSON(in) + case "insertBeforeNodeId": + (out.InsertBeforeNodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(out *jwriter.Writer, in MoveToParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetNodeId\":") + out.Int64(int64(in.TargetNodeID)) + if in.InsertBeforeNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"insertBeforeNodeId\":") + out.Int64(int64(in.InsertBeforeNodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MoveToParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MoveToParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MoveToParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *MoveToParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom19(in *jlexer.Lexer, out *CopyToReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom19(out *jwriter.Writer, in CopyToReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CopyToReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CopyToReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CopyToReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CopyToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom19(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom20(in *jlexer.Lexer, out *CopyToParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "targetNodeId": + (out.TargetNodeID).UnmarshalEasyJSON(in) + case "insertBeforeNodeId": + (out.InsertBeforeNodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom20(out *jwriter.Writer, in CopyToParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetNodeId\":") + out.Int64(int64(in.TargetNodeID)) + if in.InsertBeforeNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"insertBeforeNodeId\":") + out.Int64(int64(in.InsertBeforeNodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CopyToParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CopyToParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CopyToParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CopyToParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom21(in *jlexer.Lexer, out *GetAttributesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "attributes": + if in.IsNull() { + in.Skip() + out.Attributes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Attributes = make([]string, 0, 4) + } else { + out.Attributes = []string{} + } + for !in.IsDelim(']') { + var v25 string + v25 = string(in.String()) + out.Attributes = append(out.Attributes, v25) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom21(out *jwriter.Writer, in GetAttributesReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Attributes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"attributes\":") + if in.Attributes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v26, v27 := range in.Attributes { + if v26 > 0 { + out.RawByte(',') + } + out.String(string(v27)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAttributesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAttributesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAttributesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAttributesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom22(in *jlexer.Lexer, out *GetAttributesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom22(out *jwriter.Writer, in GetAttributesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAttributesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAttributesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAttributesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAttributesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom22(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom23(in *jlexer.Lexer, out *ResolveNodeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "object": + if in.IsNull() { + in.Skip() + out.Object = nil + } else { + if out.Object == nil { + out.Object = new(runtime.RemoteObject) + } + (*out.Object).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom23(out *jwriter.Writer, in ResolveNodeReturns) { + out.RawByte('{') + first := true + _ = first + if in.Object != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"object\":") + if in.Object == nil { + out.RawString("null") + } else { + (*in.Object).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ResolveNodeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom23(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ResolveNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom23(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ResolveNodeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom23(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ResolveNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom23(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom24(in *jlexer.Lexer, out *ResolveNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "objectGroup": + out.ObjectGroup = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom24(out *jwriter.Writer, in ResolveNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if in.ObjectGroup != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectGroup\":") + out.String(string(in.ObjectGroup)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ResolveNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom24(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ResolveNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom24(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ResolveNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom24(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ResolveNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom24(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom25(in *jlexer.Lexer, out *SetInspectedNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom25(out *jwriter.Writer, in SetInspectedNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetInspectedNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom25(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetInspectedNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom25(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetInspectedNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom25(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetInspectedNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom25(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom26(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeIds": + if in.IsNull() { + in.Skip() + out.NodeIds = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.NodeIds = make([]cdp.NodeID, 0, 8) + } else { + out.NodeIds = []cdp.NodeID{} + } + for !in.IsDelim(']') { + var v28 cdp.NodeID + (v28).UnmarshalEasyJSON(in) + out.NodeIds = append(out.NodeIds, v28) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom26(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.NodeIds) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeIds\":") + if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v29, v30 := range in.NodeIds { + if v29 > 0 { + out.RawByte(',') + } + out.Int64(int64(v30)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PushNodesByBackendIdsToFrontendReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom26(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PushNodesByBackendIdsToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom26(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom26(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom26(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom27(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "backendNodeIds": + if in.IsNull() { + in.Skip() + out.BackendNodeIds = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.BackendNodeIds = make([]cdp.BackendNodeID, 0, 8) + } else { + out.BackendNodeIds = []cdp.BackendNodeID{} + } + for !in.IsDelim(']') { + var v31 cdp.BackendNodeID + (v31).UnmarshalEasyJSON(in) + out.BackendNodeIds = append(out.BackendNodeIds, v31) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom27(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeIds\":") + if in.BackendNodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v32, v33 := range in.BackendNodeIds { + if v32 > 0 { + out.RawByte(',') + } + out.Int64(int64(v33)) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PushNodesByBackendIdsToFrontendParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PushNodesByBackendIdsToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom27(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom28(in *jlexer.Lexer, out *PushNodeByPathToFrontendReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom28(out *jwriter.Writer, in PushNodeByPathToFrontendReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PushNodeByPathToFrontendReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom28(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PushNodeByPathToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom28(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PushNodeByPathToFrontendReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom28(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PushNodeByPathToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom28(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom29(in *jlexer.Lexer, out *PushNodeByPathToFrontendParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "path": + out.Path = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom29(out *jwriter.Writer, in PushNodeByPathToFrontendParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"path\":") + out.String(string(in.Path)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PushNodeByPathToFrontendParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom29(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PushNodeByPathToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom29(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PushNodeByPathToFrontendParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom29(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PushNodeByPathToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom29(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom30(in *jlexer.Lexer, out *HighlightFrameParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "contentColor": + if in.IsNull() { + in.Skip() + out.ContentColor = nil + } else { + if out.ContentColor == nil { + out.ContentColor = new(cdp.RGBA) + } + (*out.ContentColor).UnmarshalEasyJSON(in) + } + case "contentOutlineColor": + if in.IsNull() { + in.Skip() + out.ContentOutlineColor = nil + } else { + if out.ContentOutlineColor == nil { + out.ContentOutlineColor = new(cdp.RGBA) + } + (*out.ContentOutlineColor).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom30(out *jwriter.Writer, in HighlightFrameParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + if in.ContentColor != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"contentColor\":") + if in.ContentColor == nil { + out.RawString("null") + } else { + (*in.ContentColor).MarshalEasyJSON(out) + } + } + if in.ContentOutlineColor != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"contentOutlineColor\":") + if in.ContentOutlineColor == nil { + out.RawString("null") + } else { + (*in.ContentOutlineColor).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HighlightFrameParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom30(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HighlightFrameParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom30(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HighlightFrameParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom30(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HighlightFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom30(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom31(in *jlexer.Lexer, out *HideHighlightParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom31(out *jwriter.Writer, in HideHighlightParams) { out.RawByte('{') first := true _ = first @@ -3462,24 +2893,699 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v HideHighlightParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom31(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v HideHighlightParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom31(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *HideHighlightParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom31(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HideHighlightParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom31(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom32(in *jlexer.Lexer, out *HighlightNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "highlightConfig": + if in.IsNull() { + in.Skip() + out.HighlightConfig = nil + } else { + if out.HighlightConfig == nil { + out.HighlightConfig = new(HighlightConfig) + } + (*out.HighlightConfig).UnmarshalEasyJSON(in) + } + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom32(out *jwriter.Writer, in HighlightNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"highlightConfig\":") + if in.HighlightConfig == nil { + out.RawString("null") + } else { + (*in.HighlightConfig).MarshalEasyJSON(out) + } + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + if in.BackendNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeId\":") + out.Int64(int64(in.BackendNodeID)) + } + if in.ObjectID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HighlightNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom32(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HighlightNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom32(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HighlightNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom32(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HighlightNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom32(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom33(in *jlexer.Lexer, out *HighlightQuadParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "quad": + if in.IsNull() { + in.Skip() + out.Quad = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Quad = make(Quad, 0, 8) + } else { + out.Quad = Quad{} + } + for !in.IsDelim(']') { + var v34 float64 + v34 = float64(in.Float64()) + out.Quad = append(out.Quad, v34) + in.WantComma() + } + in.Delim(']') + } + case "color": + if in.IsNull() { + in.Skip() + out.Color = nil + } else { + if out.Color == nil { + out.Color = new(cdp.RGBA) + } + (*out.Color).UnmarshalEasyJSON(in) + } + case "outlineColor": + if in.IsNull() { + in.Skip() + out.OutlineColor = nil + } else { + if out.OutlineColor == nil { + out.OutlineColor = new(cdp.RGBA) + } + (*out.OutlineColor).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom33(out *jwriter.Writer, in HighlightQuadParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"quad\":") + if in.Quad == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v35, v36 := range in.Quad { + if v35 > 0 { + out.RawByte(',') + } + out.Float64(float64(v36)) + } + out.RawByte(']') + } + if in.Color != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"color\":") + if in.Color == nil { + out.RawString("null") + } else { + (*in.Color).MarshalEasyJSON(out) + } + } + if in.OutlineColor != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"outlineColor\":") + if in.OutlineColor == nil { + out.RawString("null") + } else { + (*in.OutlineColor).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HighlightQuadParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom33(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HighlightQuadParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom33(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HighlightQuadParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom33(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HighlightQuadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom33(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom34(in *jlexer.Lexer, out *HighlightRectParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "x": + out.X = int64(in.Int64()) + case "y": + out.Y = int64(in.Int64()) + case "width": + out.Width = int64(in.Int64()) + case "height": + out.Height = int64(in.Int64()) + case "color": + if in.IsNull() { + in.Skip() + out.Color = nil + } else { + if out.Color == nil { + out.Color = new(cdp.RGBA) + } + (*out.Color).UnmarshalEasyJSON(in) + } + case "outlineColor": + if in.IsNull() { + in.Skip() + out.OutlineColor = nil + } else { + if out.OutlineColor == nil { + out.OutlineColor = new(cdp.RGBA) + } + (*out.OutlineColor).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom34(out *jwriter.Writer, in HighlightRectParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"x\":") + out.Int64(int64(in.X)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"y\":") + out.Int64(int64(in.Y)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"width\":") + out.Int64(int64(in.Width)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"height\":") + out.Int64(int64(in.Height)) + if in.Color != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"color\":") + if in.Color == nil { + out.RawString("null") + } else { + (*in.Color).MarshalEasyJSON(out) + } + } + if in.OutlineColor != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"outlineColor\":") + if in.OutlineColor == nil { + out.RawString("null") + } else { + (*in.OutlineColor).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HighlightRectParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom34(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HighlightRectParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom34(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HighlightRectParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom34(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HighlightRectParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom34(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom35(in *jlexer.Lexer, out *SetInspectModeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "mode": + (out.Mode).UnmarshalEasyJSON(in) + case "highlightConfig": + if in.IsNull() { + in.Skip() + out.HighlightConfig = nil + } else { + if out.HighlightConfig == nil { + out.HighlightConfig = new(HighlightConfig) + } + (*out.HighlightConfig).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom35(out *jwriter.Writer, in SetInspectModeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"mode\":") + (in.Mode).MarshalEasyJSON(out) + if in.HighlightConfig != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"highlightConfig\":") + if in.HighlightConfig == nil { + out.RawString("null") + } else { + (*in.HighlightConfig).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetInspectModeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetInspectModeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetInspectModeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetInspectModeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom35(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom36(in *jlexer.Lexer, out *RequestNodeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom36(out *jwriter.Writer, in RequestNodeReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestNodeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestNodeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestNodeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom36(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(in *jlexer.Lexer, out *RequestNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(out *jwriter.Writer, in RequestNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom37(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom37(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom38(in *jlexer.Lexer, out *DiscardSearchResultsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "searchId": + out.SearchID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(out *jwriter.Writer, in DiscardSearchResultsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"searchId\":") + out.String(string(in.SearchID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DiscardSearchResultsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DiscardSearchResultsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DiscardSearchResultsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom38(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HideHighlightParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DiscardSearchResultsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom38(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom39(in *jlexer.Lexer, out *GetSearchResultsReturns) { @@ -3513,9 +3619,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom39(in *jlexer.Lexer, out *G out.NodeIds = []cdp.NodeID{} } for !in.IsDelim(']') { - var v25 cdp.NodeID - (v25).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v25) + var v37 cdp.NodeID + (v37).UnmarshalEasyJSON(in) + out.NodeIds = append(out.NodeIds, v37) in.WantComma() } in.Delim(']') @@ -3544,11 +3650,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom39(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v26, v27 := range in.NodeIds { - if v26 > 0 { + for v38, v39 := range in.NodeIds { + if v38 > 0 { out.RawByte(',') } - out.Int64(int64(v27)) + out.Int64(int64(v39)) } out.RawByte(']') } @@ -3662,7 +3768,7 @@ func (v *GetSearchResultsParams) UnmarshalJSON(data []byte) error { func (v *GetSearchResultsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom40(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom41(in *jlexer.Lexer, out *GetRelayoutBoundaryReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom41(in *jlexer.Lexer, out *PerformSearchReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3681,8 +3787,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom41(in *jlexer.Lexer, out *G continue } switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) + case "searchId": + out.SearchID = string(in.String()) + case "resultCount": + out.ResultCount = int64(in.Int64()) default: in.SkipRecursive() } @@ -3693,45 +3801,130 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom41(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom41(out *jwriter.Writer, in GetRelayoutBoundaryReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom41(out *jwriter.Writer, in PerformSearchReturns) { out.RawByte('{') first := true _ = first - if in.NodeID != 0 { + if in.SearchID != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) + out.RawString("\"searchId\":") + out.String(string(in.SearchID)) + } + if in.ResultCount != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"resultCount\":") + out.Int64(int64(in.ResultCount)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetRelayoutBoundaryReturns) MarshalJSON() ([]byte, error) { +func (v PerformSearchReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom41(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetRelayoutBoundaryReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v PerformSearchReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom41(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetRelayoutBoundaryReturns) UnmarshalJSON(data []byte) error { +func (v *PerformSearchReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom41(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetRelayoutBoundaryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *PerformSearchReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom41(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(in *jlexer.Lexer, out *GetRelayoutBoundaryParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(in *jlexer.Lexer, out *PerformSearchParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "query": + out.Query = string(in.String()) + case "includeUserAgentShadowDOM": + out.IncludeUserAgentShadowDOM = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(out *jwriter.Writer, in PerformSearchParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"query\":") + out.String(string(in.Query)) + if in.IncludeUserAgentShadowDOM { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"includeUserAgentShadowDOM\":") + out.Bool(bool(in.IncludeUserAgentShadowDOM)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PerformSearchParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PerformSearchParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PerformSearchParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PerformSearchParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(in *jlexer.Lexer, out *SetOuterHTMLParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3752,6 +3945,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(in *jlexer.Lexer, out *G switch key { case "nodeId": (out.NodeID).UnmarshalEasyJSON(in) + case "outerHTML": + out.OuterHTML = string(in.String()) default: in.SkipRecursive() } @@ -3762,7 +3957,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(out *jwriter.Writer, in GetRelayoutBoundaryParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(out *jwriter.Writer, in SetOuterHTMLParams) { out.RawByte('{') first := true _ = first @@ -3772,33 +3967,39 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(out *jwriter.Writer, in first = false out.RawString("\"nodeId\":") out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"outerHTML\":") + out.String(string(in.OuterHTML)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetRelayoutBoundaryParams) MarshalJSON() ([]byte, error) { +func (v SetOuterHTMLParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetRelayoutBoundaryParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom42(w, v) +func (v SetOuterHTMLParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetRelayoutBoundaryParams) UnmarshalJSON(data []byte) error { +func (v *SetOuterHTMLParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetRelayoutBoundaryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom42(l, v) +func (v *SetOuterHTMLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(in *jlexer.Lexer, out *GetOuterHTMLReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(in *jlexer.Lexer, out *GetOuterHTMLReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3829,7 +4030,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(out *jwriter.Writer, in GetOuterHTMLReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(out *jwriter.Writer, in GetOuterHTMLReturns) { out.RawByte('{') first := true _ = first @@ -3847,27 +4048,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetOuterHTMLReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetOuterHTMLReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom43(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetOuterHTMLReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetOuterHTMLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom43(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(in *jlexer.Lexer, out *GetOuterHTMLParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom45(in *jlexer.Lexer, out *GetOuterHTMLParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3898,7 +4099,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(in *jlexer.Lexer, out *G in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(out *jwriter.Writer, in GetOuterHTMLParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom45(out *jwriter.Writer, in GetOuterHTMLParams) { out.RawByte('{') first := true _ = first @@ -3913,2245 +4114,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v GetOuterHTMLParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetOuterHTMLParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom44(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetOuterHTMLParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetOuterHTMLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom44(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom45(in *jlexer.Lexer, out *GetNodeForLocationReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom45(out *jwriter.Writer, in GetNodeForLocationReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetNodeForLocationReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom45(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetNodeForLocationReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetOuterHTMLParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom45(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetNodeForLocationReturns) UnmarshalJSON(data []byte) error { +func (v *GetOuterHTMLParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom45(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetNodeForLocationReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetOuterHTMLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom45(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom46(in *jlexer.Lexer, out *GetNodeForLocationParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "x": - out.X = int64(in.Int64()) - case "y": - out.Y = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom46(out *jwriter.Writer, in GetNodeForLocationParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"x\":") - out.Int64(int64(in.X)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"y\":") - out.Int64(int64(in.Y)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetNodeForLocationParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom46(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetNodeForLocationParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom46(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetNodeForLocationParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom46(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetNodeForLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom46(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom47(in *jlexer.Lexer, out *GetHighlightObjectForTestReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "highlight": - (out.Highlight).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom47(out *jwriter.Writer, in GetHighlightObjectForTestReturns) { - out.RawByte('{') - first := true - _ = first - if (in.Highlight).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"highlight\":") - (in.Highlight).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetHighlightObjectForTestReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom47(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetHighlightObjectForTestReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom47(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetHighlightObjectForTestReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom47(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetHighlightObjectForTestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom47(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom48(in *jlexer.Lexer, out *GetHighlightObjectForTestParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom48(out *jwriter.Writer, in GetHighlightObjectForTestParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetHighlightObjectForTestParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom48(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetHighlightObjectForTestParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom48(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetHighlightObjectForTestParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom48(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetHighlightObjectForTestParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom48(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom49(in *jlexer.Lexer, out *GetFlattenedDocumentReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Nodes = make([]*cdp.Node, 0, 8) - } else { - out.Nodes = []*cdp.Node{} - } - for !in.IsDelim(']') { - var v28 *cdp.Node - if in.IsNull() { - in.Skip() - v28 = nil - } else { - if v28 == nil { - v28 = new(cdp.Node) - } - (*v28).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v28) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(out *jwriter.Writer, in GetFlattenedDocumentReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Nodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodes\":") - if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v29, v30 := range in.Nodes { - if v29 > 0 { - out.RawByte(',') - } - if v30 == nil { - out.RawString("null") - } else { - (*v30).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetFlattenedDocumentReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetFlattenedDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetFlattenedDocumentReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom49(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetFlattenedDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom49(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom50(in *jlexer.Lexer, out *GetFlattenedDocumentParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "depth": - out.Depth = int64(in.Int64()) - case "pierce": - out.Pierce = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(out *jwriter.Writer, in GetFlattenedDocumentParams) { - out.RawByte('{') - first := true - _ = first - if in.Depth != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"depth\":") - out.Int64(int64(in.Depth)) - } - if in.Pierce { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pierce\":") - out.Bool(bool(in.Pierce)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetFlattenedDocumentParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetFlattenedDocumentParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetFlattenedDocumentParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom50(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetFlattenedDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom50(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom51(in *jlexer.Lexer, out *GetDocumentReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "root": - if in.IsNull() { - in.Skip() - out.Root = nil - } else { - if out.Root == nil { - out.Root = new(cdp.Node) - } - (*out.Root).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(out *jwriter.Writer, in GetDocumentReturns) { - out.RawByte('{') - first := true - _ = first - if in.Root != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"root\":") - if in.Root == nil { - out.RawString("null") - } else { - (*in.Root).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetDocumentReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetDocumentReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom51(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom51(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom52(in *jlexer.Lexer, out *GetDocumentParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "depth": - out.Depth = int64(in.Int64()) - case "pierce": - out.Pierce = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(out *jwriter.Writer, in GetDocumentParams) { - out.RawByte('{') - first := true - _ = first - if in.Depth != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"depth\":") - out.Int64(int64(in.Depth)) - } - if in.Pierce { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pierce\":") - out.Bool(bool(in.Pierce)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetDocumentParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetDocumentParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetDocumentParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom52(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom52(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom53(in *jlexer.Lexer, out *GetBoxModelReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "model": - if in.IsNull() { - in.Skip() - out.Model = nil - } else { - if out.Model == nil { - out.Model = new(BoxModel) - } - (*out.Model).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(out *jwriter.Writer, in GetBoxModelReturns) { - out.RawByte('{') - first := true - _ = first - if in.Model != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"model\":") - if in.Model == nil { - out.RawString("null") - } else { - (*in.Model).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetBoxModelReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetBoxModelReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetBoxModelReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom53(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetBoxModelReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom53(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom54(in *jlexer.Lexer, out *GetBoxModelParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(out *jwriter.Writer, in GetBoxModelParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetBoxModelParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetBoxModelParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetBoxModelParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom54(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetBoxModelParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom54(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom55(in *jlexer.Lexer, out *GetAttributesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "attributes": - if in.IsNull() { - in.Skip() - out.Attributes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Attributes = make([]string, 0, 4) - } else { - out.Attributes = []string{} - } - for !in.IsDelim(']') { - var v31 string - v31 = string(in.String()) - out.Attributes = append(out.Attributes, v31) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom55(out *jwriter.Writer, in GetAttributesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Attributes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"attributes\":") - if in.Attributes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v32, v33 := range in.Attributes { - if v32 > 0 { - out.RawByte(',') - } - out.String(string(v33)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetAttributesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom55(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetAttributesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom55(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetAttributesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom55(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetAttributesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom55(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom56(in *jlexer.Lexer, out *GetAttributesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(out *jwriter.Writer, in GetAttributesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetAttributesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetAttributesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetAttributesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom56(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetAttributesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom56(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom57(in *jlexer.Lexer, out *FocusParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(out *jwriter.Writer, in FocusParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FocusParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FocusParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FocusParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom57(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FocusParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom57(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom58(in *jlexer.Lexer, out *EventShadowRootPushed) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "hostId": - (out.HostID).UnmarshalEasyJSON(in) - case "root": - if in.IsNull() { - in.Skip() - out.Root = nil - } else { - if out.Root == nil { - out.Root = new(cdp.Node) - } - (*out.Root).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(out *jwriter.Writer, in EventShadowRootPushed) { - out.RawByte('{') - first := true - _ = first - if in.HostID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hostId\":") - out.Int64(int64(in.HostID)) - } - if in.Root != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"root\":") - if in.Root == nil { - out.RawString("null") - } else { - (*in.Root).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventShadowRootPushed) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventShadowRootPushed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventShadowRootPushed) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom58(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventShadowRootPushed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom58(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom59(in *jlexer.Lexer, out *EventShadowRootPopped) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "hostId": - (out.HostID).UnmarshalEasyJSON(in) - case "rootId": - (out.RootID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(out *jwriter.Writer, in EventShadowRootPopped) { - out.RawByte('{') - first := true - _ = first - if in.HostID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hostId\":") - out.Int64(int64(in.HostID)) - } - if in.RootID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"rootId\":") - out.Int64(int64(in.RootID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventShadowRootPopped) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventShadowRootPopped) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventShadowRootPopped) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom59(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventShadowRootPopped) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom59(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom60(in *jlexer.Lexer, out *EventSetChildNodes) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "parentId": - (out.ParentID).UnmarshalEasyJSON(in) - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Nodes = make([]*cdp.Node, 0, 8) - } else { - out.Nodes = []*cdp.Node{} - } - for !in.IsDelim(']') { - var v34 *cdp.Node - if in.IsNull() { - in.Skip() - v34 = nil - } else { - if v34 == nil { - v34 = new(cdp.Node) - } - (*v34).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v34) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(out *jwriter.Writer, in EventSetChildNodes) { - out.RawByte('{') - first := true - _ = first - if in.ParentID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parentId\":") - out.Int64(int64(in.ParentID)) - } - if len(in.Nodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodes\":") - if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v35, v36 := range in.Nodes { - if v35 > 0 { - out.RawByte(',') - } - if v36 == nil { - out.RawString("null") - } else { - (*v36).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventSetChildNodes) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventSetChildNodes) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventSetChildNodes) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom60(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventSetChildNodes) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom60(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom61(in *jlexer.Lexer, out *EventPseudoElementRemoved) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "parentId": - (out.ParentID).UnmarshalEasyJSON(in) - case "pseudoElementId": - (out.PseudoElementID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(out *jwriter.Writer, in EventPseudoElementRemoved) { - out.RawByte('{') - first := true - _ = first - if in.ParentID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parentId\":") - out.Int64(int64(in.ParentID)) - } - if in.PseudoElementID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pseudoElementId\":") - out.Int64(int64(in.PseudoElementID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventPseudoElementRemoved) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventPseudoElementRemoved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventPseudoElementRemoved) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom61(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventPseudoElementRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom61(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom62(in *jlexer.Lexer, out *EventPseudoElementAdded) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "parentId": - (out.ParentID).UnmarshalEasyJSON(in) - case "pseudoElement": - if in.IsNull() { - in.Skip() - out.PseudoElement = nil - } else { - if out.PseudoElement == nil { - out.PseudoElement = new(cdp.Node) - } - (*out.PseudoElement).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(out *jwriter.Writer, in EventPseudoElementAdded) { - out.RawByte('{') - first := true - _ = first - if in.ParentID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parentId\":") - out.Int64(int64(in.ParentID)) - } - if in.PseudoElement != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pseudoElement\":") - if in.PseudoElement == nil { - out.RawString("null") - } else { - (*in.PseudoElement).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventPseudoElementAdded) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventPseudoElementAdded) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventPseudoElementAdded) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom62(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventPseudoElementAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom62(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom63(in *jlexer.Lexer, out *EventNodeHighlightRequested) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom63(out *jwriter.Writer, in EventNodeHighlightRequested) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventNodeHighlightRequested) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom63(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventNodeHighlightRequested) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom63(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventNodeHighlightRequested) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom63(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventNodeHighlightRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom63(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom64(in *jlexer.Lexer, out *EventInspectNodeRequested) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom64(out *jwriter.Writer, in EventInspectNodeRequested) { - out.RawByte('{') - first := true - _ = first - if in.BackendNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendNodeId\":") - out.Int64(int64(in.BackendNodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventInspectNodeRequested) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom64(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventInspectNodeRequested) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom64(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventInspectNodeRequested) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom64(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventInspectNodeRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom64(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(in *jlexer.Lexer, out *EventInlineStyleInvalidated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeIds": - if in.IsNull() { - in.Skip() - out.NodeIds = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.NodeIds = make([]cdp.NodeID, 0, 8) - } else { - out.NodeIds = []cdp.NodeID{} - } - for !in.IsDelim(']') { - var v37 cdp.NodeID - (v37).UnmarshalEasyJSON(in) - out.NodeIds = append(out.NodeIds, v37) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom65(out *jwriter.Writer, in EventInlineStyleInvalidated) { - out.RawByte('{') - first := true - _ = first - if len(in.NodeIds) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeIds\":") - if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v38, v39 := range in.NodeIds { - if v38 > 0 { - out.RawByte(',') - } - out.Int64(int64(v39)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventInlineStyleInvalidated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom65(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventInlineStyleInvalidated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom65(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventInlineStyleInvalidated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventInlineStyleInvalidated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(in *jlexer.Lexer, out *EventDocumentUpdated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(out *jwriter.Writer, in EventDocumentUpdated) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDocumentUpdated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDocumentUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDocumentUpdated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDocumentUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(in *jlexer.Lexer, out *EventDistributedNodesUpdated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "insertionPointId": - (out.InsertionPointID).UnmarshalEasyJSON(in) - case "distributedNodes": - if in.IsNull() { - in.Skip() - out.DistributedNodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.DistributedNodes = make([]*cdp.BackendNode, 0, 8) - } else { - out.DistributedNodes = []*cdp.BackendNode{} - } - for !in.IsDelim(']') { - var v40 *cdp.BackendNode - if in.IsNull() { - in.Skip() - v40 = nil - } else { - if v40 == nil { - v40 = new(cdp.BackendNode) - } - (*v40).UnmarshalEasyJSON(in) - } - out.DistributedNodes = append(out.DistributedNodes, v40) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(out *jwriter.Writer, in EventDistributedNodesUpdated) { - out.RawByte('{') - first := true - _ = first - if in.InsertionPointID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"insertionPointId\":") - out.Int64(int64(in.InsertionPointID)) - } - if len(in.DistributedNodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"distributedNodes\":") - if in.DistributedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v41, v42 := range in.DistributedNodes { - if v41 > 0 { - out.RawByte(',') - } - if v42 == nil { - out.RawString("null") - } else { - (*v42).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDistributedNodesUpdated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDistributedNodesUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDistributedNodesUpdated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDistributedNodesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(in *jlexer.Lexer, out *EventChildNodeRemoved) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "parentNodeId": - (out.ParentNodeID).UnmarshalEasyJSON(in) - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(out *jwriter.Writer, in EventChildNodeRemoved) { - out.RawByte('{') - first := true - _ = first - if in.ParentNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parentNodeId\":") - out.Int64(int64(in.ParentNodeID)) - } - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventChildNodeRemoved) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventChildNodeRemoved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventChildNodeRemoved) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventChildNodeRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(in *jlexer.Lexer, out *EventChildNodeInserted) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "parentNodeId": - (out.ParentNodeID).UnmarshalEasyJSON(in) - case "previousNodeId": - (out.PreviousNodeID).UnmarshalEasyJSON(in) - case "node": - if in.IsNull() { - in.Skip() - out.Node = nil - } else { - if out.Node == nil { - out.Node = new(cdp.Node) - } - (*out.Node).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(out *jwriter.Writer, in EventChildNodeInserted) { - out.RawByte('{') - first := true - _ = first - if in.ParentNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parentNodeId\":") - out.Int64(int64(in.ParentNodeID)) - } - if in.PreviousNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"previousNodeId\":") - out.Int64(int64(in.PreviousNodeID)) - } - if in.Node != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"node\":") - if in.Node == nil { - out.RawString("null") - } else { - (*in.Node).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventChildNodeInserted) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventChildNodeInserted) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventChildNodeInserted) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventChildNodeInserted) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(in *jlexer.Lexer, out *EventChildNodeCountUpdated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "childNodeCount": - out.ChildNodeCount = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in EventChildNodeCountUpdated) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - if in.ChildNodeCount != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"childNodeCount\":") - out.Int64(int64(in.ChildNodeCount)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventChildNodeCountUpdated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventChildNodeCountUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventChildNodeCountUpdated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventChildNodeCountUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(in *jlexer.Lexer, out *EventCharacterDataModified) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "characterData": - out.CharacterData = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(out *jwriter.Writer, in EventCharacterDataModified) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - if in.CharacterData != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"characterData\":") - out.String(string(in.CharacterData)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventCharacterDataModified) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventCharacterDataModified) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventCharacterDataModified) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventCharacterDataModified) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(in *jlexer.Lexer, out *EventAttributeRemoved) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom46(in *jlexer.Lexer, out *RemoveAttributeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6184,18 +4168,99 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(out *jwriter.Writer, in EventAttributeRemoved) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom46(out *jwriter.Writer, in RemoveAttributeParams) { out.RawByte('{') first := true _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveAttributeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom46(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveAttributeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom46(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveAttributeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom46(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveAttributeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom46(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom47(in *jlexer.Lexer, out *SetAttributesAsTextParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "text": + out.Text = string(in.String()) + case "name": + out.Name = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom47(out *jwriter.Writer, in SetAttributesAsTextParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"text\":") + out.String(string(in.Text)) if in.Name != "" { if !first { out.RawByte(',') @@ -6208,29 +4273,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v EventAttributeRemoved) MarshalJSON() ([]byte, error) { +func (v SetAttributesAsTextParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom47(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventAttributeRemoved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(w, v) +func (v SetAttributesAsTextParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom47(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventAttributeRemoved) UnmarshalJSON(data []byte) error { +func (v *SetAttributesAsTextParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom47(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAttributeRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(l, v) +func (v *SetAttributesAsTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom47(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(in *jlexer.Lexer, out *EventAttributeModified) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom48(in *jlexer.Lexer, out *SetAttributeValueParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6265,350 +4330,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(in *jlexer.Lexer, out *E in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom73(out *jwriter.Writer, in EventAttributeModified) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventAttributeModified) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom73(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventAttributeModified) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom73(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventAttributeModified) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAttributeModified) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom74(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom74(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom74(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom74(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom74(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom74(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom75(in *jlexer.Lexer, out *DiscardSearchResultsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "searchId": - out.SearchID = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom75(out *jwriter.Writer, in DiscardSearchResultsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"searchId\":") - out.String(string(in.SearchID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DiscardSearchResultsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom75(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DiscardSearchResultsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom75(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DiscardSearchResultsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom75(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DiscardSearchResultsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom75(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom76(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom76(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom76(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom76(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom76(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom76(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom77(in *jlexer.Lexer, out *CopyToReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom77(out *jwriter.Writer, in CopyToReturns) { - out.RawByte('{') - first := true - _ = first - if in.NodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CopyToReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom77(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CopyToReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom77(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CopyToReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom77(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CopyToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom77(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom78(in *jlexer.Lexer, out *CopyToParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "targetNodeId": - (out.TargetNodeID).UnmarshalEasyJSON(in) - case "insertBeforeNodeId": - (out.InsertBeforeNodeID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(out *jwriter.Writer, in CopyToParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom48(out *jwriter.Writer, in SetAttributeValueParams) { out.RawByte('{') first := true _ = first @@ -6622,43 +4344,730 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(out *jwriter.Writer, in out.RawByte(',') } first = false - out.RawString("\"targetNodeId\":") - out.Int64(int64(in.TargetNodeID)) - if in.InsertBeforeNodeID != 0 { + out.RawString("\"name\":") + out.String(string(in.Name)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetAttributeValueParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom48(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetAttributeValueParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom48(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetAttributeValueParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom48(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetAttributeValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom48(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom49(in *jlexer.Lexer, out *RemoveNodeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(out *jwriter.Writer, in RemoveNodeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveNodeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveNodeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveNodeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom49(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom49(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom50(in *jlexer.Lexer, out *SetNodeValueParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "value": + out.Value = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(out *jwriter.Writer, in SetNodeValueParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetNodeValueParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetNodeValueParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetNodeValueParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom50(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetNodeValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom50(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom51(in *jlexer.Lexer, out *SetNodeNameReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(out *jwriter.Writer, in SetNodeNameReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"insertBeforeNodeId\":") - out.Int64(int64(in.InsertBeforeNodeID)) + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v CopyToParams) MarshalJSON() ([]byte, error) { +func (v SetNodeNameReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CopyToParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(w, v) +func (v SetNodeNameReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CopyToParams) UnmarshalJSON(data []byte) error { +func (v *SetNodeNameReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom78(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom51(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CopyToParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom78(l, v) +func (v *SetNodeNameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom51(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom52(in *jlexer.Lexer, out *SetNodeNameParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "name": + out.Name = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(out *jwriter.Writer, in SetNodeNameParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetNodeNameParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetNodeNameParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetNodeNameParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom52(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetNodeNameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom52(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom53(in *jlexer.Lexer, out *QuerySelectorAllReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeIds": + if in.IsNull() { + in.Skip() + out.NodeIds = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.NodeIds = make([]cdp.NodeID, 0, 8) + } else { + out.NodeIds = []cdp.NodeID{} + } + for !in.IsDelim(']') { + var v40 cdp.NodeID + (v40).UnmarshalEasyJSON(in) + out.NodeIds = append(out.NodeIds, v40) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(out *jwriter.Writer, in QuerySelectorAllReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.NodeIds) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeIds\":") + if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v41, v42 := range in.NodeIds { + if v41 > 0 { + out.RawByte(',') + } + out.Int64(int64(v42)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v QuerySelectorAllReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v QuerySelectorAllReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *QuerySelectorAllReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom53(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *QuerySelectorAllReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom53(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom54(in *jlexer.Lexer, out *QuerySelectorAllParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "selector": + out.Selector = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(out *jwriter.Writer, in QuerySelectorAllParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"selector\":") + out.String(string(in.Selector)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v QuerySelectorAllParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v QuerySelectorAllParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *QuerySelectorAllParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom54(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *QuerySelectorAllParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom54(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom55(in *jlexer.Lexer, out *QuerySelectorReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom55(out *jwriter.Writer, in QuerySelectorReturns) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v QuerySelectorReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom55(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v QuerySelectorReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom55(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *QuerySelectorReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom55(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *QuerySelectorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom55(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom56(in *jlexer.Lexer, out *QuerySelectorParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "selector": + out.Selector = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(out *jwriter.Writer, in QuerySelectorParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"selector\":") + out.String(string(in.Selector)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v QuerySelectorParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v QuerySelectorParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *QuerySelectorParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom56(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *QuerySelectorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom56(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom57(in *jlexer.Lexer, out *RequestChildNodesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "depth": + out.Depth = int64(in.Int64()) + case "pierce": + out.Pierce = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(out *jwriter.Writer, in RequestChildNodesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if in.Depth != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"depth\":") + out.Int64(int64(in.Depth)) + } + if in.Pierce { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pierce\":") + out.Bool(bool(in.Pierce)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestChildNodesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestChildNodesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestChildNodesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom57(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestChildNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom57(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom58(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6706,7 +5115,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(out *jwriter.Writer, in CollectClassNamesFromSubtreeReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(out *jwriter.Writer, in CollectClassNamesFromSubtreeReturns) { out.RawByte('{') first := true _ = first @@ -6735,27 +5144,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v CollectClassNamesFromSubtreeReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CollectClassNamesFromSubtreeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CollectClassNamesFromSubtreeReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom58(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CollectClassNamesFromSubtreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom58(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom59(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6786,7 +5195,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(in *jlexer.Lexer, out *C in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(out *jwriter.Writer, in CollectClassNamesFromSubtreeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(out *jwriter.Writer, in CollectClassNamesFromSubtreeParams) { out.RawByte('{') first := true _ = first @@ -6802,27 +5211,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v CollectClassNamesFromSubtreeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CollectClassNamesFromSubtreeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CollectClassNamesFromSubtreeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom59(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CollectClassNamesFromSubtreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom59(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom81(in *jlexer.Lexer, out *BoxModel) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom60(in *jlexer.Lexer, out *GetFlattenedDocumentReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -6841,96 +5250,33 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom81(in *jlexer.Lexer, out *B continue } switch key { - case "content": + case "nodes": if in.IsNull() { in.Skip() - out.Content = nil + out.Nodes = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.Content = make(Quad, 0, 8) + out.Nodes = make([]*cdp.Node, 0, 8) } else { - out.Content = Quad{} + out.Nodes = []*cdp.Node{} } for !in.IsDelim(']') { - var v46 float64 - v46 = float64(in.Float64()) - out.Content = append(out.Content, v46) + var v46 *cdp.Node + if in.IsNull() { + in.Skip() + v46 = nil + } else { + if v46 == nil { + v46 = new(cdp.Node) + } + (*v46).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v46) in.WantComma() } in.Delim(']') } - case "padding": - if in.IsNull() { - in.Skip() - out.Padding = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Padding = make(Quad, 0, 8) - } else { - out.Padding = Quad{} - } - for !in.IsDelim(']') { - var v47 float64 - v47 = float64(in.Float64()) - out.Padding = append(out.Padding, v47) - in.WantComma() - } - in.Delim(']') - } - case "border": - if in.IsNull() { - in.Skip() - out.Border = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Border = make(Quad, 0, 8) - } else { - out.Border = Quad{} - } - for !in.IsDelim(']') { - var v48 float64 - v48 = float64(in.Float64()) - out.Border = append(out.Border, v48) - in.WantComma() - } - in.Delim(']') - } - case "margin": - if in.IsNull() { - in.Skip() - out.Margin = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Margin = make(Quad, 0, 8) - } else { - out.Margin = Quad{} - } - for !in.IsDelim(']') { - var v49 float64 - v49 = float64(in.Float64()) - out.Margin = append(out.Margin, v49) - in.WantComma() - } - in.Delim(']') - } - case "width": - out.Width = int64(in.Int64()) - case "height": - out.Height = int64(in.Int64()) - case "shapeOutside": - if in.IsNull() { - in.Skip() - out.ShapeOutside = nil - } else { - if out.ShapeOutside == nil { - out.ShapeOutside = new(ShapeOutsideInfo) - } - (*out.ShapeOutside).UnmarshalEasyJSON(in) - } default: in.SkipRecursive() } @@ -6941,137 +5287,1791 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom81(in *jlexer.Lexer, out *B in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom81(out *jwriter.Writer, in BoxModel) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(out *jwriter.Writer, in GetFlattenedDocumentReturns) { out.RawByte('{') first := true _ = first - if len(in.Content) != 0 { + if len(in.Nodes) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"content\":") - if in.Content == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"nodes\":") + if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v50, v51 := range in.Content { - if v50 > 0 { + for v47, v48 := range in.Nodes { + if v47 > 0 { out.RawByte(',') } - out.Float64(float64(v51)) - } - out.RawByte(']') - } - } - if len(in.Padding) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"padding\":") - if in.Padding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v52, v53 := range in.Padding { - if v52 > 0 { - out.RawByte(',') + if v48 == nil { + out.RawString("null") + } else { + (*v48).MarshalEasyJSON(out) } - out.Float64(float64(v53)) } out.RawByte(']') } } - if len(in.Border) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"border\":") - if in.Border == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v54, v55 := range in.Border { - if v54 > 0 { - out.RawByte(',') - } - out.Float64(float64(v55)) - } - out.RawByte(']') - } - } - if len(in.Margin) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"margin\":") - if in.Margin == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v56, v57 := range in.Margin { - if v56 > 0 { - out.RawByte(',') - } - out.Float64(float64(v57)) - } - out.RawByte(']') - } - } - if in.Width != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"width\":") - out.Int64(int64(in.Width)) - } - if in.Height != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"height\":") - out.Int64(int64(in.Height)) - } - if in.ShapeOutside != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"shapeOutside\":") - if in.ShapeOutside == nil { - out.RawString("null") - } else { - (*in.ShapeOutside).MarshalEasyJSON(out) - } - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v BoxModel) MarshalJSON() ([]byte, error) { +func (v GetFlattenedDocumentReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetFlattenedDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetFlattenedDocumentReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom60(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetFlattenedDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom60(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom61(in *jlexer.Lexer, out *GetFlattenedDocumentParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "depth": + out.Depth = int64(in.Int64()) + case "pierce": + out.Pierce = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(out *jwriter.Writer, in GetFlattenedDocumentParams) { + out.RawByte('{') + first := true + _ = first + if in.Depth != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"depth\":") + out.Int64(int64(in.Depth)) + } + if in.Pierce { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pierce\":") + out.Bool(bool(in.Pierce)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetFlattenedDocumentParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetFlattenedDocumentParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetFlattenedDocumentParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom61(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetFlattenedDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom61(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom62(in *jlexer.Lexer, out *GetDocumentReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "root": + if in.IsNull() { + in.Skip() + out.Root = nil + } else { + if out.Root == nil { + out.Root = new(cdp.Node) + } + (*out.Root).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(out *jwriter.Writer, in GetDocumentReturns) { + out.RawByte('{') + first := true + _ = first + if in.Root != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"root\":") + if in.Root == nil { + out.RawString("null") + } else { + (*in.Root).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetDocumentReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetDocumentReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom62(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom62(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom63(in *jlexer.Lexer, out *GetDocumentParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "depth": + out.Depth = int64(in.Int64()) + case "pierce": + out.Pierce = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom63(out *jwriter.Writer, in GetDocumentParams) { + out.RawByte('{') + first := true + _ = first + if in.Depth != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"depth\":") + out.Int64(int64(in.Depth)) + } + if in.Pierce { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pierce\":") + out.Bool(bool(in.Pierce)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetDocumentParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom63(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetDocumentParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom63(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetDocumentParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom63(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom63(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom64(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom64(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom64(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom64(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom64(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom64(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom65(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom65(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom65(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(in *jlexer.Lexer, out *EventNodeHighlightRequested) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(out *jwriter.Writer, in EventNodeHighlightRequested) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventNodeHighlightRequested) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventNodeHighlightRequested) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventNodeHighlightRequested) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventNodeHighlightRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(in *jlexer.Lexer, out *EventDistributedNodesUpdated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "insertionPointId": + (out.InsertionPointID).UnmarshalEasyJSON(in) + case "distributedNodes": + if in.IsNull() { + in.Skip() + out.DistributedNodes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.DistributedNodes = make([]*cdp.BackendNode, 0, 8) + } else { + out.DistributedNodes = []*cdp.BackendNode{} + } + for !in.IsDelim(']') { + var v49 *cdp.BackendNode + if in.IsNull() { + in.Skip() + v49 = nil + } else { + if v49 == nil { + v49 = new(cdp.BackendNode) + } + (*v49).UnmarshalEasyJSON(in) + } + out.DistributedNodes = append(out.DistributedNodes, v49) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(out *jwriter.Writer, in EventDistributedNodesUpdated) { + out.RawByte('{') + first := true + _ = first + if in.InsertionPointID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"insertionPointId\":") + out.Int64(int64(in.InsertionPointID)) + } + if len(in.DistributedNodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"distributedNodes\":") + if in.DistributedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v50, v51 := range in.DistributedNodes { + if v50 > 0 { + out.RawByte(',') + } + if v51 == nil { + out.RawString("null") + } else { + (*v51).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDistributedNodesUpdated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventDistributedNodesUpdated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventDistributedNodesUpdated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventDistributedNodesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(in *jlexer.Lexer, out *EventPseudoElementRemoved) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "parentId": + (out.ParentID).UnmarshalEasyJSON(in) + case "pseudoElementId": + (out.PseudoElementID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(out *jwriter.Writer, in EventPseudoElementRemoved) { + out.RawByte('{') + first := true + _ = first + if in.ParentID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parentId\":") + out.Int64(int64(in.ParentID)) + } + if in.PseudoElementID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pseudoElementId\":") + out.Int64(int64(in.PseudoElementID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventPseudoElementRemoved) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventPseudoElementRemoved) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventPseudoElementRemoved) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventPseudoElementRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(in *jlexer.Lexer, out *EventPseudoElementAdded) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "parentId": + (out.ParentID).UnmarshalEasyJSON(in) + case "pseudoElement": + if in.IsNull() { + in.Skip() + out.PseudoElement = nil + } else { + if out.PseudoElement == nil { + out.PseudoElement = new(cdp.Node) + } + (*out.PseudoElement).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(out *jwriter.Writer, in EventPseudoElementAdded) { + out.RawByte('{') + first := true + _ = first + if in.ParentID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parentId\":") + out.Int64(int64(in.ParentID)) + } + if in.PseudoElement != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pseudoElement\":") + if in.PseudoElement == nil { + out.RawString("null") + } else { + (*in.PseudoElement).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventPseudoElementAdded) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventPseudoElementAdded) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventPseudoElementAdded) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventPseudoElementAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(in *jlexer.Lexer, out *EventShadowRootPopped) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "hostId": + (out.HostID).UnmarshalEasyJSON(in) + case "rootId": + (out.RootID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in EventShadowRootPopped) { + out.RawByte('{') + first := true + _ = first + if in.HostID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hostId\":") + out.Int64(int64(in.HostID)) + } + if in.RootID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"rootId\":") + out.Int64(int64(in.RootID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventShadowRootPopped) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventShadowRootPopped) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventShadowRootPopped) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventShadowRootPopped) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(in *jlexer.Lexer, out *EventShadowRootPushed) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "hostId": + (out.HostID).UnmarshalEasyJSON(in) + case "root": + if in.IsNull() { + in.Skip() + out.Root = nil + } else { + if out.Root == nil { + out.Root = new(cdp.Node) + } + (*out.Root).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(out *jwriter.Writer, in EventShadowRootPushed) { + out.RawByte('{') + first := true + _ = first + if in.HostID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hostId\":") + out.Int64(int64(in.HostID)) + } + if in.Root != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"root\":") + if in.Root == nil { + out.RawString("null") + } else { + (*in.Root).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventShadowRootPushed) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventShadowRootPushed) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventShadowRootPushed) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventShadowRootPushed) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(in *jlexer.Lexer, out *EventChildNodeRemoved) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "parentNodeId": + (out.ParentNodeID).UnmarshalEasyJSON(in) + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(out *jwriter.Writer, in EventChildNodeRemoved) { + out.RawByte('{') + first := true + _ = first + if in.ParentNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parentNodeId\":") + out.Int64(int64(in.ParentNodeID)) + } + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventChildNodeRemoved) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventChildNodeRemoved) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventChildNodeRemoved) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventChildNodeRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(in *jlexer.Lexer, out *EventChildNodeInserted) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "parentNodeId": + (out.ParentNodeID).UnmarshalEasyJSON(in) + case "previousNodeId": + (out.PreviousNodeID).UnmarshalEasyJSON(in) + case "node": + if in.IsNull() { + in.Skip() + out.Node = nil + } else { + if out.Node == nil { + out.Node = new(cdp.Node) + } + (*out.Node).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom73(out *jwriter.Writer, in EventChildNodeInserted) { + out.RawByte('{') + first := true + _ = first + if in.ParentNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parentNodeId\":") + out.Int64(int64(in.ParentNodeID)) + } + if in.PreviousNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"previousNodeId\":") + out.Int64(int64(in.PreviousNodeID)) + } + if in.Node != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"node\":") + if in.Node == nil { + out.RawString("null") + } else { + (*in.Node).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventChildNodeInserted) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom73(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventChildNodeInserted) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom73(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventChildNodeInserted) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventChildNodeInserted) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom73(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom74(in *jlexer.Lexer, out *EventChildNodeCountUpdated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "childNodeCount": + out.ChildNodeCount = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom74(out *jwriter.Writer, in EventChildNodeCountUpdated) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + if in.ChildNodeCount != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"childNodeCount\":") + out.Int64(int64(in.ChildNodeCount)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventChildNodeCountUpdated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom74(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventChildNodeCountUpdated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom74(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventChildNodeCountUpdated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom74(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventChildNodeCountUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom74(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom75(in *jlexer.Lexer, out *EventCharacterDataModified) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "characterData": + out.CharacterData = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom75(out *jwriter.Writer, in EventCharacterDataModified) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + if in.CharacterData != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"characterData\":") + out.String(string(in.CharacterData)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventCharacterDataModified) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom75(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventCharacterDataModified) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom75(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventCharacterDataModified) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom75(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventCharacterDataModified) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom75(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom76(in *jlexer.Lexer, out *EventInlineStyleInvalidated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeIds": + if in.IsNull() { + in.Skip() + out.NodeIds = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.NodeIds = make([]cdp.NodeID, 0, 8) + } else { + out.NodeIds = []cdp.NodeID{} + } + for !in.IsDelim(']') { + var v52 cdp.NodeID + (v52).UnmarshalEasyJSON(in) + out.NodeIds = append(out.NodeIds, v52) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom76(out *jwriter.Writer, in EventInlineStyleInvalidated) { + out.RawByte('{') + first := true + _ = first + if len(in.NodeIds) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeIds\":") + if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v53, v54 := range in.NodeIds { + if v53 > 0 { + out.RawByte(',') + } + out.Int64(int64(v54)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventInlineStyleInvalidated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom76(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventInlineStyleInvalidated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom76(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventInlineStyleInvalidated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom76(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventInlineStyleInvalidated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom76(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom77(in *jlexer.Lexer, out *EventAttributeRemoved) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "name": + out.Name = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom77(out *jwriter.Writer, in EventAttributeRemoved) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventAttributeRemoved) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom77(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventAttributeRemoved) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom77(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventAttributeRemoved) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom77(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAttributeRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom77(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom78(in *jlexer.Lexer, out *EventAttributeModified) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(out *jwriter.Writer, in EventAttributeModified) { + out.RawByte('{') + first := true + _ = first + if in.NodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + } + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventAttributeModified) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventAttributeModified) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom78(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventAttributeModified) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom78(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAttributeModified) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom78(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(in *jlexer.Lexer, out *EventSetChildNodes) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "parentId": + (out.ParentID).UnmarshalEasyJSON(in) + case "nodes": + if in.IsNull() { + in.Skip() + out.Nodes = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Nodes = make([]*cdp.Node, 0, 8) + } else { + out.Nodes = []*cdp.Node{} + } + for !in.IsDelim(']') { + var v55 *cdp.Node + if in.IsNull() { + in.Skip() + v55 = nil + } else { + if v55 == nil { + v55 = new(cdp.Node) + } + (*v55).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v55) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(out *jwriter.Writer, in EventSetChildNodes) { + out.RawByte('{') + first := true + _ = first + if in.ParentID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parentId\":") + out.Int64(int64(in.ParentID)) + } + if len(in.Nodes) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodes\":") + if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v56, v57 := range in.Nodes { + if v56 > 0 { + out.RawByte(',') + } + if v57 == nil { + out.RawString("null") + } else { + (*v57).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventSetChildNodes) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventSetChildNodes) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom79(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventSetChildNodes) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventSetChildNodes) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom79(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(in *jlexer.Lexer, out *EventInspectNodeRequested) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(out *jwriter.Writer, in EventInspectNodeRequested) { + out.RawByte('{') + first := true + _ = first + if in.BackendNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeId\":") + out.Int64(int64(in.BackendNodeID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventInspectNodeRequested) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventInspectNodeRequested) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom80(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventInspectNodeRequested) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventInspectNodeRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom80(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom81(in *jlexer.Lexer, out *EventDocumentUpdated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom81(out *jwriter.Writer, in EventDocumentUpdated) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDocumentUpdated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom81(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v BoxModel) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventDocumentUpdated) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom81(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *BoxModel) UnmarshalJSON(data []byte) error { +func (v *EventDocumentUpdated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom81(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BoxModel) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventDocumentUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom81(l, v) } diff --git a/cdp/domdebugger/domdebugger.go b/cdp/domdebugger/domdebugger.go index f15ced0..8e221bc 100644 --- a/cdp/domdebugger/domdebugger.go +++ b/cdp/domdebugger/domdebugger.go @@ -15,7 +15,6 @@ import ( cdp "github.com/knq/chromedp/cdp" "github.com/knq/chromedp/cdp/runtime" - "github.com/mailru/easyjson" ) // SetDOMBreakpointParams sets breakpoint on particular operation with DOM. @@ -39,39 +38,7 @@ func SetDOMBreakpoint(nodeID cdp.NodeID, typeVal DOMBreakpointType) *SetDOMBreak // Do executes DOMDebugger.setDOMBreakpoint against the provided context and // target handler. func (p *SetDOMBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerSetDOMBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerSetDOMBreakpoint, p, nil) } // RemoveDOMBreakpointParams removes DOM breakpoint that was set using @@ -97,39 +64,7 @@ func RemoveDOMBreakpoint(nodeID cdp.NodeID, typeVal DOMBreakpointType) *RemoveDO // Do executes DOMDebugger.removeDOMBreakpoint against the provided context and // target handler. func (p *RemoveDOMBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveDOMBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveDOMBreakpoint, p, nil) } // SetEventListenerBreakpointParams sets breakpoint on particular DOM event. @@ -158,39 +93,7 @@ func (p SetEventListenerBreakpointParams) WithTargetName(targetName string) *Set // Do executes DOMDebugger.setEventListenerBreakpoint against the provided context and // target handler. func (p *SetEventListenerBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerSetEventListenerBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerSetEventListenerBreakpoint, p, nil) } // RemoveEventListenerBreakpointParams removes breakpoint on particular DOM @@ -219,39 +122,7 @@ func (p RemoveEventListenerBreakpointParams) WithTargetName(targetName string) * // Do executes DOMDebugger.removeEventListenerBreakpoint against the provided context and // target handler. func (p *RemoveEventListenerBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveEventListenerBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveEventListenerBreakpoint, p, nil) } // SetInstrumentationBreakpointParams sets breakpoint on particular native @@ -273,39 +144,7 @@ func SetInstrumentationBreakpoint(eventName string) *SetInstrumentationBreakpoin // Do executes DOMDebugger.setInstrumentationBreakpoint against the provided context and // target handler. func (p *SetInstrumentationBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerSetInstrumentationBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerSetInstrumentationBreakpoint, p, nil) } // RemoveInstrumentationBreakpointParams removes breakpoint on particular @@ -328,39 +167,7 @@ func RemoveInstrumentationBreakpoint(eventName string) *RemoveInstrumentationBre // Do executes DOMDebugger.removeInstrumentationBreakpoint against the provided context and // target handler. func (p *RemoveInstrumentationBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveInstrumentationBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveInstrumentationBreakpoint, p, nil) } // SetXHRBreakpointParams sets breakpoint on XMLHttpRequest. @@ -381,39 +188,7 @@ func SetXHRBreakpoint(url string) *SetXHRBreakpointParams { // Do executes DOMDebugger.setXHRBreakpoint against the provided context and // target handler. func (p *SetXHRBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerSetXHRBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerSetXHRBreakpoint, p, nil) } // RemoveXHRBreakpointParams removes breakpoint from XMLHttpRequest. @@ -434,39 +209,7 @@ func RemoveXHRBreakpoint(url string) *RemoveXHRBreakpointParams { // Do executes DOMDebugger.removeXHRBreakpoint against the provided context and // target handler. func (p *RemoveXHRBreakpointParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveXHRBreakpoint, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMDebuggerRemoveXHRBreakpoint, p, nil) } // GetEventListenersParams returns event listeners of the given object. @@ -513,44 +256,12 @@ type GetEventListenersReturns struct { // returns: // listeners - Array of relevant listeners. func (p *GetEventListenersParams) Do(ctxt context.Context, h cdp.Handler) (listeners []*EventListener, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetEventListenersReturns + err = h.Execute(ctxt, cdp.CommandDOMDebuggerGetEventListeners, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMDebuggerGetEventListeners, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetEventListenersReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Listeners, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Listeners, nil } diff --git a/cdp/domdebugger/easyjson.go b/cdp/domdebugger/easyjson.go index c58fd04..99b3609 100644 --- a/cdp/domdebugger/easyjson.go +++ b/cdp/domdebugger/easyjson.go @@ -18,775 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger(in *jlexer.Lexer, out *SetXHRBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger(out *jwriter.Writer, in SetXHRBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetXHRBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetXHRBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger1(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "eventName": - out.EventName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger1(out *jwriter.Writer, in SetInstrumentationBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventName\":") - out.String(string(in.EventName)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger2(in *jlexer.Lexer, out *SetEventListenerBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "eventName": - out.EventName = string(in.String()) - case "targetName": - out.TargetName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger2(out *jwriter.Writer, in SetEventListenerBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventName\":") - out.String(string(in.EventName)) - if in.TargetName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetName\":") - out.String(string(in.TargetName)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetEventListenerBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetEventListenerBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger3(in *jlexer.Lexer, out *SetDOMBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "type": - (out.Type).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger3(out *jwriter.Writer, in SetDOMBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetDOMBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetDOMBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger4(in *jlexer.Lexer, out *RemoveXHRBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger4(out *jwriter.Writer, in RemoveXHRBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveXHRBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveXHRBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger5(in *jlexer.Lexer, out *RemoveInstrumentationBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "eventName": - out.EventName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger5(out *jwriter.Writer, in RemoveInstrumentationBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventName\":") - out.String(string(in.EventName)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger6(in *jlexer.Lexer, out *RemoveEventListenerBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "eventName": - out.EventName = string(in.String()) - case "targetName": - out.TargetName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger6(out *jwriter.Writer, in RemoveEventListenerBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventName\":") - out.String(string(in.EventName)) - if in.TargetName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetName\":") - out.String(string(in.TargetName)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveEventListenerBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveEventListenerBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger7(in *jlexer.Lexer, out *RemoveDOMBreakpointParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodeId": - (out.NodeID).UnmarshalEasyJSON(in) - case "type": - (out.Type).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger7(out *jwriter.Writer, in RemoveDOMBreakpointParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodeId\":") - out.Int64(int64(in.NodeID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveDOMBreakpointParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveDOMBreakpointParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger8(in *jlexer.Lexer, out *GetEventListenersReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "listeners": - if in.IsNull() { - in.Skip() - out.Listeners = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Listeners = make([]*EventListener, 0, 8) - } else { - out.Listeners = []*EventListener{} - } - for !in.IsDelim(']') { - var v1 *EventListener - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(EventListener) - } - (*v1).UnmarshalEasyJSON(in) - } - out.Listeners = append(out.Listeners, v1) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger8(out *jwriter.Writer, in GetEventListenersReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Listeners) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"listeners\":") - if in.Listeners == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Listeners { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetEventListenersReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetEventListenersReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetEventListenersReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetEventListenersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger9(in *jlexer.Lexer, out *GetEventListenersParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "objectId": - out.ObjectID = runtime.RemoteObjectID(in.String()) - case "depth": - out.Depth = int64(in.Int64()) - case "pierce": - out.Pierce = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger9(out *jwriter.Writer, in GetEventListenersParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - if in.Depth != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"depth\":") - out.Int64(int64(in.Depth)) - } - if in.Pierce { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pierce\":") - out.Bool(bool(in.Pierce)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetEventListenersParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetEventListenersParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetEventListenersParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetEventListenersParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger10(in *jlexer.Lexer, out *EventListener) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger(in *jlexer.Lexer, out *EventListener) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -839,16 +71,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger10(in *jlexer.Lexer } (*out.OriginalHandler).UnmarshalEasyJSON(in) } - case "removeFunction": - if in.IsNull() { - in.Skip() - out.RemoveFunction = nil - } else { - if out.RemoveFunction == nil { - out.RemoveFunction = new(runtime.RemoteObject) - } - (*out.RemoveFunction).UnmarshalEasyJSON(in) - } case "backendNodeId": (out.BackendNodeID).UnmarshalEasyJSON(in) default: @@ -861,7 +83,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger10(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(out *jwriter.Writer, in EventListener) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger(out *jwriter.Writer, in EventListener) { out.RawByte('{') first := true _ = first @@ -945,18 +167,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(out *jwriter.Wri (*in.OriginalHandler).MarshalEasyJSON(out) } } - if in.RemoveFunction != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"removeFunction\":") - if in.RemoveFunction == nil { - out.RawString("null") - } else { - (*in.RemoveFunction).MarshalEasyJSON(out) - } - } if in.BackendNodeID != 0 { if !first { out.RawByte(',') @@ -971,23 +181,791 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(out *jwriter.Wri // MarshalJSON supports json.Marshaler interface func (v EventListener) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventListener) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventListener) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventListener) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger1(in *jlexer.Lexer, out *GetEventListenersReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "listeners": + if in.IsNull() { + in.Skip() + out.Listeners = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Listeners = make([]*EventListener, 0, 8) + } else { + out.Listeners = []*EventListener{} + } + for !in.IsDelim(']') { + var v1 *EventListener + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(EventListener) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Listeners = append(out.Listeners, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger1(out *jwriter.Writer, in GetEventListenersReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Listeners) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"listeners\":") + if in.Listeners == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.Listeners { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetEventListenersReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetEventListenersReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetEventListenersReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetEventListenersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger2(in *jlexer.Lexer, out *GetEventListenersParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) + case "depth": + out.Depth = int64(in.Int64()) + case "pierce": + out.Pierce = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger2(out *jwriter.Writer, in GetEventListenersParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + if in.Depth != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"depth\":") + out.Int64(int64(in.Depth)) + } + if in.Pierce { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pierce\":") + out.Bool(bool(in.Pierce)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetEventListenersParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetEventListenersParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetEventListenersParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetEventListenersParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger3(in *jlexer.Lexer, out *RemoveXHRBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger3(out *jwriter.Writer, in RemoveXHRBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveXHRBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveXHRBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger4(in *jlexer.Lexer, out *SetXHRBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger4(out *jwriter.Writer, in SetXHRBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetXHRBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetXHRBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger5(in *jlexer.Lexer, out *RemoveInstrumentationBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "eventName": + out.EventName = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger5(out *jwriter.Writer, in RemoveInstrumentationBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"eventName\":") + out.String(string(in.EventName)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger6(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "eventName": + out.EventName = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger6(out *jwriter.Writer, in SetInstrumentationBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"eventName\":") + out.String(string(in.EventName)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger7(in *jlexer.Lexer, out *RemoveEventListenerBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "eventName": + out.EventName = string(in.String()) + case "targetName": + out.TargetName = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger7(out *jwriter.Writer, in RemoveEventListenerBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"eventName\":") + out.String(string(in.EventName)) + if in.TargetName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetName\":") + out.String(string(in.TargetName)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveEventListenerBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveEventListenerBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger8(in *jlexer.Lexer, out *SetEventListenerBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "eventName": + out.EventName = string(in.String()) + case "targetName": + out.TargetName = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger8(out *jwriter.Writer, in SetEventListenerBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"eventName\":") + out.String(string(in.EventName)) + if in.TargetName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetName\":") + out.String(string(in.TargetName)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetEventListenerBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetEventListenerBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger9(in *jlexer.Lexer, out *RemoveDOMBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "type": + (out.Type).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger9(out *jwriter.Writer, in RemoveDOMBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveDOMBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveDOMBreakpointParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger10(in *jlexer.Lexer, out *SetDOMBreakpointParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodeId": + (out.NodeID).UnmarshalEasyJSON(in) + case "type": + (out.Type).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(out *jwriter.Writer, in SetDOMBreakpointParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"nodeId\":") + out.Int64(int64(in.NodeID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetDOMBreakpointParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetDOMBreakpointParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventListener) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomdebugger10(l, v) } diff --git a/cdp/domdebugger/types.go b/cdp/domdebugger/types.go index 0b13f90..d83fc77 100644 --- a/cdp/domdebugger/types.go +++ b/cdp/domdebugger/types.go @@ -68,6 +68,5 @@ type EventListener struct { ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based). Handler *runtime.RemoteObject `json:"handler,omitempty"` // Event handler function value. OriginalHandler *runtime.RemoteObject `json:"originalHandler,omitempty"` // Event original handler function value. - RemoveFunction *runtime.RemoteObject `json:"removeFunction,omitempty"` // Event listener remove function. BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node the listener is added to (if any). } diff --git a/cdp/domstorage/domstorage.go b/cdp/domstorage/domstorage.go index a392d9f..68f9042 100644 --- a/cdp/domstorage/domstorage.go +++ b/cdp/domstorage/domstorage.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables storage tracking, storage events will now be @@ -28,33 +27,7 @@ func Enable() *EnableParams { // Do executes DOMStorage.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMStorageEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMStorageEnable, nil, nil) } // DisableParams disables storage tracking, prevents storage events from @@ -70,33 +43,7 @@ func Disable() *DisableParams { // Do executes DOMStorage.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMStorageDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMStorageDisable, nil, nil) } // ClearParams [no description]. @@ -117,39 +64,7 @@ func Clear(storageID *StorageID) *ClearParams { // Do executes DOMStorage.clear against the provided context and // target handler. func (p *ClearParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMStorageClear, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMStorageClear, p, nil) } // GetDOMStorageItemsParams [no description]. @@ -178,46 +93,14 @@ type GetDOMStorageItemsReturns struct { // returns: // entries func (p *GetDOMStorageItemsParams) Do(ctxt context.Context, h cdp.Handler) (entries []Item, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetDOMStorageItemsReturns + err = h.Execute(ctxt, cdp.CommandDOMStorageGetDOMStorageItems, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandDOMStorageGetDOMStorageItems, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetDOMStorageItemsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Entries, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Entries, nil } // SetDOMStorageItemParams [no description]. @@ -244,39 +127,7 @@ func SetDOMStorageItem(storageID *StorageID, key string, value string) *SetDOMSt // Do executes DOMStorage.setDOMStorageItem against the provided context and // target handler. func (p *SetDOMStorageItemParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMStorageSetDOMStorageItem, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMStorageSetDOMStorageItem, p, nil) } // RemoveDOMStorageItemParams [no description]. @@ -300,37 +151,5 @@ func RemoveDOMStorageItem(storageID *StorageID, key string) *RemoveDOMStorageIte // Do executes DOMStorage.removeDOMStorageItem against the provided context and // target handler. func (p *RemoveDOMStorageItemParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandDOMStorageRemoveDOMStorageItem, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandDOMStorageRemoveDOMStorageItem, p, nil) } diff --git a/cdp/domstorage/easyjson.go b/cdp/domstorage/easyjson.go index 05504fc..346a236 100644 --- a/cdp/domstorage/easyjson.go +++ b/cdp/domstorage/easyjson.go @@ -96,7 +96,478 @@ func (v *StorageID) UnmarshalJSON(data []byte) error { func (v *StorageID) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(in *jlexer.Lexer, out *SetDOMStorageItemParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(in *jlexer.Lexer, out *EventDomStorageItemUpdated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "storageId": + if in.IsNull() { + in.Skip() + out.StorageID = nil + } else { + if out.StorageID == nil { + out.StorageID = new(StorageID) + } + (*out.StorageID).UnmarshalEasyJSON(in) + } + case "key": + out.Key = string(in.String()) + case "oldValue": + out.OldValue = string(in.String()) + case "newValue": + out.NewValue = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(out *jwriter.Writer, in EventDomStorageItemUpdated) { + out.RawByte('{') + first := true + _ = first + if in.StorageID != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"storageId\":") + if in.StorageID == nil { + out.RawString("null") + } else { + (*in.StorageID).MarshalEasyJSON(out) + } + } + if in.Key != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"key\":") + out.String(string(in.Key)) + } + if in.OldValue != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"oldValue\":") + out.String(string(in.OldValue)) + } + if in.NewValue != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"newValue\":") + out.String(string(in.NewValue)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDomStorageItemUpdated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventDomStorageItemUpdated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventDomStorageItemUpdated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventDomStorageItemUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage2(in *jlexer.Lexer, out *EventDomStorageItemAdded) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "storageId": + if in.IsNull() { + in.Skip() + out.StorageID = nil + } else { + if out.StorageID == nil { + out.StorageID = new(StorageID) + } + (*out.StorageID).UnmarshalEasyJSON(in) + } + case "key": + out.Key = string(in.String()) + case "newValue": + out.NewValue = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage2(out *jwriter.Writer, in EventDomStorageItemAdded) { + out.RawByte('{') + first := true + _ = first + if in.StorageID != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"storageId\":") + if in.StorageID == nil { + out.RawString("null") + } else { + (*in.StorageID).MarshalEasyJSON(out) + } + } + if in.Key != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"key\":") + out.String(string(in.Key)) + } + if in.NewValue != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"newValue\":") + out.String(string(in.NewValue)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDomStorageItemAdded) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventDomStorageItemAdded) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventDomStorageItemAdded) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventDomStorageItemAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(in *jlexer.Lexer, out *EventDomStorageItemRemoved) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "storageId": + if in.IsNull() { + in.Skip() + out.StorageID = nil + } else { + if out.StorageID == nil { + out.StorageID = new(StorageID) + } + (*out.StorageID).UnmarshalEasyJSON(in) + } + case "key": + out.Key = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(out *jwriter.Writer, in EventDomStorageItemRemoved) { + out.RawByte('{') + first := true + _ = first + if in.StorageID != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"storageId\":") + if in.StorageID == nil { + out.RawString("null") + } else { + (*in.StorageID).MarshalEasyJSON(out) + } + } + if in.Key != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"key\":") + out.String(string(in.Key)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDomStorageItemRemoved) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventDomStorageItemRemoved) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventDomStorageItemRemoved) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventDomStorageItemRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(in *jlexer.Lexer, out *EventDomStorageItemsCleared) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "storageId": + if in.IsNull() { + in.Skip() + out.StorageID = nil + } else { + if out.StorageID == nil { + out.StorageID = new(StorageID) + } + (*out.StorageID).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(out *jwriter.Writer, in EventDomStorageItemsCleared) { + out.RawByte('{') + first := true + _ = first + if in.StorageID != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"storageId\":") + if in.StorageID == nil { + out.RawString("null") + } else { + (*in.StorageID).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDomStorageItemsCleared) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventDomStorageItemsCleared) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventDomStorageItemsCleared) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventDomStorageItemsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage5(in *jlexer.Lexer, out *RemoveDOMStorageItemParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "storageId": + if in.IsNull() { + in.Skip() + out.StorageID = nil + } else { + if out.StorageID == nil { + out.StorageID = new(StorageID) + } + (*out.StorageID).UnmarshalEasyJSON(in) + } + case "key": + out.Key = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(out *jwriter.Writer, in RemoveDOMStorageItemParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"storageId\":") + if in.StorageID == nil { + out.RawString("null") + } else { + (*in.StorageID).MarshalEasyJSON(out) + } + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"key\":") + out.String(string(in.Key)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveDOMStorageItemParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveDOMStorageItemParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage6(in *jlexer.Lexer, out *SetDOMStorageItemParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -139,7 +610,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(out *jwriter.Writer, in SetDOMStorageItemParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(out *jwriter.Writer, in SetDOMStorageItemParams) { out.RawByte('{') first := true _ = first @@ -171,114 +642,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v SetDOMStorageItemParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetDOMStorageItemParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage1(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage2(in *jlexer.Lexer, out *RemoveDOMStorageItemParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "storageId": - if in.IsNull() { - in.Skip() - out.StorageID = nil - } else { - if out.StorageID == nil { - out.StorageID = new(StorageID) - } - (*out.StorageID).UnmarshalEasyJSON(in) - } - case "key": - out.Key = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage2(out *jwriter.Writer, in RemoveDOMStorageItemParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"storageId\":") - if in.StorageID == nil { - out.RawString("null") - } else { - (*in.StorageID).MarshalEasyJSON(out) - } - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"key\":") - out.String(string(in.Key)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveDOMStorageItemParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveDOMStorageItemParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(in *jlexer.Lexer, out *GetDOMStorageItemsReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage7(in *jlexer.Lexer, out *GetDOMStorageItemsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -343,7 +727,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(out *jwriter.Writer, in GetDOMStorageItemsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(out *jwriter.Writer, in GetDOMStorageItemsReturns) { out.RawByte('{') first := true _ = first @@ -383,27 +767,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v GetDOMStorageItemsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetDOMStorageItemsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage3(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetDOMStorageItemsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetDOMStorageItemsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage3(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(in *jlexer.Lexer, out *GetDOMStorageItemsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage8(in *jlexer.Lexer, out *GetDOMStorageItemsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -442,7 +826,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(out *jwriter.Writer, in GetDOMStorageItemsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(out *jwriter.Writer, in GetDOMStorageItemsParams) { out.RawByte('{') first := true _ = first @@ -461,412 +845,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v GetDOMStorageItemsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetDOMStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetDOMStorageItemsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetDOMStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage5(in *jlexer.Lexer, out *EventDomStorageItemsCleared) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "storageId": - if in.IsNull() { - in.Skip() - out.StorageID = nil - } else { - if out.StorageID == nil { - out.StorageID = new(StorageID) - } - (*out.StorageID).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(out *jwriter.Writer, in EventDomStorageItemsCleared) { - out.RawByte('{') - first := true - _ = first - if in.StorageID != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"storageId\":") - if in.StorageID == nil { - out.RawString("null") - } else { - (*in.StorageID).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDomStorageItemsCleared) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDomStorageItemsCleared) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDomStorageItemsCleared) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDomStorageItemsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage6(in *jlexer.Lexer, out *EventDomStorageItemUpdated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "storageId": - if in.IsNull() { - in.Skip() - out.StorageID = nil - } else { - if out.StorageID == nil { - out.StorageID = new(StorageID) - } - (*out.StorageID).UnmarshalEasyJSON(in) - } - case "key": - out.Key = string(in.String()) - case "oldValue": - out.OldValue = string(in.String()) - case "newValue": - out.NewValue = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(out *jwriter.Writer, in EventDomStorageItemUpdated) { - out.RawByte('{') - first := true - _ = first - if in.StorageID != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"storageId\":") - if in.StorageID == nil { - out.RawString("null") - } else { - (*in.StorageID).MarshalEasyJSON(out) - } - } - if in.Key != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"key\":") - out.String(string(in.Key)) - } - if in.OldValue != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"oldValue\":") - out.String(string(in.OldValue)) - } - if in.NewValue != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"newValue\":") - out.String(string(in.NewValue)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDomStorageItemUpdated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDomStorageItemUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDomStorageItemUpdated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDomStorageItemUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage7(in *jlexer.Lexer, out *EventDomStorageItemRemoved) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "storageId": - if in.IsNull() { - in.Skip() - out.StorageID = nil - } else { - if out.StorageID == nil { - out.StorageID = new(StorageID) - } - (*out.StorageID).UnmarshalEasyJSON(in) - } - case "key": - out.Key = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(out *jwriter.Writer, in EventDomStorageItemRemoved) { - out.RawByte('{') - first := true - _ = first - if in.StorageID != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"storageId\":") - if in.StorageID == nil { - out.RawString("null") - } else { - (*in.StorageID).MarshalEasyJSON(out) - } - } - if in.Key != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"key\":") - out.String(string(in.Key)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDomStorageItemRemoved) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDomStorageItemRemoved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDomStorageItemRemoved) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDomStorageItemRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage8(in *jlexer.Lexer, out *EventDomStorageItemAdded) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "storageId": - if in.IsNull() { - in.Skip() - out.StorageID = nil - } else { - if out.StorageID == nil { - out.StorageID = new(StorageID) - } - (*out.StorageID).UnmarshalEasyJSON(in) - } - case "key": - out.Key = string(in.String()) - case "newValue": - out.NewValue = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(out *jwriter.Writer, in EventDomStorageItemAdded) { - out.RawByte('{') - first := true - _ = first - if in.StorageID != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"storageId\":") - if in.StorageID == nil { - out.RawString("null") - } else { - (*in.StorageID).MarshalEasyJSON(out) - } - } - if in.Key != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"key\":") - out.String(string(in.Key)) - } - if in.NewValue != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"newValue\":") - out.String(string(in.NewValue)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDomStorageItemAdded) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDomStorageItemAdded) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetDOMStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDomStorageItemAdded) UnmarshalJSON(data []byte) error { +func (v *GetDOMStorageItemsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDomStorageItemAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetDOMStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage9(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage9(in *jlexer.Lexer, out *ClearParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -885,6 +885,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage9(in *jlexer.Lexer, continue } switch key { + case "storageId": + if in.IsNull() { + in.Skip() + out.StorageID = nil + } else { + if out.StorageID == nil { + out.StorageID = new(StorageID) + } + (*out.StorageID).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -895,34 +905,44 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage9(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage9(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage9(out *jwriter.Writer, in ClearParams) { out.RawByte('{') first := true _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"storageId\":") + if in.StorageID == nil { + out.RawString("null") + } else { + (*in.StorageID).MarshalEasyJSON(out) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EnableParams) MarshalJSON() ([]byte, error) { +func (v ClearParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { +func (v *ClearParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage9(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage10(in *jlexer.Lexer, out *DisableParams) { @@ -984,7 +1004,7 @@ func (v *DisableParams) UnmarshalJSON(data []byte) error { func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage10(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage11(in *jlexer.Lexer, out *ClearParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage11(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1003,16 +1023,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage11(in *jlexer.Lexer, continue } switch key { - case "storageId": - if in.IsNull() { - in.Skip() - out.StorageID = nil - } else { - if out.StorageID == nil { - out.StorageID = new(StorageID) - } - (*out.StorageID).UnmarshalEasyJSON(in) - } default: in.SkipRecursive() } @@ -1023,43 +1033,33 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage11(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage11(out *jwriter.Writer, in ClearParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage11(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"storageId\":") - if in.StorageID == nil { - out.RawString("null") - } else { - (*in.StorageID).MarshalEasyJSON(out) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v ClearParams) MarshalJSON() ([]byte, error) { +func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearParams) UnmarshalJSON(data []byte) error { +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDomstorage11(l, v) } diff --git a/cdp/easyjson.go b/cdp/easyjson.go index 0d3485f..1e758ba 100644 --- a/cdp/easyjson.go +++ b/cdp/easyjson.go @@ -679,7 +679,7 @@ func (v *Node) UnmarshalJSON(data []byte) error { func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdp1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp2(in *jlexer.Lexer, out *MessageError) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp2(in *jlexer.Lexer, out *BackendNode) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -698,10 +698,12 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp2(in *jlexer.Lexer, out *Messa continue } switch key { - case "code": - out.Code = int64(in.Int64()) - case "message": - out.Message = string(in.String()) + case "nodeType": + (out.NodeType).UnmarshalEasyJSON(in) + case "nodeName": + out.NodeName = string(in.String()) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -712,174 +714,61 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp2(in *jlexer.Lexer, out *Messa in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp2(out *jwriter.Writer, in MessageError) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp2(out *jwriter.Writer, in BackendNode) { out.RawByte('{') first := true _ = first - if in.Code != 0 { + if in.NodeType != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"code\":") - out.Int64(int64(in.Code)) + out.RawString("\"nodeType\":") + (in.NodeType).MarshalEasyJSON(out) } - if in.Message != "" { + if in.NodeName != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"message\":") - out.String(string(in.Message)) + out.RawString("\"nodeName\":") + out.String(string(in.NodeName)) + } + if in.BackendNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeId\":") + out.Int64(int64(in.BackendNodeID)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v MessageError) MarshalJSON() ([]byte, error) { +func (v BackendNode) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdp2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v MessageError) MarshalEasyJSON(w *jwriter.Writer) { +func (v BackendNode) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdp2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *MessageError) UnmarshalJSON(data []byte) error { +func (v *BackendNode) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdp2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MessageError) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *BackendNode) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdp2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp3(in *jlexer.Lexer, out *Message) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "id": - out.ID = int64(in.Int64()) - case "method": - (out.Method).UnmarshalEasyJSON(in) - case "params": - (out.Params).UnmarshalEasyJSON(in) - case "result": - (out.Result).UnmarshalEasyJSON(in) - case "error": - if in.IsNull() { - in.Skip() - out.Error = nil - } else { - if out.Error == nil { - out.Error = new(MessageError) - } - (*out.Error).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp3(out *jwriter.Writer, in Message) { - out.RawByte('{') - first := true - _ = first - if in.ID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"id\":") - out.Int64(int64(in.ID)) - } - if in.Method != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"method\":") - (in.Method).MarshalEasyJSON(out) - } - if (in.Params).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"params\":") - (in.Params).MarshalEasyJSON(out) - } - if (in.Result).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - (in.Result).MarshalEasyJSON(out) - } - if in.Error != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"error\":") - if in.Error == nil { - out.RawString("null") - } else { - (*in.Error).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Message) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdp3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Message) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdp3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Message) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdp3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdp3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(in *jlexer.Lexer, out *Frame) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp3(in *jlexer.Lexer, out *Frame) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -922,7 +811,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(in *jlexer.Lexer, out *Frame in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Frame) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp3(out *jwriter.Writer, in Frame) { out.RawByte('{') first := true _ = first @@ -988,27 +877,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram // MarshalJSON supports json.Marshaler interface func (v Frame) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdp3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Frame) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdp3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Frame) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdp3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Frame) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdp3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp5(in *jlexer.Lexer, out *BackendNode) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(in *jlexer.Lexer, out *Message) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1027,12 +916,24 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp5(in *jlexer.Lexer, out *Backe continue } switch key { - case "nodeType": - (out.NodeType).UnmarshalEasyJSON(in) - case "nodeName": - out.NodeName = string(in.String()) - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) + case "id": + out.ID = int64(in.Int64()) + case "method": + (out.Method).UnmarshalEasyJSON(in) + case "params": + (out.Params).UnmarshalEasyJSON(in) + case "result": + (out.Result).UnmarshalEasyJSON(in) + case "error": + if in.IsNull() { + in.Skip() + out.Error = nil + } else { + if out.Error == nil { + out.Error = new(MessageError) + } + (*out.Error).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -1043,57 +944,156 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp5(in *jlexer.Lexer, out *Backe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp5(out *jwriter.Writer, in BackendNode) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Message) { out.RawByte('{') first := true _ = first - if in.NodeType != 0 { + if in.ID != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"nodeType\":") - (in.NodeType).MarshalEasyJSON(out) + out.RawString("\"id\":") + out.Int64(int64(in.ID)) } - if in.NodeName != "" { + if in.Method != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"nodeName\":") - out.String(string(in.NodeName)) + out.RawString("\"method\":") + (in.Method).MarshalEasyJSON(out) } - if in.BackendNodeID != 0 { + if (in.Params).IsDefined() { if !first { out.RawByte(',') } first = false - out.RawString("\"backendNodeId\":") - out.Int64(int64(in.BackendNodeID)) + out.RawString("\"params\":") + (in.Params).MarshalEasyJSON(out) + } + if (in.Result).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + (in.Result).MarshalEasyJSON(out) + } + if in.Error != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"error\":") + if in.Error == nil { + out.RawString("null") + } else { + (*in.Error).MarshalEasyJSON(out) + } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v BackendNode) MarshalJSON() ([]byte, error) { +func (v Message) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Message) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Message) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdp4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdp5(in *jlexer.Lexer, out *MessageError) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "code": + out.Code = int64(in.Int64()) + case "message": + out.Message = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp5(out *jwriter.Writer, in MessageError) { + out.RawByte('{') + first := true + _ = first + if in.Code != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"code\":") + out.Int64(int64(in.Code)) + } + if in.Message != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"message\":") + out.String(string(in.Message)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MessageError) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdp5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v BackendNode) MarshalEasyJSON(w *jwriter.Writer) { +func (v MessageError) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdp5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *BackendNode) UnmarshalJSON(data []byte) error { +func (v *MessageError) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdp5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BackendNode) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *MessageError) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdp5(l, v) } diff --git a/cdp/emulation/easyjson.go b/cdp/emulation/easyjson.go index 38ba90c..7b88d2f 100644 --- a/cdp/emulation/easyjson.go +++ b/cdp/emulation/easyjson.go @@ -18,7 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation(in *jlexer.Lexer, out *SetVisibleSizeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation(in *jlexer.Lexer, out *ScreenOrientation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -37,10 +37,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation(in *jlexer.Lexer, ou continue } switch key { - case "width": - out.Width = int64(in.Int64()) - case "height": - out.Height = int64(in.Int64()) + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "angle": + out.Angle = int64(in.Int64()) default: in.SkipRecursive() } @@ -51,49 +51,193 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation(out *jwriter.Writer, in SetVisibleSizeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation(out *jwriter.Writer, in ScreenOrientation) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) } - first = false - out.RawString("\"width\":") - out.Int64(int64(in.Width)) - if !first { - out.RawByte(',') + if in.Angle != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"angle\":") + out.Int64(int64(in.Angle)) } - first = false - out.RawString("\"height\":") - out.Int64(int64(in.Height)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetVisibleSizeParams) MarshalJSON() ([]byte, error) { +func (v ScreenOrientation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetVisibleSizeParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v ScreenOrientation) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetVisibleSizeParams) UnmarshalJSON(data []byte) error { +func (v *ScreenOrientation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetVisibleSizeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ScreenOrientation) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(in *jlexer.Lexer, out *SetVirtualTimePolicyParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(in *jlexer.Lexer, out *EventVirtualTimeBudgetExpired) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(out *jwriter.Writer, in EventVirtualTimeBudgetExpired) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventVirtualTimeBudgetExpired) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventVirtualTimeBudgetExpired) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventVirtualTimeBudgetExpired) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventVirtualTimeBudgetExpired) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(in *jlexer.Lexer, out *SetDefaultBackgroundColorOverrideParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "color": + if in.IsNull() { + in.Skip() + out.Color = nil + } else { + if out.Color == nil { + out.Color = new(cdp.RGBA) + } + (*out.Color).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(out *jwriter.Writer, in SetDefaultBackgroundColorOverrideParams) { + out.RawByte('{') + first := true + _ = first + if in.Color != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"color\":") + if in.Color == nil { + out.RawString("null") + } else { + (*in.Color).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetDefaultBackgroundColorOverrideParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetDefaultBackgroundColorOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(in *jlexer.Lexer, out *SetVirtualTimePolicyParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -126,7 +270,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(out *jwriter.Writer, in SetVirtualTimePolicyParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation3(out *jwriter.Writer, in SetVirtualTimePolicyParams) { out.RawByte('{') first := true _ = first @@ -150,27 +294,289 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v SetVirtualTimePolicyParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetVirtualTimePolicyParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetVirtualTimePolicyParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetVirtualTimePolicyParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation1(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(in *jlexer.Lexer, out *SetTouchEmulationEnabledParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation4(in *jlexer.Lexer, out *CanEmulateReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + out.Result = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation4(out *jwriter.Writer, in CanEmulateReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + out.Bool(bool(in.Result)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanEmulateReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanEmulateReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanEmulateReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanEmulateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(in *jlexer.Lexer, out *CanEmulateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(out *jwriter.Writer, in CanEmulateParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanEmulateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanEmulateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanEmulateParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanEmulateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(in *jlexer.Lexer, out *SetCPUThrottlingRateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "rate": + out.Rate = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(out *jwriter.Writer, in SetCPUThrottlingRateParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"rate\":") + out.Float64(float64(in.Rate)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetCPUThrottlingRateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetCPUThrottlingRateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetCPUThrottlingRateParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetCPUThrottlingRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(in *jlexer.Lexer, out *SetEmulatedMediaParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "media": + out.Media = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(out *jwriter.Writer, in SetEmulatedMediaParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"media\":") + out.String(string(in.Media)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetEmulatedMediaParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetEmulatedMediaParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetEmulatedMediaParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetEmulatedMediaParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(in *jlexer.Lexer, out *SetTouchEmulationEnabledParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -203,7 +609,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(out *jwriter.Writer, in SetTouchEmulationEnabledParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(out *jwriter.Writer, in SetTouchEmulationEnabledParams) { out.RawByte('{') first := true _ = first @@ -227,27 +633,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v SetTouchEmulationEnabledParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetTouchEmulationEnabledParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetTouchEmulationEnabledParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetTouchEmulationEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(in *jlexer.Lexer, out *SetScriptExecutionDisabledParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation9(in *jlexer.Lexer, out *ClearGeolocationOverrideParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -266,8 +672,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(in *jlexer.Lexer, o continue } switch key { - case "value": - out.Value = bool(in.Bool()) default: in.SkipRecursive() } @@ -278,110 +682,37 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation3(out *jwriter.Writer, in SetScriptExecutionDisabledParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation9(out *jwriter.Writer, in ClearGeolocationOverrideParams) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.Bool(bool(in.Value)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetScriptExecutionDisabledParams) MarshalJSON() ([]byte, error) { +func (v ClearGeolocationOverrideParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetScriptExecutionDisabledParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation3(w, v) +func (v ClearGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetScriptExecutionDisabledParams) UnmarshalJSON(data []byte) error { +func (v *ClearGeolocationOverrideParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetScriptExecutionDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation3(l, v) +func (v *ClearGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation4(in *jlexer.Lexer, out *SetPageScaleFactorParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "pageScaleFactor": - out.PageScaleFactor = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation4(out *jwriter.Writer, in SetPageScaleFactorParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pageScaleFactor\":") - out.Float64(float64(in.PageScaleFactor)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetPageScaleFactorParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetPageScaleFactorParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(in *jlexer.Lexer, out *SetGeolocationOverrideParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation10(in *jlexer.Lexer, out *SetGeolocationOverrideParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -416,7 +747,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(out *jwriter.Writer, in SetGeolocationOverrideParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(out *jwriter.Writer, in SetGeolocationOverrideParams) { out.RawByte('{') first := true _ = first @@ -450,27 +781,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v SetGeolocationOverrideParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation5(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetGeolocationOverrideParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation5(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation10(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(in *jlexer.Lexer, out *SetEmulatedMediaParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation11(in *jlexer.Lexer, out *SetScriptExecutionDisabledParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -489,8 +820,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(in *jlexer.Lexer, o continue } switch key { - case "media": - out.Media = string(in.String()) + case "value": + out.Value = bool(in.Bool()) default: in.SkipRecursive() } @@ -501,7 +832,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(out *jwriter.Writer, in SetEmulatedMediaParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation11(out *jwriter.Writer, in SetScriptExecutionDisabledParams) { out.RawByte('{') first := true _ = first @@ -509,35 +840,437 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(out *jwriter.Writer out.RawByte(',') } first = false - out.RawString("\"media\":") - out.String(string(in.Media)) + out.RawString("\"value\":") + out.Bool(bool(in.Value)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetEmulatedMediaParams) MarshalJSON() ([]byte, error) { +func (v SetScriptExecutionDisabledParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetEmulatedMediaParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation6(w, v) +func (v SetScriptExecutionDisabledParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetEmulatedMediaParams) UnmarshalJSON(data []byte) error { +func (v *SetScriptExecutionDisabledParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetEmulatedMediaParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation6(l, v) +func (v *SetScriptExecutionDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation11(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(in *jlexer.Lexer, out *SetDeviceMetricsOverrideParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation12(in *jlexer.Lexer, out *SetVisibleSizeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "width": + out.Width = int64(in.Int64()) + case "height": + out.Height = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation12(out *jwriter.Writer, in SetVisibleSizeParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"width\":") + out.Int64(int64(in.Width)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"height\":") + out.Int64(int64(in.Height)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetVisibleSizeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetVisibleSizeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetVisibleSizeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetVisibleSizeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation13(in *jlexer.Lexer, out *SetPageScaleFactorParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "pageScaleFactor": + out.PageScaleFactor = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation13(out *jwriter.Writer, in SetPageScaleFactorParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pageScaleFactor\":") + out.Float64(float64(in.PageScaleFactor)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetPageScaleFactorParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetPageScaleFactorParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation14(in *jlexer.Lexer, out *ResetPageScaleFactorParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation14(out *jwriter.Writer, in ResetPageScaleFactorParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ResetPageScaleFactorParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ResetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ResetPageScaleFactorParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ResetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation15(in *jlexer.Lexer, out *ResetViewportParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation15(out *jwriter.Writer, in ResetViewportParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ResetViewportParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ResetViewportParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ResetViewportParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ResetViewportParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation16(in *jlexer.Lexer, out *ForceViewportParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "x": + out.X = float64(in.Float64()) + case "y": + out.Y = float64(in.Float64()) + case "scale": + out.Scale = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation16(out *jwriter.Writer, in ForceViewportParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"x\":") + out.Float64(float64(in.X)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"y\":") + out.Float64(float64(in.Y)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scale\":") + out.Float64(float64(in.Scale)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ForceViewportParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ForceViewportParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ForceViewportParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ForceViewportParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation16(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation17(in *jlexer.Lexer, out *ClearDeviceMetricsOverrideParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation17(out *jwriter.Writer, in ClearDeviceMetricsOverrideParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ClearDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClearDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClearDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation18(in *jlexer.Lexer, out *SetDeviceMetricsOverrideParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -596,7 +1329,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(out *jwriter.Writer, in SetDeviceMetricsOverrideParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation18(out *jwriter.Writer, in SetDeviceMetricsOverrideParams) { out.RawByte('{') first := true _ = first @@ -687,757 +1420,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v SetDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(in *jlexer.Lexer, out *SetDefaultBackgroundColorOverrideParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "color": - if in.IsNull() { - in.Skip() - out.Color = nil - } else { - if out.Color == nil { - out.Color = new(cdp.RGBA) - } - (*out.Color).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(out *jwriter.Writer, in SetDefaultBackgroundColorOverrideParams) { - out.RawByte('{') - first := true - _ = first - if in.Color != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"color\":") - if in.Color == nil { - out.RawString("null") - } else { - (*in.Color).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetDefaultBackgroundColorOverrideParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetDefaultBackgroundColorOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation9(in *jlexer.Lexer, out *SetCPUThrottlingRateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "rate": - out.Rate = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation9(out *jwriter.Writer, in SetCPUThrottlingRateParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"rate\":") - out.Float64(float64(in.Rate)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetCPUThrottlingRateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetCPUThrottlingRateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetCPUThrottlingRateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetCPUThrottlingRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation10(in *jlexer.Lexer, out *ScreenOrientation) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "angle": - out.Angle = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(out *jwriter.Writer, in ScreenOrientation) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Angle != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"angle\":") - out.Int64(int64(in.Angle)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ScreenOrientation) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ScreenOrientation) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ScreenOrientation) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ScreenOrientation) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation11(in *jlexer.Lexer, out *ResetViewportParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation11(out *jwriter.Writer, in ResetViewportParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ResetViewportParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ResetViewportParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ResetViewportParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ResetViewportParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation12(in *jlexer.Lexer, out *ResetPageScaleFactorParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation12(out *jwriter.Writer, in ResetPageScaleFactorParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ResetPageScaleFactorParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ResetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ResetPageScaleFactorParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ResetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation13(in *jlexer.Lexer, out *ForceViewportParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "x": - out.X = float64(in.Float64()) - case "y": - out.Y = float64(in.Float64()) - case "scale": - out.Scale = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation13(out *jwriter.Writer, in ForceViewportParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"x\":") - out.Float64(float64(in.X)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"y\":") - out.Float64(float64(in.Y)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scale\":") - out.Float64(float64(in.Scale)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ForceViewportParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ForceViewportParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ForceViewportParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ForceViewportParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation14(in *jlexer.Lexer, out *EventVirtualTimeBudgetExpired) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation14(out *jwriter.Writer, in EventVirtualTimeBudgetExpired) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventVirtualTimeBudgetExpired) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventVirtualTimeBudgetExpired) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventVirtualTimeBudgetExpired) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventVirtualTimeBudgetExpired) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation14(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation15(in *jlexer.Lexer, out *ClearGeolocationOverrideParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation15(out *jwriter.Writer, in ClearGeolocationOverrideParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ClearGeolocationOverrideParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation15(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation15(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearGeolocationOverrideParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation15(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation15(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation16(in *jlexer.Lexer, out *ClearDeviceMetricsOverrideParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation16(out *jwriter.Writer, in ClearDeviceMetricsOverrideParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ClearDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation17(in *jlexer.Lexer, out *CanEmulateReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - out.Result = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation17(out *jwriter.Writer, in CanEmulateReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - out.Bool(bool(in.Result)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanEmulateReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanEmulateReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanEmulateReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanEmulateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation18(in *jlexer.Lexer, out *CanEmulateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation18(out *jwriter.Writer, in CanEmulateParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanEmulateParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation18(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanEmulateParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v SetDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation18(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CanEmulateParams) UnmarshalJSON(data []byte) error { +func (v *SetDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation18(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanEmulateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpEmulation18(l, v) } diff --git a/cdp/emulation/emulation.go b/cdp/emulation/emulation.go index f4ce9d8..250022d 100644 --- a/cdp/emulation/emulation.go +++ b/cdp/emulation/emulation.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // SetDeviceMetricsOverrideParams overrides the values of device screen @@ -98,39 +97,7 @@ func (p SetDeviceMetricsOverrideParams) WithScreenOrientation(screenOrientation // Do executes Emulation.setDeviceMetricsOverride against the provided context and // target handler. func (p *SetDeviceMetricsOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetDeviceMetricsOverride, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetDeviceMetricsOverride, p, nil) } // ClearDeviceMetricsOverrideParams clears the overriden device metrics. @@ -144,33 +111,7 @@ func ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideParams { // Do executes Emulation.clearDeviceMetricsOverride against the provided context and // target handler. func (p *ClearDeviceMetricsOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationClearDeviceMetricsOverride, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationClearDeviceMetricsOverride, nil, nil) } // ForceViewportParams overrides the visible area of the page. The change is @@ -203,39 +144,7 @@ func ForceViewport(x float64, y float64, scale float64) *ForceViewportParams { // Do executes Emulation.forceViewport against the provided context and // target handler. func (p *ForceViewportParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationForceViewport, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationForceViewport, p, nil) } // ResetViewportParams resets the visible area of the page to the original @@ -251,33 +160,7 @@ func ResetViewport() *ResetViewportParams { // Do executes Emulation.resetViewport against the provided context and // target handler. func (p *ResetViewportParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationResetViewport, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationResetViewport, nil, nil) } // ResetPageScaleFactorParams requests that page scale factor is reset to @@ -293,33 +176,7 @@ func ResetPageScaleFactor() *ResetPageScaleFactorParams { // Do executes Emulation.resetPageScaleFactor against the provided context and // target handler. func (p *ResetPageScaleFactorParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationResetPageScaleFactor, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationResetPageScaleFactor, nil, nil) } // SetPageScaleFactorParams sets a specified page scale factor. @@ -340,39 +197,7 @@ func SetPageScaleFactor(pageScaleFactor float64) *SetPageScaleFactorParams { // Do executes Emulation.setPageScaleFactor against the provided context and // target handler. func (p *SetPageScaleFactorParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetPageScaleFactor, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetPageScaleFactor, p, nil) } // SetVisibleSizeParams resizes the frame/viewport of the page. Note that @@ -400,39 +225,7 @@ func SetVisibleSize(width int64, height int64) *SetVisibleSizeParams { // Do executes Emulation.setVisibleSize against the provided context and // target handler. func (p *SetVisibleSizeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetVisibleSize, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetVisibleSize, p, nil) } // SetScriptExecutionDisabledParams switches script execution in the page. @@ -453,39 +246,7 @@ func SetScriptExecutionDisabled(value bool) *SetScriptExecutionDisabledParams { // Do executes Emulation.setScriptExecutionDisabled against the provided context and // target handler. func (p *SetScriptExecutionDisabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetScriptExecutionDisabled, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetScriptExecutionDisabled, p, nil) } // SetGeolocationOverrideParams overrides the Geolocation Position or Error. @@ -525,39 +286,7 @@ func (p SetGeolocationOverrideParams) WithAccuracy(accuracy float64) *SetGeoloca // Do executes Emulation.setGeolocationOverride against the provided context and // target handler. func (p *SetGeolocationOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetGeolocationOverride, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetGeolocationOverride, p, nil) } // ClearGeolocationOverrideParams clears the overriden Geolocation Position @@ -573,33 +302,7 @@ func ClearGeolocationOverride() *ClearGeolocationOverrideParams { // Do executes Emulation.clearGeolocationOverride against the provided context and // target handler. func (p *ClearGeolocationOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationClearGeolocationOverride, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationClearGeolocationOverride, nil, nil) } // SetTouchEmulationEnabledParams toggles mouse event-based touch event @@ -629,39 +332,7 @@ func (p SetTouchEmulationEnabledParams) WithConfiguration(configuration EnabledC // Do executes Emulation.setTouchEmulationEnabled against the provided context and // target handler. func (p *SetTouchEmulationEnabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetTouchEmulationEnabled, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetTouchEmulationEnabled, p, nil) } // SetEmulatedMediaParams emulates the given media for CSS media queries. @@ -682,39 +353,7 @@ func SetEmulatedMedia(media string) *SetEmulatedMediaParams { // Do executes Emulation.setEmulatedMedia against the provided context and // target handler. func (p *SetEmulatedMediaParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetEmulatedMedia, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetEmulatedMedia, p, nil) } // SetCPUThrottlingRateParams enables CPU throttling to emulate slow CPUs. @@ -735,39 +374,7 @@ func SetCPUThrottlingRate(rate float64) *SetCPUThrottlingRateParams { // Do executes Emulation.setCPUThrottlingRate against the provided context and // target handler. func (p *SetCPUThrottlingRateParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetCPUThrottlingRate, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetCPUThrottlingRate, p, nil) } // CanEmulateParams tells whether emulation is supported. @@ -789,40 +396,14 @@ type CanEmulateReturns struct { // returns: // result - True if emulation is supported. func (p *CanEmulateParams) Do(ctxt context.Context, h cdp.Handler) (result bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationCanEmulate, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CanEmulateReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() + var res CanEmulateReturns + err = h.Execute(ctxt, cdp.CommandEmulationCanEmulate, nil, &res) + if err != nil { + return false, err } - return false, cdp.ErrUnknownResult + return res.Result, nil } // SetVirtualTimePolicyParams turns on virtual time for all frames (replacing @@ -855,39 +436,7 @@ func (p SetVirtualTimePolicyParams) WithBudget(budget int64) *SetVirtualTimePoli // Do executes Emulation.setVirtualTimePolicy against the provided context and // target handler. func (p *SetVirtualTimePolicyParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetVirtualTimePolicy, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetVirtualTimePolicy, p, nil) } // SetDefaultBackgroundColorOverrideParams sets or clears an override of the @@ -916,37 +465,5 @@ func (p SetDefaultBackgroundColorOverrideParams) WithColor(color *cdp.RGBA) *Set // Do executes Emulation.setDefaultBackgroundColorOverride against the provided context and // target handler. func (p *SetDefaultBackgroundColorOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandEmulationSetDefaultBackgroundColorOverride, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandEmulationSetDefaultBackgroundColorOverride, p, nil) } diff --git a/cdp/heapprofiler/easyjson.go b/cdp/heapprofiler/easyjson.go index 8dd09f3..b668c17 100644 --- a/cdp/heapprofiler/easyjson.go +++ b/cdp/heapprofiler/easyjson.go @@ -18,7 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler(in *jlexer.Lexer, out *TakeHeapSnapshotParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler(in *jlexer.Lexer, out *SamplingHeapProfile) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -37,8 +37,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler(in *jlexer.Lexer, continue } switch key { - case "reportProgress": - out.ReportProgress = bool(in.Bool()) + case "head": + if in.IsNull() { + in.Skip() + out.Head = nil + } else { + if out.Head == nil { + out.Head = new(SamplingHeapProfileNode) + } + (*out.Head).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -49,45 +57,49 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler(out *jwriter.Writer, in TakeHeapSnapshotParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler(out *jwriter.Writer, in SamplingHeapProfile) { out.RawByte('{') first := true _ = first - if in.ReportProgress { + if in.Head != nil { if !first { out.RawByte(',') } first = false - out.RawString("\"reportProgress\":") - out.Bool(bool(in.ReportProgress)) + out.RawString("\"head\":") + if in.Head == nil { + out.RawString("null") + } else { + (*in.Head).MarshalEasyJSON(out) + } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v TakeHeapSnapshotParams) MarshalJSON() ([]byte, error) { +func (v SamplingHeapProfile) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v TakeHeapSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v SamplingHeapProfile) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *TakeHeapSnapshotParams) UnmarshalJSON(data []byte) error { +func (v *SamplingHeapProfile) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *TakeHeapSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SamplingHeapProfile) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler1(in *jlexer.Lexer, out *StopTrackingHeapObjectsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler1(in *jlexer.Lexer, out *SamplingHeapProfileNode) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -106,8 +118,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler1(in *jlexer.Lexer continue } switch key { - case "reportProgress": - out.ReportProgress = bool(in.Bool()) + case "callFrame": + if in.IsNull() { + in.Skip() + out.CallFrame = nil + } else { + if out.CallFrame == nil { + out.CallFrame = new(runtime.CallFrame) + } + (*out.CallFrame).UnmarshalEasyJSON(in) + } + case "selfSize": + out.SelfSize = float64(in.Float64()) + case "children": + if in.IsNull() { + in.Skip() + out.Children = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Children = make([]*SamplingHeapProfileNode, 0, 8) + } else { + out.Children = []*SamplingHeapProfileNode{} + } + for !in.IsDelim(']') { + var v1 *SamplingHeapProfileNode + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(SamplingHeapProfileNode) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Children = append(out.Children, v1) + in.WantComma() + } + in.Delim(']') + } default: in.SkipRecursive() } @@ -118,42 +167,77 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler1(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler1(out *jwriter.Writer, in StopTrackingHeapObjectsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler1(out *jwriter.Writer, in SamplingHeapProfileNode) { out.RawByte('{') first := true _ = first - if in.ReportProgress { + if in.CallFrame != nil { if !first { out.RawByte(',') } first = false - out.RawString("\"reportProgress\":") - out.Bool(bool(in.ReportProgress)) + out.RawString("\"callFrame\":") + if in.CallFrame == nil { + out.RawString("null") + } else { + (*in.CallFrame).MarshalEasyJSON(out) + } + } + if in.SelfSize != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"selfSize\":") + out.Float64(float64(in.SelfSize)) + } + if len(in.Children) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"children\":") + if in.Children == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.Children { + if v2 > 0 { + out.RawByte(',') + } + if v3 == nil { + out.RawString("null") + } else { + (*v3).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v StopTrackingHeapObjectsParams) MarshalJSON() ([]byte, error) { +func (v SamplingHeapProfileNode) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v StopTrackingHeapObjectsParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v SamplingHeapProfileNode) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *StopTrackingHeapObjectsParams) UnmarshalJSON(data []byte) error { +func (v *SamplingHeapProfileNode) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StopTrackingHeapObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SamplingHeapProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler1(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler2(in *jlexer.Lexer, out *StopSamplingReturns) { @@ -296,76 +380,7 @@ func (v *StopSamplingParams) UnmarshalJSON(data []byte) error { func (v *StopSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler4(in *jlexer.Lexer, out *StartTrackingHeapObjectsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "trackAllocations": - out.TrackAllocations = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler4(out *jwriter.Writer, in StartTrackingHeapObjectsParams) { - out.RawByte('{') - first := true - _ = first - if in.TrackAllocations { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"trackAllocations\":") - out.Bool(bool(in.TrackAllocations)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StartTrackingHeapObjectsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StartTrackingHeapObjectsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StartTrackingHeapObjectsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StartTrackingHeapObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler5(in *jlexer.Lexer, out *StartSamplingParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler4(in *jlexer.Lexer, out *StartSamplingParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -396,7 +411,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler5(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(out *jwriter.Writer, in StartSamplingParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler4(out *jwriter.Writer, in StartSamplingParams) { out.RawByte('{') first := true _ = first @@ -414,27 +429,96 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(out *jwriter.Wri // MarshalJSON supports json.Marshaler interface func (v StartSamplingParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StartSamplingParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StartSamplingParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StartSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler5(in *jlexer.Lexer, out *GetHeapObjectIDReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "heapSnapshotObjectId": + out.HeapSnapshotObjectID = HeapSnapshotObjectID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(out *jwriter.Writer, in GetHeapObjectIDReturns) { + out.RawByte('{') + first := true + _ = first + if in.HeapSnapshotObjectID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"heapSnapshotObjectId\":") + out.String(string(in.HeapSnapshotObjectID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetHeapObjectIDReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetHeapObjectIDReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetHeapObjectIDReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StartSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetHeapObjectIDReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler6(in *jlexer.Lexer, out *SamplingHeapProfileNode) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler6(in *jlexer.Lexer, out *GetHeapObjectIDParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -453,45 +537,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler6(in *jlexer.Lexer continue } switch key { - case "callFrame": - if in.IsNull() { - in.Skip() - out.CallFrame = nil - } else { - if out.CallFrame == nil { - out.CallFrame = new(runtime.CallFrame) - } - (*out.CallFrame).UnmarshalEasyJSON(in) - } - case "selfSize": - out.SelfSize = float64(in.Float64()) - case "children": - if in.IsNull() { - in.Skip() - out.Children = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Children = make([]*SamplingHeapProfileNode, 0, 8) - } else { - out.Children = []*SamplingHeapProfileNode{} - } - for !in.IsDelim(']') { - var v1 *SamplingHeapProfileNode - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(SamplingHeapProfileNode) - } - (*v1).UnmarshalEasyJSON(in) - } - out.Children = append(out.Children, v1) - in.WantComma() - } - in.Delim(']') - } + case "objectId": + out.ObjectID = runtime.RemoteObjectID(in.String()) default: in.SkipRecursive() } @@ -502,80 +549,43 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler6(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(out *jwriter.Writer, in SamplingHeapProfileNode) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(out *jwriter.Writer, in GetHeapObjectIDParams) { out.RawByte('{') first := true _ = first - if in.CallFrame != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"callFrame\":") - if in.CallFrame == nil { - out.RawString("null") - } else { - (*in.CallFrame).MarshalEasyJSON(out) - } - } - if in.SelfSize != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"selfSize\":") - out.Float64(float64(in.SelfSize)) - } - if len(in.Children) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"children\":") - if in.Children == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Children { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } + if !first { + out.RawByte(',') } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SamplingHeapProfileNode) MarshalJSON() ([]byte, error) { +func (v GetHeapObjectIDParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SamplingHeapProfileNode) MarshalEasyJSON(w *jwriter.Writer) { +func (v GetHeapObjectIDParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SamplingHeapProfileNode) UnmarshalJSON(data []byte) error { +func (v *GetHeapObjectIDParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SamplingHeapProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetHeapObjectIDParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler7(in *jlexer.Lexer, out *SamplingHeapProfile) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler7(in *jlexer.Lexer, out *AddInspectedHeapObjectParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -594,16 +604,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler7(in *jlexer.Lexer continue } switch key { - case "head": - if in.IsNull() { - in.Skip() - out.Head = nil - } else { - if out.Head == nil { - out.Head = new(SamplingHeapProfileNode) - } - (*out.Head).UnmarshalEasyJSON(in) - } + case "heapObjectId": + out.HeapObjectID = HeapSnapshotObjectID(in.String()) default: in.SkipRecursive() } @@ -614,46 +616,40 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler7(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(out *jwriter.Writer, in SamplingHeapProfile) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(out *jwriter.Writer, in AddInspectedHeapObjectParams) { out.RawByte('{') first := true _ = first - if in.Head != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"head\":") - if in.Head == nil { - out.RawString("null") - } else { - (*in.Head).MarshalEasyJSON(out) - } + if !first { + out.RawByte(',') } + first = false + out.RawString("\"heapObjectId\":") + out.String(string(in.HeapObjectID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SamplingHeapProfile) MarshalJSON() ([]byte, error) { +func (v AddInspectedHeapObjectParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SamplingHeapProfile) MarshalEasyJSON(w *jwriter.Writer) { +func (v AddInspectedHeapObjectParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SamplingHeapProfile) UnmarshalJSON(data []byte) error { +func (v *AddInspectedHeapObjectParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SamplingHeapProfile) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *AddInspectedHeapObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler7(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler8(in *jlexer.Lexer, out *GetObjectByHeapObjectIDReturns) { @@ -814,7 +810,7 @@ func (v *GetObjectByHeapObjectIDParams) UnmarshalJSON(data []byte) error { func (v *GetObjectByHeapObjectIDParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler10(in *jlexer.Lexer, out *GetHeapObjectIDReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler10(in *jlexer.Lexer, out *CollectGarbageParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -833,8 +829,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler10(in *jlexer.Lexe continue } switch key { - case "heapSnapshotObjectId": - out.HeapSnapshotObjectID = HeapSnapshotObjectID(in.String()) default: in.SkipRecursive() } @@ -845,45 +839,37 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler10(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler10(out *jwriter.Writer, in GetHeapObjectIDReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler10(out *jwriter.Writer, in CollectGarbageParams) { out.RawByte('{') first := true _ = first - if in.HeapSnapshotObjectID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"heapSnapshotObjectId\":") - out.String(string(in.HeapSnapshotObjectID)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetHeapObjectIDReturns) MarshalJSON() ([]byte, error) { +func (v CollectGarbageParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetHeapObjectIDReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v CollectGarbageParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetHeapObjectIDReturns) UnmarshalJSON(data []byte) error { +func (v *CollectGarbageParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetHeapObjectIDReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *CollectGarbageParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler10(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler11(in *jlexer.Lexer, out *GetHeapObjectIDParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler11(in *jlexer.Lexer, out *TakeHeapSnapshotParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -902,8 +888,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler11(in *jlexer.Lexe continue } switch key { - case "objectId": - out.ObjectID = runtime.RemoteObjectID(in.String()) + case "reportProgress": + out.ReportProgress = bool(in.Bool()) default: in.SkipRecursive() } @@ -914,43 +900,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler11(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler11(out *jwriter.Writer, in GetHeapObjectIDParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler11(out *jwriter.Writer, in TakeHeapSnapshotParams) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.ReportProgress { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"reportProgress\":") + out.Bool(bool(in.ReportProgress)) } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v GetHeapObjectIDParams) MarshalJSON() ([]byte, error) { +func (v TakeHeapSnapshotParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetHeapObjectIDParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v TakeHeapSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *GetHeapObjectIDParams) UnmarshalJSON(data []byte) error { +func (v *TakeHeapSnapshotParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetHeapObjectIDParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *TakeHeapSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler11(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler12(in *jlexer.Lexer, out *EventResetProfiles) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler12(in *jlexer.Lexer, out *StopTrackingHeapObjectsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -969,6 +957,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler12(in *jlexer.Lexe continue } switch key { + case "reportProgress": + out.ReportProgress = bool(in.Bool()) default: in.SkipRecursive() } @@ -979,37 +969,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler12(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler12(out *jwriter.Writer, in EventResetProfiles) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler12(out *jwriter.Writer, in StopTrackingHeapObjectsParams) { out.RawByte('{') first := true _ = first + if in.ReportProgress { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"reportProgress\":") + out.Bool(bool(in.ReportProgress)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventResetProfiles) MarshalJSON() ([]byte, error) { +func (v StopTrackingHeapObjectsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler12(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventResetProfiles) MarshalEasyJSON(w *jwriter.Writer) { +func (v StopTrackingHeapObjectsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler12(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventResetProfiles) UnmarshalJSON(data []byte) error { +func (v *StopTrackingHeapObjectsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler12(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventResetProfiles) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *StopTrackingHeapObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler12(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler13(in *jlexer.Lexer, out *EventReportHeapSnapshotProgress) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler13(in *jlexer.Lexer, out *StartTrackingHeapObjectsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1028,12 +1026,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler13(in *jlexer.Lexe continue } switch key { - case "done": - out.Done = int64(in.Int64()) - case "total": - out.Total = int64(in.Int64()) - case "finished": - out.Finished = bool(in.Bool()) + case "trackAllocations": + out.TrackAllocations = bool(in.Bool()) default: in.SkipRecursive() } @@ -1044,61 +1038,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler13(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler13(out *jwriter.Writer, in EventReportHeapSnapshotProgress) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler13(out *jwriter.Writer, in StartTrackingHeapObjectsParams) { out.RawByte('{') first := true _ = first - if in.Done != 0 { + if in.TrackAllocations { if !first { out.RawByte(',') } first = false - out.RawString("\"done\":") - out.Int64(int64(in.Done)) - } - if in.Total != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"total\":") - out.Int64(int64(in.Total)) - } - if in.Finished { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"finished\":") - out.Bool(bool(in.Finished)) + out.RawString("\"trackAllocations\":") + out.Bool(bool(in.TrackAllocations)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventReportHeapSnapshotProgress) MarshalJSON() ([]byte, error) { +func (v StartTrackingHeapObjectsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler13(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventReportHeapSnapshotProgress) MarshalEasyJSON(w *jwriter.Writer) { +func (v StartTrackingHeapObjectsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler13(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventReportHeapSnapshotProgress) UnmarshalJSON(data []byte) error { +func (v *StartTrackingHeapObjectsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler13(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventReportHeapSnapshotProgress) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *StartTrackingHeapObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler13(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler14(in *jlexer.Lexer, out *EventLastSeenObjectID) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler14(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1117,10 +1095,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler14(in *jlexer.Lexe continue } switch key { - case "lastSeenObjectId": - out.LastSeenObjectID = int64(in.Int64()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -1131,53 +1105,96 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler14(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(out *jwriter.Writer, in EventLastSeenObjectID) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first - if in.LastSeenObjectID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lastSeenObjectId\":") - out.Int64(int64(in.LastSeenObjectID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventLastSeenObjectID) MarshalJSON() ([]byte, error) { +func (v DisableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventLastSeenObjectID) MarshalEasyJSON(w *jwriter.Writer) { +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventLastSeenObjectID) UnmarshalJSON(data []byte) error { +func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventLastSeenObjectID) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler14(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(in *jlexer.Lexer, out *EventHeapStatsUpdate) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(in *jlexer.Lexer, out *EventHeapStatsUpdate) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1225,7 +1242,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(out *jwriter.Writer, in EventHeapStatsUpdate) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(out *jwriter.Writer, in EventHeapStatsUpdate) { out.RawByte('{') first := true _ = first @@ -1254,27 +1271,254 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(out *jwriter.Wr // MarshalJSON supports json.Marshaler interface func (v EventHeapStatsUpdate) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventHeapStatsUpdate) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventHeapStatsUpdate) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventHeapStatsUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler15(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(in *jlexer.Lexer, out *EventAddHeapSnapshotChunk) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler17(in *jlexer.Lexer, out *EventLastSeenObjectID) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "lastSeenObjectId": + out.LastSeenObjectID = int64(in.Int64()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler17(out *jwriter.Writer, in EventLastSeenObjectID) { + out.RawByte('{') + first := true + _ = first + if in.LastSeenObjectID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lastSeenObjectId\":") + out.Int64(int64(in.LastSeenObjectID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventLastSeenObjectID) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventLastSeenObjectID) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventLastSeenObjectID) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventLastSeenObjectID) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler18(in *jlexer.Lexer, out *EventReportHeapSnapshotProgress) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "done": + out.Done = int64(in.Int64()) + case "total": + out.Total = int64(in.Int64()) + case "finished": + out.Finished = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler18(out *jwriter.Writer, in EventReportHeapSnapshotProgress) { + out.RawByte('{') + first := true + _ = first + if in.Done != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"done\":") + out.Int64(int64(in.Done)) + } + if in.Total != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"total\":") + out.Int64(int64(in.Total)) + } + if in.Finished { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"finished\":") + out.Bool(bool(in.Finished)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventReportHeapSnapshotProgress) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventReportHeapSnapshotProgress) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventReportHeapSnapshotProgress) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventReportHeapSnapshotProgress) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler19(in *jlexer.Lexer, out *EventResetProfiles) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler19(out *jwriter.Writer, in EventResetProfiles) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventResetProfiles) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventResetProfiles) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventResetProfiles) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventResetProfiles) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler19(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler20(in *jlexer.Lexer, out *EventAddHeapSnapshotChunk) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1305,7 +1549,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(out *jwriter.Writer, in EventAddHeapSnapshotChunk) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler20(out *jwriter.Writer, in EventAddHeapSnapshotChunk) { out.RawByte('{') first := true _ = first @@ -1322,268 +1566,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(out *jwriter.Wr // MarshalJSON supports json.Marshaler interface func (v EventAddHeapSnapshotChunk) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventAddHeapSnapshotChunk) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventAddHeapSnapshotChunk) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAddHeapSnapshotChunk) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler17(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler17(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler18(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler18(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler19(in *jlexer.Lexer, out *CollectGarbageParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler19(out *jwriter.Writer, in CollectGarbageParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CollectGarbageParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CollectGarbageParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CollectGarbageParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CollectGarbageParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler20(in *jlexer.Lexer, out *AddInspectedHeapObjectParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "heapObjectId": - out.HeapObjectID = HeapSnapshotObjectID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler20(out *jwriter.Writer, in AddInspectedHeapObjectParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"heapObjectId\":") - out.String(string(in.HeapObjectID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AddInspectedHeapObjectParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler20(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddInspectedHeapObjectParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventAddHeapSnapshotChunk) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler20(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AddInspectedHeapObjectParams) UnmarshalJSON(data []byte) error { +func (v *EventAddHeapSnapshotChunk) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler20(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddInspectedHeapObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventAddHeapSnapshotChunk) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHeapprofiler20(l, v) } diff --git a/cdp/heapprofiler/heapprofiler.go b/cdp/heapprofiler/heapprofiler.go index 3ee513c..97fef60 100644 --- a/cdp/heapprofiler/heapprofiler.go +++ b/cdp/heapprofiler/heapprofiler.go @@ -11,7 +11,6 @@ import ( cdp "github.com/knq/chromedp/cdp" "github.com/knq/chromedp/cdp/runtime" - "github.com/mailru/easyjson" ) // EnableParams [no description]. @@ -25,33 +24,7 @@ func Enable() *EnableParams { // Do executes HeapProfiler.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerEnable, nil, nil) } // DisableParams [no description]. @@ -65,33 +38,7 @@ func Disable() *DisableParams { // Do executes HeapProfiler.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerDisable, nil, nil) } // StartTrackingHeapObjectsParams [no description]. @@ -115,39 +62,7 @@ func (p StartTrackingHeapObjectsParams) WithTrackAllocations(trackAllocations bo // Do executes HeapProfiler.startTrackingHeapObjects against the provided context and // target handler. func (p *StartTrackingHeapObjectsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerStartTrackingHeapObjects, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerStartTrackingHeapObjects, p, nil) } // StopTrackingHeapObjectsParams [no description]. @@ -172,39 +87,7 @@ func (p StopTrackingHeapObjectsParams) WithReportProgress(reportProgress bool) * // Do executes HeapProfiler.stopTrackingHeapObjects against the provided context and // target handler. func (p *StopTrackingHeapObjectsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerStopTrackingHeapObjects, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerStopTrackingHeapObjects, p, nil) } // TakeHeapSnapshotParams [no description]. @@ -229,39 +112,7 @@ func (p TakeHeapSnapshotParams) WithReportProgress(reportProgress bool) *TakeHea // Do executes HeapProfiler.takeHeapSnapshot against the provided context and // target handler. func (p *TakeHeapSnapshotParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerTakeHeapSnapshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerTakeHeapSnapshot, p, nil) } // CollectGarbageParams [no description]. @@ -275,33 +126,7 @@ func CollectGarbage() *CollectGarbageParams { // Do executes HeapProfiler.collectGarbage against the provided context and // target handler. func (p *CollectGarbageParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerCollectGarbage, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerCollectGarbage, nil, nil) } // GetObjectByHeapObjectIDParams [no description]. @@ -338,46 +163,14 @@ type GetObjectByHeapObjectIDReturns struct { // returns: // result - Evaluation result. func (p *GetObjectByHeapObjectIDParams) Do(ctxt context.Context, h cdp.Handler) (result *runtime.RemoteObject, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetObjectByHeapObjectIDReturns + err = h.Execute(ctxt, cdp.CommandHeapProfilerGetObjectByHeapObjectID, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerGetObjectByHeapObjectID, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetObjectByHeapObjectIDReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Result, nil } // AddInspectedHeapObjectParams enables console to refer to the node with @@ -400,39 +193,7 @@ func AddInspectedHeapObject(heapObjectID HeapSnapshotObjectID) *AddInspectedHeap // Do executes HeapProfiler.addInspectedHeapObject against the provided context and // target handler. func (p *AddInspectedHeapObjectParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerAddInspectedHeapObject, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerAddInspectedHeapObject, p, nil) } // GetHeapObjectIDParams [no description]. @@ -461,46 +222,14 @@ type GetHeapObjectIDReturns struct { // returns: // heapSnapshotObjectID - Id of the heap snapshot object corresponding to the passed remote object id. func (p *GetHeapObjectIDParams) Do(ctxt context.Context, h cdp.Handler) (heapSnapshotObjectID HeapSnapshotObjectID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetHeapObjectIDReturns + err = h.Execute(ctxt, cdp.CommandHeapProfilerGetHeapObjectID, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerGetHeapObjectID, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetHeapObjectIDReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.HeapSnapshotObjectID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.HeapSnapshotObjectID, nil } // StartSamplingParams [no description]. @@ -525,39 +254,7 @@ func (p StartSamplingParams) WithSamplingInterval(samplingInterval float64) *Sta // Do executes HeapProfiler.startSampling against the provided context and // target handler. func (p *StartSamplingParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerStartSampling, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandHeapProfilerStartSampling, p, nil) } // StopSamplingParams [no description]. @@ -579,38 +276,12 @@ type StopSamplingReturns struct { // returns: // profile - Recorded sampling heap profile. func (p *StopSamplingParams) Do(ctxt context.Context, h cdp.Handler) (profile *SamplingHeapProfile, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandHeapProfilerStopSampling, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r StopSamplingReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Profile, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res StopSamplingReturns + err = h.Execute(ctxt, cdp.CommandHeapProfilerStopSampling, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.Profile, nil } diff --git a/cdp/indexeddb/easyjson.go b/cdp/indexeddb/easyjson.go index a7c033d..9025eae 100644 --- a/cdp/indexeddb/easyjson.go +++ b/cdp/indexeddb/easyjson.go @@ -18,7 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(in *jlexer.Lexer, out *RequestDatabaseReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(in *jlexer.Lexer, out *KeyPath) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -37,177 +37,25 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(in *jlexer.Lexer, ou continue } switch key { - case "databaseWithObjectStores": + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "string": + out.String = string(in.String()) + case "array": if in.IsNull() { in.Skip() - out.DatabaseWithObjectStores = nil - } else { - if out.DatabaseWithObjectStores == nil { - out.DatabaseWithObjectStores = new(DatabaseWithObjectStores) - } - (*out.DatabaseWithObjectStores).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb(out *jwriter.Writer, in RequestDatabaseReturns) { - out.RawByte('{') - first := true - _ = first - if in.DatabaseWithObjectStores != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"databaseWithObjectStores\":") - if in.DatabaseWithObjectStores == nil { - out.RawString("null") - } else { - (*in.DatabaseWithObjectStores).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestDatabaseReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestDatabaseReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestDatabaseReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestDatabaseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb1(in *jlexer.Lexer, out *RequestDatabaseParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "securityOrigin": - out.SecurityOrigin = string(in.String()) - case "databaseName": - out.DatabaseName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb1(out *jwriter.Writer, in RequestDatabaseParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"securityOrigin\":") - out.String(string(in.SecurityOrigin)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"databaseName\":") - out.String(string(in.DatabaseName)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestDatabaseParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestDatabaseParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb2(in *jlexer.Lexer, out *RequestDatabaseNamesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "databaseNames": - if in.IsNull() { - in.Skip() - out.DatabaseNames = nil + out.Array = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.DatabaseNames = make([]string, 0, 4) + out.Array = make([]string, 0, 4) } else { - out.DatabaseNames = []string{} + out.Array = []string{} } for !in.IsDelim(']') { var v1 string v1 = string(in.String()) - out.DatabaseNames = append(out.DatabaseNames, v1) + out.Array = append(out.Array, v1) in.WantComma() } in.Delim(']') @@ -222,21 +70,37 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb2(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb2(out *jwriter.Writer, in RequestDatabaseNamesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb(out *jwriter.Writer, in KeyPath) { out.RawByte('{') first := true _ = first - if len(in.DatabaseNames) != 0 { + if in.Type != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"databaseNames\":") - if in.DatabaseNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.String != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"string\":") + out.String(string(in.String)) + } + if len(in.Array) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"array\":") + if in.Array == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v2, v3 := range in.DatabaseNames { + for v2, v3 := range in.Array { if v2 > 0 { out.RawByte(',') } @@ -249,29 +113,277 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb2(out *jwriter.Writer } // MarshalJSON supports json.Marshaler interface -func (v RequestDatabaseNamesReturns) MarshalJSON() ([]byte, error) { +func (v KeyPath) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v KeyPath) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *KeyPath) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *KeyPath) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb1(in *jlexer.Lexer, out *DataEntry) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + 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(runtime.RemoteObject) + } + (*out.Key).UnmarshalEasyJSON(in) + } + case "primaryKey": + if in.IsNull() { + in.Skip() + out.PrimaryKey = nil + } else { + if out.PrimaryKey == nil { + out.PrimaryKey = new(runtime.RemoteObject) + } + (*out.PrimaryKey).UnmarshalEasyJSON(in) + } + case "value": + if in.IsNull() { + in.Skip() + out.Value = nil + } else { + if out.Value == nil { + out.Value = new(runtime.RemoteObject) + } + (*out.Value).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb1(out *jwriter.Writer, in DataEntry) { + out.RawByte('{') + first := true + _ = first + if in.Key != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"key\":") + if in.Key == nil { + out.RawString("null") + } else { + (*in.Key).MarshalEasyJSON(out) + } + } + if in.PrimaryKey != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"primaryKey\":") + if in.PrimaryKey == nil { + out.RawString("null") + } else { + (*in.PrimaryKey).MarshalEasyJSON(out) + } + } + if in.Value != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + if in.Value == nil { + out.RawString("null") + } else { + (*in.Value).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DataEntry) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DataEntry) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb2(in *jlexer.Lexer, out *KeyRange) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "lower": + if in.IsNull() { + in.Skip() + out.Lower = nil + } else { + if out.Lower == nil { + out.Lower = new(Key) + } + (*out.Lower).UnmarshalEasyJSON(in) + } + case "upper": + if in.IsNull() { + in.Skip() + out.Upper = nil + } else { + if out.Upper == nil { + out.Upper = new(Key) + } + (*out.Upper).UnmarshalEasyJSON(in) + } + case "lowerOpen": + out.LowerOpen = bool(in.Bool()) + case "upperOpen": + out.UpperOpen = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb2(out *jwriter.Writer, in KeyRange) { + out.RawByte('{') + first := true + _ = first + if in.Lower != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lower\":") + if in.Lower == nil { + out.RawString("null") + } else { + (*in.Lower).MarshalEasyJSON(out) + } + } + if in.Upper != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"upper\":") + if in.Upper == nil { + out.RawString("null") + } else { + (*in.Upper).MarshalEasyJSON(out) + } + } + if in.LowerOpen { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lowerOpen\":") + out.Bool(bool(in.LowerOpen)) + } + if in.UpperOpen { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"upperOpen\":") + out.Bool(bool(in.UpperOpen)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v KeyRange) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestDatabaseNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { +func (v KeyRange) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestDatabaseNamesReturns) UnmarshalJSON(data []byte) error { +func (v *KeyRange) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestDatabaseNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *KeyRange) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(in *jlexer.Lexer, out *RequestDatabaseNamesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(in *jlexer.Lexer, out *Key) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -290,102 +402,41 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(in *jlexer.Lexer, o continue } switch key { - case "securityOrigin": - out.SecurityOrigin = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb3(out *jwriter.Writer, in RequestDatabaseNamesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"securityOrigin\":") - out.String(string(in.SecurityOrigin)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestDatabaseNamesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestDatabaseNamesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestDatabaseNamesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestDatabaseNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(in *jlexer.Lexer, out *RequestDataReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "objectStoreDataEntries": + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "number": + out.Number = float64(in.Float64()) + case "string": + out.String = string(in.String()) + case "date": + out.Date = float64(in.Float64()) + case "array": if in.IsNull() { in.Skip() - out.ObjectStoreDataEntries = nil + out.Array = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.ObjectStoreDataEntries = make([]*DataEntry, 0, 8) + out.Array = make([]*Key, 0, 8) } else { - out.ObjectStoreDataEntries = []*DataEntry{} + out.Array = []*Key{} } for !in.IsDelim(']') { - var v4 *DataEntry + var v4 *Key if in.IsNull() { in.Skip() v4 = nil } else { if v4 == nil { - v4 = new(DataEntry) + v4 = new(Key) } (*v4).UnmarshalEasyJSON(in) } - out.ObjectStoreDataEntries = append(out.ObjectStoreDataEntries, v4) + out.Array = append(out.Array, v4) in.WantComma() } in.Delim(']') } - case "hasMore": - out.HasMore = bool(in.Bool()) default: in.SkipRecursive() } @@ -396,21 +447,53 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(out *jwriter.Writer, in RequestDataReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb3(out *jwriter.Writer, in Key) { out.RawByte('{') first := true _ = first - if len(in.ObjectStoreDataEntries) != 0 { + if in.Type != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"objectStoreDataEntries\":") - if in.ObjectStoreDataEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Number != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"number\":") + out.Float64(float64(in.Number)) + } + if in.String != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"string\":") + out.String(string(in.String)) + } + if in.Date != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"date\":") + out.Float64(float64(in.Date)) + } + if len(in.Array) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"array\":") + if in.Array == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v5, v6 := range in.ObjectStoreDataEntries { + for v5, v6 := range in.Array { if v5 > 0 { out.RawByte(',') } @@ -423,170 +506,33 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(out *jwriter.Writer out.RawByte(']') } } - if in.HasMore { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hasMore\":") - out.Bool(bool(in.HasMore)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v RequestDataReturns) MarshalJSON() ([]byte, error) { +func (v Key) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestDataReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(w, v) +func (v Key) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestDataReturns) UnmarshalJSON(data []byte) error { +func (v *Key) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(l, v) +func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb5(in *jlexer.Lexer, out *RequestDataParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "securityOrigin": - out.SecurityOrigin = string(in.String()) - case "databaseName": - out.DatabaseName = string(in.String()) - case "objectStoreName": - out.ObjectStoreName = string(in.String()) - case "indexName": - out.IndexName = string(in.String()) - case "skipCount": - out.SkipCount = int64(in.Int64()) - case "pageSize": - out.PageSize = int64(in.Int64()) - case "keyRange": - if in.IsNull() { - in.Skip() - out.KeyRange = nil - } else { - if out.KeyRange == nil { - out.KeyRange = new(KeyRange) - } - (*out.KeyRange).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb5(out *jwriter.Writer, in RequestDataParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"securityOrigin\":") - out.String(string(in.SecurityOrigin)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"databaseName\":") - out.String(string(in.DatabaseName)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectStoreName\":") - out.String(string(in.ObjectStoreName)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"indexName\":") - out.String(string(in.IndexName)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"skipCount\":") - out.Int64(int64(in.SkipCount)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pageSize\":") - out.Int64(int64(in.PageSize)) - if in.KeyRange != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyRange\":") - if in.KeyRange == nil { - out.RawString("null") - } else { - (*in.KeyRange).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestDataParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestDataParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestDataParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestDataParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(in *jlexer.Lexer, out *ObjectStoreIndex) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(in *jlexer.Lexer, out *ObjectStoreIndex) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -631,7 +577,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(out *jwriter.Writer, in ObjectStoreIndex) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(out *jwriter.Writer, in ObjectStoreIndex) { out.RawByte('{') first := true _ = first @@ -677,27 +623,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ObjectStoreIndex) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ObjectStoreIndex) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ObjectStoreIndex) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ObjectStoreIndex) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(in *jlexer.Lexer, out *ObjectStore) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb5(in *jlexer.Lexer, out *ObjectStore) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -767,7 +713,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer, in ObjectStore) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb5(out *jwriter.Writer, in ObjectStore) { out.RawByte('{') first := true _ = first @@ -828,609 +774,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ObjectStore) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ObjectStore) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ObjectStore) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ObjectStore) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb8(in *jlexer.Lexer, out *KeyRange) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "lower": - if in.IsNull() { - in.Skip() - out.Lower = nil - } else { - if out.Lower == nil { - out.Lower = new(Key) - } - (*out.Lower).UnmarshalEasyJSON(in) - } - case "upper": - if in.IsNull() { - in.Skip() - out.Upper = nil - } else { - if out.Upper == nil { - out.Upper = new(Key) - } - (*out.Upper).UnmarshalEasyJSON(in) - } - case "lowerOpen": - out.LowerOpen = bool(in.Bool()) - case "upperOpen": - out.UpperOpen = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(out *jwriter.Writer, in KeyRange) { - out.RawByte('{') - first := true - _ = first - if in.Lower != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lower\":") - if in.Lower == nil { - out.RawString("null") - } else { - (*in.Lower).MarshalEasyJSON(out) - } - } - if in.Upper != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"upper\":") - if in.Upper == nil { - out.RawString("null") - } else { - (*in.Upper).MarshalEasyJSON(out) - } - } - if in.LowerOpen { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lowerOpen\":") - out.Bool(bool(in.LowerOpen)) - } - if in.UpperOpen { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"upperOpen\":") - out.Bool(bool(in.UpperOpen)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v KeyRange) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v KeyRange) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *KeyRange) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *KeyRange) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb9(in *jlexer.Lexer, out *KeyPath) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "string": - out.String = string(in.String()) - case "array": - if in.IsNull() { - in.Skip() - out.Array = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Array = make([]string, 0, 4) - } else { - out.Array = []string{} - } - for !in.IsDelim(']') { - var v10 string - v10 = string(in.String()) - out.Array = append(out.Array, v10) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(out *jwriter.Writer, in KeyPath) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.String != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"string\":") - out.String(string(in.String)) - } - if len(in.Array) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"array\":") - if in.Array == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v11, v12 := range in.Array { - if v11 > 0 { - out.RawByte(',') - } - out.String(string(v12)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v KeyPath) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v KeyPath) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *KeyPath) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *KeyPath) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb10(in *jlexer.Lexer, out *Key) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "number": - out.Number = float64(in.Float64()) - case "string": - out.String = string(in.String()) - case "date": - out.Date = float64(in.Float64()) - case "array": - if in.IsNull() { - in.Skip() - out.Array = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Array = make([]*Key, 0, 8) - } else { - out.Array = []*Key{} - } - for !in.IsDelim(']') { - var v13 *Key - if in.IsNull() { - in.Skip() - v13 = nil - } else { - if v13 == nil { - v13 = new(Key) - } - (*v13).UnmarshalEasyJSON(in) - } - out.Array = append(out.Array, v13) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(out *jwriter.Writer, in Key) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Number != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"number\":") - out.Float64(float64(in.Number)) - } - if in.String != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"string\":") - out.String(string(in.String)) - } - if in.Date != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"date\":") - out.Float64(float64(in.Date)) - } - if len(in.Array) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"array\":") - if in.Array == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.Array { - if v14 > 0 { - out.RawByte(',') - } - if v15 == nil { - out.RawString("null") - } else { - (*v15).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Key) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Key) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Key) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb11(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb11(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb12(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb12(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb13(in *jlexer.Lexer, out *DeleteDatabaseParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "securityOrigin": - out.SecurityOrigin = string(in.String()) - case "databaseName": - out.DatabaseName = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb13(out *jwriter.Writer, in DeleteDatabaseParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"securityOrigin\":") - out.String(string(in.SecurityOrigin)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"databaseName\":") - out.String(string(in.DatabaseName)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DeleteDatabaseParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DeleteDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DeleteDatabaseParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DeleteDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(in *jlexer.Lexer, out *DatabaseWithObjectStores) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(in *jlexer.Lexer, out *DatabaseWithObjectStores) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1465,17 +829,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(in *jlexer.Lexer, out.ObjectStores = []*ObjectStore{} } for !in.IsDelim(']') { - var v16 *ObjectStore + var v10 *ObjectStore if in.IsNull() { in.Skip() - v16 = nil + v10 = nil } else { - if v16 == nil { - v16 = new(ObjectStore) + if v10 == nil { + v10 = new(ObjectStore) } - (*v16).UnmarshalEasyJSON(in) + (*v10).UnmarshalEasyJSON(in) } - out.ObjectStores = append(out.ObjectStores, v16) + out.ObjectStores = append(out.ObjectStores, v10) in.WantComma() } in.Delim(']') @@ -1490,7 +854,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Writer, in DatabaseWithObjectStores) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(out *jwriter.Writer, in DatabaseWithObjectStores) { out.RawByte('{') first := true _ = first @@ -1520,14 +884,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Write out.RawString("null") } else { out.RawByte('[') - for v17, v18 := range in.ObjectStores { - if v17 > 0 { + for v11, v12 := range in.ObjectStores { + if v11 > 0 { out.RawByte(',') } - if v18 == nil { + if v12 == nil { out.RawString("null") } else { - (*v18).MarshalEasyJSON(out) + (*v12).MarshalEasyJSON(out) } } out.RawByte(']') @@ -1539,27 +903,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v DatabaseWithObjectStores) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DatabaseWithObjectStores) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DatabaseWithObjectStores) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DatabaseWithObjectStores) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(in *jlexer.Lexer, out *DataEntry) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(in *jlexer.Lexer, out *DeleteDatabaseParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1578,36 +942,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(in *jlexer.Lexer, continue } switch key { - case "key": - if in.IsNull() { - in.Skip() - out.Key = nil - } else { - if out.Key == nil { - out.Key = new(runtime.RemoteObject) - } - (*out.Key).UnmarshalEasyJSON(in) - } - case "primaryKey": - if in.IsNull() { - in.Skip() - out.PrimaryKey = nil - } else { - if out.PrimaryKey == nil { - out.PrimaryKey = new(runtime.RemoteObject) - } - (*out.PrimaryKey).UnmarshalEasyJSON(in) - } - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(runtime.RemoteObject) - } - (*out.Value).UnmarshalEasyJSON(in) - } + case "securityOrigin": + out.SecurityOrigin = string(in.String()) + case "databaseName": + out.DatabaseName = string(in.String()) default: in.SkipRecursive() } @@ -1618,73 +956,49 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(out *jwriter.Writer, in DataEntry) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer, in DeleteDatabaseParams) { out.RawByte('{') first := true _ = first - if in.Key != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"key\":") - if in.Key == nil { - out.RawString("null") - } else { - (*in.Key).MarshalEasyJSON(out) - } + if !first { + out.RawByte(',') } - if in.PrimaryKey != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"primaryKey\":") - if in.PrimaryKey == nil { - out.RawString("null") - } else { - (*in.PrimaryKey).MarshalEasyJSON(out) - } - } - if in.Value != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - if in.Value == nil { - out.RawString("null") - } else { - (*in.Value).MarshalEasyJSON(out) - } + first = false + out.RawString("\"securityOrigin\":") + out.String(string(in.SecurityOrigin)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"databaseName\":") + out.String(string(in.DatabaseName)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v DataEntry) MarshalJSON() ([]byte, error) { +func (v DeleteDatabaseParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(w, v) +func (v DeleteDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DataEntry) UnmarshalJSON(data []byte) error { +func (v *DeleteDatabaseParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(l, v) +func (v *DeleteDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb16(in *jlexer.Lexer, out *ClearObjectStoreParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb8(in *jlexer.Lexer, out *ClearObjectStoreParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1719,7 +1033,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb16(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(out *jwriter.Writer, in ClearObjectStoreParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(out *jwriter.Writer, in ClearObjectStoreParams) { out.RawByte('{') first := true _ = first @@ -1747,23 +1061,709 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v ClearObjectStoreParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearObjectStoreParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearObjectStoreParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClearObjectStoreParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb9(in *jlexer.Lexer, out *RequestDataReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "objectStoreDataEntries": + if in.IsNull() { + in.Skip() + out.ObjectStoreDataEntries = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ObjectStoreDataEntries = make([]*DataEntry, 0, 8) + } else { + out.ObjectStoreDataEntries = []*DataEntry{} + } + for !in.IsDelim(']') { + var v13 *DataEntry + if in.IsNull() { + in.Skip() + v13 = nil + } else { + if v13 == nil { + v13 = new(DataEntry) + } + (*v13).UnmarshalEasyJSON(in) + } + out.ObjectStoreDataEntries = append(out.ObjectStoreDataEntries, v13) + in.WantComma() + } + in.Delim(']') + } + case "hasMore": + out.HasMore = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(out *jwriter.Writer, in RequestDataReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.ObjectStoreDataEntries) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectStoreDataEntries\":") + if in.ObjectStoreDataEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.ObjectStoreDataEntries { + if v14 > 0 { + out.RawByte(',') + } + if v15 == nil { + out.RawString("null") + } else { + (*v15).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.HasMore { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hasMore\":") + out.Bool(bool(in.HasMore)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestDataReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestDataReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestDataReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb10(in *jlexer.Lexer, out *RequestDataParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "securityOrigin": + out.SecurityOrigin = string(in.String()) + case "databaseName": + out.DatabaseName = string(in.String()) + case "objectStoreName": + out.ObjectStoreName = string(in.String()) + case "indexName": + out.IndexName = string(in.String()) + case "skipCount": + out.SkipCount = int64(in.Int64()) + case "pageSize": + out.PageSize = int64(in.Int64()) + case "keyRange": + if in.IsNull() { + in.Skip() + out.KeyRange = nil + } else { + if out.KeyRange == nil { + out.KeyRange = new(KeyRange) + } + (*out.KeyRange).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(out *jwriter.Writer, in RequestDataParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"securityOrigin\":") + out.String(string(in.SecurityOrigin)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"databaseName\":") + out.String(string(in.DatabaseName)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectStoreName\":") + out.String(string(in.ObjectStoreName)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"indexName\":") + out.String(string(in.IndexName)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"skipCount\":") + out.Int64(int64(in.SkipCount)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pageSize\":") + out.Int64(int64(in.PageSize)) + if in.KeyRange != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyRange\":") + if in.KeyRange == nil { + out.RawString("null") + } else { + (*in.KeyRange).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestDataParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestDataParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestDataParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestDataParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb11(in *jlexer.Lexer, out *RequestDatabaseReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "databaseWithObjectStores": + if in.IsNull() { + in.Skip() + out.DatabaseWithObjectStores = nil + } else { + if out.DatabaseWithObjectStores == nil { + out.DatabaseWithObjectStores = new(DatabaseWithObjectStores) + } + (*out.DatabaseWithObjectStores).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb11(out *jwriter.Writer, in RequestDatabaseReturns) { + out.RawByte('{') + first := true + _ = first + if in.DatabaseWithObjectStores != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"databaseWithObjectStores\":") + if in.DatabaseWithObjectStores == nil { + out.RawString("null") + } else { + (*in.DatabaseWithObjectStores).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestDatabaseReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestDatabaseReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestDatabaseReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestDatabaseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb12(in *jlexer.Lexer, out *RequestDatabaseParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "securityOrigin": + out.SecurityOrigin = string(in.String()) + case "databaseName": + out.DatabaseName = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb12(out *jwriter.Writer, in RequestDatabaseParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"securityOrigin\":") + out.String(string(in.SecurityOrigin)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"databaseName\":") + out.String(string(in.DatabaseName)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestDatabaseParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestDatabaseParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb13(in *jlexer.Lexer, out *RequestDatabaseNamesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "databaseNames": + if in.IsNull() { + in.Skip() + out.DatabaseNames = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.DatabaseNames = make([]string, 0, 4) + } else { + out.DatabaseNames = []string{} + } + for !in.IsDelim(']') { + var v16 string + v16 = string(in.String()) + out.DatabaseNames = append(out.DatabaseNames, v16) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb13(out *jwriter.Writer, in RequestDatabaseNamesReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.DatabaseNames) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"databaseNames\":") + if in.DatabaseNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v17, v18 := range in.DatabaseNames { + if v17 > 0 { + out.RawByte(',') + } + out.String(string(v18)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestDatabaseNamesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestDatabaseNamesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestDatabaseNamesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestDatabaseNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(in *jlexer.Lexer, out *RequestDatabaseNamesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "securityOrigin": + out.SecurityOrigin = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Writer, in RequestDatabaseNamesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"securityOrigin\":") + out.String(string(in.SecurityOrigin)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestDatabaseNamesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestDatabaseNamesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestDatabaseNamesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestDatabaseNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb16(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearObjectStoreParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIndexeddb16(l, v) } diff --git a/cdp/indexeddb/indexeddb.go b/cdp/indexeddb/indexeddb.go index 4e97f83..639a698 100644 --- a/cdp/indexeddb/indexeddb.go +++ b/cdp/indexeddb/indexeddb.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables events from backend. @@ -24,33 +23,7 @@ func Enable() *EnableParams { // Do executes IndexedDB.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandIndexedDBEnable, nil, nil) } // DisableParams disables events from backend. @@ -64,33 +37,7 @@ func Disable() *DisableParams { // Do executes IndexedDB.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandIndexedDBDisable, nil, nil) } // RequestDatabaseNamesParams requests database names for given security @@ -120,46 +67,14 @@ type RequestDatabaseNamesReturns struct { // returns: // databaseNames - Database names for origin. func (p *RequestDatabaseNamesParams) Do(ctxt context.Context, h cdp.Handler) (databaseNames []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RequestDatabaseNamesReturns + err = h.Execute(ctxt, cdp.CommandIndexedDBRequestDatabaseNames, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBRequestDatabaseNames, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestDatabaseNamesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.DatabaseNames, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.DatabaseNames, nil } // RequestDatabaseParams requests database with given name in given frame. @@ -191,46 +106,14 @@ type RequestDatabaseReturns struct { // returns: // databaseWithObjectStores - Database with an array of object stores. func (p *RequestDatabaseParams) Do(ctxt context.Context, h cdp.Handler) (databaseWithObjectStores *DatabaseWithObjectStores, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RequestDatabaseReturns + err = h.Execute(ctxt, cdp.CommandIndexedDBRequestDatabase, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBRequestDatabase, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestDatabaseReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.DatabaseWithObjectStores, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.DatabaseWithObjectStores, nil } // RequestDataParams requests data from object store or index. @@ -283,46 +166,14 @@ type RequestDataReturns struct { // objectStoreDataEntries - Array of object store data entries. // hasMore - If true, there are more entries to fetch in the given range. func (p *RequestDataParams) Do(ctxt context.Context, h cdp.Handler) (objectStoreDataEntries []*DataEntry, hasMore bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RequestDataReturns + err = h.Execute(ctxt, cdp.CommandIndexedDBRequestData, p, &res) if err != nil { return nil, false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBRequestData, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestDataReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, false, cdp.ErrInvalidResult - } - - return r.ObjectStoreDataEntries, r.HasMore, nil - - case error: - return nil, false, v - } - - case <-ctxt.Done(): - return nil, false, ctxt.Err() - } - - return nil, false, cdp.ErrUnknownResult + return res.ObjectStoreDataEntries, res.HasMore, nil } // ClearObjectStoreParams clears all entries from an object store. @@ -349,39 +200,7 @@ func ClearObjectStore(securityOrigin string, databaseName string, objectStoreNam // Do executes IndexedDB.clearObjectStore against the provided context and // target handler. func (p *ClearObjectStoreParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBClearObjectStore, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandIndexedDBClearObjectStore, p, nil) } // DeleteDatabaseParams deletes a database. @@ -405,37 +224,5 @@ func DeleteDatabase(securityOrigin string, databaseName string) *DeleteDatabaseP // Do executes IndexedDB.deleteDatabase against the provided context and // target handler. func (p *DeleteDatabaseParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandIndexedDBDeleteDatabase, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandIndexedDBDeleteDatabase, p, nil) } diff --git a/cdp/input/input.go b/cdp/input/input.go index d3d0a30..3474afa 100644 --- a/cdp/input/input.go +++ b/cdp/input/input.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // DispatchKeyEventParams dispatches a key event to the page. @@ -126,39 +125,7 @@ func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEv // Do executes Input.dispatchKeyEvent against the provided context and // target handler. func (p *DispatchKeyEventParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputDispatchKeyEvent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputDispatchKeyEvent, p, nil) } // DispatchMouseEventParams dispatches a mouse event to the page. @@ -215,39 +182,7 @@ func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMous // Do executes Input.dispatchMouseEvent against the provided context and // target handler. func (p *DispatchMouseEventParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputDispatchMouseEvent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputDispatchMouseEvent, p, nil) } // DispatchTouchEventParams dispatches a touch event to the page. @@ -287,39 +222,7 @@ func (p DispatchTouchEventParams) WithTimestamp(timestamp float64) *DispatchTouc // Do executes Input.dispatchTouchEvent against the provided context and // target handler. func (p *DispatchTouchEventParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputDispatchTouchEvent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputDispatchTouchEvent, p, nil) } // EmulateTouchFromMouseEventParams emulates touch event from the mouse event @@ -383,39 +286,7 @@ func (p EmulateTouchFromMouseEventParams) WithClickCount(clickCount int64) *Emul // Do executes Input.emulateTouchFromMouseEvent against the provided context and // target handler. func (p *EmulateTouchFromMouseEventParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputEmulateTouchFromMouseEvent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputEmulateTouchFromMouseEvent, p, nil) } // SynthesizePinchGestureParams synthesizes a pinch gesture over a time @@ -460,39 +331,7 @@ func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType Ge // Do executes Input.synthesizePinchGesture against the provided context and // target handler. func (p *SynthesizePinchGestureParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputSynthesizePinchGesture, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputSynthesizePinchGesture, p, nil) } // SynthesizeScrollGestureParams synthesizes a scroll gesture over a time @@ -595,39 +434,7 @@ func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMark // Do executes Input.synthesizeScrollGesture against the provided context and // target handler. func (p *SynthesizeScrollGestureParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputSynthesizeScrollGesture, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputSynthesizeScrollGesture, p, nil) } // SynthesizeTapGestureParams synthesizes a tap gesture over a time period by @@ -677,37 +484,5 @@ func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType Gest // Do executes Input.synthesizeTapGesture against the provided context and // target handler. func (p *SynthesizeTapGestureParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInputSynthesizeTapGesture, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInputSynthesizeTapGesture, p, nil) } diff --git a/cdp/inspector/easyjson.go b/cdp/inspector/easyjson.go index 0a63a59..8e2b398 100644 --- a/cdp/inspector/easyjson.go +++ b/cdp/inspector/easyjson.go @@ -17,7 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(in *jlexer.Lexer, out *EventTargetCrashed) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -46,7 +46,125 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(out *jwriter.Writer, in EventTargetCrashed) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector2(in *jlexer.Lexer, out *EventTargetCrashed) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector2(out *jwriter.Writer, in EventTargetCrashed) { out.RawByte('{') first := true _ = first @@ -56,27 +174,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventTargetCrashed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventTargetCrashed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventTargetCrashed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventTargetCrashed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(in *jlexer.Lexer, out *EventDetached) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector3(in *jlexer.Lexer, out *EventDetached) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -107,7 +225,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(out *jwriter.Writer, in EventDetached) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector3(out *jwriter.Writer, in EventDetached) { out.RawByte('{') first := true _ = first @@ -124,142 +242,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EventDetached) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDetached) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDetached) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDetached) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector2(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector2(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector3(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector3(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventDetached) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { +func (v *EventDetached) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventDetached) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpInspector3(l, v) } diff --git a/cdp/inspector/inspector.go b/cdp/inspector/inspector.go index 98cb4f3..2ed803b 100644 --- a/cdp/inspector/inspector.go +++ b/cdp/inspector/inspector.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables inspector domain notifications. @@ -24,33 +23,7 @@ func Enable() *EnableParams { // Do executes Inspector.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInspectorEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInspectorEnable, nil, nil) } // DisableParams disables inspector domain notifications. @@ -64,31 +37,5 @@ func Disable() *DisableParams { // Do executes Inspector.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandInspectorDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandInspectorDisable, nil, nil) } diff --git a/cdp/io/easyjson.go b/cdp/io/easyjson.go index 4e60d71..4bfe196 100644 --- a/cdp/io/easyjson.go +++ b/cdp/io/easyjson.go @@ -17,7 +17,74 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(in *jlexer.Lexer, out *ReadReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(in *jlexer.Lexer, out *CloseParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "handle": + out.Handle = StreamHandle(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(out *jwriter.Writer, in CloseParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"handle\":") + out.String(string(in.Handle)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CloseParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CloseParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(in *jlexer.Lexer, out *ReadReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -50,7 +117,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(in *jlexer.Lexer, out *Read in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(out *jwriter.Writer, in ReadReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(out *jwriter.Writer, in ReadReturns) { out.RawByte('{') first := true _ = first @@ -76,27 +143,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(out *jwriter.Writer, in Rea // MarshalJSON supports json.Marshaler interface func (v ReadReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ReadReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ReadReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ReadReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(in *jlexer.Lexer, out *ReadParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(in *jlexer.Lexer, out *ReadParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -131,7 +198,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(in *jlexer.Lexer, out *Rea in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(out *jwriter.Writer, in ReadParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(out *jwriter.Writer, in ReadParams) { out.RawByte('{') first := true _ = first @@ -162,91 +229,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(out *jwriter.Writer, in Re // MarshalJSON supports json.Marshaler interface func (v ReadParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ReadParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ReadParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ReadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(in *jlexer.Lexer, out *CloseParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "handle": - out.Handle = StreamHandle(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(out *jwriter.Writer, in CloseParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"handle\":") - out.String(string(in.Handle)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CloseParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v ReadParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIo2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CloseParams) UnmarshalJSON(data []byte) error { +func (v *ReadParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ReadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpIo2(l, v) } diff --git a/cdp/io/io.go b/cdp/io/io.go index 50e1f44..0efc3d8 100644 --- a/cdp/io/io.go +++ b/cdp/io/io.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // ReadParams read a chunk of the stream. @@ -59,46 +58,14 @@ type ReadReturns struct { // data - Data that were read. // eof - Set if the end-of-file condition occured while reading. func (p *ReadParams) Do(ctxt context.Context, h cdp.Handler) (data string, eof bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res ReadReturns + err = h.Execute(ctxt, cdp.CommandIORead, p, &res) if err != nil { return "", false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandIORead, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r ReadReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", false, cdp.ErrInvalidResult - } - - return r.Data, r.EOF, nil - - case error: - return "", false, v - } - - case <-ctxt.Done(): - return "", false, ctxt.Err() - } - - return "", false, cdp.ErrUnknownResult + return res.Data, res.EOF, nil } // CloseParams close the stream, discard any temporary backing storage. @@ -119,37 +86,5 @@ func Close(handle StreamHandle) *CloseParams { // Do executes IO.close against the provided context and // target handler. func (p *CloseParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandIOClose, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandIOClose, p, nil) } diff --git a/cdp/layertree/easyjson.go b/cdp/layertree/easyjson.go index dd70466..a70a595 100644 --- a/cdp/layertree/easyjson.go +++ b/cdp/layertree/easyjson.go @@ -182,98 +182,7 @@ func (v *SnapshotCommandLogParams) UnmarshalJSON(data []byte) error { func (v *SnapshotCommandLogParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree2(in *jlexer.Lexer, out *ScrollRect) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "rect": - if in.IsNull() { - in.Skip() - out.Rect = nil - } else { - if out.Rect == nil { - out.Rect = new(dom.Rect) - } - (*out.Rect).UnmarshalEasyJSON(in) - } - case "type": - (out.Type).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(out *jwriter.Writer, in ScrollRect) { - out.RawByte('{') - first := true - _ = first - if in.Rect != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"rect\":") - if in.Rect == nil { - out.RawString("null") - } else { - (*in.Rect).MarshalEasyJSON(out) - } - } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ScrollRect) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ScrollRect) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ScrollRect) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ScrollRect) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(in *jlexer.Lexer, out *ReplaySnapshotReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree2(in *jlexer.Lexer, out *ReplaySnapshotReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -304,7 +213,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(out *jwriter.Writer, in ReplaySnapshotReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(out *jwriter.Writer, in ReplaySnapshotReturns) { out.RawByte('{') first := true _ = first @@ -322,27 +231,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ReplaySnapshotReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ReplaySnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ReplaySnapshotReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ReplaySnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(in *jlexer.Lexer, out *ReplaySnapshotParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(in *jlexer.Lexer, out *ReplaySnapshotParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -379,7 +288,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(out *jwriter.Writer, in ReplaySnapshotParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(out *jwriter.Writer, in ReplaySnapshotParams) { out.RawByte('{') first := true _ = first @@ -419,94 +328,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ReplaySnapshotParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ReplaySnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ReplaySnapshotParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ReplaySnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree5(in *jlexer.Lexer, out *ReleaseSnapshotParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "snapshotId": - out.SnapshotID = SnapshotID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree5(out *jwriter.Writer, in ReleaseSnapshotParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"snapshotId\":") - out.String(string(in.SnapshotID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ReleaseSnapshotParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ReleaseSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ReleaseSnapshotParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ReleaseSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(in *jlexer.Lexer, out *ProfileSnapshotReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(in *jlexer.Lexer, out *ProfileSnapshotReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -571,7 +413,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(out *jwriter.Writer, in ProfileSnapshotReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(out *jwriter.Writer, in ProfileSnapshotReturns) { out.RawByte('{') first := true _ = first @@ -611,27 +453,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ProfileSnapshotReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ProfileSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ProfileSnapshotReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ProfileSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(in *jlexer.Lexer, out *ProfileSnapshotParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree5(in *jlexer.Lexer, out *ProfileSnapshotParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -676,7 +518,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(out *jwriter.Writer, in ProfileSnapshotParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree5(out *jwriter.Writer, in ProfileSnapshotParams) { out.RawByte('{') first := true _ = first @@ -720,27 +562,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ProfileSnapshotParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ProfileSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ProfileSnapshotParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ProfileSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree8(in *jlexer.Lexer, out *PictureTile) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(in *jlexer.Lexer, out *ReleaseSnapshotParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -759,12 +601,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree8(in *jlexer.Lexer, o continue } switch key { - case "x": - out.X = float64(in.Float64()) - case "y": - out.Y = float64(in.Float64()) - case "picture": - out.Picture = string(in.String()) + case "snapshotId": + out.SnapshotID = SnapshotID(in.String()) default: in.SkipRecursive() } @@ -775,58 +613,216 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree8(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree8(out *jwriter.Writer, in PictureTile) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(out *jwriter.Writer, in ReleaseSnapshotParams) { out.RawByte('{') first := true _ = first - if in.X != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"x\":") - out.Float64(float64(in.X)) + if !first { + out.RawByte(',') } - if in.Y != 0 { - if !first { - out.RawByte(',') + first = false + out.RawString("\"snapshotId\":") + out.String(string(in.SnapshotID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ReleaseSnapshotParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ReleaseSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ReleaseSnapshotParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ReleaseSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(in *jlexer.Lexer, out *LoadSnapshotReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() } - first = false - out.RawString("\"y\":") - out.Float64(float64(in.Y)) + in.Skip() + return } - if in.Picture != "" { + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "snapshotId": + out.SnapshotID = SnapshotID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(out *jwriter.Writer, in LoadSnapshotReturns) { + out.RawByte('{') + first := true + _ = first + if in.SnapshotID != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"picture\":") - out.String(string(in.Picture)) + out.RawString("\"snapshotId\":") + out.String(string(in.SnapshotID)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v PictureTile) MarshalJSON() ([]byte, error) { +func (v LoadSnapshotReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v LoadSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *LoadSnapshotReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *LoadSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree8(in *jlexer.Lexer, out *LoadSnapshotParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "tiles": + if in.IsNull() { + in.Skip() + out.Tiles = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Tiles = make([]*PictureTile, 0, 8) + } else { + out.Tiles = []*PictureTile{} + } + for !in.IsDelim(']') { + var v10 *PictureTile + if in.IsNull() { + in.Skip() + v10 = nil + } else { + if v10 == nil { + v10 = new(PictureTile) + } + (*v10).UnmarshalEasyJSON(in) + } + out.Tiles = append(out.Tiles, v10) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree8(out *jwriter.Writer, in LoadSnapshotParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"tiles\":") + if in.Tiles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Tiles { + 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 LoadSnapshotParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v PictureTile) MarshalEasyJSON(w *jwriter.Writer) { +func (v LoadSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *PictureTile) UnmarshalJSON(data []byte) error { +func (v *LoadSnapshotParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PictureTile) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *LoadSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree8(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree9(in *jlexer.Lexer, out *MakeSnapshotReturns) { @@ -965,7 +961,7 @@ func (v *MakeSnapshotParams) UnmarshalJSON(data []byte) error { func (v *MakeSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree10(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(in *jlexer.Lexer, out *LoadSnapshotReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(in *jlexer.Lexer, out *CompositingReasonsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -984,98 +980,21 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(in *jlexer.Lexer, continue } switch key { - case "snapshotId": - out.SnapshotID = SnapshotID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree11(out *jwriter.Writer, in LoadSnapshotReturns) { - out.RawByte('{') - first := true - _ = first - if in.SnapshotID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"snapshotId\":") - out.String(string(in.SnapshotID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v LoadSnapshotReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v LoadSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *LoadSnapshotReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *LoadSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(in *jlexer.Lexer, out *LoadSnapshotParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "tiles": + case "compositingReasons": if in.IsNull() { in.Skip() - out.Tiles = nil + out.CompositingReasons = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.Tiles = make([]*PictureTile, 0, 8) + out.CompositingReasons = make([]string, 0, 4) } else { - out.Tiles = []*PictureTile{} + out.CompositingReasons = []string{} } for !in.IsDelim(']') { - var v10 *PictureTile - if in.IsNull() { - in.Skip() - v10 = nil - } else { - if v10 == nil { - v10 = new(PictureTile) - } - (*v10).UnmarshalEasyJSON(in) - } - out.Tiles = append(out.Tiles, v10) + var v13 string + v13 = string(in.String()) + out.CompositingReasons = append(out.CompositingReasons, v13) in.WantComma() } in.Delim(']') @@ -1090,58 +1009,56 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree12(out *jwriter.Writer, in LoadSnapshotParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree11(out *jwriter.Writer, in CompositingReasonsReturns) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"tiles\":") - if in.Tiles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v11, v12 := range in.Tiles { - if v11 > 0 { - out.RawByte(',') - } - if v12 == nil { - out.RawString("null") - } else { - (*v12).MarshalEasyJSON(out) - } + if len(in.CompositingReasons) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"compositingReasons\":") + if in.CompositingReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.CompositingReasons { + if v14 > 0 { + out.RawByte(',') + } + out.String(string(v15)) + } + out.RawByte(']') } - out.RawByte(']') } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v LoadSnapshotParams) MarshalJSON() ([]byte, error) { +func (v CompositingReasonsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree12(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v LoadSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree12(w, v) +func (v CompositingReasonsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *LoadSnapshotParams) UnmarshalJSON(data []byte) error { +func (v *CompositingReasonsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *LoadSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(l, v) +func (v *CompositingReasonsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree11(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(in *jlexer.Lexer, out *Layer) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(in *jlexer.Lexer, out *CompositingReasonsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1162,76 +1079,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(in *jlexer.Lexer, switch key { case "layerId": out.LayerID = LayerID(in.String()) - case "parentLayerId": - out.ParentLayerID = LayerID(in.String()) - case "backendNodeId": - (out.BackendNodeID).UnmarshalEasyJSON(in) - case "offsetX": - out.OffsetX = float64(in.Float64()) - case "offsetY": - out.OffsetY = float64(in.Float64()) - case "width": - out.Width = float64(in.Float64()) - case "height": - out.Height = float64(in.Float64()) - case "transform": - if in.IsNull() { - in.Skip() - out.Transform = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Transform = make([]float64, 0, 8) - } else { - out.Transform = []float64{} - } - for !in.IsDelim(']') { - var v13 float64 - v13 = float64(in.Float64()) - out.Transform = append(out.Transform, v13) - in.WantComma() - } - in.Delim(']') - } - case "anchorX": - out.AnchorX = float64(in.Float64()) - case "anchorY": - out.AnchorY = float64(in.Float64()) - case "anchorZ": - out.AnchorZ = float64(in.Float64()) - case "paintCount": - out.PaintCount = int64(in.Int64()) - case "drawsContent": - out.DrawsContent = bool(in.Bool()) - case "invisible": - out.Invisible = bool(in.Bool()) - case "scrollRects": - if in.IsNull() { - in.Skip() - out.ScrollRects = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ScrollRects = make([]*ScrollRect, 0, 8) - } else { - out.ScrollRects = []*ScrollRect{} - } - for !in.IsDelim(']') { - var v14 *ScrollRect - if in.IsNull() { - in.Skip() - v14 = nil - } else { - if v14 == nil { - v14 = new(ScrollRect) - } - (*v14).UnmarshalEasyJSON(in) - } - out.ScrollRects = append(out.ScrollRects, v14) - in.WantComma() - } - in.Delim(']') - } default: in.SkipRecursive() } @@ -1242,183 +1089,43 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Writer, in Layer) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree12(out *jwriter.Writer, in CompositingReasonsParams) { out.RawByte('{') first := true _ = first - if in.LayerID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layerId\":") - out.String(string(in.LayerID)) - } - if in.ParentLayerID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parentLayerId\":") - out.String(string(in.ParentLayerID)) - } - if in.BackendNodeID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"backendNodeId\":") - out.Int64(int64(in.BackendNodeID)) - } - if in.OffsetX != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"offsetX\":") - out.Float64(float64(in.OffsetX)) - } - if in.OffsetY != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"offsetY\":") - out.Float64(float64(in.OffsetY)) - } - if in.Width != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"width\":") - out.Float64(float64(in.Width)) - } - if in.Height != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"height\":") - out.Float64(float64(in.Height)) - } - if len(in.Transform) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"transform\":") - if in.Transform == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v15, v16 := range in.Transform { - if v15 > 0 { - out.RawByte(',') - } - out.Float64(float64(v16)) - } - out.RawByte(']') - } - } - if in.AnchorX != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"anchorX\":") - out.Float64(float64(in.AnchorX)) - } - if in.AnchorY != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"anchorY\":") - out.Float64(float64(in.AnchorY)) - } - if in.AnchorZ != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"anchorZ\":") - out.Float64(float64(in.AnchorZ)) - } - if in.PaintCount != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"paintCount\":") - out.Int64(int64(in.PaintCount)) - } - if in.DrawsContent { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"drawsContent\":") - out.Bool(bool(in.DrawsContent)) - } - if in.Invisible { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"invisible\":") - out.Bool(bool(in.Invisible)) - } - if len(in.ScrollRects) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scrollRects\":") - if in.ScrollRects == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.ScrollRects { - if v17 > 0 { - out.RawByte(',') - } - if v18 == nil { - out.RawString("null") - } else { - (*v18).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } + if !first { + out.RawByte(',') } + first = false + out.RawString("\"layerId\":") + out.String(string(in.LayerID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v Layer) MarshalJSON() ([]byte, error) { +func (v CompositingReasonsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree12(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Layer) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(w, v) +func (v CompositingReasonsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree12(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Layer) UnmarshalJSON(data []byte) error { +func (v *CompositingReasonsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Layer) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(l, v) +func (v *CompositingReasonsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree12(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree14(in *jlexer.Lexer, out *EventLayerTreeDidChange) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1437,33 +1144,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree14(in *jlexer.Lexer, continue } switch key { - case "layers": - if in.IsNull() { - in.Skip() - out.Layers = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Layers = make([]*Layer, 0, 8) - } else { - out.Layers = []*Layer{} - } - for !in.IsDelim(']') { - var v19 *Layer - if in.IsNull() { - in.Skip() - v19 = nil - } else { - if v19 == nil { - v19 = new(Layer) - } - (*v19).UnmarshalEasyJSON(in) - } - out.Layers = append(out.Layers, v19) - in.WantComma() - } - in.Delim(']') - } default: in.SkipRecursive() } @@ -1474,57 +1154,93 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree14(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree14(out *jwriter.Writer, in EventLayerTreeDidChange) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first - if len(in.Layers) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layers\":") - if in.Layers == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v20, v21 := range in.Layers { - if v20 > 0 { - out.RawByte(',') - } - if v21 == nil { - out.RawString("null") - } else { - (*v21).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventLayerTreeDidChange) MarshalJSON() ([]byte, error) { +func (v DisableParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree14(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree14(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventLayerTreeDidChange) MarshalEasyJSON(w *jwriter.Writer) { +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventLayerTreeDidChange) UnmarshalJSON(data []byte) error { +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventLayerTreeDidChange) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree14(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree15(in *jlexer.Lexer, out *EventLayerPainted) { @@ -1618,7 +1334,7 @@ func (v *EventLayerPainted) UnmarshalJSON(data []byte) error { func (v *EventLayerPainted) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree15(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(in *jlexer.Lexer, out *EventLayerTreeDidChange) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1637,139 +1353,29 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(in *jlexer.Lexer, continue } switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree16(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree17(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree17(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(in *jlexer.Lexer, out *CompositingReasonsReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "compositingReasons": + case "layers": if in.IsNull() { in.Skip() - out.CompositingReasons = nil + out.Layers = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.CompositingReasons = make([]string, 0, 4) + out.Layers = make([]*Layer, 0, 8) } else { - out.CompositingReasons = []string{} + out.Layers = []*Layer{} } for !in.IsDelim(']') { - var v22 string - v22 = string(in.String()) - out.CompositingReasons = append(out.CompositingReasons, v22) + var v16 *Layer + if in.IsNull() { + in.Skip() + v16 = nil + } else { + if v16 == nil { + v16 = new(Layer) + } + (*v16).UnmarshalEasyJSON(in) + } + out.Layers = append(out.Layers, v16) in.WantComma() } in.Delim(']') @@ -1784,25 +1390,29 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(out *jwriter.Writer, in CompositingReasonsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree16(out *jwriter.Writer, in EventLayerTreeDidChange) { out.RawByte('{') first := true _ = first - if len(in.CompositingReasons) != 0 { + if len(in.Layers) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"compositingReasons\":") - if in.CompositingReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"layers\":") + if in.Layers == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v23, v24 := range in.CompositingReasons { - if v23 > 0 { + for v17, v18 := range in.Layers { + if v17 > 0 { out.RawByte(',') } - out.String(string(v24)) + if v18 == nil { + out.RawString("null") + } else { + (*v18).MarshalEasyJSON(out) + } } out.RawByte(']') } @@ -1811,29 +1421,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(out *jwriter.Write } // MarshalJSON supports json.Marshaler interface -func (v CompositingReasonsReturns) MarshalJSON() ([]byte, error) { +func (v EventLayerTreeDidChange) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CompositingReasonsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(w, v) +func (v EventLayerTreeDidChange) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CompositingReasonsReturns) UnmarshalJSON(data []byte) error { +func (v *EventLayerTreeDidChange) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CompositingReasonsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(l, v) +func (v *EventLayerTreeDidChange) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree19(in *jlexer.Lexer, out *CompositingReasonsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree17(in *jlexer.Lexer, out *Layer) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1854,6 +1464,76 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree19(in *jlexer.Lexer, switch key { case "layerId": out.LayerID = LayerID(in.String()) + case "parentLayerId": + out.ParentLayerID = LayerID(in.String()) + case "backendNodeId": + (out.BackendNodeID).UnmarshalEasyJSON(in) + case "offsetX": + out.OffsetX = float64(in.Float64()) + case "offsetY": + out.OffsetY = float64(in.Float64()) + case "width": + out.Width = float64(in.Float64()) + case "height": + out.Height = float64(in.Float64()) + case "transform": + if in.IsNull() { + in.Skip() + out.Transform = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Transform = make([]float64, 0, 8) + } else { + out.Transform = []float64{} + } + for !in.IsDelim(']') { + var v19 float64 + v19 = float64(in.Float64()) + out.Transform = append(out.Transform, v19) + in.WantComma() + } + in.Delim(']') + } + case "anchorX": + out.AnchorX = float64(in.Float64()) + case "anchorY": + out.AnchorY = float64(in.Float64()) + case "anchorZ": + out.AnchorZ = float64(in.Float64()) + case "paintCount": + out.PaintCount = int64(in.Int64()) + case "drawsContent": + out.DrawsContent = bool(in.Bool()) + case "invisible": + out.Invisible = bool(in.Bool()) + case "scrollRects": + if in.IsNull() { + in.Skip() + out.ScrollRects = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ScrollRects = make([]*ScrollRect, 0, 8) + } else { + out.ScrollRects = []*ScrollRect{} + } + for !in.IsDelim(']') { + var v20 *ScrollRect + if in.IsNull() { + in.Skip() + v20 = nil + } else { + if v20 == nil { + v20 = new(ScrollRect) + } + (*v20).UnmarshalEasyJSON(in) + } + out.ScrollRects = append(out.ScrollRects, v20) + in.WantComma() + } + in.Delim(']') + } default: in.SkipRecursive() } @@ -1864,39 +1544,359 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree19(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree19(out *jwriter.Writer, in CompositingReasonsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree17(out *jwriter.Writer, in Layer) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.LayerID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"layerId\":") + out.String(string(in.LayerID)) + } + if in.ParentLayerID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parentLayerId\":") + out.String(string(in.ParentLayerID)) + } + if in.BackendNodeID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"backendNodeId\":") + out.Int64(int64(in.BackendNodeID)) + } + if in.OffsetX != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"offsetX\":") + out.Float64(float64(in.OffsetX)) + } + if in.OffsetY != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"offsetY\":") + out.Float64(float64(in.OffsetY)) + } + if in.Width != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"width\":") + out.Float64(float64(in.Width)) + } + if in.Height != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"height\":") + out.Float64(float64(in.Height)) + } + if len(in.Transform) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"transform\":") + if in.Transform == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v21, v22 := range in.Transform { + if v21 > 0 { + out.RawByte(',') + } + out.Float64(float64(v22)) + } + out.RawByte(']') + } + } + if in.AnchorX != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"anchorX\":") + out.Float64(float64(in.AnchorX)) + } + if in.AnchorY != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"anchorY\":") + out.Float64(float64(in.AnchorY)) + } + if in.AnchorZ != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"anchorZ\":") + out.Float64(float64(in.AnchorZ)) + } + if in.PaintCount != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"paintCount\":") + out.Int64(int64(in.PaintCount)) + } + if in.DrawsContent { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"drawsContent\":") + out.Bool(bool(in.DrawsContent)) + } + if in.Invisible { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"invisible\":") + out.Bool(bool(in.Invisible)) + } + if len(in.ScrollRects) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scrollRects\":") + if in.ScrollRects == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v23, v24 := range in.ScrollRects { + if v23 > 0 { + out.RawByte(',') + } + if v24 == nil { + out.RawString("null") + } else { + (*v24).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } } - first = false - out.RawString("\"layerId\":") - out.String(string(in.LayerID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v CompositingReasonsParams) MarshalJSON() ([]byte, error) { +func (v Layer) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Layer) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Layer) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Layer) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(in *jlexer.Lexer, out *PictureTile) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "x": + out.X = float64(in.Float64()) + case "y": + out.Y = float64(in.Float64()) + case "picture": + out.Picture = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(out *jwriter.Writer, in PictureTile) { + out.RawByte('{') + first := true + _ = first + if in.X != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"x\":") + out.Float64(float64(in.X)) + } + if in.Y != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"y\":") + out.Float64(float64(in.Y)) + } + if in.Picture != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"picture\":") + out.String(string(in.Picture)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PictureTile) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PictureTile) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PictureTile) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PictureTile) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree19(in *jlexer.Lexer, out *ScrollRect) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "rect": + if in.IsNull() { + in.Skip() + out.Rect = nil + } else { + if out.Rect == nil { + out.Rect = new(dom.Rect) + } + (*out.Rect).UnmarshalEasyJSON(in) + } + case "type": + (out.Type).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree19(out *jwriter.Writer, in ScrollRect) { + out.RawByte('{') + first := true + _ = first + if in.Rect != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"rect\":") + if in.Rect == nil { + out.RawString("null") + } else { + (*in.Rect).MarshalEasyJSON(out) + } + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ScrollRect) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree19(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CompositingReasonsParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v ScrollRect) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree19(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CompositingReasonsParams) UnmarshalJSON(data []byte) error { +func (v *ScrollRect) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree19(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CompositingReasonsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ScrollRect) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLayertree19(l, v) } diff --git a/cdp/layertree/layertree.go b/cdp/layertree/layertree.go index c3cd6b7..4c1986d 100644 --- a/cdp/layertree/layertree.go +++ b/cdp/layertree/layertree.go @@ -25,33 +25,7 @@ func Enable() *EnableParams { // Do executes LayerTree.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLayerTreeEnable, nil, nil) } // DisableParams disables compositing tree inspection. @@ -65,33 +39,7 @@ func Disable() *DisableParams { // Do executes LayerTree.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLayerTreeDisable, nil, nil) } // CompositingReasonsParams provides the reasons why the given layer was @@ -122,46 +70,14 @@ type CompositingReasonsReturns struct { // returns: // compositingReasons - A list of strings specifying reasons for the given layer to become composited. func (p *CompositingReasonsParams) Do(ctxt context.Context, h cdp.Handler) (compositingReasons []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CompositingReasonsReturns + err = h.Execute(ctxt, cdp.CommandLayerTreeCompositingReasons, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeCompositingReasons, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CompositingReasonsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.CompositingReasons, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.CompositingReasons, nil } // MakeSnapshotParams returns the layer snapshot identifier. @@ -190,46 +106,14 @@ type MakeSnapshotReturns struct { // returns: // snapshotID - The id of the layer snapshot. func (p *MakeSnapshotParams) Do(ctxt context.Context, h cdp.Handler) (snapshotID SnapshotID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res MakeSnapshotReturns + err = h.Execute(ctxt, cdp.CommandLayerTreeMakeSnapshot, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeMakeSnapshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r MakeSnapshotReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.SnapshotID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.SnapshotID, nil } // LoadSnapshotParams returns the snapshot identifier. @@ -258,46 +142,14 @@ type LoadSnapshotReturns struct { // returns: // snapshotID - The id of the snapshot. func (p *LoadSnapshotParams) Do(ctxt context.Context, h cdp.Handler) (snapshotID SnapshotID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res LoadSnapshotReturns + err = h.Execute(ctxt, cdp.CommandLayerTreeLoadSnapshot, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeLoadSnapshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r LoadSnapshotReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.SnapshotID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.SnapshotID, nil } // ReleaseSnapshotParams releases layer snapshot captured by the back-end. @@ -318,39 +170,7 @@ func ReleaseSnapshot(snapshotID SnapshotID) *ReleaseSnapshotParams { // Do executes LayerTree.releaseSnapshot against the provided context and // target handler. func (p *ReleaseSnapshotParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeReleaseSnapshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLayerTreeReleaseSnapshot, p, nil) } // ProfileSnapshotParams [no description]. @@ -401,46 +221,14 @@ type ProfileSnapshotReturns struct { // returns: // timings - The array of paint profiles, one per run. func (p *ProfileSnapshotParams) Do(ctxt context.Context, h cdp.Handler) (timings []PaintProfile, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res ProfileSnapshotReturns + err = h.Execute(ctxt, cdp.CommandLayerTreeProfileSnapshot, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeProfileSnapshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r ProfileSnapshotReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Timings, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Timings, nil } // ReplaySnapshotParams replays the layer snapshot and returns the resulting @@ -494,46 +282,14 @@ type ReplaySnapshotReturns struct { // returns: // dataURL - A data: URL for resulting image. func (p *ReplaySnapshotParams) Do(ctxt context.Context, h cdp.Handler) (dataURL string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res ReplaySnapshotReturns + err = h.Execute(ctxt, cdp.CommandLayerTreeReplaySnapshot, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeReplaySnapshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r ReplaySnapshotReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.DataURL, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.DataURL, nil } // SnapshotCommandLogParams replays the layer snapshot and returns canvas @@ -563,44 +319,12 @@ type SnapshotCommandLogReturns struct { // returns: // commandLog - The array of canvas function calls. func (p *SnapshotCommandLogParams) Do(ctxt context.Context, h cdp.Handler) (commandLog []easyjson.RawMessage, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SnapshotCommandLogReturns + err = h.Execute(ctxt, cdp.CommandLayerTreeSnapshotCommandLog, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandLayerTreeSnapshotCommandLog, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SnapshotCommandLogReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.CommandLog, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.CommandLog, nil } diff --git a/cdp/log/easyjson.go b/cdp/log/easyjson.go index 82e45f3..e772748 100644 --- a/cdp/log/easyjson.go +++ b/cdp/log/easyjson.go @@ -19,86 +19,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog(in *jlexer.Lexer, out *ViolationSetting) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - (out.Name).UnmarshalEasyJSON(in) - case "threshold": - out.Threshold = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(out *jwriter.Writer, in ViolationSetting) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - (in.Name).MarshalEasyJSON(out) - } - if in.Threshold != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"threshold\":") - out.Float64(float64(in.Threshold)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ViolationSetting) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ViolationSetting) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ViolationSetting) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ViolationSetting) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(in *jlexer.Lexer, out *StopViolationsReportParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog(in *jlexer.Lexer, out *StopViolationsReportParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -127,7 +48,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(out *jwriter.Writer, in StopViolationsReportParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(out *jwriter.Writer, in StopViolationsReportParams) { out.RawByte('{') first := true _ = first @@ -137,27 +58,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(out *jwriter.Writer, in S // MarshalJSON supports json.Marshaler interface func (v StopViolationsReportParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StopViolationsReportParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StopViolationsReportParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StopViolationsReportParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(in *jlexer.Lexer, out *StartViolationsReportParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(in *jlexer.Lexer, out *StartViolationsReportParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -213,7 +134,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(in *jlexer.Lexer, out *St in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(out *jwriter.Writer, in StartViolationsReportParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(out *jwriter.Writer, in StartViolationsReportParams) { out.RawByte('{') first := true _ = first @@ -244,27 +165,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(out *jwriter.Writer, in S // MarshalJSON supports json.Marshaler interface func (v StartViolationsReportParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StartViolationsReportParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StartViolationsReportParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StartViolationsReportParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog3(in *jlexer.Lexer, out *EventEntryAdded) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(in *jlexer.Lexer, out *ClearParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -283,16 +204,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog3(in *jlexer.Lexer, out *Ev continue } switch key { - case "entry": - if in.IsNull() { - in.Skip() - out.Entry = nil - } else { - if out.Entry == nil { - out.Entry = new(Entry) - } - (*out.Entry).UnmarshalEasyJSON(in) - } default: in.SkipRecursive() } @@ -303,49 +214,234 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog3(in *jlexer.Lexer, out *Ev in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(out *jwriter.Writer, in EventEntryAdded) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(out *jwriter.Writer, in ClearParams) { out.RawByte('{') first := true _ = first - if in.Entry != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"entry\":") - if in.Entry == nil { - out.RawString("null") - } else { - (*in.Entry).MarshalEasyJSON(out) - } - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventEntryAdded) MarshalJSON() ([]byte, error) { +func (v ClearParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClearParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog3(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventEntryAdded) MarshalEasyJSON(w *jwriter.Writer) { +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventEntryAdded) UnmarshalJSON(data []byte) error { +func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventEntryAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(in *jlexer.Lexer, out *Entry) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog5(in *jlexer.Lexer, out *ViolationSetting) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + (out.Name).UnmarshalEasyJSON(in) + case "threshold": + out.Threshold = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog5(out *jwriter.Writer, in ViolationSetting) { + out.RawByte('{') + first := true + _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + (in.Name).MarshalEasyJSON(out) + } + if in.Threshold != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"threshold\":") + out.Float64(float64(in.Threshold)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ViolationSetting) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ViolationSetting) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ViolationSetting) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ViolationSetting) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog6(in *jlexer.Lexer, out *Entry) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -400,7 +496,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(in *jlexer.Lexer, out *En in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(out *jwriter.Writer, in Entry) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog6(out *jwriter.Writer, in Entry) { out.RawByte('{') first := true _ = first @@ -485,146 +581,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(out *jwriter.Writer, in E // MarshalJSON supports json.Marshaler interface func (v Entry) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Entry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Entry) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Entry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog5(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog5(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog6(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog6(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Entry) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { +func (v *Entry) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Entry) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog7(in *jlexer.Lexer, out *ClearParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog7(in *jlexer.Lexer, out *EventEntryAdded) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -643,6 +621,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog7(in *jlexer.Lexer, out *Cl continue } switch key { + case "entry": + if in.IsNull() { + in.Skip() + out.Entry = nil + } else { + if out.Entry == nil { + out.Entry = new(Entry) + } + (*out.Entry).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -653,33 +641,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog7(in *jlexer.Lexer, out *Cl in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog7(out *jwriter.Writer, in ClearParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog7(out *jwriter.Writer, in EventEntryAdded) { out.RawByte('{') first := true _ = first + if in.Entry != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"entry\":") + if in.Entry == nil { + out.RawString("null") + } else { + (*in.Entry).MarshalEasyJSON(out) + } + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v ClearParams) MarshalJSON() ([]byte, error) { +func (v EventEntryAdded) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventEntryAdded) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearParams) UnmarshalJSON(data []byte) error { +func (v *EventEntryAdded) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventEntryAdded) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpLog7(l, v) } diff --git a/cdp/log/log.go b/cdp/log/log.go index 1d9c79b..2d2f29d 100644 --- a/cdp/log/log.go +++ b/cdp/log/log.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables log domain, sends the entries collected so far to the @@ -28,33 +27,7 @@ func Enable() *EnableParams { // Do executes Log.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLogEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLogEnable, nil, nil) } // DisableParams disables log domain, prevents further log entries from being @@ -70,33 +43,7 @@ func Disable() *DisableParams { // Do executes Log.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLogDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLogDisable, nil, nil) } // ClearParams clears the log. @@ -110,33 +57,7 @@ func Clear() *ClearParams { // Do executes Log.clear against the provided context and // target handler. func (p *ClearParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLogClear, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLogClear, nil, nil) } // StartViolationsReportParams start violation reporting. @@ -157,39 +78,7 @@ func StartViolationsReport(config []*ViolationSetting) *StartViolationsReportPar // Do executes Log.startViolationsReport against the provided context and // target handler. func (p *StartViolationsReportParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLogStartViolationsReport, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLogStartViolationsReport, p, nil) } // StopViolationsReportParams stop violation reporting. @@ -203,31 +92,5 @@ func StopViolationsReport() *StopViolationsReportParams { // Do executes Log.stopViolationsReport against the provided context and // target handler. func (p *StopViolationsReportParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandLogStopViolationsReport, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandLogStopViolationsReport, nil, nil) } diff --git a/cdp/memory/memory.go b/cdp/memory/memory.go index fb111de..bded8a4 100644 --- a/cdp/memory/memory.go +++ b/cdp/memory/memory.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // GetDOMCountersParams [no description]. @@ -36,40 +35,14 @@ type GetDOMCountersReturns struct { // nodes // jsEventListeners func (p *GetDOMCountersParams) Do(ctxt context.Context, h cdp.Handler) (documents int64, nodes int64, jsEventListeners int64, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandMemoryGetDOMCounters, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, 0, 0, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetDOMCountersReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, 0, 0, cdp.ErrInvalidResult - } - - return r.Documents, r.Nodes, r.JsEventListeners, nil - - case error: - return 0, 0, 0, v - } - - case <-ctxt.Done(): - return 0, 0, 0, ctxt.Err() + var res GetDOMCountersReturns + err = h.Execute(ctxt, cdp.CommandMemoryGetDOMCounters, nil, &res) + if err != nil { + return 0, 0, 0, err } - return 0, 0, 0, cdp.ErrUnknownResult + return res.Documents, res.Nodes, res.JsEventListeners, nil } // SetPressureNotificationsSuppressedParams enable/disable suppressing memory @@ -92,39 +65,7 @@ func SetPressureNotificationsSuppressed(suppressed bool) *SetPressureNotificatio // Do executes Memory.setPressureNotificationsSuppressed against the provided context and // target handler. func (p *SetPressureNotificationsSuppressedParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandMemorySetPressureNotificationsSuppressed, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandMemorySetPressureNotificationsSuppressed, p, nil) } // SimulatePressureNotificationParams simulate a memory pressure notification @@ -147,37 +88,5 @@ func SimulatePressureNotification(level PressureLevel) *SimulatePressureNotifica // Do executes Memory.simulatePressureNotification against the provided context and // target handler. func (p *SimulatePressureNotificationParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandMemorySimulatePressureNotification, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandMemorySimulatePressureNotification, p, nil) } diff --git a/cdp/network/easyjson.go b/cdp/network/easyjson.go index 15c1b5a..dacb1ab 100644 --- a/cdp/network/easyjson.go +++ b/cdp/network/easyjson.go @@ -20,7 +20,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(in *jlexer.Lexer, out *WebSocketResponse) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(in *jlexer.Lexer, out *EventEventSourceMessageReceived) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -39,335 +39,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(in *jlexer.Lexer, out continue } switch key { - case "status": - out.Status = float64(in.Float64()) - case "statusText": - out.StatusText = string(in.String()) - case "headers": - if in.IsNull() { - in.Skip() - out.Headers = nil - } else { - if out.Headers == nil { - out.Headers = new(Headers) - } - (*out.Headers).UnmarshalEasyJSON(in) - } - case "headersText": - out.HeadersText = string(in.String()) - case "requestHeaders": - if in.IsNull() { - in.Skip() - out.RequestHeaders = nil - } else { - if out.RequestHeaders == nil { - out.RequestHeaders = new(Headers) - } - (*out.RequestHeaders).UnmarshalEasyJSON(in) - } - case "requestHeadersText": - out.RequestHeadersText = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork(out *jwriter.Writer, in WebSocketResponse) { - out.RawByte('{') - first := true - _ = first - if in.Status != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"status\":") - out.Float64(float64(in.Status)) - } - if in.StatusText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"statusText\":") - out.String(string(in.StatusText)) - } - if in.Headers != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"headers\":") - if in.Headers == nil { - out.RawString("null") - } else { - (*in.Headers).MarshalEasyJSON(out) - } - } - if in.HeadersText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"headersText\":") - out.String(string(in.HeadersText)) - } - if in.RequestHeaders != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestHeaders\":") - if in.RequestHeaders == nil { - out.RawString("null") - } else { - (*in.RequestHeaders).MarshalEasyJSON(out) - } - } - if in.RequestHeadersText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestHeadersText\":") - out.String(string(in.RequestHeadersText)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WebSocketResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WebSocketResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WebSocketResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WebSocketResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork1(in *jlexer.Lexer, out *WebSocketRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "headers": - if in.IsNull() { - in.Skip() - out.Headers = nil - } else { - if out.Headers == nil { - out.Headers = new(Headers) - } - (*out.Headers).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork1(out *jwriter.Writer, in WebSocketRequest) { - out.RawByte('{') - first := true - _ = first - if in.Headers != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"headers\":") - if in.Headers == nil { - out.RawString("null") - } else { - (*in.Headers).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WebSocketRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WebSocketRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WebSocketRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WebSocketRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork2(in *jlexer.Lexer, out *WebSocketFrame) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "opcode": - out.Opcode = float64(in.Float64()) - case "mask": - out.Mask = bool(in.Bool()) - case "payloadData": - out.PayloadData = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork2(out *jwriter.Writer, in WebSocketFrame) { - out.RawByte('{') - first := true - _ = first - if in.Opcode != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"opcode\":") - out.Float64(float64(in.Opcode)) - } - if in.Mask { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"mask\":") - out.Bool(bool(in.Mask)) - } - if in.PayloadData != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"payloadData\":") - out.String(string(in.PayloadData)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WebSocketFrame) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WebSocketFrame) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WebSocketFrame) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WebSocketFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(in *jlexer.Lexer, out *SignedCertificateTimestamp) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "status": - out.Status = string(in.String()) - case "origin": - out.Origin = string(in.String()) - case "logDescription": - out.LogDescription = string(in.String()) - case "logId": - out.LogID = string(in.String()) + case "requestId": + out.RequestID = RequestID(in.String()) case "timestamp": (out.Timestamp).UnmarshalEasyJSON(in) - case "hashAlgorithm": - out.HashAlgorithm = string(in.String()) - case "signatureAlgorithm": - out.SignatureAlgorithm = string(in.String()) - case "signatureData": - out.SignatureData = string(in.String()) + case "eventName": + out.EventName = string(in.String()) + case "eventId": + out.EventID = string(in.String()) + case "data": + out.Data = string(in.String()) default: in.SkipRecursive() } @@ -378,41 +59,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(out *jwriter.Writer, in SignedCertificateTimestamp) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork(out *jwriter.Writer, in EventEventSourceMessageReceived) { out.RawByte('{') first := true _ = first - if in.Status != "" { + if in.RequestID != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"status\":") - out.String(string(in.Status)) - } - if in.Origin != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"origin\":") - out.String(string(in.Origin)) - } - if in.LogDescription != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"logDescription\":") - out.String(string(in.LogDescription)) - } - if in.LogID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"logId\":") - out.String(string(in.LogID)) + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) } if true { if !first { @@ -422,57 +79,57 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(out *jwriter.Writer, out.RawString("\"timestamp\":") (in.Timestamp).MarshalEasyJSON(out) } - if in.HashAlgorithm != "" { + if in.EventName != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"hashAlgorithm\":") - out.String(string(in.HashAlgorithm)) + out.RawString("\"eventName\":") + out.String(string(in.EventName)) } - if in.SignatureAlgorithm != "" { + if in.EventID != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"signatureAlgorithm\":") - out.String(string(in.SignatureAlgorithm)) + out.RawString("\"eventId\":") + out.String(string(in.EventID)) } - if in.SignatureData != "" { + if in.Data != "" { if !first { out.RawByte(',') } first = false - out.RawString("\"signatureData\":") - out.String(string(in.SignatureData)) + out.RawString("\"data\":") + out.String(string(in.Data)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SignedCertificateTimestamp) MarshalJSON() ([]byte, error) { +func (v EventEventSourceMessageReceived) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SignedCertificateTimestamp) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(w, v) +func (v EventEventSourceMessageReceived) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SignedCertificateTimestamp) UnmarshalJSON(data []byte) error { +func (v *EventEventSourceMessageReceived) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SignedCertificateTimestamp) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(l, v) +func (v *EventEventSourceMessageReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(in *jlexer.Lexer, out *SetUserAgentOverrideParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork1(in *jlexer.Lexer, out *EventWebSocketFrameSent) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -491,149 +148,19 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(in *jlexer.Lexer, out continue } switch key { - case "userAgent": - out.UserAgent = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork4(out *jwriter.Writer, in SetUserAgentOverrideParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"userAgent\":") - out.String(string(in.UserAgent)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetUserAgentOverrideParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetUserAgentOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetUserAgentOverrideParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetUserAgentOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(in *jlexer.Lexer, out *SetMonitoringXHREnabledParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "enabled": - out.Enabled = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(out *jwriter.Writer, in SetMonitoringXHREnabledParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"enabled\":") - out.Bool(bool(in.Enabled)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetMonitoringXHREnabledParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetMonitoringXHREnabledParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetMonitoringXHREnabledParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetMonitoringXHREnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(in *jlexer.Lexer, out *SetExtraHTTPHeadersParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "headers": + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "response": if in.IsNull() { in.Skip() - out.Headers = nil + out.Response = nil } else { - if out.Headers == nil { - out.Headers = new(Headers) + if out.Response == nil { + out.Response = new(WebSocketFrame) } - (*out.Headers).UnmarshalEasyJSON(in) + (*out.Response).UnmarshalEasyJSON(in) } default: in.SkipRecursive() @@ -645,7 +172,1566 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(out *jwriter.Writer, in SetExtraHTTPHeadersParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork1(out *jwriter.Writer, in EventWebSocketFrameSent) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.Response != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + if in.Response == nil { + out.RawString("null") + } else { + (*in.Response).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketFrameSent) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketFrameSent) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketFrameSent) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketFrameSent) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork2(in *jlexer.Lexer, out *EventWebSocketFrameError) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "errorMessage": + out.ErrorMessage = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork2(out *jwriter.Writer, in EventWebSocketFrameError) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.ErrorMessage != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"errorMessage\":") + out.String(string(in.ErrorMessage)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketFrameError) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketFrameError) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketFrameError) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketFrameError) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(in *jlexer.Lexer, out *EventWebSocketFrameReceived) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "response": + if in.IsNull() { + in.Skip() + out.Response = nil + } else { + if out.Response == nil { + out.Response = new(WebSocketFrame) + } + (*out.Response).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(out *jwriter.Writer, in EventWebSocketFrameReceived) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.Response != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + if in.Response == nil { + out.RawString("null") + } else { + (*in.Response).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketFrameReceived) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketFrameReceived) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketFrameReceived) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketFrameReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(in *jlexer.Lexer, out *EventWebSocketClosed) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork4(out *jwriter.Writer, in EventWebSocketClosed) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketClosed) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketClosed) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketClosed) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketClosed) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(in *jlexer.Lexer, out *EventWebSocketCreated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "url": + out.URL = string(in.String()) + case "initiator": + if in.IsNull() { + in.Skip() + out.Initiator = nil + } else { + if out.Initiator == nil { + out.Initiator = new(Initiator) + } + (*out.Initiator).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(out *jwriter.Writer, in EventWebSocketCreated) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.Initiator != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"initiator\":") + if in.Initiator == nil { + out.RawString("null") + } else { + (*in.Initiator).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketCreated) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketCreated) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketCreated) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(in *jlexer.Lexer, out *EventWebSocketHandshakeResponseReceived) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "response": + if in.IsNull() { + in.Skip() + out.Response = nil + } else { + if out.Response == nil { + out.Response = new(WebSocketResponse) + } + (*out.Response).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(out *jwriter.Writer, in EventWebSocketHandshakeResponseReceived) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.Response != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + if in.Response == nil { + out.RawString("null") + } else { + (*in.Response).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketHandshakeResponseReceived) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketHandshakeResponseReceived) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketHandshakeResponseReceived) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketHandshakeResponseReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(in *jlexer.Lexer, out *EventWebSocketWillSendHandshakeRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "wallTime": + (out.WallTime).UnmarshalEasyJSON(in) + case "request": + if in.IsNull() { + in.Skip() + out.Request = nil + } else { + if out.Request == nil { + out.Request = new(WebSocketRequest) + } + (*out.Request).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(out *jwriter.Writer, in EventWebSocketWillSendHandshakeRequest) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"wallTime\":") + (in.WallTime).MarshalEasyJSON(out) + } + if in.Request != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"request\":") + if in.Request == nil { + out.RawString("null") + } else { + (*in.Request).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventWebSocketWillSendHandshakeRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventWebSocketWillSendHandshakeRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventWebSocketWillSendHandshakeRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventWebSocketWillSendHandshakeRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(in *jlexer.Lexer, out *EventLoadingFailed) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "errorText": + out.ErrorText = string(in.String()) + case "canceled": + out.Canceled = bool(in.Bool()) + case "blockedReason": + (out.BlockedReason).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(out *jwriter.Writer, in EventLoadingFailed) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.ErrorText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"errorText\":") + out.String(string(in.ErrorText)) + } + if in.Canceled { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"canceled\":") + out.Bool(bool(in.Canceled)) + } + if in.BlockedReason != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"blockedReason\":") + (in.BlockedReason).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventLoadingFailed) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventLoadingFailed) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventLoadingFailed) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventLoadingFailed) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(in *jlexer.Lexer, out *EventLoadingFinished) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "encodedDataLength": + out.EncodedDataLength = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(out *jwriter.Writer, in EventLoadingFinished) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.EncodedDataLength != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"encodedDataLength\":") + out.Float64(float64(in.EncodedDataLength)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventLoadingFinished) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventLoadingFinished) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventLoadingFinished) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventLoadingFinished) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(in *jlexer.Lexer, out *EventDataReceived) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "dataLength": + out.DataLength = int64(in.Int64()) + case "encodedDataLength": + out.EncodedDataLength = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(out *jwriter.Writer, in EventDataReceived) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.DataLength != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"dataLength\":") + out.Int64(int64(in.DataLength)) + } + if in.EncodedDataLength != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"encodedDataLength\":") + out.Int64(int64(in.EncodedDataLength)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventDataReceived) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventDataReceived) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventDataReceived) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventDataReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(in *jlexer.Lexer, out *EventResponseReceived) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "loaderId": + out.LoaderID = cdp.LoaderID(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "response": + if in.IsNull() { + in.Skip() + out.Response = nil + } else { + if out.Response == nil { + out.Response = new(Response) + } + (*out.Response).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork11(out *jwriter.Writer, in EventResponseReceived) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + if in.LoaderID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"loaderId\":") + out.String(string(in.LoaderID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Response != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + if in.Response == nil { + out.RawString("null") + } else { + (*in.Response).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventResponseReceived) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventResponseReceived) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventResponseReceived) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventResponseReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, out *EventRequestServedFromCache) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, in EventRequestServedFromCache) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventRequestServedFromCache) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventRequestServedFromCache) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventRequestServedFromCache) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventRequestServedFromCache) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, out *EventRequestWillBeSent) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "loaderId": + out.LoaderID = cdp.LoaderID(in.String()) + case "documentURL": + out.DocumentURL = string(in.String()) + case "request": + if in.IsNull() { + in.Skip() + out.Request = nil + } else { + if out.Request == nil { + out.Request = new(Request) + } + (*out.Request).UnmarshalEasyJSON(in) + } + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "wallTime": + (out.WallTime).UnmarshalEasyJSON(in) + case "initiator": + if in.IsNull() { + in.Skip() + out.Initiator = nil + } else { + if out.Initiator == nil { + out.Initiator = new(Initiator) + } + (*out.Initiator).UnmarshalEasyJSON(in) + } + case "redirectResponse": + if in.IsNull() { + in.Skip() + out.RedirectResponse = nil + } else { + if out.RedirectResponse == nil { + out.RedirectResponse = new(Response) + } + (*out.RedirectResponse).UnmarshalEasyJSON(in) + } + case "type": + (out.Type).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer, in EventRequestWillBeSent) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + if in.LoaderID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"loaderId\":") + out.String(string(in.LoaderID)) + } + if in.DocumentURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"documentURL\":") + out.String(string(in.DocumentURL)) + } + if in.Request != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"request\":") + if in.Request == nil { + out.RawString("null") + } else { + (*in.Request).MarshalEasyJSON(out) + } + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"wallTime\":") + (in.WallTime).MarshalEasyJSON(out) + } + if in.Initiator != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"initiator\":") + if in.Initiator == nil { + out.RawString("null") + } else { + (*in.Initiator).MarshalEasyJSON(out) + } + } + if in.RedirectResponse != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"redirectResponse\":") + if in.RedirectResponse == nil { + out.RawString("null") + } else { + (*in.RedirectResponse).MarshalEasyJSON(out) + } + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventRequestWillBeSent) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventRequestWillBeSent) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventRequestWillBeSent) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventRequestWillBeSent) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, out *EventResourceChangedPriority) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + case "newPriority": + (out.NewPriority).UnmarshalEasyJSON(in) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer, in EventResourceChangedPriority) { + out.RawByte('{') + first := true + _ = first + if in.RequestID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + } + if in.NewPriority != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"newPriority\":") + (in.NewPriority).MarshalEasyJSON(out) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventResourceChangedPriority) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventResourceChangedPriority) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventResourceChangedPriority) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventResourceChangedPriority) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, out *GetCertificateReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "tableNames": + if in.IsNull() { + in.Skip() + out.TableNames = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.TableNames = make([]string, 0, 4) + } else { + out.TableNames = []string{} + } + for !in.IsDelim(']') { + var v1 string + v1 = string(in.String()) + out.TableNames = append(out.TableNames, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer, in GetCertificateReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.TableNames) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"tableNames\":") + if in.TableNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.TableNames { + if v2 > 0 { + out.RawByte(',') + } + out.String(string(v3)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetCertificateReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetCertificateReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetCertificateReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetCertificateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, out *GetCertificateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "origin": + out.Origin = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer, in GetCertificateParams) { out.RawByte('{') first := true _ = first @@ -653,39 +1739,35 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(out *jwriter.Writer, out.RawByte(',') } first = false - out.RawString("\"headers\":") - if in.Headers == nil { - out.RawString("null") - } else { - (*in.Headers).MarshalEasyJSON(out) - } + out.RawString("\"origin\":") + out.String(string(in.Origin)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetExtraHTTPHeadersParams) MarshalJSON() ([]byte, error) { +func (v GetCertificateParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetExtraHTTPHeadersParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork6(w, v) +func (v GetCertificateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetExtraHTTPHeadersParams) UnmarshalJSON(data []byte) error { +func (v *GetCertificateParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetExtraHTTPHeadersParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork6(l, v) +func (v *GetCertificateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(in *jlexer.Lexer, out *SetDataSizeLimitsForTestParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(in *jlexer.Lexer, out *SetDataSizeLimitsForTestParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -718,7 +1800,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(out *jwriter.Writer, in SetDataSizeLimitsForTestParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(out *jwriter.Writer, in SetDataSizeLimitsForTestParams) { out.RawByte('{') first := true _ = first @@ -740,27 +1822,390 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v SetDataSizeLimitsForTestParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetDataSizeLimitsForTestParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork7(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetDataSizeLimitsForTestParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetDataSizeLimitsForTestParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork7(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(in *jlexer.Lexer, out *SetCookieReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(in *jlexer.Lexer, out *SetBypassServiceWorkerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "bypass": + out.Bypass = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork18(out *jwriter.Writer, in SetBypassServiceWorkerParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"bypass\":") + out.Bool(bool(in.Bypass)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetBypassServiceWorkerParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBypassServiceWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBypassServiceWorkerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBypassServiceWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(in *jlexer.Lexer, out *SetCacheDisabledParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "cacheDisabled": + out.CacheDisabled = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(out *jwriter.Writer, in SetCacheDisabledParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cacheDisabled\":") + out.Bool(bool(in.CacheDisabled)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetCacheDisabledParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetCacheDisabledParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetCacheDisabledParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetCacheDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork20(in *jlexer.Lexer, out *EmulateNetworkConditionsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "offline": + out.Offline = bool(in.Bool()) + case "latency": + out.Latency = float64(in.Float64()) + case "downloadThroughput": + out.DownloadThroughput = float64(in.Float64()) + case "uploadThroughput": + out.UploadThroughput = float64(in.Float64()) + case "connectionType": + (out.ConnectionType).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork20(out *jwriter.Writer, in EmulateNetworkConditionsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"offline\":") + out.Bool(bool(in.Offline)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"latency\":") + out.Float64(float64(in.Latency)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"downloadThroughput\":") + out.Float64(float64(in.DownloadThroughput)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"uploadThroughput\":") + out.Float64(float64(in.UploadThroughput)) + if in.ConnectionType != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"connectionType\":") + (in.ConnectionType).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork21(in *jlexer.Lexer, out *CanEmulateNetworkConditionsReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + out.Result = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork21(out *jwriter.Writer, in CanEmulateNetworkConditionsReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + out.Bool(bool(in.Result)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanEmulateNetworkConditionsReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanEmulateNetworkConditionsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanEmulateNetworkConditionsReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanEmulateNetworkConditionsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(in *jlexer.Lexer, out *CanEmulateNetworkConditionsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(out *jwriter.Writer, in CanEmulateNetworkConditionsParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanEmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanEmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanEmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanEmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(in *jlexer.Lexer, out *SetCookieReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -791,7 +2236,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(out *jwriter.Writer, in SetCookieReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(out *jwriter.Writer, in SetCookieReturns) { out.RawByte('{') first := true _ = first @@ -809,27 +2254,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v SetCookieReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetCookieReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork8(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetCookieReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetCookieReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork8(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(in *jlexer.Lexer, out *SetCookieParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(in *jlexer.Lexer, out *SetCookieParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -876,7 +2321,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(out *jwriter.Writer, in SetCookieParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(out *jwriter.Writer, in SetCookieParams) { out.RawByte('{') first := true _ = first @@ -952,27 +2397,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v SetCookieParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetCookieParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork9(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetCookieParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetCookieParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork9(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(in *jlexer.Lexer, out *SetCacheDisabledParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork25(in *jlexer.Lexer, out *DeleteCookieParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -991,8 +2436,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(in *jlexer.Lexer, ou continue } switch key { - case "cacheDisabled": - out.CacheDisabled = bool(in.Bool()) + case "cookieName": + out.CookieName = string(in.String()) + case "url": + out.URL = string(in.String()) default: in.SkipRecursive() } @@ -1003,7 +2450,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(out *jwriter.Writer, in SetCacheDisabledParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork25(out *jwriter.Writer, in DeleteCookieParams) { out.RawByte('{') first := true _ = first @@ -1011,35 +2458,41 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(out *jwriter.Writer, out.RawByte(',') } first = false - out.RawString("\"cacheDisabled\":") - out.Bool(bool(in.CacheDisabled)) + out.RawString("\"cookieName\":") + out.String(string(in.CookieName)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v SetCacheDisabledParams) MarshalJSON() ([]byte, error) { +func (v DeleteCookieParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetCacheDisabledParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork10(w, v) +func (v DeleteCookieParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetCacheDisabledParams) UnmarshalJSON(data []byte) error { +func (v *DeleteCookieParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork25(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetCacheDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork10(l, v) +func (v *DeleteCookieParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork25(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(in *jlexer.Lexer, out *SetBypassServiceWorkerParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(in *jlexer.Lexer, out *GetAllCookiesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1058,135 +2511,29 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(in *jlexer.Lexer, ou continue } switch key { - case "bypass": - out.Bypass = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork11(out *jwriter.Writer, in SetBypassServiceWorkerParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"bypass\":") - out.Bool(bool(in.Bypass)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetBypassServiceWorkerParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetBypassServiceWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetBypassServiceWorkerParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetBypassServiceWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, out *SecurityDetails) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - 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 "certificateId": - out.CertificateID = security.CertificateID(in.Int64()) - case "subjectName": - out.SubjectName = string(in.String()) - case "sanList": + case "cookies": if in.IsNull() { in.Skip() - out.SanList = nil + out.Cookies = nil } else { in.Delim('[') if !in.IsDelim(']') { - out.SanList = make([]string, 0, 4) + out.Cookies = make([]*Cookie, 0, 8) } else { - out.SanList = []string{} + out.Cookies = []*Cookie{} } for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.SanList = append(out.SanList, v1) - in.WantComma() - } - in.Delim(']') - } - case "issuer": - out.Issuer = string(in.String()) - case "validFrom": - (out.ValidFrom).UnmarshalEasyJSON(in) - case "validTo": - (out.ValidTo).UnmarshalEasyJSON(in) - case "signedCertificateTimestampList": - if in.IsNull() { - in.Skip() - out.SignedCertificateTimestampList = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.SignedCertificateTimestampList = make([]*SignedCertificateTimestamp, 0, 8) - } else { - out.SignedCertificateTimestampList = []*SignedCertificateTimestamp{} - } - for !in.IsDelim(']') { - var v2 *SignedCertificateTimestamp + var v4 *Cookie if in.IsNull() { in.Skip() - v2 = nil + v4 = nil } else { - if v2 == nil { - v2 = new(SignedCertificateTimestamp) + if v4 == nil { + v4 = new(Cookie) } - (*v2).UnmarshalEasyJSON(in) + (*v4).UnmarshalEasyJSON(in) } - out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v2) + out.Cookies = append(out.Cookies, v4) in.WantComma() } in.Delim(']') @@ -1201,120 +2548,21 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, in SecurityDetails) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(out *jwriter.Writer, in GetAllCookiesReturns) { out.RawByte('{') first := true _ = first - if in.Protocol != "" { + if len(in.Cookies) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"protocol\":") - out.String(string(in.Protocol)) - } - if in.KeyExchange != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyExchange\":") - out.String(string(in.KeyExchange)) - } - if in.KeyExchangeGroup != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"keyExchangeGroup\":") - out.String(string(in.KeyExchangeGroup)) - } - if in.Cipher != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cipher\":") - out.String(string(in.Cipher)) - } - if in.Mac != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"mac\":") - out.String(string(in.Mac)) - } - if in.CertificateID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"certificateId\":") - out.Int64(int64(in.CertificateID)) - } - if in.SubjectName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"subjectName\":") - out.String(string(in.SubjectName)) - } - if len(in.SanList) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sanList\":") - if in.SanList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("\"cookies\":") + if in.Cookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v3, v4 := range in.SanList { - if v3 > 0 { - out.RawByte(',') - } - out.String(string(v4)) - } - out.RawByte(']') - } - } - if in.Issuer != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"issuer\":") - out.String(string(in.Issuer)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"validFrom\":") - (in.ValidFrom).MarshalEasyJSON(out) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"validTo\":") - (in.ValidTo).MarshalEasyJSON(out) - } - if len(in.SignedCertificateTimestampList) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"signedCertificateTimestampList\":") - if in.SignedCertificateTimestampList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v5, v6 := range in.SignedCertificateTimestampList { + for v5, v6 := range in.Cookies { if v5 > 0 { out.RawByte(',') } @@ -1331,29 +2579,2060 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, } // MarshalJSON supports json.Marshaler interface -func (v SecurityDetails) MarshalJSON() ([]byte, error) { +func (v GetAllCookiesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SecurityDetails) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(w, v) +func (v GetAllCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SecurityDetails) UnmarshalJSON(data []byte) error { +func (v *GetAllCookiesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SecurityDetails) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(l, v) +func (v *GetAllCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, out *Response) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork27(in *jlexer.Lexer, out *GetAllCookiesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork27(out *jwriter.Writer, in GetAllCookiesParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAllCookiesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAllCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAllCookiesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAllCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork27(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork28(in *jlexer.Lexer, out *GetCookiesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "cookies": + if in.IsNull() { + in.Skip() + out.Cookies = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Cookies = make([]*Cookie, 0, 8) + } else { + out.Cookies = []*Cookie{} + } + for !in.IsDelim(']') { + var v7 *Cookie + if in.IsNull() { + in.Skip() + v7 = nil + } else { + if v7 == nil { + v7 = new(Cookie) + } + (*v7).UnmarshalEasyJSON(in) + } + out.Cookies = append(out.Cookies, v7) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork28(out *jwriter.Writer, in GetCookiesReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Cookies) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cookies\":") + if in.Cookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.Cookies { + 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 GetCookiesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork28(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork28(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetCookiesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork28(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork28(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork29(in *jlexer.Lexer, out *GetCookiesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "urls": + if in.IsNull() { + in.Skip() + out.Urls = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Urls = make([]string, 0, 4) + } else { + out.Urls = []string{} + } + for !in.IsDelim(']') { + var v10 string + v10 = string(in.String()) + out.Urls = append(out.Urls, v10) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork29(out *jwriter.Writer, in GetCookiesParams) { + out.RawByte('{') + first := true + _ = first + if len(in.Urls) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"urls\":") + if in.Urls == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Urls { + if v11 > 0 { + out.RawByte(',') + } + out.String(string(v12)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetCookiesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork29(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork29(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetCookiesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork29(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork29(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork30(in *jlexer.Lexer, out *ClearBrowserCookiesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork30(out *jwriter.Writer, in ClearBrowserCookiesParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork30(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork30(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork30(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork30(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork31(in *jlexer.Lexer, out *CanClearBrowserCookiesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + out.Result = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork31(out *jwriter.Writer, in CanClearBrowserCookiesReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + out.Bool(bool(in.Result)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanClearBrowserCookiesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork31(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanClearBrowserCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork31(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanClearBrowserCookiesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork31(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanClearBrowserCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork31(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork32(in *jlexer.Lexer, out *CanClearBrowserCookiesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork32(out *jwriter.Writer, in CanClearBrowserCookiesParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork32(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork32(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork32(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork32(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork33(in *jlexer.Lexer, out *ClearBrowserCacheParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork33(out *jwriter.Writer, in ClearBrowserCacheParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ClearBrowserCacheParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork33(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork33(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ClearBrowserCacheParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork33(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork33(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork34(in *jlexer.Lexer, out *CanClearBrowserCacheReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + out.Result = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork34(out *jwriter.Writer, in CanClearBrowserCacheReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + out.Bool(bool(in.Result)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanClearBrowserCacheReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork34(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanClearBrowserCacheReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork34(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanClearBrowserCacheReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork34(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanClearBrowserCacheReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork34(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork35(in *jlexer.Lexer, out *CanClearBrowserCacheParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork35(out *jwriter.Writer, in CanClearBrowserCacheParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CanClearBrowserCacheParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CanClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CanClearBrowserCacheParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CanClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork35(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork36(in *jlexer.Lexer, out *SetMonitoringXHREnabledParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "enabled": + out.Enabled = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork36(out *jwriter.Writer, in SetMonitoringXHREnabledParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enabled\":") + out.Bool(bool(in.Enabled)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetMonitoringXHREnabledParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetMonitoringXHREnabledParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetMonitoringXHREnabledParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetMonitoringXHREnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork36(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(in *jlexer.Lexer, out *ReplayXHRParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork37(out *jwriter.Writer, in ReplayXHRParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ReplayXHRParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork37(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ReplayXHRParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork37(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ReplayXHRParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ReplayXHRParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, out *RemoveBlockedURLParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, in RemoveBlockedURLParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveBlockedURLParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveBlockedURLParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveBlockedURLParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveBlockedURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(in *jlexer.Lexer, out *AddBlockedURLParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(out *jwriter.Writer, in AddBlockedURLParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddBlockedURLParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddBlockedURLParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddBlockedURLParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddBlockedURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(in *jlexer.Lexer, out *GetResponseBodyReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "body": + out.Body = string(in.String()) + case "base64Encoded": + out.Base64encoded = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(out *jwriter.Writer, in GetResponseBodyReturns) { + out.RawByte('{') + first := true + _ = first + if in.Body != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"body\":") + out.String(string(in.Body)) + } + if in.Base64encoded { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"base64Encoded\":") + out.Bool(bool(in.Base64encoded)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetResponseBodyReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetResponseBodyReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetResponseBodyReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetResponseBodyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(in *jlexer.Lexer, out *GetResponseBodyParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "requestId": + out.RequestID = RequestID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(out *jwriter.Writer, in GetResponseBodyParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestId\":") + out.String(string(in.RequestID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetResponseBodyParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetResponseBodyParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetResponseBodyParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetResponseBodyParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(in *jlexer.Lexer, out *SetExtraHTTPHeadersParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "headers": + if in.IsNull() { + in.Skip() + out.Headers = nil + } else { + if out.Headers == nil { + out.Headers = new(Headers) + } + (*out.Headers).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(out *jwriter.Writer, in SetExtraHTTPHeadersParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"headers\":") + if in.Headers == nil { + out.RawString("null") + } else { + (*in.Headers).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetExtraHTTPHeadersParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetExtraHTTPHeadersParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetExtraHTTPHeadersParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetExtraHTTPHeadersParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(in *jlexer.Lexer, out *SetUserAgentOverrideParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "userAgent": + out.UserAgent = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(out *jwriter.Writer, in SetUserAgentOverrideParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"userAgent\":") + out.String(string(in.UserAgent)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetUserAgentOverrideParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetUserAgentOverrideParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetUserAgentOverrideParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetUserAgentOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "maxTotalBufferSize": + out.MaxTotalBufferSize = int64(in.Int64()) + case "maxResourceBufferSize": + out.MaxResourceBufferSize = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(out *jwriter.Writer, in EnableParams) { + out.RawByte('{') + first := true + _ = first + if in.MaxTotalBufferSize != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"maxTotalBufferSize\":") + out.Int64(int64(in.MaxTotalBufferSize)) + } + if in.MaxResourceBufferSize != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"maxResourceBufferSize\":") + out.Int64(int64(in.MaxResourceBufferSize)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EnableParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(in *jlexer.Lexer, out *Cookie) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "name": + out.Name = string(in.String()) + case "value": + out.Value = string(in.String()) + case "domain": + out.Domain = string(in.String()) + case "path": + out.Path = string(in.String()) + case "expires": + out.Expires = float64(in.Float64()) + case "size": + out.Size = int64(in.Int64()) + case "httpOnly": + out.HTTPOnly = bool(in.Bool()) + case "secure": + out.Secure = bool(in.Bool()) + case "session": + out.Session = bool(in.Bool()) + case "sameSite": + (out.SameSite).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(out *jwriter.Writer, in Cookie) { + out.RawByte('{') + first := true + _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + if in.Domain != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"domain\":") + out.String(string(in.Domain)) + } + if in.Path != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"path\":") + out.String(string(in.Path)) + } + if in.Expires != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"expires\":") + out.Float64(float64(in.Expires)) + } + if in.Size != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"size\":") + out.Int64(int64(in.Size)) + } + if in.HTTPOnly { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"httpOnly\":") + out.Bool(bool(in.HTTPOnly)) + } + if in.Secure { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"secure\":") + out.Bool(bool(in.Secure)) + } + if in.Session { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"session\":") + out.Bool(bool(in.Session)) + } + if in.SameSite != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sameSite\":") + (in.SameSite).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Cookie) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Cookie) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Cookie) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Cookie) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(in *jlexer.Lexer, out *Initiator) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "stack": + if in.IsNull() { + in.Skip() + out.Stack = nil + } else { + if out.Stack == nil { + out.Stack = new(runtime.StackTrace) + } + (*out.Stack).UnmarshalEasyJSON(in) + } + case "url": + out.URL = string(in.String()) + case "lineNumber": + out.LineNumber = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(out *jwriter.Writer, in Initiator) { + out.RawByte('{') + first := true + _ = first + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Stack != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"stack\":") + if in.Stack == nil { + out.RawString("null") + } else { + (*in.Stack).MarshalEasyJSON(out) + } + } + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.LineNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Float64(float64(in.LineNumber)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Initiator) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Initiator) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Initiator) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Initiator) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(in *jlexer.Lexer, out *CachedResource) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "response": + if in.IsNull() { + in.Skip() + out.Response = nil + } else { + if out.Response == nil { + out.Response = new(Response) + } + (*out.Response).UnmarshalEasyJSON(in) + } + case "bodySize": + out.BodySize = float64(in.Float64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(out *jwriter.Writer, in CachedResource) { + out.RawByte('{') + first := true + _ = first + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Response != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + if in.Response == nil { + out.RawString("null") + } else { + (*in.Response).MarshalEasyJSON(out) + } + } + if in.BodySize != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"bodySize\":") + out.Float64(float64(in.BodySize)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CachedResource) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CachedResource) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CachedResource) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(in *jlexer.Lexer, out *WebSocketFrame) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "opcode": + out.Opcode = float64(in.Float64()) + case "mask": + out.Mask = bool(in.Bool()) + case "payloadData": + out.PayloadData = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(out *jwriter.Writer, in WebSocketFrame) { + out.RawByte('{') + first := true + _ = first + if in.Opcode != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"opcode\":") + out.Float64(float64(in.Opcode)) + } + if in.Mask { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"mask\":") + out.Bool(bool(in.Mask)) + } + if in.PayloadData != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"payloadData\":") + out.String(string(in.PayloadData)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v WebSocketFrame) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v WebSocketFrame) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *WebSocketFrame) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *WebSocketFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(in *jlexer.Lexer, out *WebSocketResponse) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "status": + out.Status = float64(in.Float64()) + case "statusText": + out.StatusText = string(in.String()) + case "headers": + if in.IsNull() { + in.Skip() + out.Headers = nil + } else { + if out.Headers == nil { + out.Headers = new(Headers) + } + (*out.Headers).UnmarshalEasyJSON(in) + } + case "headersText": + out.HeadersText = string(in.String()) + case "requestHeaders": + if in.IsNull() { + in.Skip() + out.RequestHeaders = nil + } else { + if out.RequestHeaders == nil { + out.RequestHeaders = new(Headers) + } + (*out.RequestHeaders).UnmarshalEasyJSON(in) + } + case "requestHeadersText": + out.RequestHeadersText = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(out *jwriter.Writer, in WebSocketResponse) { + out.RawByte('{') + first := true + _ = first + if in.Status != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"status\":") + out.Float64(float64(in.Status)) + } + if in.StatusText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"statusText\":") + out.String(string(in.StatusText)) + } + if in.Headers != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"headers\":") + if in.Headers == nil { + out.RawString("null") + } else { + (*in.Headers).MarshalEasyJSON(out) + } + } + if in.HeadersText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"headersText\":") + out.String(string(in.HeadersText)) + } + if in.RequestHeaders != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestHeaders\":") + if in.RequestHeaders == nil { + out.RawString("null") + } else { + (*in.RequestHeaders).MarshalEasyJSON(out) + } + } + if in.RequestHeadersText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"requestHeadersText\":") + out.String(string(in.RequestHeadersText)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v WebSocketResponse) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v WebSocketResponse) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *WebSocketResponse) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *WebSocketResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(in *jlexer.Lexer, out *WebSocketRequest) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "headers": + if in.IsNull() { + in.Skip() + out.Headers = nil + } else { + if out.Headers == nil { + out.Headers = new(Headers) + } + (*out.Headers).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(out *jwriter.Writer, in WebSocketRequest) { + out.RawByte('{') + first := true + _ = first + if in.Headers != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"headers\":") + if in.Headers == nil { + out.RawString("null") + } else { + (*in.Headers).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v WebSocketRequest) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v WebSocketRequest) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *WebSocketRequest) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *WebSocketRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(in *jlexer.Lexer, out *Response) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1452,7 +4731,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer, in Response) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(out *jwriter.Writer, in Response) { out.RawByte('{') first := true _ = first @@ -1630,27 +4909,554 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v Response) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Response) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Response) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, out *ResourceTiming) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(in *jlexer.Lexer, out *SecurityDetails) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + 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 "certificateId": + out.CertificateID = security.CertificateID(in.Int64()) + case "subjectName": + out.SubjectName = string(in.String()) + case "sanList": + if in.IsNull() { + in.Skip() + out.SanList = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.SanList = make([]string, 0, 4) + } else { + out.SanList = []string{} + } + for !in.IsDelim(']') { + var v13 string + v13 = string(in.String()) + out.SanList = append(out.SanList, v13) + in.WantComma() + } + in.Delim(']') + } + case "issuer": + out.Issuer = string(in.String()) + case "validFrom": + (out.ValidFrom).UnmarshalEasyJSON(in) + case "validTo": + (out.ValidTo).UnmarshalEasyJSON(in) + case "signedCertificateTimestampList": + if in.IsNull() { + in.Skip() + out.SignedCertificateTimestampList = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.SignedCertificateTimestampList = make([]*SignedCertificateTimestamp, 0, 8) + } else { + out.SignedCertificateTimestampList = []*SignedCertificateTimestamp{} + } + for !in.IsDelim(']') { + var v14 *SignedCertificateTimestamp + if in.IsNull() { + in.Skip() + v14 = nil + } else { + if v14 == nil { + v14 = new(SignedCertificateTimestamp) + } + (*v14).UnmarshalEasyJSON(in) + } + out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v14) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(out *jwriter.Writer, in SecurityDetails) { + out.RawByte('{') + first := true + _ = first + if in.Protocol != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"protocol\":") + out.String(string(in.Protocol)) + } + if in.KeyExchange != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyExchange\":") + out.String(string(in.KeyExchange)) + } + if in.KeyExchangeGroup != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"keyExchangeGroup\":") + out.String(string(in.KeyExchangeGroup)) + } + if in.Cipher != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"cipher\":") + out.String(string(in.Cipher)) + } + if in.Mac != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"mac\":") + out.String(string(in.Mac)) + } + if in.CertificateID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"certificateId\":") + out.Int64(int64(in.CertificateID)) + } + if in.SubjectName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"subjectName\":") + out.String(string(in.SubjectName)) + } + if len(in.SanList) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sanList\":") + if in.SanList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v15, v16 := range in.SanList { + if v15 > 0 { + out.RawByte(',') + } + out.String(string(v16)) + } + out.RawByte(']') + } + } + if in.Issuer != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"issuer\":") + out.String(string(in.Issuer)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"validFrom\":") + (in.ValidFrom).MarshalEasyJSON(out) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"validTo\":") + (in.ValidTo).MarshalEasyJSON(out) + } + if len(in.SignedCertificateTimestampList) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"signedCertificateTimestampList\":") + if in.SignedCertificateTimestampList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v17, v18 := range in.SignedCertificateTimestampList { + if v17 > 0 { + out.RawByte(',') + } + if v18 == nil { + out.RawString("null") + } else { + (*v18).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SecurityDetails) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SecurityDetails) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SecurityDetails) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SecurityDetails) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(in *jlexer.Lexer, out *SignedCertificateTimestamp) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "status": + out.Status = string(in.String()) + case "origin": + out.Origin = string(in.String()) + case "logDescription": + out.LogDescription = string(in.String()) + case "logId": + out.LogID = string(in.String()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "hashAlgorithm": + out.HashAlgorithm = string(in.String()) + case "signatureAlgorithm": + out.SignatureAlgorithm = string(in.String()) + case "signatureData": + out.SignatureData = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(out *jwriter.Writer, in SignedCertificateTimestamp) { + out.RawByte('{') + first := true + _ = first + if in.Status != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"status\":") + out.String(string(in.Status)) + } + if in.Origin != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + out.String(string(in.Origin)) + } + if in.LogDescription != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"logDescription\":") + out.String(string(in.LogDescription)) + } + if in.LogID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"logId\":") + out.String(string(in.LogID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.HashAlgorithm != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hashAlgorithm\":") + out.String(string(in.HashAlgorithm)) + } + if in.SignatureAlgorithm != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"signatureAlgorithm\":") + out.String(string(in.SignatureAlgorithm)) + } + if in.SignatureData != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"signatureData\":") + out.String(string(in.SignatureData)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SignedCertificateTimestamp) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SignedCertificateTimestamp) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SignedCertificateTimestamp) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SignedCertificateTimestamp) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(in *jlexer.Lexer, out *Request) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + case "method": + out.Method = string(in.String()) + case "headers": + if in.IsNull() { + in.Skip() + out.Headers = nil + } else { + if out.Headers == nil { + out.Headers = new(Headers) + } + (*out.Headers).UnmarshalEasyJSON(in) + } + case "postData": + out.PostData = string(in.String()) + case "mixedContentType": + (out.MixedContentType).UnmarshalEasyJSON(in) + case "initialPriority": + (out.InitialPriority).UnmarshalEasyJSON(in) + case "referrerPolicy": + (out.ReferrerPolicy).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(out *jwriter.Writer, in Request) { + out.RawByte('{') + first := true + _ = first + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.Method != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"method\":") + out.String(string(in.Method)) + } + if in.Headers != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"headers\":") + if in.Headers == nil { + out.RawString("null") + } else { + (*in.Headers).MarshalEasyJSON(out) + } + } + if in.PostData != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"postData\":") + out.String(string(in.PostData)) + } + if in.MixedContentType != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"mixedContentType\":") + (in.MixedContentType).MarshalEasyJSON(out) + } + if in.InitialPriority != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"initialPriority\":") + (in.InitialPriority).MarshalEasyJSON(out) + } + if in.ReferrerPolicy != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"referrerPolicy\":") + (in.ReferrerPolicy).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v Request) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v Request) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *Request) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(in *jlexer.Lexer, out *ResourceTiming) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1711,7 +5517,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer, in ResourceTiming) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(out *jwriter.Writer, in ResourceTiming) { out.RawByte('{') first := true _ = first @@ -1849,413 +5655,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ResourceTiming) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ResourceTiming) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ResourceTiming) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ResourceTiming) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, out *Request) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - case "method": - out.Method = string(in.String()) - case "headers": - if in.IsNull() { - in.Skip() - out.Headers = nil - } else { - if out.Headers == nil { - out.Headers = new(Headers) - } - (*out.Headers).UnmarshalEasyJSON(in) - } - case "postData": - out.PostData = string(in.String()) - case "mixedContentType": - (out.MixedContentType).UnmarshalEasyJSON(in) - case "initialPriority": - (out.InitialPriority).UnmarshalEasyJSON(in) - case "referrerPolicy": - (out.ReferrerPolicy).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer, in Request) { - out.RawByte('{') - first := true - _ = first - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.Method != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"method\":") - out.String(string(in.Method)) - } - if in.Headers != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"headers\":") - if in.Headers == nil { - out.RawString("null") - } else { - (*in.Headers).MarshalEasyJSON(out) - } - } - if in.PostData != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"postData\":") - out.String(string(in.PostData)) - } - if in.MixedContentType != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"mixedContentType\":") - (in.MixedContentType).MarshalEasyJSON(out) - } - if in.InitialPriority != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"initialPriority\":") - (in.InitialPriority).MarshalEasyJSON(out) - } - if in.ReferrerPolicy != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"referrerPolicy\":") - (in.ReferrerPolicy).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Request) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Request) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Request) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, out *ReplayXHRParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer, in ReplayXHRParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ReplayXHRParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ReplayXHRParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ReplayXHRParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ReplayXHRParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(in *jlexer.Lexer, out *RemoveBlockedURLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(out *jwriter.Writer, in RemoveBlockedURLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveBlockedURLParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveBlockedURLParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveBlockedURLParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveBlockedURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(in *jlexer.Lexer, out *Initiator) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "stack": - if in.IsNull() { - in.Skip() - out.Stack = nil - } else { - if out.Stack == nil { - out.Stack = new(runtime.StackTrace) - } - (*out.Stack).UnmarshalEasyJSON(in) - } - case "url": - out.URL = string(in.String()) - case "lineNumber": - out.LineNumber = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork18(out *jwriter.Writer, in Initiator) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Stack != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"stack\":") - if in.Stack == nil { - out.RawString("null") - } else { - (*in.Stack).MarshalEasyJSON(out) - } - } - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.LineNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lineNumber\":") - out.Float64(float64(in.LineNumber)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Initiator) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Initiator) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Initiator) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Initiator) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(in *jlexer.Lexer, out *Headers) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(in *jlexer.Lexer, out *Headers) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2284,7 +5704,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(out *jwriter.Writer, in Headers) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(out *jwriter.Writer, in Headers) { out.RawByte('{') first := true _ = first @@ -2293,3444 +5713,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v Headers) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Headers) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Headers) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Headers) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork20(in *jlexer.Lexer, out *GetResponseBodyReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "body": - out.Body = string(in.String()) - case "base64Encoded": - out.Base64encoded = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork20(out *jwriter.Writer, in GetResponseBodyReturns) { - out.RawByte('{') - first := true - _ = first - if in.Body != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"body\":") - out.String(string(in.Body)) - } - if in.Base64encoded { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"base64Encoded\":") - out.Bool(bool(in.Base64encoded)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetResponseBodyReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork20(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetResponseBodyReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork20(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetResponseBodyReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork20(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetResponseBodyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork20(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork21(in *jlexer.Lexer, out *GetResponseBodyParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork21(out *jwriter.Writer, in GetResponseBodyParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetResponseBodyParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetResponseBodyParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetResponseBodyParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetResponseBodyParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(in *jlexer.Lexer, out *GetCookiesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "cookies": - if in.IsNull() { - in.Skip() - out.Cookies = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Cookies = make([]*Cookie, 0, 8) - } else { - out.Cookies = []*Cookie{} - } - for !in.IsDelim(']') { - var v7 *Cookie - if in.IsNull() { - in.Skip() - v7 = nil - } else { - if v7 == nil { - v7 = new(Cookie) - } - (*v7).UnmarshalEasyJSON(in) - } - out.Cookies = append(out.Cookies, v7) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(out *jwriter.Writer, in GetCookiesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Cookies) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cookies\":") - if in.Cookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Cookies { - 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 GetCookiesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetCookiesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(in *jlexer.Lexer, out *GetCookiesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "urls": - if in.IsNull() { - in.Skip() - out.Urls = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Urls = make([]string, 0, 4) - } else { - out.Urls = []string{} - } - for !in.IsDelim(']') { - var v10 string - v10 = string(in.String()) - out.Urls = append(out.Urls, v10) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(out *jwriter.Writer, in GetCookiesParams) { - out.RawByte('{') - first := true - _ = first - if len(in.Urls) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"urls\":") - if in.Urls == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v11, v12 := range in.Urls { - if v11 > 0 { - out.RawByte(',') - } - out.String(string(v12)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetCookiesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetCookiesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(in *jlexer.Lexer, out *GetCertificateReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "tableNames": - if in.IsNull() { - in.Skip() - out.TableNames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.TableNames = make([]string, 0, 4) - } else { - out.TableNames = []string{} - } - for !in.IsDelim(']') { - var v13 string - v13 = string(in.String()) - out.TableNames = append(out.TableNames, v13) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(out *jwriter.Writer, in GetCertificateReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.TableNames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"tableNames\":") - if in.TableNames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.TableNames { - if v14 > 0 { - out.RawByte(',') - } - out.String(string(v15)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetCertificateReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetCertificateReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetCertificateReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetCertificateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork25(in *jlexer.Lexer, out *GetCertificateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "origin": - out.Origin = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork25(out *jwriter.Writer, in GetCertificateParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"origin\":") - out.String(string(in.Origin)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetCertificateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetCertificateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetCertificateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetCertificateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(in *jlexer.Lexer, out *GetAllCookiesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "cookies": - if in.IsNull() { - in.Skip() - out.Cookies = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Cookies = make([]*Cookie, 0, 8) - } else { - out.Cookies = []*Cookie{} - } - for !in.IsDelim(']') { - var v16 *Cookie - if in.IsNull() { - in.Skip() - v16 = nil - } else { - if v16 == nil { - v16 = new(Cookie) - } - (*v16).UnmarshalEasyJSON(in) - } - out.Cookies = append(out.Cookies, v16) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(out *jwriter.Writer, in GetAllCookiesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Cookies) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cookies\":") - if in.Cookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.Cookies { - if v17 > 0 { - out.RawByte(',') - } - if v18 == nil { - out.RawString("null") - } else { - (*v18).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetAllCookiesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetAllCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetAllCookiesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetAllCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork27(in *jlexer.Lexer, out *GetAllCookiesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork27(out *jwriter.Writer, in GetAllCookiesParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetAllCookiesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork27(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetAllCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork27(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetAllCookiesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork27(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetAllCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork27(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork28(in *jlexer.Lexer, out *EventWebSocketWillSendHandshakeRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "wallTime": - (out.WallTime).UnmarshalEasyJSON(in) - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(WebSocketRequest) - } - (*out.Request).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork28(out *jwriter.Writer, in EventWebSocketWillSendHandshakeRequest) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"wallTime\":") - (in.WallTime).MarshalEasyJSON(out) - } - if in.Request != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"request\":") - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketWillSendHandshakeRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork28(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketWillSendHandshakeRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork28(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketWillSendHandshakeRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork28(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketWillSendHandshakeRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork28(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork29(in *jlexer.Lexer, out *EventWebSocketHandshakeResponseReceived) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "response": - if in.IsNull() { - in.Skip() - out.Response = nil - } else { - if out.Response == nil { - out.Response = new(WebSocketResponse) - } - (*out.Response).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork29(out *jwriter.Writer, in EventWebSocketHandshakeResponseReceived) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.Response != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - if in.Response == nil { - out.RawString("null") - } else { - (*in.Response).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketHandshakeResponseReceived) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork29(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketHandshakeResponseReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork29(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketHandshakeResponseReceived) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork29(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketHandshakeResponseReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork29(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork30(in *jlexer.Lexer, out *EventWebSocketFrameSent) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "response": - if in.IsNull() { - in.Skip() - out.Response = nil - } else { - if out.Response == nil { - out.Response = new(WebSocketFrame) - } - (*out.Response).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork30(out *jwriter.Writer, in EventWebSocketFrameSent) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.Response != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - if in.Response == nil { - out.RawString("null") - } else { - (*in.Response).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketFrameSent) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork30(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketFrameSent) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork30(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketFrameSent) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork30(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketFrameSent) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork30(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork31(in *jlexer.Lexer, out *EventWebSocketFrameReceived) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "response": - if in.IsNull() { - in.Skip() - out.Response = nil - } else { - if out.Response == nil { - out.Response = new(WebSocketFrame) - } - (*out.Response).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork31(out *jwriter.Writer, in EventWebSocketFrameReceived) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.Response != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - if in.Response == nil { - out.RawString("null") - } else { - (*in.Response).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketFrameReceived) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork31(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketFrameReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork31(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketFrameReceived) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork31(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketFrameReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork31(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork32(in *jlexer.Lexer, out *EventWebSocketFrameError) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "errorMessage": - out.ErrorMessage = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork32(out *jwriter.Writer, in EventWebSocketFrameError) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.ErrorMessage != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"errorMessage\":") - out.String(string(in.ErrorMessage)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketFrameError) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork32(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketFrameError) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork32(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketFrameError) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork32(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketFrameError) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork32(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork33(in *jlexer.Lexer, out *EventWebSocketCreated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "url": - out.URL = string(in.String()) - case "initiator": - if in.IsNull() { - in.Skip() - out.Initiator = nil - } else { - if out.Initiator == nil { - out.Initiator = new(Initiator) - } - (*out.Initiator).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork33(out *jwriter.Writer, in EventWebSocketCreated) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.Initiator != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"initiator\":") - if in.Initiator == nil { - out.RawString("null") - } else { - (*in.Initiator).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketCreated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork33(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketCreated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork33(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketCreated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork33(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork33(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork34(in *jlexer.Lexer, out *EventWebSocketClosed) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork34(out *jwriter.Writer, in EventWebSocketClosed) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWebSocketClosed) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork34(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWebSocketClosed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork34(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWebSocketClosed) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork34(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWebSocketClosed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork34(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork35(in *jlexer.Lexer, out *EventResponseReceived) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - case "loaderId": - out.LoaderID = cdp.LoaderID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "response": - if in.IsNull() { - in.Skip() - out.Response = nil - } else { - if out.Response == nil { - out.Response = new(Response) - } - (*out.Response).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork35(out *jwriter.Writer, in EventResponseReceived) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - if in.LoaderID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"loaderId\":") - out.String(string(in.LoaderID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Response != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - if in.Response == nil { - out.RawString("null") - } else { - (*in.Response).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventResponseReceived) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork35(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventResponseReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork35(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventResponseReceived) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork35(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventResponseReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork35(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork36(in *jlexer.Lexer, out *EventResourceChangedPriority) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "newPriority": - (out.NewPriority).UnmarshalEasyJSON(in) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork36(out *jwriter.Writer, in EventResourceChangedPriority) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if in.NewPriority != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"newPriority\":") - (in.NewPriority).MarshalEasyJSON(out) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventResourceChangedPriority) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork36(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventResourceChangedPriority) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork36(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventResourceChangedPriority) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork36(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventResourceChangedPriority) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork36(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(in *jlexer.Lexer, out *EventRequestWillBeSent) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - case "loaderId": - out.LoaderID = cdp.LoaderID(in.String()) - case "documentURL": - out.DocumentURL = string(in.String()) - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(Request) - } - (*out.Request).UnmarshalEasyJSON(in) - } - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "wallTime": - (out.WallTime).UnmarshalEasyJSON(in) - case "initiator": - if in.IsNull() { - in.Skip() - out.Initiator = nil - } else { - if out.Initiator == nil { - out.Initiator = new(Initiator) - } - (*out.Initiator).UnmarshalEasyJSON(in) - } - case "redirectResponse": - if in.IsNull() { - in.Skip() - out.RedirectResponse = nil - } else { - if out.RedirectResponse == nil { - out.RedirectResponse = new(Response) - } - (*out.RedirectResponse).UnmarshalEasyJSON(in) - } - case "type": - (out.Type).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork37(out *jwriter.Writer, in EventRequestWillBeSent) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - if in.LoaderID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"loaderId\":") - out.String(string(in.LoaderID)) - } - if in.DocumentURL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"documentURL\":") - out.String(string(in.DocumentURL)) - } - if in.Request != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"request\":") - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"wallTime\":") - (in.WallTime).MarshalEasyJSON(out) - } - if in.Initiator != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"initiator\":") - if in.Initiator == nil { - out.RawString("null") - } else { - (*in.Initiator).MarshalEasyJSON(out) - } - } - if in.RedirectResponse != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"redirectResponse\":") - if in.RedirectResponse == nil { - out.RawString("null") - } else { - (*in.RedirectResponse).MarshalEasyJSON(out) - } - } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventRequestWillBeSent) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork37(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventRequestWillBeSent) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork37(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventRequestWillBeSent) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventRequestWillBeSent) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, out *EventRequestServedFromCache) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, in EventRequestServedFromCache) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventRequestServedFromCache) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventRequestServedFromCache) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventRequestServedFromCache) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventRequestServedFromCache) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(in *jlexer.Lexer, out *EventLoadingFinished) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "encodedDataLength": - out.EncodedDataLength = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(out *jwriter.Writer, in EventLoadingFinished) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.EncodedDataLength != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"encodedDataLength\":") - out.Float64(float64(in.EncodedDataLength)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventLoadingFinished) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventLoadingFinished) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventLoadingFinished) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventLoadingFinished) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(in *jlexer.Lexer, out *EventLoadingFailed) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "errorText": - out.ErrorText = string(in.String()) - case "canceled": - out.Canceled = bool(in.Bool()) - case "blockedReason": - (out.BlockedReason).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(out *jwriter.Writer, in EventLoadingFailed) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.ErrorText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"errorText\":") - out.String(string(in.ErrorText)) - } - if in.Canceled { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"canceled\":") - out.Bool(bool(in.Canceled)) - } - if in.BlockedReason != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"blockedReason\":") - (in.BlockedReason).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventLoadingFailed) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventLoadingFailed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventLoadingFailed) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventLoadingFailed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(in *jlexer.Lexer, out *EventEventSourceMessageReceived) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "eventName": - out.EventName = string(in.String()) - case "eventId": - out.EventID = string(in.String()) - case "data": - out.Data = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(out *jwriter.Writer, in EventEventSourceMessageReceived) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.EventName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventName\":") - out.String(string(in.EventName)) - } - if in.EventID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventId\":") - out.String(string(in.EventID)) - } - if in.Data != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"data\":") - out.String(string(in.Data)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventEventSourceMessageReceived) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventEventSourceMessageReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventEventSourceMessageReceived) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventEventSourceMessageReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(in *jlexer.Lexer, out *EventDataReceived) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "requestId": - out.RequestID = RequestID(in.String()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "dataLength": - out.DataLength = int64(in.Int64()) - case "encodedDataLength": - out.EncodedDataLength = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(out *jwriter.Writer, in EventDataReceived) { - out.RawByte('{') - first := true - _ = first - if in.RequestID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"requestId\":") - out.String(string(in.RequestID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.DataLength != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"dataLength\":") - out.Int64(int64(in.DataLength)) - } - if in.EncodedDataLength != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"encodedDataLength\":") - out.Int64(int64(in.EncodedDataLength)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDataReceived) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDataReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDataReceived) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDataReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "maxTotalBufferSize": - out.MaxTotalBufferSize = int64(in.Int64()) - case "maxResourceBufferSize": - out.MaxResourceBufferSize = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(out *jwriter.Writer, in EnableParams) { - out.RawByte('{') - first := true - _ = first - if in.MaxTotalBufferSize != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"maxTotalBufferSize\":") - out.Int64(int64(in.MaxTotalBufferSize)) - } - if in.MaxResourceBufferSize != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"maxResourceBufferSize\":") - out.Int64(int64(in.MaxResourceBufferSize)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EnableParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(in *jlexer.Lexer, out *EmulateNetworkConditionsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "offline": - out.Offline = bool(in.Bool()) - case "latency": - out.Latency = float64(in.Float64()) - case "downloadThroughput": - out.DownloadThroughput = float64(in.Float64()) - case "uploadThroughput": - out.UploadThroughput = float64(in.Float64()) - case "connectionType": - (out.ConnectionType).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(out *jwriter.Writer, in EmulateNetworkConditionsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"offline\":") - out.Bool(bool(in.Offline)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"latency\":") - out.Float64(float64(in.Latency)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"downloadThroughput\":") - out.Float64(float64(in.DownloadThroughput)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"uploadThroughput\":") - out.Float64(float64(in.UploadThroughput)) - if in.ConnectionType != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"connectionType\":") - (in.ConnectionType).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(in *jlexer.Lexer, out *DeleteCookieParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "cookieName": - out.CookieName = string(in.String()) - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(out *jwriter.Writer, in DeleteCookieParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"cookieName\":") - out.String(string(in.CookieName)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DeleteCookieParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DeleteCookieParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DeleteCookieParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DeleteCookieParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(in *jlexer.Lexer, out *Cookie) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - case "value": - out.Value = string(in.String()) - case "domain": - out.Domain = string(in.String()) - case "path": - out.Path = string(in.String()) - case "expires": - out.Expires = float64(in.Float64()) - case "size": - out.Size = int64(in.Int64()) - case "httpOnly": - out.HTTPOnly = bool(in.Bool()) - case "secure": - out.Secure = bool(in.Bool()) - case "session": - out.Session = bool(in.Bool()) - case "sameSite": - (out.SameSite).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(out *jwriter.Writer, in Cookie) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.String(string(in.Value)) - } - if in.Domain != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"domain\":") - out.String(string(in.Domain)) - } - if in.Path != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"path\":") - out.String(string(in.Path)) - } - if in.Expires != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"expires\":") - out.Float64(float64(in.Expires)) - } - if in.Size != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"size\":") - out.Int64(int64(in.Size)) - } - if in.HTTPOnly { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"httpOnly\":") - out.Bool(bool(in.HTTPOnly)) - } - if in.Secure { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"secure\":") - out.Bool(bool(in.Secure)) - } - if in.Session { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"session\":") - out.Bool(bool(in.Session)) - } - if in.SameSite != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sameSite\":") - (in.SameSite).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Cookie) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Cookie) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Cookie) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Cookie) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(in *jlexer.Lexer, out *ClearBrowserCookiesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(out *jwriter.Writer, in ClearBrowserCookiesParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(in *jlexer.Lexer, out *ClearBrowserCacheParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(out *jwriter.Writer, in ClearBrowserCacheParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ClearBrowserCacheParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ClearBrowserCacheParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(in *jlexer.Lexer, out *CanEmulateNetworkConditionsReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - out.Result = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(out *jwriter.Writer, in CanEmulateNetworkConditionsReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - out.Bool(bool(in.Result)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanEmulateNetworkConditionsReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanEmulateNetworkConditionsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanEmulateNetworkConditionsReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanEmulateNetworkConditionsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(in *jlexer.Lexer, out *CanEmulateNetworkConditionsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(out *jwriter.Writer, in CanEmulateNetworkConditionsParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanEmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanEmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanEmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanEmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(in *jlexer.Lexer, out *CanClearBrowserCookiesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - out.Result = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(out *jwriter.Writer, in CanClearBrowserCookiesReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - out.Bool(bool(in.Result)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanClearBrowserCookiesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanClearBrowserCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanClearBrowserCookiesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanClearBrowserCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(in *jlexer.Lexer, out *CanClearBrowserCookiesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(out *jwriter.Writer, in CanClearBrowserCookiesParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(in *jlexer.Lexer, out *CanClearBrowserCacheReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - out.Result = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(out *jwriter.Writer, in CanClearBrowserCacheReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - out.Bool(bool(in.Result)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanClearBrowserCacheReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanClearBrowserCacheReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanClearBrowserCacheReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanClearBrowserCacheReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(in *jlexer.Lexer, out *CanClearBrowserCacheParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(out *jwriter.Writer, in CanClearBrowserCacheParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CanClearBrowserCacheParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CanClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CanClearBrowserCacheParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CanClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(in *jlexer.Lexer, out *CachedResource) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "response": - if in.IsNull() { - in.Skip() - out.Response = nil - } else { - if out.Response == nil { - out.Response = new(Response) - } - (*out.Response).UnmarshalEasyJSON(in) - } - case "bodySize": - out.BodySize = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(out *jwriter.Writer, in CachedResource) { - out.RawByte('{') - first := true - _ = first - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Response != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - if in.Response == nil { - out.RawString("null") - } else { - (*in.Response).MarshalEasyJSON(out) - } - } - if in.BodySize != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"bodySize\":") - out.Float64(float64(in.BodySize)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CachedResource) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CachedResource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CachedResource) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(in *jlexer.Lexer, out *AddBlockedURLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(out *jwriter.Writer, in AddBlockedURLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AddBlockedURLParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddBlockedURLParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Headers) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AddBlockedURLParams) UnmarshalJSON(data []byte) error { +func (v *Headers) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddBlockedURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Headers) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(l, v) } diff --git a/cdp/network/network.go b/cdp/network/network.go index 66dc968..abe0783 100644 --- a/cdp/network/network.go +++ b/cdp/network/network.go @@ -15,7 +15,6 @@ import ( "encoding/base64" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables network tracking, network events will now be @@ -50,39 +49,7 @@ func (p EnableParams) WithMaxResourceBufferSize(maxResourceBufferSize int64) *En // Do executes Network.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkEnable, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkEnable, p, nil) } // DisableParams disables network tracking, prevents network events from @@ -98,33 +65,7 @@ func Disable() *DisableParams { // Do executes Network.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkDisable, nil, nil) } // SetUserAgentOverrideParams allows overriding user agent with the given @@ -146,39 +87,7 @@ func SetUserAgentOverride(userAgent string) *SetUserAgentOverrideParams { // Do executes Network.setUserAgentOverride against the provided context and // target handler. func (p *SetUserAgentOverrideParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetUserAgentOverride, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkSetUserAgentOverride, p, nil) } // SetExtraHTTPHeadersParams specifies whether to always send extra HTTP @@ -201,39 +110,7 @@ func SetExtraHTTPHeaders(headers *Headers) *SetExtraHTTPHeadersParams { // Do executes Network.setExtraHTTPHeaders against the provided context and // target handler. func (p *SetExtraHTTPHeadersParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetExtraHTTPHeaders, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkSetExtraHTTPHeaders, p, nil) } // GetResponseBodyParams returns content served for the given request. @@ -263,57 +140,24 @@ type GetResponseBodyReturns struct { // returns: // body - Response body. func (p *GetResponseBodyParams) Do(ctxt context.Context, h cdp.Handler) (body []byte, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetResponseBodyReturns + err = h.Execute(ctxt, cdp.CommandNetworkGetResponseBody, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkGetResponseBody, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed + // decode + var dec []byte + if res.Base64encoded { + dec, err = base64.StdEncoding.DecodeString(res.Body) + if err != nil { + return nil, err } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetResponseBodyReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - // decode - var dec []byte - if r.Base64encoded { - dec, err = base64.StdEncoding.DecodeString(r.Body) - if err != nil { - return nil, err - } - } else { - dec = []byte(r.Body) - } - - return dec, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + } else { + dec = []byte(res.Body) } - - return nil, cdp.ErrUnknownResult + return dec, nil } // AddBlockedURLParams blocks specific URL from loading. @@ -334,39 +178,7 @@ func AddBlockedURL(url string) *AddBlockedURLParams { // Do executes Network.addBlockedURL against the provided context and // target handler. func (p *AddBlockedURLParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkAddBlockedURL, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkAddBlockedURL, p, nil) } // RemoveBlockedURLParams cancels blocking of a specific URL from loading. @@ -387,39 +199,7 @@ func RemoveBlockedURL(url string) *RemoveBlockedURLParams { // Do executes Network.removeBlockedURL against the provided context and // target handler. func (p *RemoveBlockedURLParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkRemoveBlockedURL, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkRemoveBlockedURL, p, nil) } // ReplayXHRParams this method sends a new XMLHttpRequest which is identical @@ -446,39 +226,7 @@ func ReplayXHR(requestID RequestID) *ReplayXHRParams { // Do executes Network.replayXHR against the provided context and // target handler. func (p *ReplayXHRParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkReplayXHR, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkReplayXHR, p, nil) } // SetMonitoringXHREnabledParams toggles monitoring of XMLHttpRequest. If @@ -501,39 +249,7 @@ func SetMonitoringXHREnabled(enabled bool) *SetMonitoringXHREnabledParams { // Do executes Network.setMonitoringXHREnabled against the provided context and // target handler. func (p *SetMonitoringXHREnabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetMonitoringXHREnabled, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkSetMonitoringXHREnabled, p, nil) } // CanClearBrowserCacheParams tells whether clearing browser cache is @@ -556,40 +272,14 @@ type CanClearBrowserCacheReturns struct { // returns: // result - True if browser cache can be cleared. func (p *CanClearBrowserCacheParams) Do(ctxt context.Context, h cdp.Handler) (result bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkCanClearBrowserCache, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CanClearBrowserCacheReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() + var res CanClearBrowserCacheReturns + err = h.Execute(ctxt, cdp.CommandNetworkCanClearBrowserCache, nil, &res) + if err != nil { + return false, err } - return false, cdp.ErrUnknownResult + return res.Result, nil } // ClearBrowserCacheParams clears browser cache. @@ -603,33 +293,7 @@ func ClearBrowserCache() *ClearBrowserCacheParams { // Do executes Network.clearBrowserCache against the provided context and // target handler. func (p *ClearBrowserCacheParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkClearBrowserCache, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkClearBrowserCache, nil, nil) } // CanClearBrowserCookiesParams tells whether clearing browser cookies is @@ -653,40 +317,14 @@ type CanClearBrowserCookiesReturns struct { // returns: // result - True if browser cookies can be cleared. func (p *CanClearBrowserCookiesParams) Do(ctxt context.Context, h cdp.Handler) (result bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkCanClearBrowserCookies, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CanClearBrowserCookiesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() + var res CanClearBrowserCookiesReturns + err = h.Execute(ctxt, cdp.CommandNetworkCanClearBrowserCookies, nil, &res) + if err != nil { + return false, err } - return false, cdp.ErrUnknownResult + return res.Result, nil } // ClearBrowserCookiesParams clears browser cookies. @@ -700,33 +338,7 @@ func ClearBrowserCookies() *ClearBrowserCookiesParams { // Do executes Network.clearBrowserCookies against the provided context and // target handler. func (p *ClearBrowserCookiesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkClearBrowserCookies, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkClearBrowserCookies, nil, nil) } // GetCookiesParams returns all browser cookies for the current URL. @@ -762,46 +374,14 @@ type GetCookiesReturns struct { // returns: // cookies - Array of cookie objects. func (p *GetCookiesParams) Do(ctxt context.Context, h cdp.Handler) (cookies []*Cookie, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetCookiesReturns + err = h.Execute(ctxt, cdp.CommandNetworkGetCookies, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkGetCookies, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetCookiesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Cookies, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Cookies, nil } // GetAllCookiesParams returns all browser cookies. Depending on the backend @@ -825,40 +405,14 @@ type GetAllCookiesReturns struct { // returns: // cookies - Array of cookie objects. func (p *GetAllCookiesParams) Do(ctxt context.Context, h cdp.Handler) (cookies []*Cookie, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkGetAllCookies, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetAllCookiesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Cookies, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetAllCookiesReturns + err = h.Execute(ctxt, cdp.CommandNetworkGetAllCookies, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.Cookies, nil } // DeleteCookieParams deletes browser cookie with given name, domain and @@ -883,39 +437,7 @@ func DeleteCookie(cookieName string, url string) *DeleteCookieParams { // Do executes Network.deleteCookie against the provided context and // target handler. func (p *DeleteCookieParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkDeleteCookie, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkDeleteCookie, p, nil) } // SetCookieParams sets a cookie with the given cookie data; may overwrite @@ -994,46 +516,14 @@ type SetCookieReturns struct { // returns: // success - True if successfully set cookie. func (p *SetCookieParams) Do(ctxt context.Context, h cdp.Handler) (success bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SetCookieReturns + err = h.Execute(ctxt, cdp.CommandNetworkSetCookie, p, &res) if err != nil { return false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetCookie, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SetCookieReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Success, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() - } - - return false, cdp.ErrUnknownResult + return res.Success, nil } // CanEmulateNetworkConditionsParams tells whether emulation of network @@ -1057,40 +547,14 @@ type CanEmulateNetworkConditionsReturns struct { // returns: // result - True if emulation of network conditions is supported. func (p *CanEmulateNetworkConditionsParams) Do(ctxt context.Context, h cdp.Handler) (result bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkCanEmulateNetworkConditions, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CanEmulateNetworkConditionsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() + var res CanEmulateNetworkConditionsReturns + err = h.Execute(ctxt, cdp.CommandNetworkCanEmulateNetworkConditions, nil, &res) + if err != nil { + return false, err } - return false, cdp.ErrUnknownResult + return res.Result, nil } // EmulateNetworkConditionsParams activates emulation of network conditions. @@ -1127,39 +591,7 @@ func (p EmulateNetworkConditionsParams) WithConnectionType(connectionType Connec // Do executes Network.emulateNetworkConditions against the provided context and // target handler. func (p *EmulateNetworkConditionsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkEmulateNetworkConditions, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkEmulateNetworkConditions, p, nil) } // SetCacheDisabledParams toggles ignoring cache for each request. If true, @@ -1182,39 +614,7 @@ func SetCacheDisabled(cacheDisabled bool) *SetCacheDisabledParams { // Do executes Network.setCacheDisabled against the provided context and // target handler. func (p *SetCacheDisabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetCacheDisabled, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkSetCacheDisabled, p, nil) } // SetBypassServiceWorkerParams toggles ignoring of service worker for each @@ -1237,39 +637,7 @@ func SetBypassServiceWorker(bypass bool) *SetBypassServiceWorkerParams { // Do executes Network.setBypassServiceWorker against the provided context and // target handler. func (p *SetBypassServiceWorkerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetBypassServiceWorker, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkSetBypassServiceWorker, p, nil) } // SetDataSizeLimitsForTestParams for testing. @@ -1293,39 +661,7 @@ func SetDataSizeLimitsForTest(maxTotalSize int64, maxResourceSize int64) *SetDat // Do executes Network.setDataSizeLimitsForTest against the provided context and // target handler. func (p *SetDataSizeLimitsForTestParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkSetDataSizeLimitsForTest, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandNetworkSetDataSizeLimitsForTest, p, nil) } // GetCertificateParams returns the DER-encoded certificate. @@ -1354,44 +690,12 @@ type GetCertificateReturns struct { // returns: // tableNames func (p *GetCertificateParams) Do(ctxt context.Context, h cdp.Handler) (tableNames []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetCertificateReturns + err = h.Execute(ctxt, cdp.CommandNetworkGetCertificate, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandNetworkGetCertificate, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetCertificateReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.TableNames, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.TableNames, nil } diff --git a/cdp/page/easyjson.go b/cdp/page/easyjson.go index 7b01b36..64c4cde 100644 --- a/cdp/page/easyjson.go +++ b/cdp/page/easyjson.go @@ -148,7 +148,7 @@ func (v *VisualViewport) UnmarshalJSON(data []byte) error { func (v *VisualViewport) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage1(in *jlexer.Lexer, out *StopScreencastParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage1(in *jlexer.Lexer, out *LayoutViewport) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -167,6 +167,14 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage1(in *jlexer.Lexer, out *S continue } switch key { + case "pageX": + out.PageX = int64(in.Int64()) + case "pageY": + out.PageY = int64(in.Int64()) + case "clientWidth": + out.ClientWidth = int64(in.Int64()) + case "clientHeight": + out.ClientHeight = int64(in.Int64()) default: in.SkipRecursive() } @@ -177,37 +185,69 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage1(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage1(out *jwriter.Writer, in StopScreencastParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage1(out *jwriter.Writer, in LayoutViewport) { out.RawByte('{') first := true _ = first + if in.PageX != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pageX\":") + out.Int64(int64(in.PageX)) + } + if in.PageY != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"pageY\":") + out.Int64(int64(in.PageY)) + } + if in.ClientWidth != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"clientWidth\":") + out.Int64(int64(in.ClientWidth)) + } + if in.ClientHeight != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"clientHeight\":") + out.Int64(int64(in.ClientHeight)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v StopScreencastParams) MarshalJSON() ([]byte, error) { +func (v LayoutViewport) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v StopScreencastParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v LayoutViewport) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *StopScreencastParams) UnmarshalJSON(data []byte) error { +func (v *LayoutViewport) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StopScreencastParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *LayoutViewport) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage2(in *jlexer.Lexer, out *StopLoadingParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage2(in *jlexer.Lexer, out *AppManifestError) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -226,6 +266,14 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage2(in *jlexer.Lexer, out *S continue } switch key { + case "message": + out.Message = string(in.String()) + case "critical": + out.Critical = int64(in.Int64()) + case "line": + out.Line = int64(in.Int64()) + case "column": + out.Column = int64(in.Int64()) default: in.SkipRecursive() } @@ -236,634 +284,69 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage2(in *jlexer.Lexer, out *S in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage2(out *jwriter.Writer, in StopLoadingParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage2(out *jwriter.Writer, in AppManifestError) { out.RawByte('{') first := true _ = first + if in.Message != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"message\":") + out.String(string(in.Message)) + } + if in.Critical != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"critical\":") + out.Int64(int64(in.Critical)) + } + if in.Line != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"line\":") + out.Int64(int64(in.Line)) + } + if in.Column != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"column\":") + out.Int64(int64(in.Column)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v StopLoadingParams) MarshalJSON() ([]byte, error) { +func (v AppManifestError) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v StopLoadingParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v AppManifestError) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *StopLoadingParams) UnmarshalJSON(data []byte) error { +func (v *AppManifestError) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StopLoadingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *AppManifestError) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage3(in *jlexer.Lexer, out *StartScreencastParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "format": - (out.Format).UnmarshalEasyJSON(in) - case "quality": - out.Quality = int64(in.Int64()) - case "maxWidth": - out.MaxWidth = int64(in.Int64()) - case "maxHeight": - out.MaxHeight = int64(in.Int64()) - case "everyNthFrame": - out.EveryNthFrame = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage3(out *jwriter.Writer, in StartScreencastParams) { - out.RawByte('{') - first := true - _ = first - if in.Format != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"format\":") - (in.Format).MarshalEasyJSON(out) - } - if in.Quality != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"quality\":") - out.Int64(int64(in.Quality)) - } - if in.MaxWidth != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"maxWidth\":") - out.Int64(int64(in.MaxWidth)) - } - if in.MaxHeight != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"maxHeight\":") - out.Int64(int64(in.MaxHeight)) - } - if in.EveryNthFrame != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"everyNthFrame\":") - out.Int64(int64(in.EveryNthFrame)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StartScreencastParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StartScreencastParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StartScreencastParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StartScreencastParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage4(in *jlexer.Lexer, out *SetDocumentContentParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - case "html": - out.HTML = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage4(out *jwriter.Writer, in SetDocumentContentParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"html\":") - out.String(string(in.HTML)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetDocumentContentParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetDocumentContentParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetDocumentContentParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetDocumentContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage5(in *jlexer.Lexer, out *SetControlNavigationsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "enabled": - out.Enabled = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage5(out *jwriter.Writer, in SetControlNavigationsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"enabled\":") - out.Bool(bool(in.Enabled)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetControlNavigationsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetControlNavigationsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetControlNavigationsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetControlNavigationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage6(in *jlexer.Lexer, out *SetColorPickerEnabledParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "enabled": - out.Enabled = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage6(out *jwriter.Writer, in SetColorPickerEnabledParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"enabled\":") - out.Bool(bool(in.Enabled)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetColorPickerEnabledParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetColorPickerEnabledParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetColorPickerEnabledParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetColorPickerEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage7(in *jlexer.Lexer, out *SetAutoAttachToCreatedPagesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "autoAttach": - out.AutoAttach = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage7(out *jwriter.Writer, in SetAutoAttachToCreatedPagesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"autoAttach\":") - out.Bool(bool(in.AutoAttach)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetAutoAttachToCreatedPagesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetAutoAttachToCreatedPagesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetAutoAttachToCreatedPagesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetAutoAttachToCreatedPagesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage7(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage8(in *jlexer.Lexer, out *SearchInResourceReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - if in.IsNull() { - in.Skip() - out.Result = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Result = make([]*debugger.SearchMatch, 0, 8) - } else { - out.Result = []*debugger.SearchMatch{} - } - for !in.IsDelim(']') { - var v1 *debugger.SearchMatch - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(debugger.SearchMatch) - } - (*v1).UnmarshalEasyJSON(in) - } - out.Result = append(out.Result, v1) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage8(out *jwriter.Writer, in SearchInResourceReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Result) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Result { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SearchInResourceReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SearchInResourceReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SearchInResourceReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SearchInResourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage9(in *jlexer.Lexer, out *SearchInResourceParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - case "url": - out.URL = string(in.String()) - case "query": - out.Query = string(in.String()) - case "caseSensitive": - out.CaseSensitive = bool(in.Bool()) - case "isRegex": - out.IsRegex = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(out *jwriter.Writer, in SearchInResourceParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"query\":") - out.String(string(in.Query)) - if in.CaseSensitive { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"caseSensitive\":") - out.Bool(bool(in.CaseSensitive)) - } - if in.IsRegex { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"isRegex\":") - out.Bool(bool(in.IsRegex)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SearchInResourceParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SearchInResourceParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SearchInResourceParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SearchInResourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(in *jlexer.Lexer, out *ScreencastFrameMetadata) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage3(in *jlexer.Lexer, out *ScreencastFrameMetadata) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -906,7 +389,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(out *jwriter.Writer, in ScreencastFrameMetadata) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage3(out *jwriter.Writer, in ScreencastFrameMetadata) { out.RawByte('{') first := true _ = first @@ -972,374 +455,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v ScreencastFrameMetadata) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ScreencastFrameMetadata) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ScreencastFrameMetadata) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ScreencastFrameMetadata) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage11(in *jlexer.Lexer, out *ScreencastFrameAckParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "sessionId": - out.SessionID = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage11(out *jwriter.Writer, in ScreencastFrameAckParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sessionId\":") - out.Int64(int64(in.SessionID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ScreencastFrameAckParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ScreencastFrameAckParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ScreencastFrameAckParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ScreencastFrameAckParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage12(in *jlexer.Lexer, out *RequestAppBannerParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage12(out *jwriter.Writer, in RequestAppBannerParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestAppBannerParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestAppBannerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestAppBannerParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestAppBannerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage13(in *jlexer.Lexer, out *RemoveScriptToEvaluateOnLoadParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "identifier": - out.Identifier = ScriptIdentifier(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage13(out *jwriter.Writer, in RemoveScriptToEvaluateOnLoadParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"identifier\":") - out.String(string(in.Identifier)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveScriptToEvaluateOnLoadParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveScriptToEvaluateOnLoadParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveScriptToEvaluateOnLoadParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveScriptToEvaluateOnLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage14(in *jlexer.Lexer, out *ReloadParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "ignoreCache": - out.IgnoreCache = bool(in.Bool()) - case "scriptToEvaluateOnLoad": - out.ScriptToEvaluateOnLoad = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage14(out *jwriter.Writer, in ReloadParams) { - out.RawByte('{') - first := true - _ = first - if in.IgnoreCache { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"ignoreCache\":") - out.Bool(bool(in.IgnoreCache)) - } - if in.ScriptToEvaluateOnLoad != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptToEvaluateOnLoad\":") - out.String(string(in.ScriptToEvaluateOnLoad)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ReloadParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ReloadParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ReloadParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ReloadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage14(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage15(in *jlexer.Lexer, out *ProcessNavigationParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "response": - (out.Response).UnmarshalEasyJSON(in) - case "navigationId": - out.NavigationID = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage15(out *jwriter.Writer, in ProcessNavigationParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"response\":") - (in.Response).MarshalEasyJSON(out) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"navigationId\":") - out.Int64(int64(in.NavigationID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ProcessNavigationParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage15(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ProcessNavigationParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage15(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ProcessNavigationParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage15(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ProcessNavigationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage15(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(in *jlexer.Lexer, out *NavigationEntry) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage4(in *jlexer.Lexer, out *NavigationEntry) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1374,7 +510,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(out *jwriter.Writer, in NavigationEntry) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage4(out *jwriter.Writer, in NavigationEntry) { out.RawByte('{') first := true _ = first @@ -1408,1228 +544,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v NavigationEntry) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v NavigationEntry) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *NavigationEntry) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *NavigationEntry) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage17(in *jlexer.Lexer, out *NavigateToHistoryEntryParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "entryId": - out.EntryID = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(out *jwriter.Writer, in NavigateToHistoryEntryParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"entryId\":") - out.Int64(int64(in.EntryID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NavigateToHistoryEntryParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NavigateToHistoryEntryParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NavigateToHistoryEntryParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NavigateToHistoryEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage18(in *jlexer.Lexer, out *NavigateReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage18(out *jwriter.Writer, in NavigateReturns) { - out.RawByte('{') - first := true - _ = first - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NavigateReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NavigateReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NavigateReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NavigateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage19(in *jlexer.Lexer, out *NavigateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage19(out *jwriter.Writer, in NavigateParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NavigateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NavigateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NavigateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NavigateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage20(in *jlexer.Lexer, out *LayoutViewport) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "pageX": - out.PageX = int64(in.Int64()) - case "pageY": - out.PageY = int64(in.Int64()) - case "clientWidth": - out.ClientWidth = int64(in.Int64()) - case "clientHeight": - out.ClientHeight = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage20(out *jwriter.Writer, in LayoutViewport) { - out.RawByte('{') - first := true - _ = first - if in.PageX != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pageX\":") - out.Int64(int64(in.PageX)) - } - if in.PageY != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"pageY\":") - out.Int64(int64(in.PageY)) - } - if in.ClientWidth != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"clientWidth\":") - out.Int64(int64(in.ClientWidth)) - } - if in.ClientHeight != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"clientHeight\":") - out.Int64(int64(in.ClientHeight)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v LayoutViewport) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage20(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v LayoutViewport) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage20(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *LayoutViewport) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage20(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *LayoutViewport) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage20(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage21(in *jlexer.Lexer, out *HandleJavaScriptDialogParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "accept": - out.Accept = bool(in.Bool()) - case "promptText": - out.PromptText = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(out *jwriter.Writer, in HandleJavaScriptDialogParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"accept\":") - out.Bool(bool(in.Accept)) - if in.PromptText != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"promptText\":") - out.String(string(in.PromptText)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v HandleJavaScriptDialogParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v HandleJavaScriptDialogParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *HandleJavaScriptDialogParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HandleJavaScriptDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage22(in *jlexer.Lexer, out *GetResourceTreeReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameTree": - if in.IsNull() { - in.Skip() - out.FrameTree = nil - } else { - if out.FrameTree == nil { - out.FrameTree = new(FrameResourceTree) - } - (*out.FrameTree).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage22(out *jwriter.Writer, in GetResourceTreeReturns) { - out.RawByte('{') - first := true - _ = first - if in.FrameTree != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameTree\":") - if in.FrameTree == nil { - out.RawString("null") - } else { - (*in.FrameTree).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetResourceTreeReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetResourceTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetResourceTreeReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetResourceTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage23(in *jlexer.Lexer, out *GetResourceTreeParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage23(out *jwriter.Writer, in GetResourceTreeParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetResourceTreeParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage23(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetResourceTreeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage23(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetResourceTreeParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage23(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetResourceTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage23(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage24(in *jlexer.Lexer, out *GetResourceContentReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "content": - out.Content = string(in.String()) - case "base64Encoded": - out.Base64encoded = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage24(out *jwriter.Writer, in GetResourceContentReturns) { - out.RawByte('{') - first := true - _ = first - if in.Content != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"content\":") - out.String(string(in.Content)) - } - if in.Base64encoded { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"base64Encoded\":") - out.Bool(bool(in.Base64encoded)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetResourceContentReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage24(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetResourceContentReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage24(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetResourceContentReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage24(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetResourceContentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage24(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage25(in *jlexer.Lexer, out *GetResourceContentParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage25(out *jwriter.Writer, in GetResourceContentParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetResourceContentParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetResourceContentParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetResourceContentParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetResourceContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage26(in *jlexer.Lexer, out *GetNavigationHistoryReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "currentIndex": - out.CurrentIndex = int64(in.Int64()) - case "entries": - if in.IsNull() { - in.Skip() - out.Entries = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Entries = make([]*NavigationEntry, 0, 8) - } else { - out.Entries = []*NavigationEntry{} - } - for !in.IsDelim(']') { - var v4 *NavigationEntry - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(NavigationEntry) - } - (*v4).UnmarshalEasyJSON(in) - } - out.Entries = append(out.Entries, v4) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage26(out *jwriter.Writer, in GetNavigationHistoryReturns) { - out.RawByte('{') - first := true - _ = first - if in.CurrentIndex != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"currentIndex\":") - out.Int64(int64(in.CurrentIndex)) - } - if len(in.Entries) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"entries\":") - if in.Entries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v5, v6 := range in.Entries { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetNavigationHistoryReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage26(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetNavigationHistoryReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage26(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetNavigationHistoryReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage26(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetNavigationHistoryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage26(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage27(in *jlexer.Lexer, out *GetNavigationHistoryParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage27(out *jwriter.Writer, in GetNavigationHistoryParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetNavigationHistoryParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage27(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetNavigationHistoryParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage27(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetNavigationHistoryParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage27(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetNavigationHistoryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage27(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage28(in *jlexer.Lexer, out *GetLayoutMetricsReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "layoutViewport": - if in.IsNull() { - in.Skip() - out.LayoutViewport = nil - } else { - if out.LayoutViewport == nil { - out.LayoutViewport = new(LayoutViewport) - } - (*out.LayoutViewport).UnmarshalEasyJSON(in) - } - case "visualViewport": - if in.IsNull() { - in.Skip() - out.VisualViewport = nil - } else { - if out.VisualViewport == nil { - out.VisualViewport = new(VisualViewport) - } - (*out.VisualViewport).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage28(out *jwriter.Writer, in GetLayoutMetricsReturns) { - out.RawByte('{') - first := true - _ = first - if in.LayoutViewport != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"layoutViewport\":") - if in.LayoutViewport == nil { - out.RawString("null") - } else { - (*in.LayoutViewport).MarshalEasyJSON(out) - } - } - if in.VisualViewport != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"visualViewport\":") - if in.VisualViewport == nil { - out.RawString("null") - } else { - (*in.VisualViewport).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetLayoutMetricsReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage28(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetLayoutMetricsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage28(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetLayoutMetricsReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage28(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetLayoutMetricsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage28(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage29(in *jlexer.Lexer, out *GetLayoutMetricsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage29(out *jwriter.Writer, in GetLayoutMetricsParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetLayoutMetricsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage29(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetLayoutMetricsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage29(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetLayoutMetricsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage29(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetLayoutMetricsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage29(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage30(in *jlexer.Lexer, out *GetAppManifestReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - case "errors": - if in.IsNull() { - in.Skip() - out.Errors = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Errors = make([]*AppManifestError, 0, 8) - } else { - out.Errors = []*AppManifestError{} - } - for !in.IsDelim(']') { - var v7 *AppManifestError - if in.IsNull() { - in.Skip() - v7 = nil - } else { - if v7 == nil { - v7 = new(AppManifestError) - } - (*v7).UnmarshalEasyJSON(in) - } - out.Errors = append(out.Errors, v7) - in.WantComma() - } - in.Delim(']') - } - case "data": - out.Data = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage30(out *jwriter.Writer, in GetAppManifestReturns) { - out.RawByte('{') - first := true - _ = first - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if len(in.Errors) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"errors\":") - if in.Errors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Errors { - if v8 > 0 { - out.RawByte(',') - } - if v9 == nil { - out.RawString("null") - } else { - (*v9).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Data != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"data\":") - out.String(string(in.Data)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetAppManifestReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage30(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetAppManifestReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage30(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetAppManifestReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage30(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetAppManifestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage30(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage31(in *jlexer.Lexer, out *GetAppManifestParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage31(out *jwriter.Writer, in GetAppManifestParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetAppManifestParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage31(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetAppManifestParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage31(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetAppManifestParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage31(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetAppManifestParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage31(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(in *jlexer.Lexer, out *FrameResourceTree) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage5(in *jlexer.Lexer, out *FrameResourceTree) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2670,17 +605,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(in *jlexer.Lexer, out * out.ChildFrames = []*FrameResourceTree{} } for !in.IsDelim(']') { - var v10 *FrameResourceTree + var v1 *FrameResourceTree if in.IsNull() { in.Skip() - v10 = nil + v1 = nil } else { - if v10 == nil { - v10 = new(FrameResourceTree) + if v1 == nil { + v1 = new(FrameResourceTree) } - (*v10).UnmarshalEasyJSON(in) + (*v1).UnmarshalEasyJSON(in) } - out.ChildFrames = append(out.ChildFrames, v10) + out.ChildFrames = append(out.ChildFrames, v1) in.WantComma() } in.Delim(']') @@ -2697,17 +632,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(in *jlexer.Lexer, out * out.Resources = []*FrameResource{} } for !in.IsDelim(']') { - var v11 *FrameResource + var v2 *FrameResource if in.IsNull() { in.Skip() - v11 = nil + v2 = nil } else { - if v11 == nil { - v11 = new(FrameResource) + if v2 == nil { + v2 = new(FrameResource) } - (*v11).UnmarshalEasyJSON(in) + (*v2).UnmarshalEasyJSON(in) } - out.Resources = append(out.Resources, v11) + out.Resources = append(out.Resources, v2) in.WantComma() } in.Delim(']') @@ -2722,7 +657,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(out *jwriter.Writer, in FrameResourceTree) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage5(out *jwriter.Writer, in FrameResourceTree) { out.RawByte('{') first := true _ = first @@ -2748,14 +683,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v12, v13 := range in.ChildFrames { - if v12 > 0 { + for v3, v4 := range in.ChildFrames { + if v3 > 0 { out.RawByte(',') } - if v13 == nil { + if v4 == nil { out.RawString("null") } else { - (*v13).MarshalEasyJSON(out) + (*v4).MarshalEasyJSON(out) } } out.RawByte(']') @@ -2771,14 +706,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v14, v15 := range in.Resources { - if v14 > 0 { + for v5, v6 := range in.Resources { + if v5 > 0 { out.RawByte(',') } - if v15 == nil { + if v6 == nil { out.RawString("null") } else { - (*v15).MarshalEasyJSON(out) + (*v6).MarshalEasyJSON(out) } } out.RawByte(']') @@ -2790,27 +725,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v FrameResourceTree) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v FrameResourceTree) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *FrameResourceTree) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *FrameResourceTree) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage33(in *jlexer.Lexer, out *FrameResource) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage6(in *jlexer.Lexer, out *FrameResource) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2853,7 +788,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage33(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in FrameResource) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage6(out *jwriter.Writer, in FrameResource) { out.RawByte('{') first := true _ = first @@ -2919,27 +854,2970 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v FrameResource) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v FrameResource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *FrameResource) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *FrameResource) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage7(in *jlexer.Lexer, out *GetLayoutMetricsReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "layoutViewport": + if in.IsNull() { + in.Skip() + out.LayoutViewport = nil + } else { + if out.LayoutViewport == nil { + out.LayoutViewport = new(LayoutViewport) + } + (*out.LayoutViewport).UnmarshalEasyJSON(in) + } + case "visualViewport": + if in.IsNull() { + in.Skip() + out.VisualViewport = nil + } else { + if out.VisualViewport == nil { + out.VisualViewport = new(VisualViewport) + } + (*out.VisualViewport).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage7(out *jwriter.Writer, in GetLayoutMetricsReturns) { + out.RawByte('{') + first := true + _ = first + if in.LayoutViewport != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"layoutViewport\":") + if in.LayoutViewport == nil { + out.RawString("null") + } else { + (*in.LayoutViewport).MarshalEasyJSON(out) + } + } + if in.VisualViewport != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"visualViewport\":") + if in.VisualViewport == nil { + out.RawString("null") + } else { + (*in.VisualViewport).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetLayoutMetricsReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetLayoutMetricsReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetLayoutMetricsReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetLayoutMetricsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage8(in *jlexer.Lexer, out *GetLayoutMetricsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage8(out *jwriter.Writer, in GetLayoutMetricsParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetLayoutMetricsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetLayoutMetricsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetLayoutMetricsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetLayoutMetricsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage9(in *jlexer.Lexer, out *ProcessNavigationParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "response": + (out.Response).UnmarshalEasyJSON(in) + case "navigationId": + out.NavigationID = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(out *jwriter.Writer, in ProcessNavigationParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"response\":") + (in.Response).MarshalEasyJSON(out) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"navigationId\":") + out.Int64(int64(in.NavigationID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ProcessNavigationParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ProcessNavigationParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ProcessNavigationParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ProcessNavigationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(in *jlexer.Lexer, out *SetControlNavigationsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "enabled": + out.Enabled = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(out *jwriter.Writer, in SetControlNavigationsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enabled\":") + out.Bool(bool(in.Enabled)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetControlNavigationsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetControlNavigationsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetControlNavigationsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetControlNavigationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage11(in *jlexer.Lexer, out *RequestAppBannerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage11(out *jwriter.Writer, in RequestAppBannerParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RequestAppBannerParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RequestAppBannerParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RequestAppBannerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RequestAppBannerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage12(in *jlexer.Lexer, out *GetAppManifestReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + case "errors": + if in.IsNull() { + in.Skip() + out.Errors = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Errors = make([]*AppManifestError, 0, 8) + } else { + out.Errors = []*AppManifestError{} + } + for !in.IsDelim(']') { + var v7 *AppManifestError + if in.IsNull() { + in.Skip() + v7 = nil + } else { + if v7 == nil { + v7 = new(AppManifestError) + } + (*v7).UnmarshalEasyJSON(in) + } + out.Errors = append(out.Errors, v7) + in.WantComma() + } + in.Delim(']') + } + case "data": + out.Data = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage12(out *jwriter.Writer, in GetAppManifestReturns) { + out.RawByte('{') + first := true + _ = first + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if len(in.Errors) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"errors\":") + if in.Errors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.Errors { + if v8 > 0 { + out.RawByte(',') + } + if v9 == nil { + out.RawString("null") + } else { + (*v9).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Data != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"data\":") + out.String(string(in.Data)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAppManifestReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAppManifestReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAppManifestReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAppManifestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage13(in *jlexer.Lexer, out *GetAppManifestParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage13(out *jwriter.Writer, in GetAppManifestParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetAppManifestParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetAppManifestParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetAppManifestParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetAppManifestParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage14(in *jlexer.Lexer, out *ConfigureOverlayParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "suspended": + out.Suspended = bool(in.Bool()) + case "message": + out.Message = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage14(out *jwriter.Writer, in ConfigureOverlayParams) { + out.RawByte('{') + first := true + _ = first + if in.Suspended { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"suspended\":") + out.Bool(bool(in.Suspended)) + } + if in.Message != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"message\":") + out.String(string(in.Message)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ConfigureOverlayParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ConfigureOverlayParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ConfigureOverlayParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ConfigureOverlayParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage15(in *jlexer.Lexer, out *SetColorPickerEnabledParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "enabled": + out.Enabled = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage15(out *jwriter.Writer, in SetColorPickerEnabledParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enabled\":") + out.Bool(bool(in.Enabled)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetColorPickerEnabledParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetColorPickerEnabledParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetColorPickerEnabledParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetColorPickerEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(in *jlexer.Lexer, out *HandleJavaScriptDialogParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "accept": + out.Accept = bool(in.Bool()) + case "promptText": + out.PromptText = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(out *jwriter.Writer, in HandleJavaScriptDialogParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"accept\":") + out.Bool(bool(in.Accept)) + if in.PromptText != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"promptText\":") + out.String(string(in.PromptText)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v HandleJavaScriptDialogParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v HandleJavaScriptDialogParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *HandleJavaScriptDialogParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *HandleJavaScriptDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage16(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage17(in *jlexer.Lexer, out *ScreencastFrameAckParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "sessionId": + out.SessionID = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(out *jwriter.Writer, in ScreencastFrameAckParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sessionId\":") + out.Int64(int64(in.SessionID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ScreencastFrameAckParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ScreencastFrameAckParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ScreencastFrameAckParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ScreencastFrameAckParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage18(in *jlexer.Lexer, out *StopScreencastParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage18(out *jwriter.Writer, in StopScreencastParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StopScreencastParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StopScreencastParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StopScreencastParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StopScreencastParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage19(in *jlexer.Lexer, out *StartScreencastParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "format": + (out.Format).UnmarshalEasyJSON(in) + case "quality": + out.Quality = int64(in.Int64()) + case "maxWidth": + out.MaxWidth = int64(in.Int64()) + case "maxHeight": + out.MaxHeight = int64(in.Int64()) + case "everyNthFrame": + out.EveryNthFrame = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage19(out *jwriter.Writer, in StartScreencastParams) { + out.RawByte('{') + first := true + _ = first + if in.Format != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"format\":") + (in.Format).MarshalEasyJSON(out) + } + if in.Quality != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"quality\":") + out.Int64(int64(in.Quality)) + } + if in.MaxWidth != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"maxWidth\":") + out.Int64(int64(in.MaxWidth)) + } + if in.MaxHeight != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"maxHeight\":") + out.Int64(int64(in.MaxHeight)) + } + if in.EveryNthFrame != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"everyNthFrame\":") + out.Int64(int64(in.EveryNthFrame)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StartScreencastParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StartScreencastParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StartScreencastParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StartScreencastParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage19(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage20(in *jlexer.Lexer, out *CaptureScreenshotReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "data": + out.Data = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage20(out *jwriter.Writer, in CaptureScreenshotReturns) { + out.RawByte('{') + first := true + _ = first + if in.Data != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"data\":") + out.String(string(in.Data)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CaptureScreenshotReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CaptureScreenshotReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CaptureScreenshotReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CaptureScreenshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage21(in *jlexer.Lexer, out *CaptureScreenshotParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "format": + (out.Format).UnmarshalEasyJSON(in) + case "quality": + out.Quality = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(out *jwriter.Writer, in CaptureScreenshotParams) { + out.RawByte('{') + first := true + _ = first + if in.Format != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"format\":") + (in.Format).MarshalEasyJSON(out) + } + if in.Quality != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"quality\":") + out.Int64(int64(in.Quality)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CaptureScreenshotParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CaptureScreenshotParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CaptureScreenshotParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CaptureScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage22(in *jlexer.Lexer, out *SetDocumentContentParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "html": + out.HTML = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage22(out *jwriter.Writer, in SetDocumentContentParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"html\":") + out.String(string(in.HTML)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetDocumentContentParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetDocumentContentParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetDocumentContentParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetDocumentContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage22(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage23(in *jlexer.Lexer, out *SearchInResourceReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + if in.IsNull() { + in.Skip() + out.Result = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Result = make([]*debugger.SearchMatch, 0, 8) + } else { + out.Result = []*debugger.SearchMatch{} + } + for !in.IsDelim(']') { + var v10 *debugger.SearchMatch + if in.IsNull() { + in.Skip() + v10 = nil + } else { + if v10 == nil { + v10 = new(debugger.SearchMatch) + } + (*v10).UnmarshalEasyJSON(in) + } + out.Result = append(out.Result, v10) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage23(out *jwriter.Writer, in SearchInResourceReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Result) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.Result { + 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 SearchInResourceReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage23(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SearchInResourceReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage23(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SearchInResourceReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage23(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SearchInResourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage23(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage24(in *jlexer.Lexer, out *SearchInResourceParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "url": + out.URL = string(in.String()) + case "query": + out.Query = string(in.String()) + case "caseSensitive": + out.CaseSensitive = bool(in.Bool()) + case "isRegex": + out.IsRegex = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage24(out *jwriter.Writer, in SearchInResourceParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"query\":") + out.String(string(in.Query)) + if in.CaseSensitive { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"caseSensitive\":") + out.Bool(bool(in.CaseSensitive)) + } + if in.IsRegex { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isRegex\":") + out.Bool(bool(in.IsRegex)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SearchInResourceParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage24(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SearchInResourceParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage24(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SearchInResourceParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage24(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SearchInResourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage24(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage25(in *jlexer.Lexer, out *GetResourceContentReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "content": + out.Content = string(in.String()) + case "base64Encoded": + out.Base64encoded = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage25(out *jwriter.Writer, in GetResourceContentReturns) { + out.RawByte('{') + first := true + _ = first + if in.Content != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"content\":") + out.String(string(in.Content)) + } + if in.Base64encoded { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"base64Encoded\":") + out.Bool(bool(in.Base64encoded)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetResourceContentReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage25(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetResourceContentReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage25(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetResourceContentReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage25(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetResourceContentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage25(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage26(in *jlexer.Lexer, out *GetResourceContentParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage26(out *jwriter.Writer, in GetResourceContentParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetResourceContentParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage26(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetResourceContentParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage26(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetResourceContentParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage26(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetResourceContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage26(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage27(in *jlexer.Lexer, out *GetResourceTreeReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameTree": + if in.IsNull() { + in.Skip() + out.FrameTree = nil + } else { + if out.FrameTree == nil { + out.FrameTree = new(FrameResourceTree) + } + (*out.FrameTree).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage27(out *jwriter.Writer, in GetResourceTreeReturns) { + out.RawByte('{') + first := true + _ = first + if in.FrameTree != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameTree\":") + if in.FrameTree == nil { + out.RawString("null") + } else { + (*in.FrameTree).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetResourceTreeReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage27(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetResourceTreeReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage27(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetResourceTreeReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage27(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetResourceTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage27(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage28(in *jlexer.Lexer, out *GetResourceTreeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage28(out *jwriter.Writer, in GetResourceTreeParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetResourceTreeParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage28(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetResourceTreeParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage28(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetResourceTreeParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage28(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetResourceTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage28(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage29(in *jlexer.Lexer, out *NavigateToHistoryEntryParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "entryId": + out.EntryID = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage29(out *jwriter.Writer, in NavigateToHistoryEntryParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"entryId\":") + out.Int64(int64(in.EntryID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v NavigateToHistoryEntryParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage29(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v NavigateToHistoryEntryParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage29(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *NavigateToHistoryEntryParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage29(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *NavigateToHistoryEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage29(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage30(in *jlexer.Lexer, out *GetNavigationHistoryReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "currentIndex": + out.CurrentIndex = int64(in.Int64()) + case "entries": + if in.IsNull() { + in.Skip() + out.Entries = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Entries = make([]*NavigationEntry, 0, 8) + } else { + out.Entries = []*NavigationEntry{} + } + for !in.IsDelim(']') { + var v13 *NavigationEntry + if in.IsNull() { + in.Skip() + v13 = nil + } else { + if v13 == nil { + v13 = new(NavigationEntry) + } + (*v13).UnmarshalEasyJSON(in) + } + out.Entries = append(out.Entries, v13) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage30(out *jwriter.Writer, in GetNavigationHistoryReturns) { + out.RawByte('{') + first := true + _ = first + if in.CurrentIndex != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"currentIndex\":") + out.Int64(int64(in.CurrentIndex)) + } + if len(in.Entries) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"entries\":") + if in.Entries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.Entries { + if v14 > 0 { + out.RawByte(',') + } + if v15 == nil { + out.RawString("null") + } else { + (*v15).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetNavigationHistoryReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage30(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetNavigationHistoryReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage30(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetNavigationHistoryReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage30(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetNavigationHistoryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage30(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage31(in *jlexer.Lexer, out *GetNavigationHistoryParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage31(out *jwriter.Writer, in GetNavigationHistoryParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetNavigationHistoryParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage31(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetNavigationHistoryParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage31(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetNavigationHistoryParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage31(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetNavigationHistoryParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage31(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(in *jlexer.Lexer, out *StopLoadingParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(out *jwriter.Writer, in StopLoadingParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StopLoadingParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StopLoadingParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage32(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StopLoadingParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StopLoadingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage32(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage33(in *jlexer.Lexer, out *NavigateReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in NavigateReturns) { + out.RawByte('{') + first := true + _ = first + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v NavigateReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v NavigateReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *NavigateReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage33(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FrameResource) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *NavigateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage33(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(in *jlexer.Lexer, out *EventScreencastVisibilityChanged) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(in *jlexer.Lexer, out *NavigateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(out *jwriter.Writer, in NavigateParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v NavigateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v NavigateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *NavigateParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *NavigateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(in *jlexer.Lexer, out *ReloadParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "ignoreCache": + out.IgnoreCache = bool(in.Bool()) + case "scriptToEvaluateOnLoad": + out.ScriptToEvaluateOnLoad = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(out *jwriter.Writer, in ReloadParams) { + out.RawByte('{') + first := true + _ = first + if in.IgnoreCache { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"ignoreCache\":") + out.Bool(bool(in.IgnoreCache)) + } + if in.ScriptToEvaluateOnLoad != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptToEvaluateOnLoad\":") + out.String(string(in.ScriptToEvaluateOnLoad)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ReloadParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ReloadParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ReloadParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ReloadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out *SetAutoAttachToCreatedPagesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "autoAttach": + out.AutoAttach = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in SetAutoAttachToCreatedPagesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"autoAttach\":") + out.Bool(bool(in.AutoAttach)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetAutoAttachToCreatedPagesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetAutoAttachToCreatedPagesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetAutoAttachToCreatedPagesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetAutoAttachToCreatedPagesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(in *jlexer.Lexer, out *RemoveScriptToEvaluateOnLoadParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "identifier": + out.Identifier = ScriptIdentifier(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in RemoveScriptToEvaluateOnLoadParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"identifier\":") + out.String(string(in.Identifier)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RemoveScriptToEvaluateOnLoadParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RemoveScriptToEvaluateOnLoadParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RemoveScriptToEvaluateOnLoadParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RemoveScriptToEvaluateOnLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(in *jlexer.Lexer, out *AddScriptToEvaluateOnLoadReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "identifier": + out.Identifier = ScriptIdentifier(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in AddScriptToEvaluateOnLoadReturns) { + out.RawByte('{') + first := true + _ = first + if in.Identifier != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"identifier\":") + out.String(string(in.Identifier)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddScriptToEvaluateOnLoadReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddScriptToEvaluateOnLoadReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddScriptToEvaluateOnLoadReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddScriptToEvaluateOnLoadReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(in *jlexer.Lexer, out *AddScriptToEvaluateOnLoadParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scriptSource": + out.ScriptSource = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in AddScriptToEvaluateOnLoadParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptSource\":") + out.String(string(in.ScriptSource)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AddScriptToEvaluateOnLoadParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AddScriptToEvaluateOnLoadParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AddScriptToEvaluateOnLoadParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AddScriptToEvaluateOnLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(in *jlexer.Lexer, out *EventNavigationRequested) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "isInMainFrame": + out.IsInMainFrame = bool(in.Bool()) + case "isRedirect": + out.IsRedirect = bool(in.Bool()) + case "navigationId": + out.NavigationID = int64(in.Int64()) + case "url": + out.URL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(out *jwriter.Writer, in EventNavigationRequested) { + out.RawByte('{') + first := true + _ = first + if in.IsInMainFrame { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isInMainFrame\":") + out.Bool(bool(in.IsInMainFrame)) + } + if in.IsRedirect { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"isRedirect\":") + out.Bool(bool(in.IsRedirect)) + } + if in.NavigationID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"navigationId\":") + out.Int64(int64(in.NavigationID)) + } + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventNavigationRequested) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventNavigationRequested) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventNavigationRequested) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventNavigationRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(in *jlexer.Lexer, out *EventInterstitialHidden) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in EventInterstitialHidden) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventInterstitialHidden) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventInterstitialHidden) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventInterstitialHidden) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventInterstitialHidden) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(in *jlexer.Lexer, out *EventInterstitialShown) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in EventInterstitialShown) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventInterstitialShown) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventInterstitialShown) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventInterstitialShown) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventInterstitialShown) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out *EventColorPicked) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "color": + if in.IsNull() { + in.Skip() + out.Color = nil + } else { + if out.Color == nil { + out.Color = new(cdp.RGBA) + } + (*out.Color).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in EventColorPicked) { + out.RawByte('{') + first := true + _ = first + if in.Color != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"color\":") + if in.Color == nil { + out.RawString("null") + } else { + (*in.Color).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventColorPicked) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventColorPicked) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventColorPicked) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventColorPicked) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(in *jlexer.Lexer, out *EventScreencastVisibilityChanged) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2970,7 +3848,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(out *jwriter.Writer, in EventScreencastVisibilityChanged) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(out *jwriter.Writer, in EventScreencastVisibilityChanged) { out.RawByte('{') first := true _ = first @@ -2988,27 +3866,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventScreencastVisibilityChanged) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventScreencastVisibilityChanged) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventScreencastVisibilityChanged) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventScreencastVisibilityChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage34(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(in *jlexer.Lexer, out *EventScreencastFrame) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(in *jlexer.Lexer, out *EventScreencastFrame) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3051,7 +3929,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(out *jwriter.Writer, in EventScreencastFrame) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in EventScreencastFrame) { out.RawByte('{') first := true _ = first @@ -3089,27 +3967,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventScreencastFrame) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventScreencastFrame) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventScreencastFrame) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventScreencastFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage35(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out *EventNavigationRequested) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(in *jlexer.Lexer, out *EventJavascriptDialogClosed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3128,14 +4006,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out * continue } switch key { - case "isInMainFrame": - out.IsInMainFrame = bool(in.Bool()) - case "isRedirect": - out.IsRedirect = bool(in.Bool()) - case "navigationId": - out.NavigationID = int64(in.Int64()) - case "url": - out.URL = string(in.String()) + case "result": + out.Result = bool(in.Bool()) default: in.SkipRecursive() } @@ -3146,138 +4018,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in EventNavigationRequested) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in EventJavascriptDialogClosed) { out.RawByte('{') first := true _ = first - if in.IsInMainFrame { + if in.Result { if !first { out.RawByte(',') } first = false - out.RawString("\"isInMainFrame\":") - out.Bool(bool(in.IsInMainFrame)) - } - if in.IsRedirect { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"isRedirect\":") - out.Bool(bool(in.IsRedirect)) - } - if in.NavigationID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"navigationId\":") - out.Int64(int64(in.NavigationID)) - } - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) + out.RawString("\"result\":") + out.Bool(bool(in.Result)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventNavigationRequested) MarshalJSON() ([]byte, error) { +func (v EventJavascriptDialogClosed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventNavigationRequested) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(w, v) +func (v EventJavascriptDialogClosed) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventNavigationRequested) UnmarshalJSON(data []byte) error { +func (v *EventJavascriptDialogClosed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventNavigationRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage36(l, v) +func (v *EventJavascriptDialogClosed) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(in *jlexer.Lexer, out *EventLoadEventFired) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in EventLoadEventFired) { - out.RawByte('{') - first := true - _ = first - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventLoadEventFired) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventLoadEventFired) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventLoadEventFired) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventLoadEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage37(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(in *jlexer.Lexer, out *EventJavascriptDialogOpening) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(in *jlexer.Lexer, out *EventJavascriptDialogOpening) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3310,7 +4089,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in EventJavascriptDialogOpening) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in EventJavascriptDialogOpening) { out.RawByte('{') first := true _ = first @@ -3336,96 +4115,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventJavascriptDialogOpening) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventJavascriptDialogOpening) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventJavascriptDialogOpening) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventJavascriptDialogOpening) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage38(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(in *jlexer.Lexer, out *EventJavascriptDialogClosed) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - out.Result = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in EventJavascriptDialogClosed) { - out.RawByte('{') - first := true - _ = first - if in.Result { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - out.Bool(bool(in.Result)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventJavascriptDialogClosed) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventJavascriptDialogClosed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventJavascriptDialogClosed) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventJavascriptDialogClosed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage39(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(in *jlexer.Lexer, out *EventInterstitialShown) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(in *jlexer.Lexer, out *EventFrameResized) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3454,7 +4164,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in EventInterstitialShown) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in EventFrameResized) { out.RawByte('{') first := true _ = first @@ -3462,88 +4172,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v EventInterstitialShown) MarshalJSON() ([]byte, error) { +func (v EventFrameResized) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventInterstitialShown) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(w, v) +func (v EventFrameResized) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventInterstitialShown) UnmarshalJSON(data []byte) error { +func (v *EventFrameResized) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventInterstitialShown) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage40(l, v) +func (v *EventFrameResized) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(in *jlexer.Lexer, out *EventInterstitialHidden) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(out *jwriter.Writer, in EventInterstitialHidden) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventInterstitialHidden) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventInterstitialHidden) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage41(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventInterstitialHidden) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventInterstitialHidden) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage41(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(in *jlexer.Lexer, out *EventFrameStoppedLoading) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(in *jlexer.Lexer, out *EventFrameClearedScheduledNavigation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3574,7 +4225,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(out *jwriter.Writer, in EventFrameStoppedLoading) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in EventFrameClearedScheduledNavigation) { out.RawByte('{') first := true _ = first @@ -3590,98 +4241,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(out *jwriter.Writer, in } // MarshalJSON supports json.Marshaler interface -func (v EventFrameStoppedLoading) MarshalJSON() ([]byte, error) { +func (v EventFrameClearedScheduledNavigation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventFrameStoppedLoading) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage42(w, v) +func (v EventFrameClearedScheduledNavigation) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventFrameStoppedLoading) UnmarshalJSON(data []byte) error { +func (v *EventFrameClearedScheduledNavigation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventFrameStoppedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage42(l, v) +func (v *EventFrameClearedScheduledNavigation) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(in *jlexer.Lexer, out *EventFrameStartedLoading) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in EventFrameStartedLoading) { - out.RawByte('{') - first := true - _ = first - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventFrameStartedLoading) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventFrameStartedLoading) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventFrameStartedLoading) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventFrameStartedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage43(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(in *jlexer.Lexer, out *EventFrameScheduledNavigation) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(in *jlexer.Lexer, out *EventFrameScheduledNavigation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3714,7 +4296,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in EventFrameScheduledNavigation) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(out *jwriter.Writer, in EventFrameScheduledNavigation) { out.RawByte('{') first := true _ = first @@ -3740,27 +4322,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventFrameScheduledNavigation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventFrameScheduledNavigation) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventFrameScheduledNavigation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventFrameScheduledNavigation) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage44(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out *EventFrameResized) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(in *jlexer.Lexer, out *EventFrameStoppedLoading) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3779,6 +4361,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out * continue } switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -3789,37 +4373,183 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in EventFrameResized) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(out *jwriter.Writer, in EventFrameStoppedLoading) { out.RawByte('{') first := true _ = first + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventFrameResized) MarshalJSON() ([]byte, error) { +func (v EventFrameStoppedLoading) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventFrameResized) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(w, v) +func (v EventFrameStoppedLoading) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventFrameResized) UnmarshalJSON(data []byte) error { +func (v *EventFrameStoppedLoading) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventFrameResized) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage45(l, v) +func (v *EventFrameStoppedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(in *jlexer.Lexer, out *EventFrameNavigated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(in *jlexer.Lexer, out *EventFrameStartedLoading) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(out *jwriter.Writer, in EventFrameStartedLoading) { + out.RawByte('{') + first := true + _ = first + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventFrameStartedLoading) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventFrameStartedLoading) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventFrameStartedLoading) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventFrameStartedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(in *jlexer.Lexer, out *EventFrameDetached) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "frameId": + (out.FrameID).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(out *jwriter.Writer, in EventFrameDetached) { + out.RawByte('{') + first := true + _ = first + if in.FrameID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"frameId\":") + out.String(string(in.FrameID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventFrameDetached) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventFrameDetached) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventFrameDetached) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventFrameDetached) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(in *jlexer.Lexer, out *EventFrameNavigated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3858,7 +4588,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(out *jwriter.Writer, in EventFrameNavigated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(out *jwriter.Writer, in EventFrameNavigated) { out.RawByte('{') first := true _ = first @@ -3880,165 +4610,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventFrameNavigated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventFrameNavigated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage46(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventFrameNavigated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventFrameNavigated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage46(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(in *jlexer.Lexer, out *EventFrameDetached) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in EventFrameDetached) { - out.RawByte('{') - first := true - _ = first - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventFrameDetached) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventFrameDetached) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventFrameDetached) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventFrameDetached) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage47(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(in *jlexer.Lexer, out *EventFrameClearedScheduledNavigation) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "frameId": - (out.FrameID).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in EventFrameClearedScheduledNavigation) { - out.RawByte('{') - first := true - _ = first - if in.FrameID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"frameId\":") - out.String(string(in.FrameID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventFrameClearedScheduledNavigation) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventFrameClearedScheduledNavigation) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventFrameClearedScheduledNavigation) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventFrameClearedScheduledNavigation) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage48(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(in *jlexer.Lexer, out *EventFrameAttached) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(in *jlexer.Lexer, out *EventFrameAttached) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4071,7 +4663,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in EventFrameAttached) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(out *jwriter.Writer, in EventFrameAttached) { out.RawByte('{') first := true _ = first @@ -4097,27 +4689,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventFrameAttached) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventFrameAttached) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventFrameAttached) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventFrameAttached) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage49(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(in *jlexer.Lexer, out *EventDomContentEventFired) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(in *jlexer.Lexer, out *EventLoadEventFired) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4148,7 +4740,76 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(in *jlexer.Lexer, out * in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in EventDomContentEventFired) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in EventLoadEventFired) { + out.RawByte('{') + first := true + _ = first + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventLoadEventFired) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventLoadEventFired) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventLoadEventFired) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventLoadEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(in *jlexer.Lexer, out *EventDomContentEventFired) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(out *jwriter.Writer, in EventDomContentEventFired) { out.RawByte('{') first := true _ = first @@ -4165,685 +4826,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v EventDomContentEventFired) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDomContentEventFired) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDomContentEventFired) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDomContentEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage50(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(in *jlexer.Lexer, out *EventColorPicked) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "color": - if in.IsNull() { - in.Skip() - out.Color = nil - } else { - if out.Color == nil { - out.Color = new(cdp.RGBA) - } - (*out.Color).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in EventColorPicked) { - out.RawByte('{') - first := true - _ = first - if in.Color != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"color\":") - if in.Color == nil { - out.RawString("null") - } else { - (*in.Color).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventColorPicked) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventColorPicked) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventColorPicked) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventColorPicked) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage51(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage52(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage52(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage53(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage53(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(in *jlexer.Lexer, out *ConfigureOverlayParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "suspended": - out.Suspended = bool(in.Bool()) - case "message": - out.Message = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(out *jwriter.Writer, in ConfigureOverlayParams) { - out.RawByte('{') - first := true - _ = first - if in.Suspended { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"suspended\":") - out.Bool(bool(in.Suspended)) - } - if in.Message != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"message\":") - out.String(string(in.Message)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ConfigureOverlayParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ConfigureOverlayParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage54(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ConfigureOverlayParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ConfigureOverlayParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage54(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(in *jlexer.Lexer, out *CaptureScreenshotReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "data": - out.Data = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(out *jwriter.Writer, in CaptureScreenshotReturns) { - out.RawByte('{') - first := true - _ = first - if in.Data != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"data\":") - out.String(string(in.Data)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CaptureScreenshotReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CaptureScreenshotReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage55(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CaptureScreenshotReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CaptureScreenshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage55(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(in *jlexer.Lexer, out *CaptureScreenshotParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "format": - (out.Format).UnmarshalEasyJSON(in) - case "quality": - out.Quality = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(out *jwriter.Writer, in CaptureScreenshotParams) { - out.RawByte('{') - first := true - _ = first - if in.Format != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"format\":") - (in.Format).MarshalEasyJSON(out) - } - if in.Quality != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"quality\":") - out.Int64(int64(in.Quality)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CaptureScreenshotParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CaptureScreenshotParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage56(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CaptureScreenshotParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CaptureScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage56(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(in *jlexer.Lexer, out *AppManifestError) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message": - out.Message = string(in.String()) - case "critical": - out.Critical = int64(in.Int64()) - case "line": - out.Line = int64(in.Int64()) - case "column": - out.Column = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(out *jwriter.Writer, in AppManifestError) { - out.RawByte('{') - first := true - _ = first - if in.Message != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"message\":") - out.String(string(in.Message)) - } - if in.Critical != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"critical\":") - out.Int64(int64(in.Critical)) - } - if in.Line != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"line\":") - out.Int64(int64(in.Line)) - } - if in.Column != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"column\":") - out.Int64(int64(in.Column)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AppManifestError) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AppManifestError) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage57(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AppManifestError) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AppManifestError) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage57(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(in *jlexer.Lexer, out *AddScriptToEvaluateOnLoadReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "identifier": - out.Identifier = ScriptIdentifier(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in AddScriptToEvaluateOnLoadReturns) { - out.RawByte('{') - first := true - _ = first - if in.Identifier != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"identifier\":") - out.String(string(in.Identifier)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AddScriptToEvaluateOnLoadReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddScriptToEvaluateOnLoadReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AddScriptToEvaluateOnLoadReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddScriptToEvaluateOnLoadReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(in *jlexer.Lexer, out *AddScriptToEvaluateOnLoadParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scriptSource": - out.ScriptSource = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(out *jwriter.Writer, in AddScriptToEvaluateOnLoadParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptSource\":") - out.String(string(in.ScriptSource)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AddScriptToEvaluateOnLoadParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddScriptToEvaluateOnLoadParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventDomContentEventFired) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage59(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AddScriptToEvaluateOnLoadParams) UnmarshalJSON(data []byte) error { +func (v *EventDomContentEventFired) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddScriptToEvaluateOnLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventDomContentEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage59(l, v) } diff --git a/cdp/page/page.go b/cdp/page/page.go index b734862..fa7cdef 100644 --- a/cdp/page/page.go +++ b/cdp/page/page.go @@ -15,7 +15,6 @@ import ( cdp "github.com/knq/chromedp/cdp" "github.com/knq/chromedp/cdp/debugger" - "github.com/mailru/easyjson" ) // EnableParams enables page domain notifications. @@ -29,33 +28,7 @@ func Enable() *EnableParams { // Do executes Page.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageEnable, nil, nil) } // DisableParams disables page domain notifications. @@ -69,33 +42,7 @@ func Disable() *DisableParams { // Do executes Page.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageDisable, nil, nil) } // AddScriptToEvaluateOnLoadParams [no description]. @@ -124,46 +71,14 @@ type AddScriptToEvaluateOnLoadReturns struct { // returns: // identifier - Identifier of the added script. func (p *AddScriptToEvaluateOnLoadParams) Do(ctxt context.Context, h cdp.Handler) (identifier ScriptIdentifier, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res AddScriptToEvaluateOnLoadReturns + err = h.Execute(ctxt, cdp.CommandPageAddScriptToEvaluateOnLoad, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandPageAddScriptToEvaluateOnLoad, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r AddScriptToEvaluateOnLoadReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.Identifier, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.Identifier, nil } // RemoveScriptToEvaluateOnLoadParams [no description]. @@ -184,39 +99,7 @@ func RemoveScriptToEvaluateOnLoad(identifier ScriptIdentifier) *RemoveScriptToEv // Do executes Page.removeScriptToEvaluateOnLoad against the provided context and // target handler. func (p *RemoveScriptToEvaluateOnLoadParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageRemoveScriptToEvaluateOnLoad, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageRemoveScriptToEvaluateOnLoad, p, nil) } // SetAutoAttachToCreatedPagesParams controls whether browser will open a new @@ -239,39 +122,7 @@ func SetAutoAttachToCreatedPages(autoAttach bool) *SetAutoAttachToCreatedPagesPa // Do executes Page.setAutoAttachToCreatedPages against the provided context and // target handler. func (p *SetAutoAttachToCreatedPagesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageSetAutoAttachToCreatedPages, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageSetAutoAttachToCreatedPages, p, nil) } // ReloadParams reloads given page optionally ignoring the cache. @@ -304,39 +155,7 @@ func (p ReloadParams) WithScriptToEvaluateOnLoad(scriptToEvaluateOnLoad string) // Do executes Page.reload against the provided context and // target handler. func (p *ReloadParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageReload, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageReload, p, nil) } // NavigateParams navigates current page to the given URL. @@ -365,46 +184,14 @@ type NavigateReturns struct { // returns: // frameID - Frame id that will be navigated. func (p *NavigateParams) Do(ctxt context.Context, h cdp.Handler) (frameID cdp.FrameID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res NavigateReturns + err = h.Execute(ctxt, cdp.CommandPageNavigate, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandPageNavigate, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r NavigateReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.FrameID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.FrameID, nil } // StopLoadingParams force the page stop all navigations and pending resource @@ -420,33 +207,7 @@ func StopLoading() *StopLoadingParams { // Do executes Page.stopLoading against the provided context and // target handler. func (p *StopLoadingParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageStopLoading, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageStopLoading, nil, nil) } // GetNavigationHistoryParams returns navigation history for the current @@ -471,40 +232,14 @@ type GetNavigationHistoryReturns struct { // currentIndex - Index of the current navigation history entry. // entries - Array of navigation history entries. func (p *GetNavigationHistoryParams) Do(ctxt context.Context, h cdp.Handler) (currentIndex int64, entries []*NavigationEntry, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandPageGetNavigationHistory, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return 0, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetNavigationHistoryReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return 0, nil, cdp.ErrInvalidResult - } - - return r.CurrentIndex, r.Entries, nil - - case error: - return 0, nil, v - } - - case <-ctxt.Done(): - return 0, nil, ctxt.Err() + var res GetNavigationHistoryReturns + err = h.Execute(ctxt, cdp.CommandPageGetNavigationHistory, nil, &res) + if err != nil { + return 0, nil, err } - return 0, nil, cdp.ErrUnknownResult + return res.CurrentIndex, res.Entries, nil } // NavigateToHistoryEntryParams navigates current page to the given history @@ -526,39 +261,7 @@ func NavigateToHistoryEntry(entryID int64) *NavigateToHistoryEntryParams { // Do executes Page.navigateToHistoryEntry against the provided context and // target handler. func (p *NavigateToHistoryEntryParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageNavigateToHistoryEntry, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageNavigateToHistoryEntry, p, nil) } // GetResourceTreeParams returns present frame / resource tree structure. @@ -580,40 +283,14 @@ type GetResourceTreeReturns struct { // returns: // frameTree - Present frame / resource tree structure. func (p *GetResourceTreeParams) Do(ctxt context.Context, h cdp.Handler) (frameTree *FrameResourceTree, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandPageGetResourceTree, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetResourceTreeReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.FrameTree, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetResourceTreeReturns + err = h.Execute(ctxt, cdp.CommandPageGetResourceTree, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.FrameTree, nil } // GetResourceContentParams returns content of the given resource. @@ -646,57 +323,24 @@ type GetResourceContentReturns struct { // returns: // content - Resource content. func (p *GetResourceContentParams) Do(ctxt context.Context, h cdp.Handler) (content []byte, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetResourceContentReturns + err = h.Execute(ctxt, cdp.CommandPageGetResourceContent, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandPageGetResourceContent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed + // decode + var dec []byte + if res.Base64encoded { + dec, err = base64.StdEncoding.DecodeString(res.Content) + if err != nil { + return nil, err } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetResourceContentReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - // decode - var dec []byte - if r.Base64encoded { - dec, err = base64.StdEncoding.DecodeString(r.Content) - if err != nil { - return nil, err - } - } else { - dec = []byte(r.Content) - } - - return dec, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + } else { + dec = []byte(res.Content) } - - return nil, cdp.ErrUnknownResult + return dec, nil } // SearchInResourceParams searches for given string in resource content. @@ -745,46 +389,14 @@ type SearchInResourceReturns struct { // returns: // result - List of search matches. func (p *SearchInResourceParams) Do(ctxt context.Context, h cdp.Handler) (result []*debugger.SearchMatch, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res SearchInResourceReturns + err = h.Execute(ctxt, cdp.CommandPageSearchInResource, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandPageSearchInResource, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r SearchInResourceReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Result, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.Result, nil } // SetDocumentContentParams sets given markup as the document's HTML. @@ -808,39 +420,7 @@ func SetDocumentContent(frameID cdp.FrameID, html string) *SetDocumentContentPar // Do executes Page.setDocumentContent against the provided context and // target handler. func (p *SetDocumentContentParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageSetDocumentContent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageSetDocumentContent, p, nil) } // CaptureScreenshotParams capture page screenshot. @@ -879,53 +459,20 @@ type CaptureScreenshotReturns struct { // returns: // data - Base64-encoded image data. func (p *CaptureScreenshotParams) Do(ctxt context.Context, h cdp.Handler) (data []byte, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CaptureScreenshotReturns + err = h.Execute(ctxt, cdp.CommandPageCaptureScreenshot, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandPageCaptureScreenshot, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CaptureScreenshotReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - // decode - var dec []byte - dec, err = base64.StdEncoding.DecodeString(r.Data) - if err != nil { - return nil, err - } - - return dec, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + // decode + var dec []byte + dec, err = base64.StdEncoding.DecodeString(res.Data) + if err != nil { + return nil, err } - - return nil, cdp.ErrUnknownResult + return dec, nil } // StartScreencastParams starts sending each frame using the screencastFrame @@ -978,39 +525,7 @@ func (p StartScreencastParams) WithEveryNthFrame(everyNthFrame int64) *StartScre // Do executes Page.startScreencast against the provided context and // target handler. func (p *StartScreencastParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageStartScreencast, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageStartScreencast, p, nil) } // StopScreencastParams stops sending each frame in the screencastFrame. @@ -1024,33 +539,7 @@ func StopScreencast() *StopScreencastParams { // Do executes Page.stopScreencast against the provided context and // target handler. func (p *StopScreencastParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageStopScreencast, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageStopScreencast, nil, nil) } // ScreencastFrameAckParams acknowledges that a screencast frame has been @@ -1073,39 +562,7 @@ func ScreencastFrameAck(sessionID int64) *ScreencastFrameAckParams { // Do executes Page.screencastFrameAck against the provided context and // target handler. func (p *ScreencastFrameAckParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageScreencastFrameAck, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageScreencastFrameAck, p, nil) } // HandleJavaScriptDialogParams accepts or dismisses a JavaScript initiated @@ -1136,39 +593,7 @@ func (p HandleJavaScriptDialogParams) WithPromptText(promptText string) *HandleJ // Do executes Page.handleJavaScriptDialog against the provided context and // target handler. func (p *HandleJavaScriptDialogParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageHandleJavaScriptDialog, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageHandleJavaScriptDialog, p, nil) } // SetColorPickerEnabledParams shows / hides color picker. @@ -1189,39 +614,7 @@ func SetColorPickerEnabled(enabled bool) *SetColorPickerEnabledParams { // Do executes Page.setColorPickerEnabled against the provided context and // target handler. func (p *SetColorPickerEnabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageSetColorPickerEnabled, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageSetColorPickerEnabled, p, nil) } // ConfigureOverlayParams configures overlay. @@ -1253,39 +646,7 @@ func (p ConfigureOverlayParams) WithMessage(message string) *ConfigureOverlayPar // Do executes Page.configureOverlay against the provided context and // target handler. func (p *ConfigureOverlayParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageConfigureOverlay, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageConfigureOverlay, p, nil) } // GetAppManifestParams [no description]. @@ -1311,40 +672,14 @@ type GetAppManifestReturns struct { // errors // data - Manifest content. func (p *GetAppManifestParams) Do(ctxt context.Context, h cdp.Handler) (url string, errors []*AppManifestError, data string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandPageGetAppManifest, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return "", nil, "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetAppManifestReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", nil, "", cdp.ErrInvalidResult - } - - return r.URL, r.Errors, r.Data, nil - - case error: - return "", nil, "", v - } - - case <-ctxt.Done(): - return "", nil, "", ctxt.Err() + var res GetAppManifestReturns + err = h.Execute(ctxt, cdp.CommandPageGetAppManifest, nil, &res) + if err != nil { + return "", nil, "", err } - return "", nil, "", cdp.ErrUnknownResult + return res.URL, res.Errors, res.Data, nil } // RequestAppBannerParams [no description]. @@ -1358,33 +693,7 @@ func RequestAppBanner() *RequestAppBannerParams { // Do executes Page.requestAppBanner against the provided context and // target handler. func (p *RequestAppBannerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageRequestAppBanner, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageRequestAppBanner, nil, nil) } // SetControlNavigationsParams toggles navigation throttling which allows @@ -1407,39 +716,7 @@ func SetControlNavigations(enabled bool) *SetControlNavigationsParams { // Do executes Page.setControlNavigations against the provided context and // target handler. func (p *SetControlNavigationsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageSetControlNavigations, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageSetControlNavigations, p, nil) } // ProcessNavigationParams should be sent in response to a @@ -1466,39 +743,7 @@ func ProcessNavigation(response NavigationResponse, navigationID int64) *Process // Do executes Page.processNavigation against the provided context and // target handler. func (p *ProcessNavigationParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandPageProcessNavigation, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandPageProcessNavigation, p, nil) } // GetLayoutMetricsParams returns metrics relating to the layouting of the @@ -1524,38 +769,12 @@ type GetLayoutMetricsReturns struct { // layoutViewport - Metrics relating to the layout viewport. // visualViewport - Metrics relating to the visual viewport. func (p *GetLayoutMetricsParams) Do(ctxt context.Context, h cdp.Handler) (layoutViewport *LayoutViewport, visualViewport *VisualViewport, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandPageGetLayoutMetrics, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetLayoutMetricsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.LayoutViewport, r.VisualViewport, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() + var res GetLayoutMetricsReturns + err = h.Execute(ctxt, cdp.CommandPageGetLayoutMetrics, nil, &res) + if err != nil { + return nil, nil, err } - return nil, nil, cdp.ErrUnknownResult + return res.LayoutViewport, res.VisualViewport, nil } diff --git a/cdp/profiler/easyjson.go b/cdp/profiler/easyjson.go index e56ef5b..6d863a1 100644 --- a/cdp/profiler/easyjson.go +++ b/cdp/profiler/easyjson.go @@ -19,7 +19,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(in *jlexer.Lexer, out *StopReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(in *jlexer.Lexer, out *PositionTickInfo) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -38,15 +38,153 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(in *jlexer.Lexer, out continue } switch key { - case "profile": + case "line": + out.Line = int64(in.Int64()) + case "ticks": + out.Ticks = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler(out *jwriter.Writer, in PositionTickInfo) { + out.RawByte('{') + first := true + _ = first + if in.Line != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"line\":") + out.Int64(int64(in.Line)) + } + if in.Ticks != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"ticks\":") + out.Int64(int64(in.Ticks)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v PositionTickInfo) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v PositionTickInfo) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *PositionTickInfo) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *PositionTickInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler1(in *jlexer.Lexer, out *Profile) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "nodes": if in.IsNull() { in.Skip() - out.Profile = nil + out.Nodes = nil } else { - if out.Profile == nil { - out.Profile = new(Profile) + in.Delim('[') + if !in.IsDelim(']') { + out.Nodes = make([]*ProfileNode, 0, 8) + } else { + out.Nodes = []*ProfileNode{} } - (*out.Profile).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v1 *ProfileNode + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(ProfileNode) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Nodes = append(out.Nodes, v1) + in.WantComma() + } + in.Delim(']') + } + case "startTime": + out.StartTime = float64(in.Float64()) + case "endTime": + out.EndTime = float64(in.Float64()) + case "samples": + if in.IsNull() { + in.Skip() + out.Samples = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Samples = make([]int64, 0, 8) + } else { + out.Samples = []int64{} + } + for !in.IsDelim(']') { + var v2 int64 + v2 = int64(in.Int64()) + out.Samples = append(out.Samples, v2) + in.WantComma() + } + in.Delim(']') + } + case "timeDeltas": + if in.IsNull() { + in.Skip() + out.TimeDeltas = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.TimeDeltas = make([]int64, 0, 8) + } else { + out.TimeDeltas = []int64{} + } + for !in.IsDelim(']') { + var v3 int64 + v3 = int64(in.Int64()) + out.TimeDeltas = append(out.TimeDeltas, v3) + in.WantComma() + } + in.Delim(']') } default: in.SkipRecursive() @@ -58,234 +196,114 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler(out *jwriter.Writer, in StopReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler1(out *jwriter.Writer, in Profile) { out.RawByte('{') first := true _ = first - if in.Profile != nil { + if len(in.Nodes) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"profile\":") - if in.Profile == nil { + out.RawString("\"nodes\":") + if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { - (*in.Profile).MarshalEasyJSON(out) + out.RawByte('[') + for v4, v5 := range in.Nodes { + if v4 > 0 { + out.RawByte(',') + } + if v5 == nil { + out.RawString("null") + } else { + (*v5).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.StartTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"startTime\":") + out.Float64(float64(in.StartTime)) + } + if in.EndTime != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"endTime\":") + out.Float64(float64(in.EndTime)) + } + if len(in.Samples) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"samples\":") + if in.Samples == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v6, v7 := range in.Samples { + if v6 > 0 { + out.RawByte(',') + } + out.Int64(int64(v7)) + } + out.RawByte(']') + } + } + if len(in.TimeDeltas) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timeDeltas\":") + if in.TimeDeltas == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.TimeDeltas { + if v8 > 0 { + out.RawByte(',') + } + out.Int64(int64(v9)) + } + out.RawByte(']') } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v StopReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StopReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StopReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StopReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler1(in *jlexer.Lexer, out *StopParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler1(out *jwriter.Writer, in StopParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StopParams) MarshalJSON() ([]byte, error) { +func (v Profile) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v StopParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Profile) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *StopParams) UnmarshalJSON(data []byte) error { +func (v *Profile) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StopParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Profile) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler2(in *jlexer.Lexer, out *StartParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler2(out *jwriter.Writer, in StartParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StartParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StartParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler3(in *jlexer.Lexer, out *SetSamplingIntervalParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "interval": - out.Interval = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler3(out *jwriter.Writer, in SetSamplingIntervalParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"interval\":") - out.Int64(int64(in.Interval)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetSamplingIntervalParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetSamplingIntervalParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetSamplingIntervalParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetSamplingIntervalParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(in *jlexer.Lexer, out *ProfileNode) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler2(in *jlexer.Lexer, out *ProfileNode) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -330,9 +348,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(in *jlexer.Lexer, ou out.Children = []int64{} } for !in.IsDelim(']') { - var v1 int64 - v1 = int64(in.Int64()) - out.Children = append(out.Children, v1) + var v10 int64 + v10 = int64(in.Int64()) + out.Children = append(out.Children, v10) in.WantComma() } in.Delim(']') @@ -351,17 +369,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(in *jlexer.Lexer, ou out.PositionTicks = []*PositionTickInfo{} } for !in.IsDelim(']') { - var v2 *PositionTickInfo + var v11 *PositionTickInfo if in.IsNull() { in.Skip() - v2 = nil + v11 = nil } else { - if v2 == nil { - v2 = new(PositionTickInfo) + if v11 == nil { + v11 = new(PositionTickInfo) } - (*v2).UnmarshalEasyJSON(in) + (*v11).UnmarshalEasyJSON(in) } - out.PositionTicks = append(out.PositionTicks, v2) + out.PositionTicks = append(out.PositionTicks, v11) in.WantComma() } in.Delim(']') @@ -376,7 +394,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(out *jwriter.Writer, in ProfileNode) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler2(out *jwriter.Writer, in ProfileNode) { out.RawByte('{') first := true _ = first @@ -418,11 +436,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v3, v4 := range in.Children { - if v3 > 0 { + for v12, v13 := range in.Children { + if v12 > 0 { out.RawByte(',') } - out.Int64(int64(v4)) + out.Int64(int64(v13)) } out.RawByte(']') } @@ -445,14 +463,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v5, v6 := range in.PositionTicks { - if v5 > 0 { + for v14, v15 := range in.PositionTicks { + if v14 > 0 { out.RawByte(',') } - if v6 == nil { + if v15 == nil { out.RawString("null") } else { - (*v6).MarshalEasyJSON(out) + (*v15).MarshalEasyJSON(out) } } out.RawByte(']') @@ -464,27 +482,167 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ProfileNode) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ProfileNode) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ProfileNode) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler3(in *jlexer.Lexer, out *StopReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "profile": + if in.IsNull() { + in.Skip() + out.Profile = nil + } else { + if out.Profile == nil { + out.Profile = new(Profile) + } + (*out.Profile).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler3(out *jwriter.Writer, in StopReturns) { + out.RawByte('{') + first := true + _ = first + if in.Profile != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"profile\":") + if in.Profile == nil { + out.RawString("null") + } else { + (*in.Profile).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StopReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StopReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StopReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StopReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(in *jlexer.Lexer, out *StopParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(out *jwriter.Writer, in StopParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StopParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StopParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StopParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *StopParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler5(in *jlexer.Lexer, out *Profile) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler5(in *jlexer.Lexer, out *StartParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -503,75 +661,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler5(in *jlexer.Lexer, ou continue } switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Nodes = make([]*ProfileNode, 0, 8) - } else { - out.Nodes = []*ProfileNode{} - } - for !in.IsDelim(']') { - var v7 *ProfileNode - if in.IsNull() { - in.Skip() - v7 = nil - } else { - if v7 == nil { - v7 = new(ProfileNode) - } - (*v7).UnmarshalEasyJSON(in) - } - out.Nodes = append(out.Nodes, v7) - in.WantComma() - } - in.Delim(']') - } - case "startTime": - out.StartTime = float64(in.Float64()) - case "endTime": - out.EndTime = float64(in.Float64()) - case "samples": - if in.IsNull() { - in.Skip() - out.Samples = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Samples = make([]int64, 0, 8) - } else { - out.Samples = []int64{} - } - for !in.IsDelim(']') { - var v8 int64 - v8 = int64(in.Int64()) - out.Samples = append(out.Samples, v8) - in.WantComma() - } - in.Delim(']') - } - case "timeDeltas": - if in.IsNull() { - in.Skip() - out.TimeDeltas = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.TimeDeltas = make([]int64, 0, 8) - } else { - out.TimeDeltas = []int64{} - } - for !in.IsDelim(']') { - var v9 int64 - v9 = int64(in.Int64()) - out.TimeDeltas = append(out.TimeDeltas, v9) - in.WantComma() - } - in.Delim(']') - } default: in.SkipRecursive() } @@ -582,114 +671,37 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler5(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler5(out *jwriter.Writer, in Profile) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler5(out *jwriter.Writer, in StartParams) { out.RawByte('{') first := true _ = first - if len(in.Nodes) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"nodes\":") - if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v10, v11 := range in.Nodes { - if v10 > 0 { - out.RawByte(',') - } - if v11 == nil { - out.RawString("null") - } else { - (*v11).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.StartTime != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"startTime\":") - out.Float64(float64(in.StartTime)) - } - if in.EndTime != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endTime\":") - out.Float64(float64(in.EndTime)) - } - if len(in.Samples) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"samples\":") - if in.Samples == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v12, v13 := range in.Samples { - if v12 > 0 { - out.RawByte(',') - } - out.Int64(int64(v13)) - } - out.RawByte(']') - } - } - if len(in.TimeDeltas) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timeDeltas\":") - if in.TimeDeltas == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.TimeDeltas { - if v14 > 0 { - out.RawByte(',') - } - out.Int64(int64(v15)) - } - out.RawByte(']') - } - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v Profile) MarshalJSON() ([]byte, error) { +func (v StartParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v Profile) MarshalEasyJSON(w *jwriter.Writer) { +func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *Profile) UnmarshalJSON(data []byte) error { +func (v *StartParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Profile) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler6(in *jlexer.Lexer, out *PositionTickInfo) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler6(in *jlexer.Lexer, out *SetSamplingIntervalParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -708,10 +720,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler6(in *jlexer.Lexer, ou continue } switch key { - case "line": - out.Line = int64(in.Int64()) - case "ticks": - out.Ticks = int64(in.Int64()) + case "interval": + out.Interval = int64(in.Int64()) default: in.SkipRecursive() } @@ -722,53 +732,43 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler6(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler6(out *jwriter.Writer, in PositionTickInfo) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler6(out *jwriter.Writer, in SetSamplingIntervalParams) { out.RawByte('{') first := true _ = first - if in.Line != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"line\":") - out.Int64(int64(in.Line)) - } - if in.Ticks != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"ticks\":") - out.Int64(int64(in.Ticks)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"interval\":") + out.Int64(int64(in.Interval)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v PositionTickInfo) MarshalJSON() ([]byte, error) { +func (v SetSamplingIntervalParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v PositionTickInfo) MarshalEasyJSON(w *jwriter.Writer) { +func (v SetSamplingIntervalParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *PositionTickInfo) UnmarshalJSON(data []byte) error { +func (v *SetSamplingIntervalParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PositionTickInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetSamplingIntervalParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler6(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler7(in *jlexer.Lexer, out *EventConsoleProfileStarted) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler7(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -787,20 +787,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler7(in *jlexer.Lexer, ou continue } switch key { - case "id": - out.ID = string(in.String()) - case "location": - if in.IsNull() { - in.Skip() - out.Location = nil - } else { - if out.Location == nil { - out.Location = new(debugger.Location) - } - (*out.Location).UnmarshalEasyJSON(in) - } - case "title": - out.Title = string(in.String()) default: in.SkipRecursive() } @@ -811,65 +797,96 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler7(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler7(out *jwriter.Writer, in EventConsoleProfileStarted) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler7(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first - if in.ID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"id\":") - out.String(string(in.ID)) - } - if in.Location != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"location\":") - if in.Location == nil { - out.RawString("null") - } else { - (*in.Location).MarshalEasyJSON(out) - } - } - if in.Title != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"title\":") - out.String(string(in.Title)) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventConsoleProfileStarted) MarshalJSON() ([]byte, error) { +func (v DisableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventConsoleProfileStarted) MarshalEasyJSON(w *jwriter.Writer) { +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventConsoleProfileStarted) UnmarshalJSON(data []byte) error { +func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventConsoleProfileStarted) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(in *jlexer.Lexer, out *EventConsoleProfileFinished) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler9(in *jlexer.Lexer, out *EventConsoleProfileFinished) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -922,7 +939,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(out *jwriter.Writer, in EventConsoleProfileFinished) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(out *jwriter.Writer, in EventConsoleProfileFinished) { out.RawByte('{') first := true _ = first @@ -971,87 +988,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventConsoleProfileFinished) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventConsoleProfileFinished) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventConsoleProfileFinished) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventConsoleProfileFinished) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler9(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventConsoleProfileFinished) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { +func (v *EventConsoleProfileFinished) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventConsoleProfileFinished) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler10(in *jlexer.Lexer, out *DisableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler10(in *jlexer.Lexer, out *EventConsoleProfileStarted) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1070,6 +1028,20 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler10(in *jlexer.Lexer, o continue } switch key { + case "id": + out.ID = string(in.String()) + case "location": + if in.IsNull() { + in.Skip() + out.Location = nil + } else { + if out.Location == nil { + out.Location = new(debugger.Location) + } + (*out.Location).UnmarshalEasyJSON(in) + } + case "title": + out.Title = string(in.String()) default: in.SkipRecursive() } @@ -1080,33 +1052,61 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler10(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(out *jwriter.Writer, in EventConsoleProfileStarted) { out.RawByte('{') first := true _ = first + if in.ID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"id\":") + out.String(string(in.ID)) + } + if in.Location != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"location\":") + if in.Location == nil { + out.RawString("null") + } else { + (*in.Location).MarshalEasyJSON(out) + } + } + if in.Title != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"title\":") + out.String(string(in.Title)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v DisableParams) MarshalJSON() ([]byte, error) { +func (v EventConsoleProfileStarted) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventConsoleProfileStarted) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { +func (v *EventConsoleProfileStarted) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler10(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventConsoleProfileStarted) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler10(l, v) } diff --git a/cdp/profiler/profiler.go b/cdp/profiler/profiler.go index 123b859..91a28c5 100644 --- a/cdp/profiler/profiler.go +++ b/cdp/profiler/profiler.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams [no description]. @@ -24,33 +23,7 @@ func Enable() *EnableParams { // Do executes Profiler.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandProfilerEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandProfilerEnable, nil, nil) } // DisableParams [no description]. @@ -64,33 +37,7 @@ func Disable() *DisableParams { // Do executes Profiler.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandProfilerDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandProfilerDisable, nil, nil) } // SetSamplingIntervalParams changes CPU profiler sampling interval. Must be @@ -113,39 +60,7 @@ func SetSamplingInterval(interval int64) *SetSamplingIntervalParams { // Do executes Profiler.setSamplingInterval against the provided context and // target handler. func (p *SetSamplingIntervalParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandProfilerSetSamplingInterval, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandProfilerSetSamplingInterval, p, nil) } // StartParams [no description]. @@ -159,33 +74,7 @@ func Start() *StartParams { // Do executes Profiler.start against the provided context and // target handler. func (p *StartParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandProfilerStart, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandProfilerStart, nil, nil) } // StopParams [no description]. @@ -207,38 +96,12 @@ type StopReturns struct { // returns: // profile - Recorded profile. func (p *StopParams) Do(ctxt context.Context, h cdp.Handler) (profile *Profile, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandProfilerStop, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r StopReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Profile, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res StopReturns + err = h.Execute(ctxt, cdp.CommandProfilerStop, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.Profile, nil } diff --git a/cdp/rendering/easyjson.go b/cdp/rendering/easyjson.go index c7e368e..47db58a 100644 --- a/cdp/rendering/easyjson.go +++ b/cdp/rendering/easyjson.go @@ -151,7 +151,141 @@ func (v *SetShowScrollBottleneckRectsParams) UnmarshalJSON(data []byte) error { func (v *SetShowScrollBottleneckRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(in *jlexer.Lexer, out *SetShowPaintRectsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(in *jlexer.Lexer, out *SetShowFPSCounterParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "show": + out.Show = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(out *jwriter.Writer, in SetShowFPSCounterParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"show\":") + out.Bool(bool(in.Show)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetShowFPSCounterParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetShowFPSCounterParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetShowFPSCounterParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetShowFPSCounterParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(in *jlexer.Lexer, out *SetShowDebugBordersParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "show": + out.Show = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(out *jwriter.Writer, in SetShowDebugBordersParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"show\":") + out.Bool(bool(in.Show)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetShowDebugBordersParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetShowDebugBordersParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetShowDebugBordersParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetShowDebugBordersParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(in *jlexer.Lexer, out *SetShowPaintRectsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -182,7 +316,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(out *jwriter.Writer, in SetShowPaintRectsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(out *jwriter.Writer, in SetShowPaintRectsParams) { out.RawByte('{') first := true _ = first @@ -197,158 +331,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v SetShowPaintRectsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetShowPaintRectsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetShowPaintRectsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetShowPaintRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(in *jlexer.Lexer, out *SetShowFPSCounterParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "show": - out.Show = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(out *jwriter.Writer, in SetShowFPSCounterParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"show\":") - out.Bool(bool(in.Show)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetShowFPSCounterParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetShowFPSCounterParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetShowFPSCounterParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetShowFPSCounterParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(in *jlexer.Lexer, out *SetShowDebugBordersParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "show": - out.Show = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(out *jwriter.Writer, in SetShowDebugBordersParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"show\":") - out.Bool(bool(in.Show)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetShowDebugBordersParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetShowDebugBordersParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v SetShowPaintRectsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRendering4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *SetShowDebugBordersParams) UnmarshalJSON(data []byte) error { +func (v *SetShowPaintRectsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetShowDebugBordersParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *SetShowPaintRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRendering4(l, v) } diff --git a/cdp/rendering/rendering.go b/cdp/rendering/rendering.go index 86e630a..49edf49 100644 --- a/cdp/rendering/rendering.go +++ b/cdp/rendering/rendering.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // SetShowPaintRectsParams requests that backend shows paint rectangles. @@ -33,39 +32,7 @@ func SetShowPaintRects(result bool) *SetShowPaintRectsParams { // Do executes Rendering.setShowPaintRects against the provided context and // target handler. func (p *SetShowPaintRectsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRenderingSetShowPaintRects, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRenderingSetShowPaintRects, p, nil) } // SetShowDebugBordersParams requests that backend shows debug borders on @@ -87,39 +54,7 @@ func SetShowDebugBorders(show bool) *SetShowDebugBordersParams { // Do executes Rendering.setShowDebugBorders against the provided context and // target handler. func (p *SetShowDebugBordersParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRenderingSetShowDebugBorders, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRenderingSetShowDebugBorders, p, nil) } // SetShowFPSCounterParams requests that backend shows the FPS counter. @@ -140,39 +75,7 @@ func SetShowFPSCounter(show bool) *SetShowFPSCounterParams { // Do executes Rendering.setShowFPSCounter against the provided context and // target handler. func (p *SetShowFPSCounterParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRenderingSetShowFPSCounter, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRenderingSetShowFPSCounter, p, nil) } // SetShowScrollBottleneckRectsParams requests that backend shows scroll @@ -195,39 +98,7 @@ func SetShowScrollBottleneckRects(show bool) *SetShowScrollBottleneckRectsParams // Do executes Rendering.setShowScrollBottleneckRects against the provided context and // target handler. func (p *SetShowScrollBottleneckRectsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRenderingSetShowScrollBottleneckRects, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRenderingSetShowScrollBottleneckRects, p, nil) } // SetShowViewportSizeOnResizeParams paints viewport size upon main frame @@ -249,37 +120,5 @@ func SetShowViewportSizeOnResize(show bool) *SetShowViewportSizeOnResizeParams { // Do executes Rendering.setShowViewportSizeOnResize against the provided context and // target handler. func (p *SetShowViewportSizeOnResizeParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRenderingSetShowViewportSizeOnResize, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRenderingSetShowViewportSizeOnResize, p, nil) } diff --git a/cdp/runtime/easyjson.go b/cdp/runtime/easyjson.go index ac779a0..41d92c0 100644 --- a/cdp/runtime/easyjson.go +++ b/cdp/runtime/easyjson.go @@ -17,237 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime(in *jlexer.Lexer, out *StackTrace) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "description": - out.Description = string(in.String()) - case "callFrames": - if in.IsNull() { - in.Skip() - out.CallFrames = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.CallFrames = make([]*CallFrame, 0, 8) - } else { - out.CallFrames = []*CallFrame{} - } - for !in.IsDelim(']') { - var v1 *CallFrame - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(CallFrame) - } - (*v1).UnmarshalEasyJSON(in) - } - out.CallFrames = append(out.CallFrames, v1) - in.WantComma() - } - in.Delim(']') - } - case "parent": - if in.IsNull() { - in.Skip() - out.Parent = nil - } else { - if out.Parent == nil { - out.Parent = new(StackTrace) - } - (*out.Parent).UnmarshalEasyJSON(in) - } - case "promiseCreationFrame": - if in.IsNull() { - in.Skip() - out.PromiseCreationFrame = nil - } else { - if out.PromiseCreationFrame == nil { - out.PromiseCreationFrame = new(CallFrame) - } - (*out.PromiseCreationFrame).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(out *jwriter.Writer, in StackTrace) { - out.RawByte('{') - first := true - _ = first - if in.Description != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"description\":") - out.String(string(in.Description)) - } - if len(in.CallFrames) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"callFrames\":") - if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.CallFrames { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Parent != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"parent\":") - if in.Parent == nil { - out.RawString("null") - } else { - (*in.Parent).MarshalEasyJSON(out) - } - } - if in.PromiseCreationFrame != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"promiseCreationFrame\":") - if in.PromiseCreationFrame == nil { - out.RawString("null") - } else { - (*in.PromiseCreationFrame).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StackTrace) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StackTrace) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StackTrace) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StackTrace) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime1(in *jlexer.Lexer, out *SetCustomObjectFormatterEnabledParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "enabled": - out.Enabled = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime1(out *jwriter.Writer, in SetCustomObjectFormatterEnabledParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"enabled\":") - out.Bool(bool(in.Enabled)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetCustomObjectFormatterEnabledParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetCustomObjectFormatterEnabledParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetCustomObjectFormatterEnabledParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(in *jlexer.Lexer, out *RunScriptReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime(in *jlexer.Lexer, out *RunScriptReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -296,7 +66,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(out *jwriter.Writer, in RunScriptReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(out *jwriter.Writer, in RunScriptReturns) { out.RawByte('{') first := true _ = first @@ -330,27 +100,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v RunScriptReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RunScriptReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RunScriptReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RunScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime3(in *jlexer.Lexer, out *RunScriptParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime1(in *jlexer.Lexer, out *RunScriptParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -395,7 +165,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime3(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(out *jwriter.Writer, in RunScriptParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime1(out *jwriter.Writer, in RunScriptParams) { out.RawByte('{') first := true _ = first @@ -467,27 +237,278 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v RunScriptParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RunScriptParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RunScriptParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RunScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(in *jlexer.Lexer, out *CompileScriptReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scriptId": + out.ScriptID = ScriptID(in.String()) + case "exceptionDetails": + if in.IsNull() { + in.Skip() + out.ExceptionDetails = nil + } else { + if out.ExceptionDetails == nil { + out.ExceptionDetails = new(ExceptionDetails) + } + (*out.ExceptionDetails).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(out *jwriter.Writer, in CompileScriptReturns) { + out.RawByte('{') + first := true + _ = first + if in.ScriptID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + } + if in.ExceptionDetails != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionDetails\":") + if in.ExceptionDetails == nil { + out.RawString("null") + } else { + (*in.ExceptionDetails).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CompileScriptReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CompileScriptReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CompileScriptReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CompileScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime3(in *jlexer.Lexer, out *CompileScriptParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "expression": + out.Expression = string(in.String()) + case "sourceURL": + out.SourceURL = string(in.String()) + case "persistScript": + out.PersistScript = bool(in.Bool()) + case "executionContextId": + out.ExecutionContextID = ExecutionContextID(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(out *jwriter.Writer, in CompileScriptParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"expression\":") + out.String(string(in.Expression)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sourceURL\":") + out.String(string(in.SourceURL)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"persistScript\":") + out.Bool(bool(in.PersistScript)) + if in.ExecutionContextID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"executionContextId\":") + out.Int64(int64(in.ExecutionContextID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CompileScriptParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CompileScriptParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CompileScriptParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RunScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *CompileScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(in *jlexer.Lexer, out *RunIfWaitingForDebuggerParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(in *jlexer.Lexer, out *SetCustomObjectFormatterEnabledParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "enabled": + out.Enabled = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(out *jwriter.Writer, in SetCustomObjectFormatterEnabledParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enabled\":") + out.Bool(bool(in.Enabled)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetCustomObjectFormatterEnabledParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetCustomObjectFormatterEnabledParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetCustomObjectFormatterEnabledParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime5(in *jlexer.Lexer, out *DiscardConsoleEntriesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -516,7 +537,184 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(out *jwriter.Writer, in RunIfWaitingForDebuggerParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(out *jwriter.Writer, in DiscardConsoleEntriesParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DiscardConsoleEntriesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DiscardConsoleEntriesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DiscardConsoleEntriesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DiscardConsoleEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime6(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime6(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(in *jlexer.Lexer, out *RunIfWaitingForDebuggerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(out *jwriter.Writer, in RunIfWaitingForDebuggerParams) { out.RawByte('{') first := true _ = first @@ -526,267 +724,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v RunIfWaitingForDebuggerParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RunIfWaitingForDebuggerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime4(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RunIfWaitingForDebuggerParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RunIfWaitingForDebuggerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime4(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime5(in *jlexer.Lexer, out *RemoteObject) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "subtype": - (out.Subtype).UnmarshalEasyJSON(in) - case "className": - out.ClassName = string(in.String()) - case "value": - (out.Value).UnmarshalEasyJSON(in) - case "unserializableValue": - (out.UnserializableValue).UnmarshalEasyJSON(in) - case "description": - out.Description = string(in.String()) - case "objectId": - out.ObjectID = RemoteObjectID(in.String()) - case "preview": - if in.IsNull() { - in.Skip() - out.Preview = nil - } else { - if out.Preview == nil { - out.Preview = new(ObjectPreview) - } - (*out.Preview).UnmarshalEasyJSON(in) - } - case "customPreview": - if in.IsNull() { - in.Skip() - out.CustomPreview = nil - } else { - if out.CustomPreview == nil { - out.CustomPreview = new(CustomPreview) - } - (*out.CustomPreview).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(out *jwriter.Writer, in RemoteObject) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Subtype != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"subtype\":") - (in.Subtype).MarshalEasyJSON(out) - } - if in.ClassName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"className\":") - out.String(string(in.ClassName)) - } - if (in.Value).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - (in.Value).MarshalEasyJSON(out) - } - if in.UnserializableValue != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"unserializableValue\":") - (in.UnserializableValue).MarshalEasyJSON(out) - } - if in.Description != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"description\":") - out.String(string(in.Description)) - } - if in.ObjectID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - } - if in.Preview != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"preview\":") - if in.Preview == nil { - out.RawString("null") - } else { - (*in.Preview).MarshalEasyJSON(out) - } - } - if in.CustomPreview != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"customPreview\":") - if in.CustomPreview == nil { - out.RawString("null") - } else { - (*in.CustomPreview).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoteObject) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoteObject) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoteObject) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoteObject) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime6(in *jlexer.Lexer, out *ReleaseObjectParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "objectId": - out.ObjectID = RemoteObjectID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime6(out *jwriter.Writer, in ReleaseObjectParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ReleaseObjectParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ReleaseObjectParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ReleaseObjectParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ReleaseObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(in *jlexer.Lexer, out *ReleaseObjectGroupParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(in *jlexer.Lexer, out *ReleaseObjectGroupParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -817,7 +775,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(out *jwriter.Writer, in ReleaseObjectGroupParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer, in ReleaseObjectGroupParams) { out.RawByte('{') first := true _ = first @@ -833,27 +791,1723 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ReleaseObjectGroupParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ReleaseObjectGroupParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime7(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ReleaseObjectGroupParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ReleaseObjectGroupParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime7(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(in *jlexer.Lexer, out *PropertyPreview) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime10(in *jlexer.Lexer, out *ReleaseObjectParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "objectId": + out.ObjectID = RemoteObjectID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer, in ReleaseObjectParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ReleaseObjectParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ReleaseObjectParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ReleaseObjectParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ReleaseObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime11(in *jlexer.Lexer, out *GetPropertiesReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + if in.IsNull() { + in.Skip() + out.Result = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Result = make([]*PropertyDescriptor, 0, 8) + } else { + out.Result = []*PropertyDescriptor{} + } + for !in.IsDelim(']') { + var v1 *PropertyDescriptor + if in.IsNull() { + in.Skip() + v1 = nil + } else { + if v1 == nil { + v1 = new(PropertyDescriptor) + } + (*v1).UnmarshalEasyJSON(in) + } + out.Result = append(out.Result, v1) + in.WantComma() + } + in.Delim(']') + } + case "internalProperties": + if in.IsNull() { + in.Skip() + out.InternalProperties = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.InternalProperties = make([]*InternalPropertyDescriptor, 0, 8) + } else { + out.InternalProperties = []*InternalPropertyDescriptor{} + } + for !in.IsDelim(']') { + var v2 *InternalPropertyDescriptor + if in.IsNull() { + in.Skip() + v2 = nil + } else { + if v2 == nil { + v2 = new(InternalPropertyDescriptor) + } + (*v2).UnmarshalEasyJSON(in) + } + out.InternalProperties = append(out.InternalProperties, v2) + in.WantComma() + } + in.Delim(']') + } + case "exceptionDetails": + if in.IsNull() { + in.Skip() + out.ExceptionDetails = nil + } else { + if out.ExceptionDetails == nil { + out.ExceptionDetails = new(ExceptionDetails) + } + (*out.ExceptionDetails).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(out *jwriter.Writer, in GetPropertiesReturns) { + out.RawByte('{') + first := true + _ = first + if len(in.Result) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v3, v4 := range in.Result { + if v3 > 0 { + out.RawByte(',') + } + if v4 == nil { + out.RawString("null") + } else { + (*v4).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.InternalProperties) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"internalProperties\":") + if in.InternalProperties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v5, v6 := range in.InternalProperties { + if v5 > 0 { + out.RawByte(',') + } + if v6 == nil { + out.RawString("null") + } else { + (*v6).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.ExceptionDetails != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionDetails\":") + if in.ExceptionDetails == nil { + out.RawString("null") + } else { + (*in.ExceptionDetails).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetPropertiesReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetPropertiesReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetPropertiesReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetPropertiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime12(in *jlexer.Lexer, out *GetPropertiesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "objectId": + out.ObjectID = RemoteObjectID(in.String()) + case "ownProperties": + out.OwnProperties = bool(in.Bool()) + case "accessorPropertiesOnly": + out.AccessorPropertiesOnly = bool(in.Bool()) + case "generatePreview": + out.GeneratePreview = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime12(out *jwriter.Writer, in GetPropertiesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + if in.OwnProperties { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"ownProperties\":") + out.Bool(bool(in.OwnProperties)) + } + if in.AccessorPropertiesOnly { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"accessorPropertiesOnly\":") + out.Bool(bool(in.AccessorPropertiesOnly)) + } + if in.GeneratePreview { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"generatePreview\":") + out.Bool(bool(in.GeneratePreview)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetPropertiesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetPropertiesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetPropertiesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetPropertiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime13(in *jlexer.Lexer, out *CallFunctionOnReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + if in.IsNull() { + in.Skip() + out.Result = nil + } else { + if out.Result == nil { + out.Result = new(RemoteObject) + } + (*out.Result).UnmarshalEasyJSON(in) + } + case "exceptionDetails": + if in.IsNull() { + in.Skip() + out.ExceptionDetails = nil + } else { + if out.ExceptionDetails == nil { + out.ExceptionDetails = new(ExceptionDetails) + } + (*out.ExceptionDetails).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime13(out *jwriter.Writer, in CallFunctionOnReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + if in.Result == nil { + out.RawString("null") + } else { + (*in.Result).MarshalEasyJSON(out) + } + } + if in.ExceptionDetails != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionDetails\":") + if in.ExceptionDetails == nil { + out.RawString("null") + } else { + (*in.ExceptionDetails).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CallFunctionOnReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CallFunctionOnReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CallFunctionOnReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CallFunctionOnReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime14(in *jlexer.Lexer, out *CallFunctionOnParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "objectId": + out.ObjectID = RemoteObjectID(in.String()) + case "functionDeclaration": + out.FunctionDeclaration = string(in.String()) + case "arguments": + if in.IsNull() { + in.Skip() + out.Arguments = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Arguments = make([]*CallArgument, 0, 8) + } else { + out.Arguments = []*CallArgument{} + } + for !in.IsDelim(']') { + var v7 *CallArgument + if in.IsNull() { + in.Skip() + v7 = nil + } else { + if v7 == nil { + v7 = new(CallArgument) + } + (*v7).UnmarshalEasyJSON(in) + } + out.Arguments = append(out.Arguments, v7) + in.WantComma() + } + in.Delim(']') + } + case "silent": + out.Silent = bool(in.Bool()) + case "returnByValue": + out.ReturnByValue = bool(in.Bool()) + case "generatePreview": + out.GeneratePreview = bool(in.Bool()) + case "userGesture": + out.UserGesture = bool(in.Bool()) + case "awaitPromise": + out.AwaitPromise = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(out *jwriter.Writer, in CallFunctionOnParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"functionDeclaration\":") + out.String(string(in.FunctionDeclaration)) + if len(in.Arguments) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"arguments\":") + if in.Arguments == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v8, v9 := range in.Arguments { + if v8 > 0 { + out.RawByte(',') + } + if v9 == nil { + out.RawString("null") + } else { + (*v9).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Silent { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"silent\":") + out.Bool(bool(in.Silent)) + } + if in.ReturnByValue { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"returnByValue\":") + out.Bool(bool(in.ReturnByValue)) + } + if in.GeneratePreview { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"generatePreview\":") + out.Bool(bool(in.GeneratePreview)) + } + if in.UserGesture { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"userGesture\":") + out.Bool(bool(in.UserGesture)) + } + if in.AwaitPromise { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"awaitPromise\":") + out.Bool(bool(in.AwaitPromise)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CallFunctionOnParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CallFunctionOnParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CallFunctionOnParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CallFunctionOnParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime15(in *jlexer.Lexer, out *AwaitPromiseReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + if in.IsNull() { + in.Skip() + out.Result = nil + } else { + if out.Result == nil { + out.Result = new(RemoteObject) + } + (*out.Result).UnmarshalEasyJSON(in) + } + case "exceptionDetails": + if in.IsNull() { + in.Skip() + out.ExceptionDetails = nil + } else { + if out.ExceptionDetails == nil { + out.ExceptionDetails = new(ExceptionDetails) + } + (*out.ExceptionDetails).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(out *jwriter.Writer, in AwaitPromiseReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + if in.Result == nil { + out.RawString("null") + } else { + (*in.Result).MarshalEasyJSON(out) + } + } + if in.ExceptionDetails != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionDetails\":") + if in.ExceptionDetails == nil { + out.RawString("null") + } else { + (*in.ExceptionDetails).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AwaitPromiseReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AwaitPromiseReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AwaitPromiseReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AwaitPromiseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime16(in *jlexer.Lexer, out *AwaitPromiseParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "promiseObjectId": + out.PromiseObjectID = RemoteObjectID(in.String()) + case "returnByValue": + out.ReturnByValue = bool(in.Bool()) + case "generatePreview": + out.GeneratePreview = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(out *jwriter.Writer, in AwaitPromiseParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"promiseObjectId\":") + out.String(string(in.PromiseObjectID)) + if in.ReturnByValue { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"returnByValue\":") + out.Bool(bool(in.ReturnByValue)) + } + if in.GeneratePreview { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"generatePreview\":") + out.Bool(bool(in.GeneratePreview)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AwaitPromiseParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AwaitPromiseParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AwaitPromiseParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime16(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AwaitPromiseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime16(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime17(in *jlexer.Lexer, out *EvaluateReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "result": + if in.IsNull() { + in.Skip() + out.Result = nil + } else { + if out.Result == nil { + out.Result = new(RemoteObject) + } + (*out.Result).UnmarshalEasyJSON(in) + } + case "exceptionDetails": + if in.IsNull() { + in.Skip() + out.ExceptionDetails = nil + } else { + if out.ExceptionDetails == nil { + out.ExceptionDetails = new(ExceptionDetails) + } + (*out.ExceptionDetails).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime17(out *jwriter.Writer, in EvaluateReturns) { + out.RawByte('{') + first := true + _ = first + if in.Result != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"result\":") + if in.Result == nil { + out.RawString("null") + } else { + (*in.Result).MarshalEasyJSON(out) + } + } + if in.ExceptionDetails != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionDetails\":") + if in.ExceptionDetails == nil { + out.RawString("null") + } else { + (*in.ExceptionDetails).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EvaluateReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime17(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EvaluateReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime17(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EvaluateReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime17(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EvaluateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime17(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime18(in *jlexer.Lexer, out *EvaluateParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "expression": + out.Expression = string(in.String()) + case "objectGroup": + out.ObjectGroup = string(in.String()) + case "includeCommandLineAPI": + out.IncludeCommandLineAPI = bool(in.Bool()) + case "silent": + out.Silent = bool(in.Bool()) + case "contextId": + out.ContextID = ExecutionContextID(in.Int64()) + case "returnByValue": + out.ReturnByValue = bool(in.Bool()) + case "generatePreview": + out.GeneratePreview = bool(in.Bool()) + case "userGesture": + out.UserGesture = bool(in.Bool()) + case "awaitPromise": + out.AwaitPromise = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(out *jwriter.Writer, in EvaluateParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"expression\":") + out.String(string(in.Expression)) + if in.ObjectGroup != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectGroup\":") + out.String(string(in.ObjectGroup)) + } + if in.IncludeCommandLineAPI { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"includeCommandLineAPI\":") + out.Bool(bool(in.IncludeCommandLineAPI)) + } + if in.Silent { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"silent\":") + out.Bool(bool(in.Silent)) + } + if in.ContextID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"contextId\":") + out.Int64(int64(in.ContextID)) + } + if in.ReturnByValue { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"returnByValue\":") + out.Bool(bool(in.ReturnByValue)) + } + if in.GeneratePreview { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"generatePreview\":") + out.Bool(bool(in.GeneratePreview)) + } + if in.UserGesture { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"userGesture\":") + out.Bool(bool(in.UserGesture)) + } + if in.AwaitPromise { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"awaitPromise\":") + out.Bool(bool(in.AwaitPromise)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EvaluateParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EvaluateParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EvaluateParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime18(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EvaluateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime18(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime19(in *jlexer.Lexer, out *StackTrace) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "description": + out.Description = string(in.String()) + case "callFrames": + if in.IsNull() { + in.Skip() + out.CallFrames = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.CallFrames = make([]*CallFrame, 0, 8) + } else { + out.CallFrames = []*CallFrame{} + } + for !in.IsDelim(']') { + var v10 *CallFrame + if in.IsNull() { + in.Skip() + v10 = nil + } else { + if v10 == nil { + v10 = new(CallFrame) + } + (*v10).UnmarshalEasyJSON(in) + } + out.CallFrames = append(out.CallFrames, v10) + in.WantComma() + } + in.Delim(']') + } + case "parent": + if in.IsNull() { + in.Skip() + out.Parent = nil + } else { + if out.Parent == nil { + out.Parent = new(StackTrace) + } + (*out.Parent).UnmarshalEasyJSON(in) + } + case "promiseCreationFrame": + if in.IsNull() { + in.Skip() + out.PromiseCreationFrame = nil + } else { + if out.PromiseCreationFrame == nil { + out.PromiseCreationFrame = new(CallFrame) + } + (*out.PromiseCreationFrame).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(out *jwriter.Writer, in StackTrace) { + out.RawByte('{') + first := true + _ = first + if in.Description != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"description\":") + out.String(string(in.Description)) + } + if len(in.CallFrames) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"callFrames\":") + if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v11, v12 := range in.CallFrames { + if v11 > 0 { + out.RawByte(',') + } + if v12 == nil { + out.RawString("null") + } else { + (*v12).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.Parent != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"parent\":") + if in.Parent == nil { + out.RawString("null") + } else { + (*in.Parent).MarshalEasyJSON(out) + } + } + if in.PromiseCreationFrame != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"promiseCreationFrame\":") + if in.PromiseCreationFrame == nil { + out.RawString("null") + } else { + (*in.PromiseCreationFrame).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StackTrace) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StackTrace) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StackTrace) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime19(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StackTrace) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime19(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime20(in *jlexer.Lexer, out *CallFrame) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "functionName": + out.FunctionName = string(in.String()) + case "scriptId": + out.ScriptID = ScriptID(in.String()) + case "url": + out.URL = string(in.String()) + case "lineNumber": + out.LineNumber = int64(in.Int64()) + case "columnNumber": + out.ColumnNumber = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(out *jwriter.Writer, in CallFrame) { + out.RawByte('{') + first := true + _ = first + if in.FunctionName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"functionName\":") + out.String(string(in.FunctionName)) + } + if in.ScriptID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + } + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.LineNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Int64(int64(in.LineNumber)) + } + if in.ColumnNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNumber\":") + out.Int64(int64(in.ColumnNumber)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CallFrame) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CallFrame) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime21(in *jlexer.Lexer, out *ExceptionDetails) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "exceptionId": + out.ExceptionID = int64(in.Int64()) + case "text": + out.Text = string(in.String()) + case "lineNumber": + out.LineNumber = int64(in.Int64()) + case "columnNumber": + out.ColumnNumber = int64(in.Int64()) + case "scriptId": + out.ScriptID = ScriptID(in.String()) + case "url": + out.URL = string(in.String()) + case "stackTrace": + if in.IsNull() { + in.Skip() + out.StackTrace = nil + } else { + if out.StackTrace == nil { + out.StackTrace = new(StackTrace) + } + (*out.StackTrace).UnmarshalEasyJSON(in) + } + case "exception": + if in.IsNull() { + in.Skip() + out.Exception = nil + } else { + if out.Exception == nil { + out.Exception = new(RemoteObject) + } + (*out.Exception).UnmarshalEasyJSON(in) + } + case "executionContextId": + out.ExecutionContextID = ExecutionContextID(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(out *jwriter.Writer, in ExceptionDetails) { + out.RawByte('{') + first := true + _ = first + if in.ExceptionID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionId\":") + out.Int64(int64(in.ExceptionID)) + } + if in.Text != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"text\":") + out.String(string(in.Text)) + } + if in.LineNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Int64(int64(in.LineNumber)) + } + if in.ColumnNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNumber\":") + out.Int64(int64(in.ColumnNumber)) + } + if in.ScriptID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + } + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.StackTrace != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"stackTrace\":") + if in.StackTrace == nil { + out.RawString("null") + } else { + (*in.StackTrace).MarshalEasyJSON(out) + } + } + if in.Exception != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exception\":") + if in.Exception == nil { + out.RawString("null") + } else { + (*in.Exception).MarshalEasyJSON(out) + } + } + if in.ExecutionContextID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"executionContextId\":") + out.Int64(int64(in.ExecutionContextID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ExceptionDetails) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ExceptionDetails) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ExceptionDetails) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ExceptionDetails) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(in *jlexer.Lexer, out *ExecutionContextDescription) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "id": + out.ID = ExecutionContextID(in.Int64()) + case "origin": + out.Origin = string(in.String()) + case "name": + out.Name = string(in.String()) + case "auxData": + (out.AuxData).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer, in ExecutionContextDescription) { + out.RawByte('{') + first := true + _ = first + if in.ID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"id\":") + out.Int64(int64(in.ID)) + } + if in.Origin != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + out.String(string(in.Origin)) + } + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if (in.AuxData).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"auxData\":") + (in.AuxData).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ExecutionContextDescription) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ExecutionContextDescription) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ExecutionContextDescription) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ExecutionContextDescription) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime23(in *jlexer.Lexer, out *CallArgument) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "value": + (out.Value).UnmarshalEasyJSON(in) + case "unserializableValue": + (out.UnserializableValue).UnmarshalEasyJSON(in) + case "objectId": + out.ObjectID = RemoteObjectID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime23(out *jwriter.Writer, in CallArgument) { + out.RawByte('{') + first := true + _ = first + if (in.Value).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + (in.Value).MarshalEasyJSON(out) + } + if in.UnserializableValue != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"unserializableValue\":") + (in.UnserializableValue).MarshalEasyJSON(out) + } + if in.ObjectID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"objectId\":") + out.String(string(in.ObjectID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CallArgument) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime23(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CallArgument) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime23(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CallArgument) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime23(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CallArgument) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime23(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime24(in *jlexer.Lexer, out *InternalPropertyDescriptor) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -874,22 +2528,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(in *jlexer.Lexer, out switch key { case "name": out.Name = string(in.String()) - case "type": - (out.Type).UnmarshalEasyJSON(in) case "value": - out.Value = string(in.String()) - case "valuePreview": if in.IsNull() { in.Skip() - out.ValuePreview = nil + out.Value = nil } else { - if out.ValuePreview == nil { - out.ValuePreview = new(ObjectPreview) + if out.Value == nil { + out.Value = new(RemoteObject) } - (*out.ValuePreview).UnmarshalEasyJSON(in) + (*out.Value).UnmarshalEasyJSON(in) } - case "subtype": - (out.Subtype).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -900,7 +2548,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(out *jwriter.Writer, in PropertyPreview) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime24(out *jwriter.Writer, in InternalPropertyDescriptor) { out.RawByte('{') first := true _ = first @@ -912,69 +2560,45 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(out *jwriter.Writer, out.RawString("\"name\":") out.String(string(in.Name)) } - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Value != "" { + if in.Value != nil { if !first { out.RawByte(',') } first = false out.RawString("\"value\":") - out.String(string(in.Value)) - } - if in.ValuePreview != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"valuePreview\":") - if in.ValuePreview == nil { + if in.Value == nil { out.RawString("null") } else { - (*in.ValuePreview).MarshalEasyJSON(out) + (*in.Value).MarshalEasyJSON(out) } } - if in.Subtype != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"subtype\":") - (in.Subtype).MarshalEasyJSON(out) - } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v PropertyPreview) MarshalJSON() ([]byte, error) { +func (v InternalPropertyDescriptor) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v PropertyPreview) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(w, v) +func (v InternalPropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *PropertyPreview) UnmarshalJSON(data []byte) error { +func (v *InternalPropertyDescriptor) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime24(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *PropertyPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime8(l, v) +func (v *InternalPropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime24(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(in *jlexer.Lexer, out *PropertyDescriptor) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(in *jlexer.Lexer, out *PropertyDescriptor) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1055,7 +2679,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer, in PropertyDescriptor) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(out *jwriter.Writer, in PropertyDescriptor) { out.RawByte('{') first := true _ = first @@ -1161,1748 +2785,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v PropertyDescriptor) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v PropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *PropertyDescriptor) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *PropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime9(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime10(in *jlexer.Lexer, out *ObjectPreview) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "subtype": - (out.Subtype).UnmarshalEasyJSON(in) - case "description": - out.Description = string(in.String()) - case "overflow": - out.Overflow = bool(in.Bool()) - case "properties": - if in.IsNull() { - in.Skip() - out.Properties = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Properties = make([]*PropertyPreview, 0, 8) - } else { - out.Properties = []*PropertyPreview{} - } - for !in.IsDelim(']') { - var v4 *PropertyPreview - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(PropertyPreview) - } - (*v4).UnmarshalEasyJSON(in) - } - out.Properties = append(out.Properties, v4) - in.WantComma() - } - in.Delim(']') - } - case "entries": - if in.IsNull() { - in.Skip() - out.Entries = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Entries = make([]*EntryPreview, 0, 8) - } else { - out.Entries = []*EntryPreview{} - } - for !in.IsDelim(']') { - var v5 *EntryPreview - if in.IsNull() { - in.Skip() - v5 = nil - } else { - if v5 == nil { - v5 = new(EntryPreview) - } - (*v5).UnmarshalEasyJSON(in) - } - out.Entries = append(out.Entries, v5) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer, in ObjectPreview) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if in.Subtype != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"subtype\":") - (in.Subtype).MarshalEasyJSON(out) - } - if in.Description != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"description\":") - out.String(string(in.Description)) - } - if in.Overflow { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"overflow\":") - out.Bool(bool(in.Overflow)) - } - if len(in.Properties) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"properties\":") - if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v6, v7 := range in.Properties { - if v6 > 0 { - out.RawByte(',') - } - if v7 == nil { - out.RawString("null") - } else { - (*v7).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.Entries) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"entries\":") - if in.Entries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Entries { - 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 ObjectPreview) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ObjectPreview) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ObjectPreview) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ObjectPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime11(in *jlexer.Lexer, out *InternalPropertyDescriptor) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(RemoteObject) - } - (*out.Value).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(out *jwriter.Writer, in InternalPropertyDescriptor) { - out.RawByte('{') - first := true - _ = first - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if in.Value != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - if in.Value == nil { - out.RawString("null") - } else { - (*in.Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v InternalPropertyDescriptor) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v InternalPropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *InternalPropertyDescriptor) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *InternalPropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime12(in *jlexer.Lexer, out *GetPropertiesReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - if in.IsNull() { - in.Skip() - out.Result = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Result = make([]*PropertyDescriptor, 0, 8) - } else { - out.Result = []*PropertyDescriptor{} - } - for !in.IsDelim(']') { - var v10 *PropertyDescriptor - if in.IsNull() { - in.Skip() - v10 = nil - } else { - if v10 == nil { - v10 = new(PropertyDescriptor) - } - (*v10).UnmarshalEasyJSON(in) - } - out.Result = append(out.Result, v10) - in.WantComma() - } - in.Delim(']') - } - case "internalProperties": - if in.IsNull() { - in.Skip() - out.InternalProperties = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.InternalProperties = make([]*InternalPropertyDescriptor, 0, 8) - } else { - out.InternalProperties = []*InternalPropertyDescriptor{} - } - for !in.IsDelim(']') { - var v11 *InternalPropertyDescriptor - if in.IsNull() { - in.Skip() - v11 = nil - } else { - if v11 == nil { - v11 = new(InternalPropertyDescriptor) - } - (*v11).UnmarshalEasyJSON(in) - } - out.InternalProperties = append(out.InternalProperties, v11) - in.WantComma() - } - in.Delim(']') - } - case "exceptionDetails": - if in.IsNull() { - in.Skip() - out.ExceptionDetails = nil - } else { - if out.ExceptionDetails == nil { - out.ExceptionDetails = new(ExceptionDetails) - } - (*out.ExceptionDetails).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime12(out *jwriter.Writer, in GetPropertiesReturns) { - out.RawByte('{') - first := true - _ = first - if len(in.Result) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v12, v13 := range in.Result { - if v12 > 0 { - out.RawByte(',') - } - if v13 == nil { - out.RawString("null") - } else { - (*v13).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if len(in.InternalProperties) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"internalProperties\":") - if in.InternalProperties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.InternalProperties { - if v14 > 0 { - out.RawByte(',') - } - if v15 == nil { - out.RawString("null") - } else { - (*v15).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.ExceptionDetails != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionDetails\":") - if in.ExceptionDetails == nil { - out.RawString("null") - } else { - (*in.ExceptionDetails).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetPropertiesReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPropertiesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPropertiesReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPropertiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime13(in *jlexer.Lexer, out *GetPropertiesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "objectId": - out.ObjectID = RemoteObjectID(in.String()) - case "ownProperties": - out.OwnProperties = bool(in.Bool()) - case "accessorPropertiesOnly": - out.AccessorPropertiesOnly = bool(in.Bool()) - case "generatePreview": - out.GeneratePreview = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime13(out *jwriter.Writer, in GetPropertiesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - if in.OwnProperties { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"ownProperties\":") - out.Bool(bool(in.OwnProperties)) - } - if in.AccessorPropertiesOnly { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"accessorPropertiesOnly\":") - out.Bool(bool(in.AccessorPropertiesOnly)) - } - if in.GeneratePreview { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"generatePreview\":") - out.Bool(bool(in.GeneratePreview)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetPropertiesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetPropertiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetPropertiesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetPropertiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime14(in *jlexer.Lexer, out *ExecutionContextDescription) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "id": - out.ID = ExecutionContextID(in.Int64()) - case "origin": - out.Origin = string(in.String()) - case "name": - out.Name = string(in.String()) - case "auxData": - (out.AuxData).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(out *jwriter.Writer, in ExecutionContextDescription) { - out.RawByte('{') - first := true - _ = first - if in.ID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"id\":") - out.Int64(int64(in.ID)) - } - if in.Origin != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"origin\":") - out.String(string(in.Origin)) - } - if in.Name != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"name\":") - out.String(string(in.Name)) - } - if (in.AuxData).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"auxData\":") - (in.AuxData).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ExecutionContextDescription) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ExecutionContextDescription) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ExecutionContextDescription) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ExecutionContextDescription) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime14(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime15(in *jlexer.Lexer, out *ExceptionDetails) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "exceptionId": - out.ExceptionID = int64(in.Int64()) - case "text": - out.Text = string(in.String()) - case "lineNumber": - out.LineNumber = int64(in.Int64()) - case "columnNumber": - out.ColumnNumber = int64(in.Int64()) - case "scriptId": - out.ScriptID = ScriptID(in.String()) - case "url": - out.URL = string(in.String()) - case "stackTrace": - if in.IsNull() { - in.Skip() - out.StackTrace = nil - } else { - if out.StackTrace == nil { - out.StackTrace = new(StackTrace) - } - (*out.StackTrace).UnmarshalEasyJSON(in) - } - case "exception": - if in.IsNull() { - in.Skip() - out.Exception = nil - } else { - if out.Exception == nil { - out.Exception = new(RemoteObject) - } - (*out.Exception).UnmarshalEasyJSON(in) - } - case "executionContextId": - out.ExecutionContextID = ExecutionContextID(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(out *jwriter.Writer, in ExceptionDetails) { - out.RawByte('{') - first := true - _ = first - if in.ExceptionID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionId\":") - out.Int64(int64(in.ExceptionID)) - } - if in.Text != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"text\":") - out.String(string(in.Text)) - } - if in.LineNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lineNumber\":") - out.Int64(int64(in.LineNumber)) - } - if in.ColumnNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"columnNumber\":") - out.Int64(int64(in.ColumnNumber)) - } - if in.ScriptID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - } - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.StackTrace != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"stackTrace\":") - if in.StackTrace == nil { - out.RawString("null") - } else { - (*in.StackTrace).MarshalEasyJSON(out) - } - } - if in.Exception != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exception\":") - if in.Exception == nil { - out.RawString("null") - } else { - (*in.Exception).MarshalEasyJSON(out) - } - } - if in.ExecutionContextID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"executionContextId\":") - out.Int64(int64(in.ExecutionContextID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ExceptionDetails) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ExceptionDetails) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ExceptionDetails) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime15(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ExceptionDetails) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime15(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime16(in *jlexer.Lexer, out *EventInspectRequested) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "object": - if in.IsNull() { - in.Skip() - out.Object = nil - } else { - if out.Object == nil { - out.Object = new(RemoteObject) - } - (*out.Object).UnmarshalEasyJSON(in) - } - case "hints": - (out.Hints).UnmarshalEasyJSON(in) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(out *jwriter.Writer, in EventInspectRequested) { - out.RawByte('{') - first := true - _ = first - if in.Object != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"object\":") - if in.Object == nil { - out.RawString("null") - } else { - (*in.Object).MarshalEasyJSON(out) - } - } - if (in.Hints).IsDefined() { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hints\":") - (in.Hints).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventInspectRequested) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventInspectRequested) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventInspectRequested) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventInspectRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime17(in *jlexer.Lexer, out *EventExecutionContextsCleared) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime17(out *jwriter.Writer, in EventExecutionContextsCleared) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventExecutionContextsCleared) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventExecutionContextsCleared) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventExecutionContextsCleared) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventExecutionContextsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime18(in *jlexer.Lexer, out *EventExecutionContextDestroyed) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "executionContextId": - out.ExecutionContextID = ExecutionContextID(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(out *jwriter.Writer, in EventExecutionContextDestroyed) { - out.RawByte('{') - first := true - _ = first - if in.ExecutionContextID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"executionContextId\":") - out.Int64(int64(in.ExecutionContextID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventExecutionContextDestroyed) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventExecutionContextDestroyed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventExecutionContextDestroyed) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventExecutionContextDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime19(in *jlexer.Lexer, out *EventExecutionContextCreated) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "context": - if in.IsNull() { - in.Skip() - out.Context = nil - } else { - if out.Context == nil { - out.Context = new(ExecutionContextDescription) - } - (*out.Context).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(out *jwriter.Writer, in EventExecutionContextCreated) { - out.RawByte('{') - first := true - _ = first - if in.Context != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"context\":") - if in.Context == nil { - out.RawString("null") - } else { - (*in.Context).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventExecutionContextCreated) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventExecutionContextCreated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventExecutionContextCreated) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventExecutionContextCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime20(in *jlexer.Lexer, out *EventExceptionThrown) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "exceptionDetails": - if in.IsNull() { - in.Skip() - out.ExceptionDetails = nil - } else { - if out.ExceptionDetails == nil { - out.ExceptionDetails = new(ExceptionDetails) - } - (*out.ExceptionDetails).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(out *jwriter.Writer, in EventExceptionThrown) { - out.RawByte('{') - first := true - _ = first - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.ExceptionDetails != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionDetails\":") - if in.ExceptionDetails == nil { - out.RawString("null") - } else { - (*in.ExceptionDetails).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventExceptionThrown) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventExceptionThrown) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventExceptionThrown) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime20(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventExceptionThrown) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime20(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime21(in *jlexer.Lexer, out *EventExceptionRevoked) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "reason": - out.Reason = string(in.String()) - case "exceptionId": - out.ExceptionID = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(out *jwriter.Writer, in EventExceptionRevoked) { - out.RawByte('{') - first := true - _ = first - if in.Reason != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"reason\":") - out.String(string(in.Reason)) - } - if in.ExceptionID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionId\":") - out.Int64(int64(in.ExceptionID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventExceptionRevoked) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventExceptionRevoked) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventExceptionRevoked) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventExceptionRevoked) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(in *jlexer.Lexer, out *EventConsoleAPICalled) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - (out.Type).UnmarshalEasyJSON(in) - case "args": - if in.IsNull() { - in.Skip() - out.Args = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Args = make([]*RemoteObject, 0, 8) - } else { - out.Args = []*RemoteObject{} - } - for !in.IsDelim(']') { - var v16 *RemoteObject - if in.IsNull() { - in.Skip() - v16 = nil - } else { - if v16 == nil { - v16 = new(RemoteObject) - } - (*v16).UnmarshalEasyJSON(in) - } - out.Args = append(out.Args, v16) - in.WantComma() - } - in.Delim(']') - } - case "executionContextId": - out.ExecutionContextID = ExecutionContextID(in.Int64()) - case "timestamp": - (out.Timestamp).UnmarshalEasyJSON(in) - case "stackTrace": - if in.IsNull() { - in.Skip() - out.StackTrace = nil - } else { - if out.StackTrace == nil { - out.StackTrace = new(StackTrace) - } - (*out.StackTrace).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer, in EventConsoleAPICalled) { - out.RawByte('{') - first := true - _ = first - if in.Type != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"type\":") - (in.Type).MarshalEasyJSON(out) - } - if len(in.Args) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"args\":") - if in.Args == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v17, v18 := range in.Args { - if v17 > 0 { - out.RawByte(',') - } - if v18 == nil { - out.RawString("null") - } else { - (*v18).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.ExecutionContextID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"executionContextId\":") - out.Int64(int64(in.ExecutionContextID)) - } - if true { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"timestamp\":") - (in.Timestamp).MarshalEasyJSON(out) - } - if in.StackTrace != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"stackTrace\":") - if in.StackTrace == nil { - out.RawString("null") - } else { - (*in.StackTrace).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventConsoleAPICalled) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventConsoleAPICalled) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventConsoleAPICalled) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventConsoleAPICalled) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime23(in *jlexer.Lexer, out *EvaluateReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - if in.IsNull() { - in.Skip() - out.Result = nil - } else { - if out.Result == nil { - out.Result = new(RemoteObject) - } - (*out.Result).UnmarshalEasyJSON(in) - } - case "exceptionDetails": - if in.IsNull() { - in.Skip() - out.ExceptionDetails = nil - } else { - if out.ExceptionDetails == nil { - out.ExceptionDetails = new(ExceptionDetails) - } - (*out.ExceptionDetails).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime23(out *jwriter.Writer, in EvaluateReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - if in.Result == nil { - out.RawString("null") - } else { - (*in.Result).MarshalEasyJSON(out) - } - } - if in.ExceptionDetails != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionDetails\":") - if in.ExceptionDetails == nil { - out.RawString("null") - } else { - (*in.ExceptionDetails).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EvaluateReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime23(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EvaluateReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime23(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EvaluateReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime23(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EvaluateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime23(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime24(in *jlexer.Lexer, out *EvaluateParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "expression": - out.Expression = string(in.String()) - case "objectGroup": - out.ObjectGroup = string(in.String()) - case "includeCommandLineAPI": - out.IncludeCommandLineAPI = bool(in.Bool()) - case "silent": - out.Silent = bool(in.Bool()) - case "contextId": - out.ContextID = ExecutionContextID(in.Int64()) - case "returnByValue": - out.ReturnByValue = bool(in.Bool()) - case "generatePreview": - out.GeneratePreview = bool(in.Bool()) - case "userGesture": - out.UserGesture = bool(in.Bool()) - case "awaitPromise": - out.AwaitPromise = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime24(out *jwriter.Writer, in EvaluateParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"expression\":") - out.String(string(in.Expression)) - if in.ObjectGroup != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectGroup\":") - out.String(string(in.ObjectGroup)) - } - if in.IncludeCommandLineAPI { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"includeCommandLineAPI\":") - out.Bool(bool(in.IncludeCommandLineAPI)) - } - if in.Silent { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"silent\":") - out.Bool(bool(in.Silent)) - } - if in.ContextID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"contextId\":") - out.Int64(int64(in.ContextID)) - } - if in.ReturnByValue { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"returnByValue\":") - out.Bool(bool(in.ReturnByValue)) - } - if in.GeneratePreview { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"generatePreview\":") - out.Bool(bool(in.GeneratePreview)) - } - if in.UserGesture { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"userGesture\":") - out.Bool(bool(in.UserGesture)) - } - if in.AwaitPromise { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"awaitPromise\":") - out.Bool(bool(in.AwaitPromise)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EvaluateParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime24(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EvaluateParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime24(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EvaluateParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime24(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EvaluateParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime24(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(in *jlexer.Lexer, out *EntryPreview) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime26(in *jlexer.Lexer, out *EntryPreview) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2951,7 +2854,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(out *jwriter.Writer, in EntryPreview) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime26(out *jwriter.Writer, in EntryPreview) { out.RawByte('{') first := true _ = first @@ -2984,87 +2887,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EntryPreview) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EntryPreview) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EntryPreview) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EntryPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime26(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime26(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EntryPreview) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { +func (v *EntryPreview) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime26(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EntryPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime26(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime27(in *jlexer.Lexer, out *DiscardConsoleEntriesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime27(in *jlexer.Lexer, out *PropertyPreview) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3083,6 +2927,24 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime27(in *jlexer.Lexer, ou continue } switch key { + case "name": + out.Name = string(in.String()) + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "value": + out.Value = string(in.String()) + case "valuePreview": + if in.IsNull() { + in.Skip() + out.ValuePreview = nil + } else { + if out.ValuePreview == nil { + out.ValuePreview = new(ObjectPreview) + } + (*out.ValuePreview).UnmarshalEasyJSON(in) + } + case "subtype": + (out.Subtype).UnmarshalEasyJSON(in) default: in.SkipRecursive() } @@ -3093,37 +2955,81 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime27(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime27(out *jwriter.Writer, in DiscardConsoleEntriesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime27(out *jwriter.Writer, in PropertyPreview) { out.RawByte('{') first := true _ = first + if in.Name != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"name\":") + out.String(string(in.Name)) + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Value != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.String(string(in.Value)) + } + if in.ValuePreview != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"valuePreview\":") + if in.ValuePreview == nil { + out.RawString("null") + } else { + (*in.ValuePreview).MarshalEasyJSON(out) + } + } + if in.Subtype != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"subtype\":") + (in.Subtype).MarshalEasyJSON(out) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v DiscardConsoleEntriesParams) MarshalJSON() ([]byte, error) { +func (v PropertyPreview) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime27(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DiscardConsoleEntriesParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v PropertyPreview) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime27(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DiscardConsoleEntriesParams) UnmarshalJSON(data []byte) error { +func (v *PropertyPreview) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime27(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DiscardConsoleEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *PropertyPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime27(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime28(in *jlexer.Lexer, out *DisableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime28(in *jlexer.Lexer, out *ObjectPreview) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3142,6 +3048,68 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime28(in *jlexer.Lexer, ou continue } switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "subtype": + (out.Subtype).UnmarshalEasyJSON(in) + case "description": + out.Description = string(in.String()) + case "overflow": + out.Overflow = bool(in.Bool()) + case "properties": + if in.IsNull() { + in.Skip() + out.Properties = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Properties = make([]*PropertyPreview, 0, 8) + } else { + out.Properties = []*PropertyPreview{} + } + for !in.IsDelim(']') { + var v13 *PropertyPreview + if in.IsNull() { + in.Skip() + v13 = nil + } else { + if v13 == nil { + v13 = new(PropertyPreview) + } + (*v13).UnmarshalEasyJSON(in) + } + out.Properties = append(out.Properties, v13) + in.WantComma() + } + in.Delim(']') + } + case "entries": + if in.IsNull() { + in.Skip() + out.Entries = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Entries = make([]*EntryPreview, 0, 8) + } else { + out.Entries = []*EntryPreview{} + } + for !in.IsDelim(']') { + var v14 *EntryPreview + if in.IsNull() { + in.Skip() + v14 = nil + } else { + if v14 == nil { + v14 = new(EntryPreview) + } + (*v14).UnmarshalEasyJSON(in) + } + out.Entries = append(out.Entries, v14) + in.WantComma() + } + in.Delim(']') + } default: in.SkipRecursive() } @@ -3152,34 +3120,112 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime28(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime28(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime28(out *jwriter.Writer, in ObjectPreview) { out.RawByte('{') first := true _ = first + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Subtype != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"subtype\":") + (in.Subtype).MarshalEasyJSON(out) + } + if in.Description != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"description\":") + out.String(string(in.Description)) + } + if in.Overflow { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"overflow\":") + out.Bool(bool(in.Overflow)) + } + if len(in.Properties) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"properties\":") + if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v15, v16 := range in.Properties { + if v15 > 0 { + out.RawByte(',') + } + if v16 == nil { + out.RawString("null") + } else { + (*v16).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if len(in.Entries) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"entries\":") + if in.Entries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v17, v18 := range in.Entries { + if v17 > 0 { + out.RawByte(',') + } + if v18 == nil { + out.RawString("null") + } else { + (*v18).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v DisableParams) MarshalJSON() ([]byte, error) { +func (v ObjectPreview) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime28(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v ObjectPreview) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime28(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { +func (v *ObjectPreview) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime28(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ObjectPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime28(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime29(in *jlexer.Lexer, out *CustomPreview) { @@ -3291,578 +3337,7 @@ func (v *CustomPreview) UnmarshalJSON(data []byte) error { func (v *CustomPreview) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime29(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime30(in *jlexer.Lexer, out *CompileScriptReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scriptId": - out.ScriptID = ScriptID(in.String()) - case "exceptionDetails": - if in.IsNull() { - in.Skip() - out.ExceptionDetails = nil - } else { - if out.ExceptionDetails == nil { - out.ExceptionDetails = new(ExceptionDetails) - } - (*out.ExceptionDetails).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime30(out *jwriter.Writer, in CompileScriptReturns) { - out.RawByte('{') - first := true - _ = first - if in.ScriptID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - } - if in.ExceptionDetails != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionDetails\":") - if in.ExceptionDetails == nil { - out.RawString("null") - } else { - (*in.ExceptionDetails).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CompileScriptReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime30(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CompileScriptReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime30(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CompileScriptReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime30(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CompileScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime30(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime31(in *jlexer.Lexer, out *CompileScriptParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "expression": - out.Expression = string(in.String()) - case "sourceURL": - out.SourceURL = string(in.String()) - case "persistScript": - out.PersistScript = bool(in.Bool()) - case "executionContextId": - out.ExecutionContextID = ExecutionContextID(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime31(out *jwriter.Writer, in CompileScriptParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"expression\":") - out.String(string(in.Expression)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sourceURL\":") - out.String(string(in.SourceURL)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"persistScript\":") - out.Bool(bool(in.PersistScript)) - if in.ExecutionContextID != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"executionContextId\":") - out.Int64(int64(in.ExecutionContextID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CompileScriptParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime31(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CompileScriptParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime31(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CompileScriptParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime31(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CompileScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime31(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime32(in *jlexer.Lexer, out *CallFunctionOnReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "result": - if in.IsNull() { - in.Skip() - out.Result = nil - } else { - if out.Result == nil { - out.Result = new(RemoteObject) - } - (*out.Result).UnmarshalEasyJSON(in) - } - case "exceptionDetails": - if in.IsNull() { - in.Skip() - out.ExceptionDetails = nil - } else { - if out.ExceptionDetails == nil { - out.ExceptionDetails = new(ExceptionDetails) - } - (*out.ExceptionDetails).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime32(out *jwriter.Writer, in CallFunctionOnReturns) { - out.RawByte('{') - first := true - _ = first - if in.Result != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"result\":") - if in.Result == nil { - out.RawString("null") - } else { - (*in.Result).MarshalEasyJSON(out) - } - } - if in.ExceptionDetails != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"exceptionDetails\":") - if in.ExceptionDetails == nil { - out.RawString("null") - } else { - (*in.ExceptionDetails).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CallFunctionOnReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime32(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CallFunctionOnReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime32(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CallFunctionOnReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime32(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CallFunctionOnReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime32(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime33(in *jlexer.Lexer, out *CallFunctionOnParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "objectId": - out.ObjectID = RemoteObjectID(in.String()) - case "functionDeclaration": - out.FunctionDeclaration = string(in.String()) - case "arguments": - if in.IsNull() { - in.Skip() - out.Arguments = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Arguments = make([]*CallArgument, 0, 8) - } else { - out.Arguments = []*CallArgument{} - } - for !in.IsDelim(']') { - var v19 *CallArgument - if in.IsNull() { - in.Skip() - v19 = nil - } else { - if v19 == nil { - v19 = new(CallArgument) - } - (*v19).UnmarshalEasyJSON(in) - } - out.Arguments = append(out.Arguments, v19) - in.WantComma() - } - in.Delim(']') - } - case "silent": - out.Silent = bool(in.Bool()) - case "returnByValue": - out.ReturnByValue = bool(in.Bool()) - case "generatePreview": - out.GeneratePreview = bool(in.Bool()) - case "userGesture": - out.UserGesture = bool(in.Bool()) - case "awaitPromise": - out.AwaitPromise = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime33(out *jwriter.Writer, in CallFunctionOnParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"objectId\":") - out.String(string(in.ObjectID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"functionDeclaration\":") - out.String(string(in.FunctionDeclaration)) - if len(in.Arguments) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"arguments\":") - if in.Arguments == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v20, v21 := range in.Arguments { - if v20 > 0 { - out.RawByte(',') - } - if v21 == nil { - out.RawString("null") - } else { - (*v21).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Silent { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"silent\":") - out.Bool(bool(in.Silent)) - } - if in.ReturnByValue { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"returnByValue\":") - out.Bool(bool(in.ReturnByValue)) - } - if in.GeneratePreview { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"generatePreview\":") - out.Bool(bool(in.GeneratePreview)) - } - if in.UserGesture { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"userGesture\":") - out.Bool(bool(in.UserGesture)) - } - if in.AwaitPromise { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"awaitPromise\":") - out.Bool(bool(in.AwaitPromise)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CallFunctionOnParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime33(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CallFunctionOnParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime33(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CallFunctionOnParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime33(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CallFunctionOnParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime33(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime34(in *jlexer.Lexer, out *CallFrame) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "functionName": - out.FunctionName = string(in.String()) - case "scriptId": - out.ScriptID = ScriptID(in.String()) - case "url": - out.URL = string(in.String()) - case "lineNumber": - out.LineNumber = int64(in.Int64()) - case "columnNumber": - out.ColumnNumber = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(out *jwriter.Writer, in CallFrame) { - out.RawByte('{') - first := true - _ = first - if in.FunctionName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"functionName\":") - out.String(string(in.FunctionName)) - } - if in.ScriptID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scriptId\":") - out.String(string(in.ScriptID)) - } - if in.URL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - } - if in.LineNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lineNumber\":") - out.Int64(int64(in.LineNumber)) - } - if in.ColumnNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"columnNumber\":") - out.Int64(int64(in.ColumnNumber)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CallFrame) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CallFrame) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime34(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime34(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(in *jlexer.Lexer, out *CallArgument) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime30(in *jlexer.Lexer, out *RemoteObject) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3881,12 +3356,40 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(in *jlexer.Lexer, ou continue } switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "subtype": + (out.Subtype).UnmarshalEasyJSON(in) + case "className": + out.ClassName = string(in.String()) case "value": (out.Value).UnmarshalEasyJSON(in) case "unserializableValue": (out.UnserializableValue).UnmarshalEasyJSON(in) + case "description": + out.Description = string(in.String()) case "objectId": out.ObjectID = RemoteObjectID(in.String()) + case "preview": + if in.IsNull() { + in.Skip() + out.Preview = nil + } else { + if out.Preview == nil { + out.Preview = new(ObjectPreview) + } + (*out.Preview).UnmarshalEasyJSON(in) + } + case "customPreview": + if in.IsNull() { + in.Skip() + out.CustomPreview = nil + } else { + if out.CustomPreview == nil { + out.CustomPreview = new(CustomPreview) + } + (*out.CustomPreview).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -3897,10 +3400,34 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(out *jwriter.Writer, in CallArgument) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime30(out *jwriter.Writer, in RemoteObject) { out.RawByte('{') first := true _ = first + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if in.Subtype != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"subtype\":") + (in.Subtype).MarshalEasyJSON(out) + } + if in.ClassName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"className\":") + out.String(string(in.ClassName)) + } if (in.Value).IsDefined() { if !first { out.RawByte(',') @@ -3917,6 +3444,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(out *jwriter.Writer, out.RawString("\"unserializableValue\":") (in.UnserializableValue).MarshalEasyJSON(out) } + if in.Description != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"description\":") + out.String(string(in.Description)) + } if in.ObjectID != "" { if !first { out.RawByte(',') @@ -3925,33 +3460,57 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(out *jwriter.Writer, out.RawString("\"objectId\":") out.String(string(in.ObjectID)) } + if in.Preview != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"preview\":") + if in.Preview == nil { + out.RawString("null") + } else { + (*in.Preview).MarshalEasyJSON(out) + } + } + if in.CustomPreview != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"customPreview\":") + if in.CustomPreview == nil { + out.RawString("null") + } else { + (*in.CustomPreview).MarshalEasyJSON(out) + } + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v CallArgument) MarshalJSON() ([]byte, error) { +func (v RemoteObject) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime30(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v CallArgument) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(w, v) +func (v RemoteObject) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime30(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *CallArgument) UnmarshalJSON(data []byte) error { +func (v *RemoteObject) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime30(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CallArgument) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(l, v) +func (v *RemoteObject) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime30(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(in *jlexer.Lexer, out *AwaitPromiseReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime31(in *jlexer.Lexer, out *EventInspectRequested) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3970,16 +3529,339 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(in *jlexer.Lexer, ou continue } switch key { - case "result": + case "object": if in.IsNull() { in.Skip() - out.Result = nil + out.Object = nil } else { - if out.Result == nil { - out.Result = new(RemoteObject) + if out.Object == nil { + out.Object = new(RemoteObject) } - (*out.Result).UnmarshalEasyJSON(in) + (*out.Object).UnmarshalEasyJSON(in) } + case "hints": + (out.Hints).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime31(out *jwriter.Writer, in EventInspectRequested) { + out.RawByte('{') + first := true + _ = first + if in.Object != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"object\":") + if in.Object == nil { + out.RawString("null") + } else { + (*in.Object).MarshalEasyJSON(out) + } + } + if (in.Hints).IsDefined() { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hints\":") + (in.Hints).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventInspectRequested) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime31(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventInspectRequested) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime31(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventInspectRequested) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime31(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventInspectRequested) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime31(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime32(in *jlexer.Lexer, out *EventConsoleAPICalled) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "type": + (out.Type).UnmarshalEasyJSON(in) + case "args": + if in.IsNull() { + in.Skip() + out.Args = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.Args = make([]*RemoteObject, 0, 8) + } else { + out.Args = []*RemoteObject{} + } + for !in.IsDelim(']') { + var v19 *RemoteObject + if in.IsNull() { + in.Skip() + v19 = nil + } else { + if v19 == nil { + v19 = new(RemoteObject) + } + (*v19).UnmarshalEasyJSON(in) + } + out.Args = append(out.Args, v19) + in.WantComma() + } + in.Delim(']') + } + case "executionContextId": + out.ExecutionContextID = ExecutionContextID(in.Int64()) + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) + case "stackTrace": + if in.IsNull() { + in.Skip() + out.StackTrace = nil + } else { + if out.StackTrace == nil { + out.StackTrace = new(StackTrace) + } + (*out.StackTrace).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime32(out *jwriter.Writer, in EventConsoleAPICalled) { + out.RawByte('{') + first := true + _ = first + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + if len(in.Args) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"args\":") + if in.Args == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v20, v21 := range in.Args { + if v20 > 0 { + out.RawByte(',') + } + if v21 == nil { + out.RawString("null") + } else { + (*v21).MarshalEasyJSON(out) + } + } + out.RawByte(']') + } + } + if in.ExecutionContextID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"executionContextId\":") + out.Int64(int64(in.ExecutionContextID)) + } + if true { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) + } + if in.StackTrace != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"stackTrace\":") + if in.StackTrace == nil { + out.RawString("null") + } else { + (*in.StackTrace).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventConsoleAPICalled) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime32(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventConsoleAPICalled) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime32(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventConsoleAPICalled) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime32(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventConsoleAPICalled) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime32(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime33(in *jlexer.Lexer, out *EventExceptionRevoked) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "reason": + out.Reason = string(in.String()) + case "exceptionId": + out.ExceptionID = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime33(out *jwriter.Writer, in EventExceptionRevoked) { + out.RawByte('{') + first := true + _ = first + if in.Reason != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"reason\":") + out.String(string(in.Reason)) + } + if in.ExceptionID != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"exceptionId\":") + out.Int64(int64(in.ExceptionID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventExceptionRevoked) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime33(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventExceptionRevoked) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime33(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventExceptionRevoked) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime33(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventExceptionRevoked) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime33(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime34(in *jlexer.Lexer, out *EventExceptionThrown) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "timestamp": + (out.Timestamp).UnmarshalEasyJSON(in) case "exceptionDetails": if in.IsNull() { in.Skip() @@ -4000,21 +3882,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(out *jwriter.Writer, in AwaitPromiseReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(out *jwriter.Writer, in EventExceptionThrown) { out.RawByte('{') first := true _ = first - if in.Result != nil { + if true { if !first { out.RawByte(',') } first = false - out.RawString("\"result\":") - if in.Result == nil { - out.RawString("null") - } else { - (*in.Result).MarshalEasyJSON(out) - } + out.RawString("\"timestamp\":") + (in.Timestamp).MarshalEasyJSON(out) } if in.ExceptionDetails != nil { if !first { @@ -4032,29 +3910,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(out *jwriter.Writer, } // MarshalJSON supports json.Marshaler interface -func (v AwaitPromiseReturns) MarshalJSON() ([]byte, error) { +func (v EventExceptionThrown) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AwaitPromiseReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(w, v) +func (v EventExceptionThrown) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AwaitPromiseReturns) UnmarshalJSON(data []byte) error { +func (v *EventExceptionThrown) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime34(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AwaitPromiseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(l, v) +func (v *EventExceptionThrown) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime34(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime37(in *jlexer.Lexer, out *AwaitPromiseParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(in *jlexer.Lexer, out *EventExecutionContextsCleared) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4073,12 +3951,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime37(in *jlexer.Lexer, ou continue } switch key { - case "promiseObjectId": - out.PromiseObjectID = RemoteObjectID(in.String()) - case "returnByValue": - out.ReturnByValue = bool(in.Bool()) - case "generatePreview": - out.GeneratePreview = bool(in.Bool()) default: in.SkipRecursive() } @@ -4089,55 +3961,183 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime37(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime37(out *jwriter.Writer, in AwaitPromiseParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(out *jwriter.Writer, in EventExecutionContextsCleared) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventExecutionContextsCleared) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventExecutionContextsCleared) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime35(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventExecutionContextsCleared) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventExecutionContextsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime35(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(in *jlexer.Lexer, out *EventExecutionContextDestroyed) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return } - first = false - out.RawString("\"promiseObjectId\":") - out.String(string(in.PromiseObjectID)) - if in.ReturnByValue { + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "executionContextId": + out.ExecutionContextID = ExecutionContextID(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(out *jwriter.Writer, in EventExecutionContextDestroyed) { + out.RawByte('{') + first := true + _ = first + if in.ExecutionContextID != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"returnByValue\":") - out.Bool(bool(in.ReturnByValue)) - } - if in.GeneratePreview { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"generatePreview\":") - out.Bool(bool(in.GeneratePreview)) + out.RawString("\"executionContextId\":") + out.Int64(int64(in.ExecutionContextID)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v AwaitPromiseParams) MarshalJSON() ([]byte, error) { +func (v EventExecutionContextDestroyed) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventExecutionContextDestroyed) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime36(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventExecutionContextDestroyed) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventExecutionContextDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime36(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime37(in *jlexer.Lexer, out *EventExecutionContextCreated) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "context": + if in.IsNull() { + in.Skip() + out.Context = nil + } else { + if out.Context == nil { + out.Context = new(ExecutionContextDescription) + } + (*out.Context).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime37(out *jwriter.Writer, in EventExecutionContextCreated) { + out.RawByte('{') + first := true + _ = first + if in.Context != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"context\":") + if in.Context == nil { + out.RawString("null") + } else { + (*in.Context).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventExecutionContextCreated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime37(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AwaitPromiseParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventExecutionContextCreated) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime37(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AwaitPromiseParams) UnmarshalJSON(data []byte) error { +func (v *EventExecutionContextCreated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime37(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AwaitPromiseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventExecutionContextCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpRuntime37(l, v) } diff --git a/cdp/runtime/runtime.go b/cdp/runtime/runtime.go index f9d76d7..f7826ed 100644 --- a/cdp/runtime/runtime.go +++ b/cdp/runtime/runtime.go @@ -17,7 +17,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EvaluateParams evaluates expression on global object. @@ -112,46 +111,14 @@ type EvaluateReturns struct { // result - Evaluation result. // exceptionDetails - Exception details. func (p *EvaluateParams) Do(ctxt context.Context, h cdp.Handler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res EvaluateReturns + err = h.Execute(ctxt, cdp.CommandRuntimeEvaluate, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeEvaluate, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r EvaluateReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.Result, r.ExceptionDetails, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.Result, res.ExceptionDetails, nil } // AwaitPromiseParams add handler to promise with given promise object id. @@ -197,46 +164,14 @@ type AwaitPromiseReturns struct { // result - Promise result. Will contain rejected value if promise was rejected. // exceptionDetails - Exception details if stack strace is available. func (p *AwaitPromiseParams) Do(ctxt context.Context, h cdp.Handler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res AwaitPromiseReturns + err = h.Execute(ctxt, cdp.CommandRuntimeAwaitPromise, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeAwaitPromise, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r AwaitPromiseReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.Result, r.ExceptionDetails, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.Result, res.ExceptionDetails, nil } // CallFunctionOnParams calls function with given declaration on the given @@ -319,46 +254,14 @@ type CallFunctionOnReturns struct { // result - Call result. // exceptionDetails - Exception details. func (p *CallFunctionOnParams) Do(ctxt context.Context, h cdp.Handler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CallFunctionOnReturns + err = h.Execute(ctxt, cdp.CommandRuntimeCallFunctionOn, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeCallFunctionOn, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CallFunctionOnReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.Result, r.ExceptionDetails, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.Result, res.ExceptionDetails, nil } // GetPropertiesParams returns properties of a given object. Object group of @@ -416,46 +319,14 @@ type GetPropertiesReturns struct { // internalProperties - Internal object properties (only of the element itself). // exceptionDetails - Exception details. func (p *GetPropertiesParams) Do(ctxt context.Context, h cdp.Handler) (result []*PropertyDescriptor, internalProperties []*InternalPropertyDescriptor, exceptionDetails *ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetPropertiesReturns + err = h.Execute(ctxt, cdp.CommandRuntimeGetProperties, p, &res) if err != nil { return nil, nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeGetProperties, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetPropertiesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, nil, cdp.ErrInvalidResult - } - - return r.Result, r.InternalProperties, r.ExceptionDetails, nil - - case error: - return nil, nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, nil, ctxt.Err() - } - - return nil, nil, nil, cdp.ErrUnknownResult + return res.Result, res.InternalProperties, res.ExceptionDetails, nil } // ReleaseObjectParams releases remote object with given id. @@ -476,39 +347,7 @@ func ReleaseObject(objectID RemoteObjectID) *ReleaseObjectParams { // Do executes Runtime.releaseObject against the provided context and // target handler. func (p *ReleaseObjectParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeReleaseObject, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeReleaseObject, p, nil) } // ReleaseObjectGroupParams releases all remote objects that belong to a @@ -531,39 +370,7 @@ func ReleaseObjectGroup(objectGroup string) *ReleaseObjectGroupParams { // Do executes Runtime.releaseObjectGroup against the provided context and // target handler. func (p *ReleaseObjectGroupParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeReleaseObjectGroup, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeReleaseObjectGroup, p, nil) } // RunIfWaitingForDebuggerParams tells inspected instance to run if it was @@ -579,33 +386,7 @@ func RunIfWaitingForDebugger() *RunIfWaitingForDebuggerParams { // Do executes Runtime.runIfWaitingForDebugger against the provided context and // target handler. func (p *RunIfWaitingForDebuggerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeRunIfWaitingForDebugger, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeRunIfWaitingForDebugger, nil, nil) } // EnableParams enables reporting of execution contexts creation by means of @@ -623,33 +404,7 @@ func Enable() *EnableParams { // Do executes Runtime.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeEnable, nil, nil) } // DisableParams disables reporting of execution contexts creation. @@ -663,33 +418,7 @@ func Disable() *DisableParams { // Do executes Runtime.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeDisable, nil, nil) } // DiscardConsoleEntriesParams discards collected exceptions and console API @@ -704,33 +433,7 @@ func DiscardConsoleEntries() *DiscardConsoleEntriesParams { // Do executes Runtime.discardConsoleEntries against the provided context and // target handler. func (p *DiscardConsoleEntriesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeDiscardConsoleEntries, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeDiscardConsoleEntries, nil, nil) } // SetCustomObjectFormatterEnabledParams [no description]. @@ -751,39 +454,7 @@ func SetCustomObjectFormatterEnabled(enabled bool) *SetCustomObjectFormatterEnab // Do executes Runtime.setCustomObjectFormatterEnabled against the provided context and // target handler. func (p *SetCustomObjectFormatterEnabledParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeSetCustomObjectFormatterEnabled, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandRuntimeSetCustomObjectFormatterEnabled, p, nil) } // CompileScriptParams compiles expression. @@ -829,46 +500,14 @@ type CompileScriptReturns struct { // scriptID - Id of the script. // exceptionDetails - Exception details. func (p *CompileScriptParams) Do(ctxt context.Context, h cdp.Handler) (scriptID ScriptID, exceptionDetails *ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CompileScriptReturns + err = h.Execute(ctxt, cdp.CommandRuntimeCompileScript, p, &res) if err != nil { return "", nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeCompileScript, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CompileScriptReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", nil, cdp.ErrInvalidResult - } - - return r.ScriptID, r.ExceptionDetails, nil - - case error: - return "", nil, v - } - - case <-ctxt.Done(): - return "", nil, ctxt.Err() - } - - return "", nil, cdp.ErrUnknownResult + return res.ScriptID, res.ExceptionDetails, nil } // RunScriptParams runs script with given id in a given context. @@ -955,44 +594,12 @@ type RunScriptReturns struct { // result - Run result. // exceptionDetails - Exception details. func (p *RunScriptParams) Do(ctxt context.Context, h cdp.Handler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res RunScriptReturns + err = h.Execute(ctxt, cdp.CommandRuntimeRunScript, p, &res) if err != nil { return nil, nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandRuntimeRunScript, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RunScriptReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, nil, cdp.ErrInvalidResult - } - - return r.Result, r.ExceptionDetails, nil - - case error: - return nil, nil, v - } - - case <-ctxt.Done(): - return nil, nil, ctxt.Err() - } - - return nil, nil, cdp.ErrUnknownResult + return res.Result, res.ExceptionDetails, nil } diff --git a/cdp/schema/schema.go b/cdp/schema/schema.go index b94038d..df7975f 100644 --- a/cdp/schema/schema.go +++ b/cdp/schema/schema.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // GetDomainsParams returns supported domains. @@ -34,38 +33,12 @@ type GetDomainsReturns struct { // returns: // domains - List of supported domains. func (p *GetDomainsParams) Do(ctxt context.Context, h cdp.Handler) (domains []*Domain, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandSchemaGetDomains, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetDomainsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Domains, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetDomainsReturns + err = h.Execute(ctxt, cdp.CommandSchemaGetDomains, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.Domains, nil } diff --git a/cdp/security/easyjson.go b/cdp/security/easyjson.go index 1a7dbed..7b9076a 100644 --- a/cdp/security/easyjson.go +++ b/cdp/security/easyjson.go @@ -17,106 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "securityState": - (out.SecurityState).UnmarshalEasyJSON(in) - case "summary": - out.Summary = string(in.String()) - case "description": - out.Description = string(in.String()) - case "hasCertificate": - out.HasCertificate = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(out *jwriter.Writer, in StateExplanation) { - out.RawByte('{') - first := true - _ = first - if in.SecurityState != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"securityState\":") - (in.SecurityState).MarshalEasyJSON(out) - } - if in.Summary != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"summary\":") - out.String(string(in.Summary)) - } - if in.Description != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"description\":") - out.String(string(in.Description)) - } - if in.HasCertificate { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"hasCertificate\":") - out.Bool(bool(in.HasCertificate)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StateExplanation) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StateExplanation) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StateExplanation) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(in *jlexer.Lexer, out *ShowCertificateViewerParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(in *jlexer.Lexer, out *ShowCertificateViewerParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -145,7 +46,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(out *jwriter.Writer, in ShowCertificateViewerParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(out *jwriter.Writer, in ShowCertificateViewerParams) { out.RawByte('{') first := true _ = first @@ -155,27 +56,145 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ShowCertificateViewerParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ShowCertificateViewerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ShowCertificateViewerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ShowCertificateViewerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ShowCertificateViewerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(in *jlexer.Lexer, out *InsecureContentStatus) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(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{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, out *InsecureContentStatus) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -216,7 +235,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(out *jwriter.Writer, in InsecureContentStatus) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer, in InsecureContentStatus) { out.RawByte('{') first := true _ = first @@ -274,27 +293,126 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v InsecureContentStatus) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v InsecureContentStatus) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *InsecureContentStatus) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *InsecureContentStatus) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, out *EventSecurityStateChanged) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(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.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "securityState": + (out.SecurityState).UnmarshalEasyJSON(in) + case "summary": + out.Summary = string(in.String()) + case "description": + out.Description = string(in.String()) + case "hasCertificate": + out.HasCertificate = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(out *jwriter.Writer, in StateExplanation) { + out.RawByte('{') + first := true + _ = first + if in.SecurityState != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"securityState\":") + (in.SecurityState).MarshalEasyJSON(out) + } + if in.Summary != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"summary\":") + out.String(string(in.Summary)) + } + if in.Description != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"description\":") + out.String(string(in.Description)) + } + if in.HasCertificate { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"hasCertificate\":") + out.Bool(bool(in.HasCertificate)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StateExplanation) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StateExplanation) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StateExplanation) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(in *jlexer.Lexer, out *EventSecurityStateChanged) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -366,7 +484,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer, in EventSecurityStateChanged) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer, in EventSecurityStateChanged) { out.RawByte('{') first := true _ = first @@ -434,142 +552,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventSecurityStateChanged) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventSecurityStateChanged) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(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{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DisableParams) UnmarshalJSON(data []byte) error { +func (v *EventSecurityStateChanged) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(l, v) } diff --git a/cdp/security/security.go b/cdp/security/security.go index 97da31e..f641457 100644 --- a/cdp/security/security.go +++ b/cdp/security/security.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams enables tracking security state changes. @@ -26,33 +25,7 @@ func Enable() *EnableParams { // Do executes Security.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandSecurityEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandSecurityEnable, nil, nil) } // DisableParams disables tracking security state changes. @@ -66,33 +39,7 @@ func Disable() *DisableParams { // Do executes Security.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandSecurityDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandSecurityDisable, nil, nil) } // ShowCertificateViewerParams displays native dialog with the certificate @@ -107,31 +54,5 @@ func ShowCertificateViewer() *ShowCertificateViewerParams { // Do executes Security.showCertificateViewer against the provided context and // target handler. func (p *ShowCertificateViewerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandSecurityShowCertificateViewer, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandSecurityShowCertificateViewer, nil, nil) } diff --git a/cdp/serviceworker/easyjson.go b/cdp/serviceworker/easyjson.go index d48c17d..6dab7f8 100644 --- a/cdp/serviceworker/easyjson.go +++ b/cdp/serviceworker/easyjson.go @@ -18,7 +18,126 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(in *jlexer.Lexer, out *Version) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(in *jlexer.Lexer, out *ErrorMessage) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "errorMessage": + out.ErrorMessage = string(in.String()) + case "registrationId": + out.RegistrationID = string(in.String()) + case "versionId": + out.VersionID = string(in.String()) + case "sourceURL": + out.SourceURL = string(in.String()) + case "lineNumber": + out.LineNumber = int64(in.Int64()) + case "columnNumber": + out.ColumnNumber = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(out *jwriter.Writer, in ErrorMessage) { + out.RawByte('{') + first := true + _ = first + if in.ErrorMessage != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"errorMessage\":") + out.String(string(in.ErrorMessage)) + } + if in.RegistrationID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"registrationId\":") + out.String(string(in.RegistrationID)) + } + if in.VersionID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"versionId\":") + out.String(string(in.VersionID)) + } + if in.SourceURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"sourceURL\":") + out.String(string(in.SourceURL)) + } + if in.LineNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Int64(int64(in.LineNumber)) + } + if in.ColumnNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNumber\":") + out.Int64(int64(in.ColumnNumber)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ErrorMessage) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ErrorMessage) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ErrorMessage) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ErrorMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker1(in *jlexer.Lexer, out *Version) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -82,7 +201,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(in *jlexer.Lexer in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(out *jwriter.Writer, in Version) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker1(out *jwriter.Writer, in Version) { out.RawByte('{') first := true _ = first @@ -174,430 +293,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(out *jwriter.Wri // MarshalJSON supports json.Marshaler interface func (v Version) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Version) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Version) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Version) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker1(in *jlexer.Lexer, out *UpdateRegistrationParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scopeURL": - out.ScopeURL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker1(out *jwriter.Writer, in UpdateRegistrationParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scopeURL\":") - out.String(string(in.ScopeURL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v UpdateRegistrationParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v UpdateRegistrationParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v Version) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *UpdateRegistrationParams) UnmarshalJSON(data []byte) error { +func (v *Version) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *UpdateRegistrationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *Version) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker2(in *jlexer.Lexer, out *UnregisterParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scopeURL": - out.ScopeURL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker2(out *jwriter.Writer, in UnregisterParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scopeURL\":") - out.String(string(in.ScopeURL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v UnregisterParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v UnregisterParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *UnregisterParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *UnregisterParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker3(in *jlexer.Lexer, out *StopWorkerParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "versionId": - out.VersionID = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker3(out *jwriter.Writer, in StopWorkerParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"versionId\":") - out.String(string(in.VersionID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StopWorkerParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StopWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StopWorkerParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StopWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker4(in *jlexer.Lexer, out *StartWorkerParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scopeURL": - out.ScopeURL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker4(out *jwriter.Writer, in StartWorkerParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scopeURL\":") - out.String(string(in.ScopeURL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v StartWorkerParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v StartWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *StartWorkerParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StartWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker5(in *jlexer.Lexer, out *SkipWaitingParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "scopeURL": - out.ScopeURL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker5(out *jwriter.Writer, in SkipWaitingParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"scopeURL\":") - out.String(string(in.ScopeURL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SkipWaitingParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SkipWaitingParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SkipWaitingParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SkipWaitingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker5(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker6(in *jlexer.Lexer, out *SetForceUpdateOnPageLoadParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "forceUpdateOnPageLoad": - out.ForceUpdateOnPageLoad = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker6(out *jwriter.Writer, in SetForceUpdateOnPageLoadParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"forceUpdateOnPageLoad\":") - out.Bool(bool(in.ForceUpdateOnPageLoad)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetForceUpdateOnPageLoadParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetForceUpdateOnPageLoadParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetForceUpdateOnPageLoadParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetForceUpdateOnPageLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker6(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(in *jlexer.Lexer, out *Registration) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker2(in *jlexer.Lexer, out *Registration) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -632,7 +349,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(out *jwriter.Writer, in Registration) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker2(out *jwriter.Writer, in Registration) { out.RawByte('{') first := true _ = first @@ -666,27 +383,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(out *jwriter.Wr // MarshalJSON supports json.Marshaler interface func (v Registration) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Registration) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Registration) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Registration) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(in *jlexer.Lexer, out *InspectWorkerParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker3(in *jlexer.Lexer, out *EventWorkerErrorReported) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -705,8 +422,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(in *jlexer.Lexe continue } switch key { - case "versionId": - out.VersionID = string(in.String()) + case "errorMessage": + if in.IsNull() { + in.Skip() + out.ErrorMessage = nil + } else { + if out.ErrorMessage == nil { + out.ErrorMessage = new(ErrorMessage) + } + (*out.ErrorMessage).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -717,43 +442,49 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker8(out *jwriter.Writer, in InspectWorkerParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker3(out *jwriter.Writer, in EventWorkerErrorReported) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.ErrorMessage != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"errorMessage\":") + if in.ErrorMessage == nil { + out.RawString("null") + } else { + (*in.ErrorMessage).MarshalEasyJSON(out) + } } - first = false - out.RawString("\"versionId\":") - out.String(string(in.VersionID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v InspectWorkerParams) MarshalJSON() ([]byte, error) { +func (v EventWorkerErrorReported) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker8(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v InspectWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker8(w, v) +func (v EventWorkerErrorReported) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *InspectWorkerParams) UnmarshalJSON(data []byte) error { +func (v *EventWorkerErrorReported) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *InspectWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(l, v) +func (v *EventWorkerErrorReported) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker3(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(in *jlexer.Lexer, out *EventWorkerVersionUpdated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker4(in *jlexer.Lexer, out *EventWorkerVersionUpdated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -809,7 +540,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(in *jlexer.Lexe in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(out *jwriter.Writer, in EventWorkerVersionUpdated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker4(out *jwriter.Writer, in EventWorkerVersionUpdated) { out.RawByte('{') first := true _ = first @@ -842,27 +573,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(out *jwriter.Wr // MarshalJSON supports json.Marshaler interface func (v EventWorkerVersionUpdated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventWorkerVersionUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventWorkerVersionUpdated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventWorkerVersionUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(in *jlexer.Lexer, out *EventWorkerRegistrationUpdated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker5(in *jlexer.Lexer, out *EventWorkerRegistrationUpdated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -918,7 +649,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(in *jlexer.Lex in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(out *jwriter.Writer, in EventWorkerRegistrationUpdated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker5(out *jwriter.Writer, in EventWorkerRegistrationUpdated) { out.RawByte('{') first := true _ = first @@ -951,286 +682,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(out *jwriter.W // MarshalJSON supports json.Marshaler interface func (v EventWorkerRegistrationUpdated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventWorkerRegistrationUpdated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventWorkerRegistrationUpdated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventWorkerRegistrationUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker5(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker11(in *jlexer.Lexer, out *EventWorkerErrorReported) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "errorMessage": - if in.IsNull() { - in.Skip() - out.ErrorMessage = nil - } else { - if out.ErrorMessage == nil { - out.ErrorMessage = new(ErrorMessage) - } - (*out.ErrorMessage).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(out *jwriter.Writer, in EventWorkerErrorReported) { - out.RawByte('{') - first := true - _ = first - if in.ErrorMessage != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"errorMessage\":") - if in.ErrorMessage == nil { - out.RawString("null") - } else { - (*in.ErrorMessage).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventWorkerErrorReported) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventWorkerErrorReported) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventWorkerErrorReported) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventWorkerErrorReported) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker11(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker12(in *jlexer.Lexer, out *ErrorMessage) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "errorMessage": - out.ErrorMessage = string(in.String()) - case "registrationId": - out.RegistrationID = string(in.String()) - case "versionId": - out.VersionID = string(in.String()) - case "sourceURL": - out.SourceURL = string(in.String()) - case "lineNumber": - out.LineNumber = int64(in.Int64()) - case "columnNumber": - out.ColumnNumber = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(out *jwriter.Writer, in ErrorMessage) { - out.RawByte('{') - first := true - _ = first - if in.ErrorMessage != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"errorMessage\":") - out.String(string(in.ErrorMessage)) - } - if in.RegistrationID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"registrationId\":") - out.String(string(in.RegistrationID)) - } - if in.VersionID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"versionId\":") - out.String(string(in.VersionID)) - } - if in.SourceURL != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"sourceURL\":") - out.String(string(in.SourceURL)) - } - if in.LineNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"lineNumber\":") - out.Int64(int64(in.LineNumber)) - } - if in.ColumnNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"columnNumber\":") - out.Int64(int64(in.ColumnNumber)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ErrorMessage) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ErrorMessage) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ErrorMessage) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ErrorMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker12(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker13(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.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker13(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{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EnableParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker13(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker14(in *jlexer.Lexer, out *DispatchSyncEventParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker6(in *jlexer.Lexer, out *DispatchSyncEventParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1267,7 +739,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker14(in *jlexer.Lex in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(out *jwriter.Writer, in DispatchSyncEventParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker6(out *jwriter.Writer, in DispatchSyncEventParams) { out.RawByte('{') first := true _ = first @@ -1301,24 +773,576 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(out *jwriter.W // MarshalJSON supports json.Marshaler interface func (v DispatchSyncEventParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DispatchSyncEventParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DispatchSyncEventParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DispatchSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(in *jlexer.Lexer, out *DeliverPushMessageParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "origin": + out.Origin = string(in.String()) + case "registrationId": + out.RegistrationID = string(in.String()) + case "data": + out.Data = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(out *jwriter.Writer, in DeliverPushMessageParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"origin\":") + out.String(string(in.Origin)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"registrationId\":") + out.String(string(in.RegistrationID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"data\":") + out.String(string(in.Data)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DeliverPushMessageParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DeliverPushMessageParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DeliverPushMessageParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DeliverPushMessageParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(in *jlexer.Lexer, out *SetForceUpdateOnPageLoadParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "forceUpdateOnPageLoad": + out.ForceUpdateOnPageLoad = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker8(out *jwriter.Writer, in SetForceUpdateOnPageLoadParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"forceUpdateOnPageLoad\":") + out.Bool(bool(in.ForceUpdateOnPageLoad)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetForceUpdateOnPageLoadParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetForceUpdateOnPageLoadParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetForceUpdateOnPageLoadParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetForceUpdateOnPageLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(in *jlexer.Lexer, out *InspectWorkerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "versionId": + out.VersionID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(out *jwriter.Writer, in InspectWorkerParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"versionId\":") + out.String(string(in.VersionID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v InspectWorkerParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v InspectWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *InspectWorkerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *InspectWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(in *jlexer.Lexer, out *StopWorkerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "versionId": + out.VersionID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(out *jwriter.Writer, in StopWorkerParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"versionId\":") + out.String(string(in.VersionID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StopWorkerParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StopWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StopWorkerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StopWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker11(in *jlexer.Lexer, out *SkipWaitingParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scopeURL": + out.ScopeURL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(out *jwriter.Writer, in SkipWaitingParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scopeURL\":") + out.String(string(in.ScopeURL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SkipWaitingParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SkipWaitingParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SkipWaitingParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SkipWaitingParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker12(in *jlexer.Lexer, out *StartWorkerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scopeURL": + out.ScopeURL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(out *jwriter.Writer, in StartWorkerParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scopeURL\":") + out.String(string(in.ScopeURL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StartWorkerParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StartWorkerParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StartWorkerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StartWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker13(in *jlexer.Lexer, out *UpdateRegistrationParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scopeURL": + out.ScopeURL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker13(out *jwriter.Writer, in UpdateRegistrationParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scopeURL\":") + out.String(string(in.ScopeURL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v UpdateRegistrationParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v UpdateRegistrationParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *UpdateRegistrationParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *UpdateRegistrationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker14(in *jlexer.Lexer, out *UnregisterParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scopeURL": + out.ScopeURL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(out *jwriter.Writer, in UnregisterParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scopeURL\":") + out.String(string(in.ScopeURL)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v UnregisterParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v UnregisterParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *UnregisterParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DispatchSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *UnregisterParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker14(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker15(in *jlexer.Lexer, out *DisableParams) { @@ -1380,7 +1404,7 @@ func (v *DisableParams) UnmarshalJSON(data []byte) error { func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker15(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker16(in *jlexer.Lexer, out *DeliverPushMessageParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker16(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1399,12 +1423,6 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker16(in *jlexer.Lex continue } switch key { - case "origin": - out.Origin = string(in.String()) - case "registrationId": - out.RegistrationID = string(in.String()) - case "data": - out.Data = string(in.String()) default: in.SkipRecursive() } @@ -1415,51 +1433,33 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker16(in *jlexer.Lex in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker16(out *jwriter.Writer, in DeliverPushMessageParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker16(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"origin\":") - out.String(string(in.Origin)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"registrationId\":") - out.String(string(in.RegistrationID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"data\":") - out.String(string(in.Data)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v DeliverPushMessageParams) MarshalJSON() ([]byte, error) { +func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v DeliverPushMessageParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *DeliverPushMessageParams) UnmarshalJSON(data []byte) error { +func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DeliverPushMessageParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpServiceworker16(l, v) } diff --git a/cdp/serviceworker/serviceworker.go b/cdp/serviceworker/serviceworker.go index d603645..3155516 100644 --- a/cdp/serviceworker/serviceworker.go +++ b/cdp/serviceworker/serviceworker.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // EnableParams [no description]. @@ -24,33 +23,7 @@ func Enable() *EnableParams { // Do executes ServiceWorker.enable against the provided context and // target handler. func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerEnable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerEnable, nil, nil) } // DisableParams [no description]. @@ -64,33 +37,7 @@ func Disable() *DisableParams { // Do executes ServiceWorker.disable against the provided context and // target handler. func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerDisable, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerDisable, nil, nil) } // UnregisterParams [no description]. @@ -111,39 +58,7 @@ func Unregister(scopeURL string) *UnregisterParams { // Do executes ServiceWorker.unregister against the provided context and // target handler. func (p *UnregisterParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerUnregister, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerUnregister, p, nil) } // UpdateRegistrationParams [no description]. @@ -164,39 +79,7 @@ func UpdateRegistration(scopeURL string) *UpdateRegistrationParams { // Do executes ServiceWorker.updateRegistration against the provided context and // target handler. func (p *UpdateRegistrationParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerUpdateRegistration, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerUpdateRegistration, p, nil) } // StartWorkerParams [no description]. @@ -217,39 +100,7 @@ func StartWorker(scopeURL string) *StartWorkerParams { // Do executes ServiceWorker.startWorker against the provided context and // target handler. func (p *StartWorkerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerStartWorker, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerStartWorker, p, nil) } // SkipWaitingParams [no description]. @@ -270,39 +121,7 @@ func SkipWaiting(scopeURL string) *SkipWaitingParams { // Do executes ServiceWorker.skipWaiting against the provided context and // target handler. func (p *SkipWaitingParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerSkipWaiting, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerSkipWaiting, p, nil) } // StopWorkerParams [no description]. @@ -323,39 +142,7 @@ func StopWorker(versionID string) *StopWorkerParams { // Do executes ServiceWorker.stopWorker against the provided context and // target handler. func (p *StopWorkerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerStopWorker, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerStopWorker, p, nil) } // InspectWorkerParams [no description]. @@ -376,39 +163,7 @@ func InspectWorker(versionID string) *InspectWorkerParams { // Do executes ServiceWorker.inspectWorker against the provided context and // target handler. func (p *InspectWorkerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerInspectWorker, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerInspectWorker, p, nil) } // SetForceUpdateOnPageLoadParams [no description]. @@ -429,39 +184,7 @@ func SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) *SetForceUpdateOnPageL // Do executes ServiceWorker.setForceUpdateOnPageLoad against the provided context and // target handler. func (p *SetForceUpdateOnPageLoadParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerSetForceUpdateOnPageLoad, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerSetForceUpdateOnPageLoad, p, nil) } // DeliverPushMessageParams [no description]. @@ -488,39 +211,7 @@ func DeliverPushMessage(origin string, registrationID string, data string) *Deli // Do executes ServiceWorker.deliverPushMessage against the provided context and // target handler. func (p *DeliverPushMessageParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerDeliverPushMessage, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerDeliverPushMessage, p, nil) } // DispatchSyncEventParams [no description]. @@ -550,37 +241,5 @@ func DispatchSyncEvent(origin string, registrationID string, tag string, lastCha // Do executes ServiceWorker.dispatchSyncEvent against the provided context and // target handler. func (p *DispatchSyncEventParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandServiceWorkerDispatchSyncEvent, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandServiceWorkerDispatchSyncEvent, p, nil) } diff --git a/cdp/storage/storage.go b/cdp/storage/storage.go index d48d155..e189c28 100644 --- a/cdp/storage/storage.go +++ b/cdp/storage/storage.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // ClearDataForOriginParams clears storage for origin. @@ -34,37 +33,5 @@ func ClearDataForOrigin(origin string, storageTypes string) *ClearDataForOriginP // Do executes Storage.clearDataForOrigin against the provided context and // target handler. func (p *ClearDataForOriginParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandStorageClearDataForOrigin, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandStorageClearDataForOrigin, p, nil) } diff --git a/cdp/systeminfo/easyjson.go b/cdp/systeminfo/easyjson.go index 89bdb7a..f5bcd61 100644 --- a/cdp/systeminfo/easyjson.go +++ b/cdp/systeminfo/easyjson.go @@ -17,167 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(in *jlexer.Lexer, out *GetInfoReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "gpu": - if in.IsNull() { - in.Skip() - out.Gpu = nil - } else { - if out.Gpu == nil { - out.Gpu = new(GPUInfo) - } - (*out.Gpu).UnmarshalEasyJSON(in) - } - case "modelName": - out.ModelName = string(in.String()) - case "modelVersion": - out.ModelVersion = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(out *jwriter.Writer, in GetInfoReturns) { - out.RawByte('{') - first := true - _ = first - if in.Gpu != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"gpu\":") - if in.Gpu == nil { - out.RawString("null") - } else { - (*in.Gpu).MarshalEasyJSON(out) - } - } - if in.ModelName != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"modelName\":") - out.String(string(in.ModelName)) - } - if in.ModelVersion != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"modelVersion\":") - out.String(string(in.ModelVersion)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetInfoReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetInfoReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo1(in *jlexer.Lexer, out *GetInfoParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo1(out *jwriter.Writer, in GetInfoParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetInfoParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetInfoParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetInfoParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(in *jlexer.Lexer, out *GPUInfo) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(in *jlexer.Lexer, out *GPUInfo) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -256,7 +96,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Writer, in GPUInfo) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(out *jwriter.Writer, in GPUInfo) { out.RawByte('{') first := true _ = first @@ -324,27 +164,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v GPUInfo) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GPUInfo) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GPUInfo) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GPUInfo) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo3(in *jlexer.Lexer, out *GPUDevice) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo1(in *jlexer.Lexer, out *GPUDevice) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -381,7 +221,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo3(in *jlexer.Lexer, in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(out *jwriter.Writer, in GPUDevice) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo1(out *jwriter.Writer, in GPUDevice) { out.RawByte('{') first := true _ = first @@ -423,23 +263,183 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(out *jwriter.Write // MarshalJSON supports json.Marshaler interface func (v GPUDevice) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GPUDevice) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GPUDevice) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GPUDevice) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(in *jlexer.Lexer, out *GetInfoReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "gpu": + if in.IsNull() { + in.Skip() + out.Gpu = nil + } else { + if out.Gpu == nil { + out.Gpu = new(GPUInfo) + } + (*out.Gpu).UnmarshalEasyJSON(in) + } + case "modelName": + out.ModelName = string(in.String()) + case "modelVersion": + out.ModelVersion = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Writer, in GetInfoReturns) { + out.RawByte('{') + first := true + _ = first + if in.Gpu != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"gpu\":") + if in.Gpu == nil { + out.RawString("null") + } else { + (*in.Gpu).MarshalEasyJSON(out) + } + } + if in.ModelName != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"modelName\":") + out.String(string(in.ModelName)) + } + if in.ModelVersion != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"modelVersion\":") + out.String(string(in.ModelVersion)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetInfoReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetInfoReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo2(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo3(in *jlexer.Lexer, out *GetInfoParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(out *jwriter.Writer, in GetInfoParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v GetInfoParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v GetInfoParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *GetInfoParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GPUDevice) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *GetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSysteminfo3(l, v) } diff --git a/cdp/systeminfo/systeminfo.go b/cdp/systeminfo/systeminfo.go index a55a8c2..b802460 100644 --- a/cdp/systeminfo/systeminfo.go +++ b/cdp/systeminfo/systeminfo.go @@ -13,7 +13,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // GetInfoParams returns information about the system. @@ -39,38 +38,12 @@ type GetInfoReturns struct { // modelName - A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported. // modelVersion - A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported. func (p *GetInfoParams) Do(ctxt context.Context, h cdp.Handler) (gpu *GPUInfo, modelName string, modelVersion string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandSystemInfoGetInfo, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, "", "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetInfoReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, "", "", cdp.ErrInvalidResult - } - - return r.Gpu, r.ModelName, r.ModelVersion, nil - - case error: - return nil, "", "", v - } - - case <-ctxt.Done(): - return nil, "", "", ctxt.Err() + var res GetInfoReturns + err = h.Execute(ctxt, cdp.CommandSystemInfoGetInfo, nil, &res) + if err != nil { + return nil, "", "", err } - return nil, "", "", cdp.ErrUnknownResult + return res.Gpu, res.ModelName, res.ModelVersion, nil } diff --git a/cdp/target/easyjson.go b/cdp/target/easyjson.go index 56dd6c2..2345bb9 100644 --- a/cdp/target/easyjson.go +++ b/cdp/target/easyjson.go @@ -17,398 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget(in *jlexer.Lexer, out *SetRemoteLocationsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "locations": - if in.IsNull() { - in.Skip() - out.Locations = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Locations = make([]*RemoteLocation, 0, 8) - } else { - out.Locations = []*RemoteLocation{} - } - for !in.IsDelim(']') { - var v1 *RemoteLocation - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(RemoteLocation) - } - (*v1).UnmarshalEasyJSON(in) - } - out.Locations = append(out.Locations, v1) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget(out *jwriter.Writer, in SetRemoteLocationsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"locations\":") - if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Locations { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetRemoteLocationsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetRemoteLocationsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetRemoteLocationsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetRemoteLocationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget1(in *jlexer.Lexer, out *SetDiscoverTargetsParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "discover": - out.Discover = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget1(out *jwriter.Writer, in SetDiscoverTargetsParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"discover\":") - out.Bool(bool(in.Discover)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetDiscoverTargetsParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetDiscoverTargetsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetDiscoverTargetsParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetDiscoverTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget1(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget2(in *jlexer.Lexer, out *SetAutoAttachParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "autoAttach": - out.AutoAttach = bool(in.Bool()) - case "waitForDebuggerOnStart": - out.WaitForDebuggerOnStart = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget2(out *jwriter.Writer, in SetAutoAttachParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"autoAttach\":") - out.Bool(bool(in.AutoAttach)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"waitForDebuggerOnStart\":") - out.Bool(bool(in.WaitForDebuggerOnStart)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetAutoAttachParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetAutoAttachParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetAutoAttachParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetAutoAttachParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget2(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget3(in *jlexer.Lexer, out *SetAttachToFramesParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "value": - out.Value = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget3(out *jwriter.Writer, in SetAttachToFramesParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.Bool(bool(in.Value)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SetAttachToFramesParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SetAttachToFramesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SetAttachToFramesParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SetAttachToFramesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget4(in *jlexer.Lexer, out *SendMessageToTargetParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "targetId": - out.TargetID = string(in.String()) - case "message": - out.Message = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget4(out *jwriter.Writer, in SendMessageToTargetParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetId\":") - out.String(string(in.TargetID)) - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"message\":") - out.String(string(in.Message)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SendMessageToTargetParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SendMessageToTargetParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SendMessageToTargetParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SendMessageToTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(in *jlexer.Lexer, out *RemoteLocation) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget(in *jlexer.Lexer, out *RemoteLocation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -441,7 +50,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(out *jwriter.Writer, in RemoteLocation) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget(out *jwriter.Writer, in RemoteLocation) { out.RawByte('{') first := true _ = first @@ -467,27 +76,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v RemoteLocation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RemoteLocation) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RemoteLocation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RemoteLocation) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(in *jlexer.Lexer, out *Info) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget1(in *jlexer.Lexer, out *Info) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -524,7 +133,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(out *jwriter.Writer, in Info) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget1(out *jwriter.Writer, in Info) { out.RawByte('{') first := true _ = first @@ -566,27 +175,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Info) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Info) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Info) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Info) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget1(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(in *jlexer.Lexer, out *GetTargetsReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget2(in *jlexer.Lexer, out *GetTargetsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -617,17 +226,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(in *jlexer.Lexer, out out.TargetInfos = []*Info{} } for !in.IsDelim(']') { - var v4 *Info + var v1 *Info if in.IsNull() { in.Skip() - v4 = nil + v1 = nil } else { - if v4 == nil { - v4 = new(Info) + if v1 == nil { + v1 = new(Info) } - (*v4).UnmarshalEasyJSON(in) + (*v1).UnmarshalEasyJSON(in) } - out.TargetInfos = append(out.TargetInfos, v4) + out.TargetInfos = append(out.TargetInfos, v1) in.WantComma() } in.Delim(']') @@ -642,7 +251,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(out *jwriter.Writer, in GetTargetsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget2(out *jwriter.Writer, in GetTargetsReturns) { out.RawByte('{') first := true _ = first @@ -656,14 +265,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v5, v6 := range in.TargetInfos { - if v5 > 0 { + for v2, v3 := range in.TargetInfos { + if v2 > 0 { out.RawByte(',') } - if v6 == nil { + if v3 == nil { out.RawString("null") } else { - (*v6).MarshalEasyJSON(out) + (*v3).MarshalEasyJSON(out) } } out.RawByte(']') @@ -675,27 +284,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v GetTargetsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetTargetsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetTargetsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetTargetsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget8(in *jlexer.Lexer, out *GetTargetsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget3(in *jlexer.Lexer, out *GetTargetsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -724,7 +333,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget8(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(out *jwriter.Writer, in GetTargetsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget3(out *jwriter.Writer, in GetTargetsParams) { out.RawByte('{') first := true _ = first @@ -734,27 +343,863 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v GetTargetsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetTargetsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetTargetsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *GetTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget4(in *jlexer.Lexer, out *CreateTargetReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "targetId": + out.TargetID = ID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget4(out *jwriter.Writer, in CreateTargetReturns) { + out.RawByte('{') + first := true + _ = first + if in.TargetID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetId\":") + out.String(string(in.TargetID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CreateTargetReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget4(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CreateTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget4(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CreateTargetReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget4(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CreateTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget4(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(in *jlexer.Lexer, out *CreateTargetParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "url": + out.URL = string(in.String()) + case "width": + out.Width = int64(in.Int64()) + case "height": + out.Height = int64(in.Int64()) + case "browserContextId": + out.BrowserContextID = BrowserContextID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(out *jwriter.Writer, in CreateTargetParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + if in.Width != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"width\":") + out.Int64(int64(in.Width)) + } + if in.Height != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"height\":") + out.Int64(int64(in.Height)) + } + if in.BrowserContextID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"browserContextId\":") + out.String(string(in.BrowserContextID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CreateTargetParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CreateTargetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CreateTargetParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CreateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget5(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(in *jlexer.Lexer, out *DisposeBrowserContextReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "success": + out.Success = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(out *jwriter.Writer, in DisposeBrowserContextReturns) { + out.RawByte('{') + first := true + _ = first + if in.Success { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"success\":") + out.Bool(bool(in.Success)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DisposeBrowserContextReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisposeBrowserContextReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisposeBrowserContextReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisposeBrowserContextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget6(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(in *jlexer.Lexer, out *DisposeBrowserContextParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "browserContextId": + out.BrowserContextID = BrowserContextID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(out *jwriter.Writer, in DisposeBrowserContextParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"browserContextId\":") + out.String(string(in.BrowserContextID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DisposeBrowserContextParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DisposeBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget7(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DisposeBrowserContextParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DisposeBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget7(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget8(in *jlexer.Lexer, out *CreateBrowserContextReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "browserContextId": + out.BrowserContextID = BrowserContextID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(out *jwriter.Writer, in CreateBrowserContextReturns) { + out.RawByte('{') + first := true + _ = first + if in.BrowserContextID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"browserContextId\":") + out.String(string(in.BrowserContextID)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CreateBrowserContextReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CreateBrowserContextReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget8(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CreateBrowserContextReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget8(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *CreateBrowserContextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget8(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(in *jlexer.Lexer, out *GetTargetInfoReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(in *jlexer.Lexer, out *CreateBrowserContextParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(out *jwriter.Writer, in CreateBrowserContextParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CreateBrowserContextParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CreateBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CreateBrowserContextParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CreateBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(in *jlexer.Lexer, out *DetachFromTargetParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "targetId": + out.TargetID = ID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(out *jwriter.Writer, in DetachFromTargetParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetId\":") + out.String(string(in.TargetID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v DetachFromTargetParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v DetachFromTargetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *DetachFromTargetParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *DetachFromTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(in *jlexer.Lexer, out *AttachToTargetReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "success": + out.Success = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(out *jwriter.Writer, in AttachToTargetReturns) { + out.RawByte('{') + first := true + _ = first + if in.Success { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"success\":") + out.Bool(bool(in.Success)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AttachToTargetReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AttachToTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AttachToTargetReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AttachToTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(in *jlexer.Lexer, out *AttachToTargetParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "targetId": + out.TargetID = ID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(out *jwriter.Writer, in AttachToTargetParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetId\":") + out.String(string(in.TargetID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v AttachToTargetParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v AttachToTargetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *AttachToTargetParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *AttachToTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(in *jlexer.Lexer, out *CloseTargetReturns) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "success": + out.Success = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(out *jwriter.Writer, in CloseTargetReturns) { + out.RawByte('{') + first := true + _ = first + if in.Success { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"success\":") + out.Bool(bool(in.Success)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CloseTargetReturns) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CloseTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CloseTargetReturns) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CloseTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(in *jlexer.Lexer, out *CloseTargetParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "targetId": + out.TargetID = ID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(out *jwriter.Writer, in CloseTargetParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetId\":") + out.String(string(in.TargetID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v CloseTargetParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v CloseTargetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *CloseTargetParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *CloseTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(in *jlexer.Lexer, out *ActivateTargetParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "targetId": + out.TargetID = ID(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(out *jwriter.Writer, in ActivateTargetParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetId\":") + out.String(string(in.TargetID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ActivateTargetParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ActivateTargetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ActivateTargetParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ActivateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget16(in *jlexer.Lexer, out *GetTargetInfoReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -793,7 +1238,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(out *jwriter.Writer, in GetTargetInfoReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(out *jwriter.Writer, in GetTargetInfoReturns) { out.RawByte('{') first := true _ = first @@ -815,27 +1260,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v GetTargetInfoReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetTargetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget9(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetTargetInfoReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetTargetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget9(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(in *jlexer.Lexer, out *GetTargetInfoParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget17(in *jlexer.Lexer, out *GetTargetInfoParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -866,7 +1311,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(out *jwriter.Writer, in GetTargetInfoParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget17(out *jwriter.Writer, in GetTargetInfoParams) { out.RawByte('{') first := true _ = first @@ -882,27 +1327,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v GetTargetInfoParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget17(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetTargetInfoParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget10(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget17(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetTargetInfoParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget17(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetTargetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget10(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget17(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(in *jlexer.Lexer, out *EventTargetDestroyed) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(in *jlexer.Lexer, out *SendMessageToTargetParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -922,7 +1367,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(in *jlexer.Lexer, out } switch key { case "targetId": - out.TargetID = ID(in.String()) + out.TargetID = string(in.String()) + case "message": + out.Message = string(in.String()) default: in.SkipRecursive() } @@ -933,45 +1380,49 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(out *jwriter.Writer, in EventTargetDestroyed) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget18(out *jwriter.Writer, in SendMessageToTargetParams) { out.RawByte('{') first := true _ = first - if in.TargetID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetId\":") - out.String(string(in.TargetID)) + if !first { + out.RawByte(',') } + first = false + out.RawString("\"targetId\":") + out.String(string(in.TargetID)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"message\":") + out.String(string(in.Message)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventTargetDestroyed) MarshalJSON() ([]byte, error) { +func (v SendMessageToTargetParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget18(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventTargetDestroyed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(w, v) +func (v SendMessageToTargetParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget18(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventTargetDestroyed) UnmarshalJSON(data []byte) error { +func (v *SendMessageToTargetParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventTargetDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget11(l, v) +func (v *SendMessageToTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(in *jlexer.Lexer, out *EventTargetCreated) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget19(in *jlexer.Lexer, out *SetRemoteLocationsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -990,15 +1441,32 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(in *jlexer.Lexer, out continue } switch key { - case "targetInfo": + case "locations": if in.IsNull() { in.Skip() - out.TargetInfo = nil + out.Locations = nil } else { - if out.TargetInfo == nil { - out.TargetInfo = new(Info) + in.Delim('[') + if !in.IsDelim(']') { + out.Locations = make([]*RemoteLocation, 0, 8) + } else { + out.Locations = []*RemoteLocation{} } - (*out.TargetInfo).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v4 *RemoteLocation + if in.IsNull() { + in.Skip() + v4 = nil + } else { + if v4 == nil { + v4 = new(RemoteLocation) + } + (*v4).UnmarshalEasyJSON(in) + } + out.Locations = append(out.Locations, v4) + in.WantComma() + } + in.Delim(']') } default: in.SkipRecursive() @@ -1010,49 +1478,267 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(out *jwriter.Writer, in EventTargetCreated) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(out *jwriter.Writer, in SetRemoteLocationsParams) { out.RawByte('{') first := true _ = first - if in.TargetInfo != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetInfo\":") - if in.TargetInfo == nil { - out.RawString("null") - } else { - (*in.TargetInfo).MarshalEasyJSON(out) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"locations\":") + if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v5, v6 := range in.Locations { + if v5 > 0 { + out.RawByte(',') + } + if v6 == nil { + out.RawString("null") + } else { + (*v6).MarshalEasyJSON(out) + } } + out.RawByte(']') } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v EventTargetCreated) MarshalJSON() ([]byte, error) { +func (v SetRemoteLocationsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventTargetCreated) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(w, v) +func (v SetRemoteLocationsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *EventTargetCreated) UnmarshalJSON(data []byte) error { +func (v *SetRemoteLocationsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget19(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventTargetCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget12(l, v) +func (v *SetRemoteLocationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget19(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(in *jlexer.Lexer, out *EventReceivedMessageFromTarget) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget20(in *jlexer.Lexer, out *SetAttachToFramesParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "value": + out.Value = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget20(out *jwriter.Writer, in SetAttachToFramesParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"value\":") + out.Bool(bool(in.Value)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetAttachToFramesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget20(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetAttachToFramesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget20(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetAttachToFramesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget20(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetAttachToFramesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget20(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(in *jlexer.Lexer, out *SetAutoAttachParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "autoAttach": + out.AutoAttach = bool(in.Bool()) + case "waitForDebuggerOnStart": + out.WaitForDebuggerOnStart = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(out *jwriter.Writer, in SetAutoAttachParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"autoAttach\":") + out.Bool(bool(in.AutoAttach)) + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"waitForDebuggerOnStart\":") + out.Bool(bool(in.WaitForDebuggerOnStart)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetAutoAttachParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetAutoAttachParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetAutoAttachParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetAutoAttachParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget22(in *jlexer.Lexer, out *SetDiscoverTargetsParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "discover": + out.Discover = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget22(out *jwriter.Writer, in SetDiscoverTargetsParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"discover\":") + out.Bool(bool(in.Discover)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetDiscoverTargetsParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget22(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetDiscoverTargetsParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget22(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetDiscoverTargetsParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget22(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetDiscoverTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget22(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget23(in *jlexer.Lexer, out *EventReceivedMessageFromTarget) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1085,7 +1771,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(out *jwriter.Writer, in EventReceivedMessageFromTarget) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget23(out *jwriter.Writer, in EventReceivedMessageFromTarget) { out.RawByte('{') first := true _ = first @@ -1111,27 +1797,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventReceivedMessageFromTarget) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget23(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventReceivedMessageFromTarget) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget23(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventReceivedMessageFromTarget) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget23(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventReceivedMessageFromTarget) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget13(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget23(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(in *jlexer.Lexer, out *EventDetachedFromTarget) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget24(in *jlexer.Lexer, out *EventDetachedFromTarget) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1162,7 +1848,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(out *jwriter.Writer, in EventDetachedFromTarget) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget24(out *jwriter.Writer, in EventDetachedFromTarget) { out.RawByte('{') first := true _ = first @@ -1180,27 +1866,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventDetachedFromTarget) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventDetachedFromTarget) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventDetachedFromTarget) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget24(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventDetachedFromTarget) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget14(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget24(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(in *jlexer.Lexer, out *EventAttachedToTarget) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget25(in *jlexer.Lexer, out *EventAttachedToTarget) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1241,7 +1927,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(out *jwriter.Writer, in EventAttachedToTarget) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget25(out *jwriter.Writer, in EventAttachedToTarget) { out.RawByte('{') first := true _ = first @@ -1271,163 +1957,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventAttachedToTarget) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventAttachedToTarget) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventAttachedToTarget) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget25(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventAttachedToTarget) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget15(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget25(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget16(in *jlexer.Lexer, out *DisposeBrowserContextReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - out.Success = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(out *jwriter.Writer, in DisposeBrowserContextReturns) { - out.RawByte('{') - first := true - _ = first - if in.Success { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"success\":") - out.Bool(bool(in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DisposeBrowserContextReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisposeBrowserContextReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisposeBrowserContextReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisposeBrowserContextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget17(in *jlexer.Lexer, out *DisposeBrowserContextParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "browserContextId": - out.BrowserContextID = BrowserContextID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget17(out *jwriter.Writer, in DisposeBrowserContextParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"browserContextId\":") - out.String(string(in.BrowserContextID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DisposeBrowserContextParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget17(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DisposeBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget17(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DisposeBrowserContextParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget17(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DisposeBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget17(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(in *jlexer.Lexer, out *DetachFromTargetParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget26(in *jlexer.Lexer, out *EventTargetDestroyed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1458,74 +2008,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget18(out *jwriter.Writer, in DetachFromTargetParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetId\":") - out.String(string(in.TargetID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v DetachFromTargetParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget18(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v DetachFromTargetParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget18(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *DetachFromTargetParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *DetachFromTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget18(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget19(in *jlexer.Lexer, out *CreateTargetReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "targetId": - out.TargetID = ID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(out *jwriter.Writer, in CreateTargetReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget26(out *jwriter.Writer, in EventTargetDestroyed) { out.RawByte('{') first := true _ = first @@ -1541,526 +2024,29 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(out *jwriter.Writer, } // MarshalJSON supports json.Marshaler interface -func (v CreateTargetReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CreateTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget19(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CreateTargetReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget19(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CreateTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget19(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget20(in *jlexer.Lexer, out *CreateTargetParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - case "width": - out.Width = int64(in.Int64()) - case "height": - out.Height = int64(in.Int64()) - case "browserContextId": - out.BrowserContextID = BrowserContextID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget20(out *jwriter.Writer, in CreateTargetParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - if in.Width != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"width\":") - out.Int64(int64(in.Width)) - } - if in.Height != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"height\":") - out.Int64(int64(in.Height)) - } - if in.BrowserContextID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"browserContextId\":") - out.String(string(in.BrowserContextID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CreateTargetParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget20(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CreateTargetParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget20(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CreateTargetParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget20(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CreateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget20(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(in *jlexer.Lexer, out *CreateBrowserContextReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "browserContextId": - out.BrowserContextID = BrowserContextID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(out *jwriter.Writer, in CreateBrowserContextReturns) { - out.RawByte('{') - first := true - _ = first - if in.BrowserContextID != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"browserContextId\":") - out.String(string(in.BrowserContextID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CreateBrowserContextReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CreateBrowserContextReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget21(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CreateBrowserContextReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CreateBrowserContextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget21(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget22(in *jlexer.Lexer, out *CreateBrowserContextParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget22(out *jwriter.Writer, in CreateBrowserContextParams) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CreateBrowserContextParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget22(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CreateBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget22(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CreateBrowserContextParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget22(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CreateBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget22(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget23(in *jlexer.Lexer, out *CloseTargetReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - out.Success = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget23(out *jwriter.Writer, in CloseTargetReturns) { - out.RawByte('{') - first := true - _ = first - if in.Success { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"success\":") - out.Bool(bool(in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CloseTargetReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget23(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CloseTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget23(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CloseTargetReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget23(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CloseTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget23(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget24(in *jlexer.Lexer, out *CloseTargetParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "targetId": - out.TargetID = ID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget24(out *jwriter.Writer, in CloseTargetParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetId\":") - out.String(string(in.TargetID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v CloseTargetParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget24(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v CloseTargetParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget24(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *CloseTargetParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget24(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *CloseTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget24(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget25(in *jlexer.Lexer, out *AttachToTargetReturns) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - out.Success = bool(in.Bool()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget25(out *jwriter.Writer, in AttachToTargetReturns) { - out.RawByte('{') - first := true - _ = first - if in.Success { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"success\":") - out.Bool(bool(in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AttachToTargetReturns) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget25(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AttachToTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget25(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AttachToTargetReturns) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget25(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AttachToTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget25(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget26(in *jlexer.Lexer, out *AttachToTargetParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "targetId": - out.TargetID = ID(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget26(out *jwriter.Writer, in AttachToTargetParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"targetId\":") - out.String(string(in.TargetID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AttachToTargetParams) MarshalJSON() ([]byte, error) { +func (v EventTargetDestroyed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v AttachToTargetParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventTargetDestroyed) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *AttachToTargetParams) UnmarshalJSON(data []byte) error { +func (v *EventTargetDestroyed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget26(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AttachToTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventTargetDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget26(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget27(in *jlexer.Lexer, out *ActivateTargetParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget27(in *jlexer.Lexer, out *EventTargetCreated) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2079,8 +2065,16 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget27(in *jlexer.Lexer, out continue } switch key { - case "targetId": - out.TargetID = ID(in.String()) + case "targetInfo": + if in.IsNull() { + in.Skip() + out.TargetInfo = nil + } else { + if out.TargetInfo == nil { + out.TargetInfo = new(Info) + } + (*out.TargetInfo).UnmarshalEasyJSON(in) + } default: in.SkipRecursive() } @@ -2091,39 +2085,45 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget27(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget27(out *jwriter.Writer, in ActivateTargetParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget27(out *jwriter.Writer, in EventTargetCreated) { out.RawByte('{') first := true _ = first - if !first { - out.RawByte(',') + if in.TargetInfo != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"targetInfo\":") + if in.TargetInfo == nil { + out.RawString("null") + } else { + (*in.TargetInfo).MarshalEasyJSON(out) + } } - first = false - out.RawString("\"targetId\":") - out.String(string(in.TargetID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v ActivateTargetParams) MarshalJSON() ([]byte, error) { +func (v EventTargetCreated) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget27(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v ActivateTargetParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventTargetCreated) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget27(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *ActivateTargetParams) UnmarshalJSON(data []byte) error { +func (v *EventTargetCreated) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget27(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ActivateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventTargetCreated) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTarget27(l, v) } diff --git a/cdp/target/target.go b/cdp/target/target.go index 4422469..d6f6751 100644 --- a/cdp/target/target.go +++ b/cdp/target/target.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // SetDiscoverTargetsParams controls whether to discover available targets @@ -35,39 +34,7 @@ func SetDiscoverTargets(discover bool) *SetDiscoverTargetsParams { // Do executes Target.setDiscoverTargets against the provided context and // target handler. func (p *SetDiscoverTargetsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetSetDiscoverTargets, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetSetDiscoverTargets, p, nil) } // SetAutoAttachParams controls whether to automatically attach to new @@ -97,39 +64,7 @@ func SetAutoAttach(autoAttach bool, waitForDebuggerOnStart bool) *SetAutoAttachP // Do executes Target.setAutoAttach against the provided context and // target handler. func (p *SetAutoAttachParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetSetAutoAttach, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetSetAutoAttach, p, nil) } // SetAttachToFramesParams [no description]. @@ -150,39 +85,7 @@ func SetAttachToFrames(value bool) *SetAttachToFramesParams { // Do executes Target.setAttachToFrames against the provided context and // target handler. func (p *SetAttachToFramesParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetSetAttachToFrames, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetSetAttachToFrames, p, nil) } // SetRemoteLocationsParams enables target discovery for the specified @@ -205,39 +108,7 @@ func SetRemoteLocations(locations []*RemoteLocation) *SetRemoteLocationsParams { // Do executes Target.setRemoteLocations against the provided context and // target handler. func (p *SetRemoteLocationsParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetSetRemoteLocations, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetSetRemoteLocations, p, nil) } // SendMessageToTargetParams sends protocol message to the target with given @@ -262,39 +133,7 @@ func SendMessageToTarget(targetID string, message string) *SendMessageToTargetPa // Do executes Target.sendMessageToTarget against the provided context and // target handler. func (p *SendMessageToTargetParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetSendMessageToTarget, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetSendMessageToTarget, p, nil) } // GetTargetInfoParams returns information about a target. @@ -323,46 +162,14 @@ type GetTargetInfoReturns struct { // returns: // targetInfo func (p *GetTargetInfoParams) Do(ctxt context.Context, h cdp.Handler) (targetInfo *Info, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res GetTargetInfoReturns + err = h.Execute(ctxt, cdp.CommandTargetGetTargetInfo, p, &res) if err != nil { return nil, err } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetGetTargetInfo, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetTargetInfoReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.TargetInfo, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() - } - - return nil, cdp.ErrUnknownResult + return res.TargetInfo, nil } // ActivateTargetParams activates (focuses) the target. @@ -383,39 +190,7 @@ func ActivateTarget(targetID ID) *ActivateTargetParams { // Do executes Target.activateTarget against the provided context and // target handler. func (p *ActivateTargetParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetActivateTarget, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetActivateTarget, p, nil) } // CloseTargetParams closes the target. If the target is a page that gets @@ -446,46 +221,14 @@ type CloseTargetReturns struct { // returns: // success func (p *CloseTargetParams) Do(ctxt context.Context, h cdp.Handler) (success bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CloseTargetReturns + err = h.Execute(ctxt, cdp.CommandTargetCloseTarget, p, &res) if err != nil { return false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetCloseTarget, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CloseTargetReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Success, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() - } - - return false, cdp.ErrUnknownResult + return res.Success, nil } // AttachToTargetParams attaches to the target with given id. @@ -514,46 +257,14 @@ type AttachToTargetReturns struct { // returns: // success - Whether attach succeeded. func (p *AttachToTargetParams) Do(ctxt context.Context, h cdp.Handler) (success bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res AttachToTargetReturns + err = h.Execute(ctxt, cdp.CommandTargetAttachToTarget, p, &res) if err != nil { return false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetAttachToTarget, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r AttachToTargetReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Success, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() - } - - return false, cdp.ErrUnknownResult + return res.Success, nil } // DetachFromTargetParams detaches from the target with given id. @@ -574,39 +285,7 @@ func DetachFromTarget(targetID ID) *DetachFromTargetParams { // Do executes Target.detachFromTarget against the provided context and // target handler. func (p *DetachFromTargetParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTargetDetachFromTarget, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTargetDetachFromTarget, p, nil) } // CreateBrowserContextParams creates a new empty BrowserContext. Similar to @@ -630,40 +309,14 @@ type CreateBrowserContextReturns struct { // returns: // browserContextID - The id of the context created. func (p *CreateBrowserContextParams) Do(ctxt context.Context, h cdp.Handler) (browserContextID BrowserContextID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetCreateBrowserContext, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CreateBrowserContextReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.BrowserContextID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() + var res CreateBrowserContextReturns + err = h.Execute(ctxt, cdp.CommandTargetCreateBrowserContext, nil, &res) + if err != nil { + return "", err } - return "", cdp.ErrUnknownResult + return res.BrowserContextID, nil } // DisposeBrowserContextParams deletes a BrowserContext, will fail of any @@ -694,46 +347,14 @@ type DisposeBrowserContextReturns struct { // returns: // success func (p *DisposeBrowserContextParams) Do(ctxt context.Context, h cdp.Handler) (success bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res DisposeBrowserContextReturns + err = h.Execute(ctxt, cdp.CommandTargetDisposeBrowserContext, p, &res) if err != nil { return false, err } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetDisposeBrowserContext, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r DisposeBrowserContextReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return false, cdp.ErrInvalidResult - } - - return r.Success, nil - - case error: - return false, v - } - - case <-ctxt.Done(): - return false, ctxt.Err() - } - - return false, cdp.ErrUnknownResult + return res.Success, nil } // CreateTargetParams creates a new page. @@ -784,46 +405,14 @@ type CreateTargetReturns struct { // returns: // targetID - The id of the page opened. func (p *CreateTargetParams) Do(ctxt context.Context, h cdp.Handler) (targetID ID, err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) + // execute + var res CreateTargetReturns + err = h.Execute(ctxt, cdp.CommandTargetCreateTarget, p, &res) if err != nil { return "", err } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetCreateTarget, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return "", cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r CreateTargetReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", cdp.ErrInvalidResult - } - - return r.TargetID, nil - - case error: - return "", v - } - - case <-ctxt.Done(): - return "", ctxt.Err() - } - - return "", cdp.ErrUnknownResult + return res.TargetID, nil } // GetTargetsParams retrieves a list of available targets. @@ -845,38 +434,12 @@ type GetTargetsReturns struct { // returns: // targetInfos - The list of targets. func (p *GetTargetsParams) Do(ctxt context.Context, h cdp.Handler) (targetInfos []*Info, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandTargetGetTargets, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetTargetsReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.TargetInfos, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetTargetsReturns + err = h.Execute(ctxt, cdp.CommandTargetGetTargets, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.TargetInfos, nil } diff --git a/cdp/tethering/easyjson.go b/cdp/tethering/easyjson.go index 1d4cbac..f0ec9bc 100644 --- a/cdp/tethering/easyjson.go +++ b/cdp/tethering/easyjson.go @@ -17,74 +17,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(in *jlexer.Lexer, out *UnbindParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "port": - out.Port = int64(in.Int64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(out *jwriter.Writer, in UnbindParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"port\":") - out.Int64(int64(in.Port)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v UnbindParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v UnbindParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *UnbindParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *UnbindParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(in *jlexer.Lexer, out *EventAccepted) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(in *jlexer.Lexer, out *EventAccepted) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -117,7 +50,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(out *jwriter.Writer, in EventAccepted) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(out *jwriter.Writer, in EventAccepted) { out.RawByte('{') first := true _ = first @@ -143,24 +76,91 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EventAccepted) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventAccepted) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventAccepted) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventAccepted) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(in *jlexer.Lexer, out *UnbindParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "port": + out.Port = int64(in.Int64()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(out *jwriter.Writer, in UnbindParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"port\":") + out.Int64(int64(in.Port)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v UnbindParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v UnbindParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *UnbindParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventAccepted) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *UnbindParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering2(in *jlexer.Lexer, out *BindParams) { diff --git a/cdp/tethering/tethering.go b/cdp/tethering/tethering.go index f56aacd..06b047f 100644 --- a/cdp/tethering/tethering.go +++ b/cdp/tethering/tethering.go @@ -12,7 +12,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // BindParams request browser port binding. @@ -33,39 +32,7 @@ func Bind(port int64) *BindParams { // Do executes Tethering.bind against the provided context and // target handler. func (p *BindParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTetheringBind, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTetheringBind, p, nil) } // UnbindParams request browser port unbinding. @@ -86,37 +53,5 @@ func Unbind(port int64) *UnbindParams { // Do executes Tethering.unbind against the provided context and // target handler. func (p *UnbindParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTetheringUnbind, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTetheringUnbind, p, nil) } diff --git a/cdp/tracing/easyjson.go b/cdp/tracing/easyjson.go index 664d675..a9cd7fb 100644 --- a/cdp/tracing/easyjson.go +++ b/cdp/tracing/easyjson.go @@ -18,7 +18,7 @@ var ( _ easyjson.Marshaler ) -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(in *jlexer.Lexer, out *TraceConfig) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(in *jlexer.Lexer, out *EventBufferUsage) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -37,81 +37,12 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(in *jlexer.Lexer, out continue } switch key { - case "recordMode": - (out.RecordMode).UnmarshalEasyJSON(in) - case "enableSampling": - out.EnableSampling = bool(in.Bool()) - case "enableSystrace": - out.EnableSystrace = bool(in.Bool()) - case "enableArgumentFilter": - out.EnableArgumentFilter = bool(in.Bool()) - case "includedCategories": - if in.IsNull() { - in.Skip() - out.IncludedCategories = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.IncludedCategories = make([]string, 0, 4) - } else { - out.IncludedCategories = []string{} - } - for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.IncludedCategories = append(out.IncludedCategories, v1) - in.WantComma() - } - in.Delim(']') - } - case "excludedCategories": - if in.IsNull() { - in.Skip() - out.ExcludedCategories = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.ExcludedCategories = make([]string, 0, 4) - } else { - out.ExcludedCategories = []string{} - } - for !in.IsDelim(']') { - var v2 string - v2 = string(in.String()) - out.ExcludedCategories = append(out.ExcludedCategories, v2) - in.WantComma() - } - in.Delim(']') - } - case "syntheticDelays": - if in.IsNull() { - in.Skip() - out.SyntheticDelays = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.SyntheticDelays = make([]string, 0, 4) - } else { - out.SyntheticDelays = []string{} - } - for !in.IsDelim(']') { - var v3 string - v3 = string(in.String()) - out.SyntheticDelays = append(out.SyntheticDelays, v3) - in.WantComma() - } - in.Delim(']') - } - case "memoryDumpConfig": - if in.IsNull() { - in.Skip() - out.MemoryDumpConfig = nil - } else { - if out.MemoryDumpConfig == nil { - out.MemoryDumpConfig = new(MemoryDumpConfig) - } - (*out.MemoryDumpConfig).UnmarshalEasyJSON(in) - } + case "percentFull": + out.PercentFull = float64(in.Float64()) + case "eventCount": + out.EventCount = float64(in.Float64()) + case "value": + out.Value = float64(in.Float64()) default: in.SkipRecursive() } @@ -122,138 +53,61 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(out *jwriter.Writer, in TraceConfig) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(out *jwriter.Writer, in EventBufferUsage) { out.RawByte('{') first := true _ = first - if in.RecordMode != "" { + if in.PercentFull != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"recordMode\":") - (in.RecordMode).MarshalEasyJSON(out) + out.RawString("\"percentFull\":") + out.Float64(float64(in.PercentFull)) } - if in.EnableSampling { + if in.EventCount != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"enableSampling\":") - out.Bool(bool(in.EnableSampling)) + out.RawString("\"eventCount\":") + out.Float64(float64(in.EventCount)) } - if in.EnableSystrace { + if in.Value != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"enableSystrace\":") - out.Bool(bool(in.EnableSystrace)) - } - if in.EnableArgumentFilter { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"enableArgumentFilter\":") - out.Bool(bool(in.EnableArgumentFilter)) - } - if len(in.IncludedCategories) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"includedCategories\":") - if in.IncludedCategories == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v4, v5 := range in.IncludedCategories { - if v4 > 0 { - out.RawByte(',') - } - out.String(string(v5)) - } - out.RawByte(']') - } - } - if len(in.ExcludedCategories) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"excludedCategories\":") - if in.ExcludedCategories == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v6, v7 := range in.ExcludedCategories { - if v6 > 0 { - out.RawByte(',') - } - out.String(string(v7)) - } - out.RawByte(']') - } - } - if len(in.SyntheticDelays) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"syntheticDelays\":") - if in.SyntheticDelays == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.SyntheticDelays { - if v8 > 0 { - out.RawByte(',') - } - out.String(string(v9)) - } - out.RawByte(']') - } - } - if in.MemoryDumpConfig != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"memoryDumpConfig\":") - if in.MemoryDumpConfig == nil { - out.RawString("null") - } else { - (*in.MemoryDumpConfig).MarshalEasyJSON(out) - } + out.RawString("\"value\":") + out.Float64(float64(in.Value)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v TraceConfig) MarshalJSON() ([]byte, error) { +func (v EventBufferUsage) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v TraceConfig) MarshalEasyJSON(w *jwriter.Writer) { +func (v EventBufferUsage) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *TraceConfig) UnmarshalJSON(data []byte) error { +func (v *EventBufferUsage) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *TraceConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *EventBufferUsage) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(in *jlexer.Lexer, out *StartParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(in *jlexer.Lexer, out *EventTracingComplete) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -272,19 +126,93 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(in *jlexer.Lexer, out continue } switch key { - case "bufferUsageReportingInterval": - out.BufferUsageReportingInterval = float64(in.Float64()) - case "transferMode": - (out.TransferMode).UnmarshalEasyJSON(in) - case "traceConfig": + case "stream": + out.Stream = io.StreamHandle(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(out *jwriter.Writer, in EventTracingComplete) { + out.RawByte('{') + first := true + _ = first + if in.Stream != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"stream\":") + out.String(string(in.Stream)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventTracingComplete) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventTracingComplete) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventTracingComplete) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventTracingComplete) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(in *jlexer.Lexer, out *EventDataCollected) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "value": if in.IsNull() { in.Skip() - out.TraceConfig = nil + out.Value = nil } else { - if out.TraceConfig == nil { - out.TraceConfig = new(TraceConfig) + in.Delim('[') + if !in.IsDelim(']') { + out.Value = make([]easyjson.RawMessage, 0, 2) + } else { + out.Value = []easyjson.RawMessage{} } - (*out.TraceConfig).UnmarshalEasyJSON(in) + for !in.IsDelim(']') { + var v1 easyjson.RawMessage + (v1).UnmarshalEasyJSON(in) + out.Value = append(out.Value, v1) + in.WantComma() + } + in.Delim(']') } default: in.SkipRecursive() @@ -296,65 +224,123 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(out *jwriter.Writer, in StartParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(out *jwriter.Writer, in EventDataCollected) { out.RawByte('{') first := true _ = first - if in.BufferUsageReportingInterval != 0 { + if len(in.Value) != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"bufferUsageReportingInterval\":") - out.Float64(float64(in.BufferUsageReportingInterval)) - } - if in.TransferMode != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"transferMode\":") - (in.TransferMode).MarshalEasyJSON(out) - } - if in.TraceConfig != nil { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"traceConfig\":") - if in.TraceConfig == nil { + out.RawString("\"value\":") + if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { - (*in.TraceConfig).MarshalEasyJSON(out) + out.RawByte('[') + for v2, v3 := range in.Value { + if v2 > 0 { + out.RawByte(',') + } + (v3).MarshalEasyJSON(out) + } + out.RawByte(']') } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface -func (v StartParams) MarshalJSON() ([]byte, error) { +func (v EventDataCollected) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(w, v) +func (v EventDataCollected) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *StartParams) UnmarshalJSON(data []byte) error { +func (v *EventDataCollected) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(l, v) +func (v *EventDataCollected) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(in *jlexer.Lexer, out *RequestMemoryDumpReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(in *jlexer.Lexer, out *RecordClockSyncMarkerParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "syncId": + out.SyncID = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(out *jwriter.Writer, in RecordClockSyncMarkerParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"syncId\":") + out.String(string(in.SyncID)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v RecordClockSyncMarkerParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v RecordClockSyncMarkerParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *RecordClockSyncMarkerParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *RecordClockSyncMarkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(in *jlexer.Lexer, out *RequestMemoryDumpReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -387,7 +373,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(out *jwriter.Writer, in RequestMemoryDumpReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(out *jwriter.Writer, in RequestMemoryDumpReturns) { out.RawByte('{') first := true _ = first @@ -413,27 +399,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v RequestMemoryDumpReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RequestMemoryDumpReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RequestMemoryDumpReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RequestMemoryDumpReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(in *jlexer.Lexer, out *RequestMemoryDumpParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(in *jlexer.Lexer, out *RequestMemoryDumpParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -462,7 +448,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(in *jlexer.Lexer, out in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(out *jwriter.Writer, in RequestMemoryDumpParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(out *jwriter.Writer, in RequestMemoryDumpParams) { out.RawByte('{') first := true _ = first @@ -471,151 +457,25 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v RequestMemoryDumpParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestMemoryDumpParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestMemoryDumpParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestMemoryDumpParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(in *jlexer.Lexer, out *RecordClockSyncMarkerParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "syncId": - out.SyncID = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(out *jwriter.Writer, in RecordClockSyncMarkerParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"syncId\":") - out.String(string(in.SyncID)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RecordClockSyncMarkerParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RecordClockSyncMarkerParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RecordClockSyncMarkerParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RecordClockSyncMarkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(in *jlexer.Lexer, out *MemoryDumpConfig) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(out *jwriter.Writer, in MemoryDumpConfig) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v MemoryDumpConfig) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v MemoryDumpConfig) MarshalEasyJSON(w *jwriter.Writer) { +func (v RequestMemoryDumpParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *MemoryDumpConfig) UnmarshalJSON(data []byte) error { +func (v *RequestMemoryDumpParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *MemoryDumpConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *RequestMemoryDumpParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing6(in *jlexer.Lexer, out *GetCategoriesReturns) { @@ -649,9 +509,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing6(in *jlexer.Lexer, out out.Categories = []string{} } for !in.IsDelim(']') { - var v10 string - v10 = string(in.String()) - out.Categories = append(out.Categories, v10) + var v4 string + v4 = string(in.String()) + out.Categories = append(out.Categories, v4) in.WantComma() } in.Delim(']') @@ -680,11 +540,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing6(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v11, v12 := range in.Categories { - if v11 > 0 { + for v5, v6 := range in.Categories { + if v5 > 0 { out.RawByte(',') } - out.String(string(v12)) + out.String(string(v6)) } out.RawByte(']') } @@ -774,262 +634,7 @@ func (v *GetCategoriesParams) UnmarshalJSON(data []byte) error { func (v *GetCategoriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing7(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(in *jlexer.Lexer, out *EventTracingComplete) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stream": - out.Stream = io.StreamHandle(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(out *jwriter.Writer, in EventTracingComplete) { - out.RawByte('{') - first := true - _ = first - if in.Stream != "" { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"stream\":") - out.String(string(in.Stream)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventTracingComplete) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventTracingComplete) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventTracingComplete) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventTracingComplete) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(in *jlexer.Lexer, out *EventDataCollected) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - in.Delim('[') - if !in.IsDelim(']') { - out.Value = make([]easyjson.RawMessage, 0, 2) - } else { - out.Value = []easyjson.RawMessage{} - } - for !in.IsDelim(']') { - var v13 easyjson.RawMessage - (v13).UnmarshalEasyJSON(in) - out.Value = append(out.Value, v13) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(out *jwriter.Writer, in EventDataCollected) { - out.RawByte('{') - first := true - _ = first - if len(in.Value) != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.Value { - if v14 > 0 { - out.RawByte(',') - } - (v15).MarshalEasyJSON(out) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventDataCollected) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventDataCollected) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventDataCollected) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventDataCollected) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(in *jlexer.Lexer, out *EventBufferUsage) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "percentFull": - out.PercentFull = float64(in.Float64()) - case "eventCount": - out.EventCount = float64(in.Float64()) - case "value": - out.Value = float64(in.Float64()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(out *jwriter.Writer, in EventBufferUsage) { - out.RawByte('{') - first := true - _ = first - if in.PercentFull != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"percentFull\":") - out.Float64(float64(in.PercentFull)) - } - if in.EventCount != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"eventCount\":") - out.Float64(float64(in.EventCount)) - } - if in.Value != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"value\":") - out.Float64(float64(in.Value)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EventBufferUsage) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EventBufferUsage) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EventBufferUsage) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EventBufferUsage) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(in *jlexer.Lexer, out *EndParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(in *jlexer.Lexer, out *EndParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1058,7 +663,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(out *jwriter.Writer, in EndParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(out *jwriter.Writer, in EndParams) { out.RawByte('{') first := true _ = first @@ -1068,23 +673,418 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EndParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EndParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EndParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EndParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(in *jlexer.Lexer, out *StartParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "bufferUsageReportingInterval": + out.BufferUsageReportingInterval = float64(in.Float64()) + case "transferMode": + (out.TransferMode).UnmarshalEasyJSON(in) + case "traceConfig": + if in.IsNull() { + in.Skip() + out.TraceConfig = nil + } else { + if out.TraceConfig == nil { + out.TraceConfig = new(TraceConfig) + } + (*out.TraceConfig).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(out *jwriter.Writer, in StartParams) { + out.RawByte('{') + first := true + _ = first + if in.BufferUsageReportingInterval != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"bufferUsageReportingInterval\":") + out.Float64(float64(in.BufferUsageReportingInterval)) + } + if in.TransferMode != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"transferMode\":") + (in.TransferMode).MarshalEasyJSON(out) + } + if in.TraceConfig != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"traceConfig\":") + if in.TraceConfig == nil { + out.RawString("null") + } else { + (*in.TraceConfig).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v StartParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *StartParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(in *jlexer.Lexer, out *TraceConfig) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "recordMode": + (out.RecordMode).UnmarshalEasyJSON(in) + case "enableSampling": + out.EnableSampling = bool(in.Bool()) + case "enableSystrace": + out.EnableSystrace = bool(in.Bool()) + case "enableArgumentFilter": + out.EnableArgumentFilter = bool(in.Bool()) + case "includedCategories": + if in.IsNull() { + in.Skip() + out.IncludedCategories = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.IncludedCategories = make([]string, 0, 4) + } else { + out.IncludedCategories = []string{} + } + for !in.IsDelim(']') { + var v7 string + v7 = string(in.String()) + out.IncludedCategories = append(out.IncludedCategories, v7) + in.WantComma() + } + in.Delim(']') + } + case "excludedCategories": + if in.IsNull() { + in.Skip() + out.ExcludedCategories = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.ExcludedCategories = make([]string, 0, 4) + } else { + out.ExcludedCategories = []string{} + } + for !in.IsDelim(']') { + var v8 string + v8 = string(in.String()) + out.ExcludedCategories = append(out.ExcludedCategories, v8) + in.WantComma() + } + in.Delim(']') + } + case "syntheticDelays": + if in.IsNull() { + in.Skip() + out.SyntheticDelays = nil + } else { + in.Delim('[') + if !in.IsDelim(']') { + out.SyntheticDelays = make([]string, 0, 4) + } else { + out.SyntheticDelays = []string{} + } + for !in.IsDelim(']') { + var v9 string + v9 = string(in.String()) + out.SyntheticDelays = append(out.SyntheticDelays, v9) + in.WantComma() + } + in.Delim(']') + } + case "memoryDumpConfig": + if in.IsNull() { + in.Skip() + out.MemoryDumpConfig = nil + } else { + if out.MemoryDumpConfig == nil { + out.MemoryDumpConfig = new(MemoryDumpConfig) + } + (*out.MemoryDumpConfig).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(out *jwriter.Writer, in TraceConfig) { + out.RawByte('{') + first := true + _ = first + if in.RecordMode != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"recordMode\":") + (in.RecordMode).MarshalEasyJSON(out) + } + if in.EnableSampling { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enableSampling\":") + out.Bool(bool(in.EnableSampling)) + } + if in.EnableSystrace { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enableSystrace\":") + out.Bool(bool(in.EnableSystrace)) + } + if in.EnableArgumentFilter { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enableArgumentFilter\":") + out.Bool(bool(in.EnableArgumentFilter)) + } + if len(in.IncludedCategories) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"includedCategories\":") + if in.IncludedCategories == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v10, v11 := range in.IncludedCategories { + if v10 > 0 { + out.RawByte(',') + } + out.String(string(v11)) + } + out.RawByte(']') + } + } + if len(in.ExcludedCategories) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"excludedCategories\":") + if in.ExcludedCategories == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v12, v13 := range in.ExcludedCategories { + if v12 > 0 { + out.RawByte(',') + } + out.String(string(v13)) + } + out.RawByte(']') + } + } + if len(in.SyntheticDelays) != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"syntheticDelays\":") + if in.SyntheticDelays == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v14, v15 := range in.SyntheticDelays { + if v14 > 0 { + out.RawByte(',') + } + out.String(string(v15)) + } + out.RawByte(']') + } + } + if in.MemoryDumpConfig != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"memoryDumpConfig\":") + if in.MemoryDumpConfig == nil { + out.RawString("null") + } else { + (*in.MemoryDumpConfig).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v TraceConfig) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v TraceConfig) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *TraceConfig) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *TraceConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(in *jlexer.Lexer, out *MemoryDumpConfig) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(out *jwriter.Writer, in MemoryDumpConfig) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v MemoryDumpConfig) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v MemoryDumpConfig) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *MemoryDumpConfig) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EndParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *MemoryDumpConfig) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(l, v) } diff --git a/cdp/tracing/tracing.go b/cdp/tracing/tracing.go index cd505ee..a3dad7a 100644 --- a/cdp/tracing/tracing.go +++ b/cdp/tracing/tracing.go @@ -10,7 +10,6 @@ import ( "context" cdp "github.com/knq/chromedp/cdp" - "github.com/mailru/easyjson" ) // StartParams start trace events collection. @@ -50,39 +49,7 @@ func (p StartParams) WithTraceConfig(traceConfig *TraceConfig) *StartParams { // Do executes Tracing.start against the provided context and // target handler. func (p *StartParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTracingStart, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTracingStart, p, nil) } // EndParams stop trace events collection. @@ -96,33 +63,7 @@ func End() *EndParams { // Do executes Tracing.end against the provided context and // target handler. func (p *EndParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTracingEnd, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTracingEnd, nil, nil) } // GetCategoriesParams gets supported tracing categories. @@ -144,40 +85,14 @@ type GetCategoriesReturns struct { // returns: // categories - A list of supported tracing categories. func (p *GetCategoriesParams) Do(ctxt context.Context, h cdp.Handler) (categories []string, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandTracingGetCategories, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return nil, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r GetCategoriesReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return nil, cdp.ErrInvalidResult - } - - return r.Categories, nil - - case error: - return nil, v - } - - case <-ctxt.Done(): - return nil, ctxt.Err() + var res GetCategoriesReturns + err = h.Execute(ctxt, cdp.CommandTracingGetCategories, nil, &res) + if err != nil { + return nil, err } - return nil, cdp.ErrUnknownResult + return res.Categories, nil } // RequestMemoryDumpParams request a global memory dump. @@ -201,40 +116,14 @@ type RequestMemoryDumpReturns struct { // dumpGUID - GUID of the resulting global memory dump. // success - True iff the global memory dump succeeded. func (p *RequestMemoryDumpParams) Do(ctxt context.Context, h cdp.Handler) (dumpGUID string, success bool, err error) { - if ctxt == nil { - ctxt = context.Background() - } - // execute - ch := h.Execute(ctxt, cdp.CommandTracingRequestMemoryDump, cdp.Empty) - - // read response - select { - case res := <-ch: - if res == nil { - return "", false, cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - // unmarshal - var r RequestMemoryDumpReturns - err = easyjson.Unmarshal(v, &r) - if err != nil { - return "", false, cdp.ErrInvalidResult - } - - return r.DumpGUID, r.Success, nil - - case error: - return "", false, v - } - - case <-ctxt.Done(): - return "", false, ctxt.Err() + var res RequestMemoryDumpReturns + err = h.Execute(ctxt, cdp.CommandTracingRequestMemoryDump, nil, &res) + if err != nil { + return "", false, err } - return "", false, cdp.ErrUnknownResult + return res.DumpGUID, res.Success, nil } // RecordClockSyncMarkerParams record a clock sync marker in the trace. @@ -255,37 +144,5 @@ func RecordClockSyncMarker(syncID string) *RecordClockSyncMarkerParams { // Do executes Tracing.recordClockSyncMarker against the provided context and // target handler. func (p *RecordClockSyncMarkerParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - if ctxt == nil { - ctxt = context.Background() - } - - // marshal - buf, err := easyjson.Marshal(p) - if err != nil { - return err - } - - // execute - ch := h.Execute(ctxt, cdp.CommandTracingRecordClockSyncMarker, easyjson.RawMessage(buf)) - - // read response - select { - case res := <-ch: - if res == nil { - return cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage: - return nil - - case error: - return v - } - - case <-ctxt.Done(): - return ctxt.Err() - } - - return cdp.ErrUnknownResult + return h.Execute(ctxt, cdp.CommandTracingRecordClockSyncMarker, p, nil) } diff --git a/chromedp_test.go b/chromedp_test.go index db83ab4..1aac60e 100644 --- a/chromedp_test.go +++ b/chromedp_test.go @@ -15,7 +15,7 @@ var defaultContext = context.Background() func TestMain(m *testing.M) { var err error - pool, err = NewPool() + pool, err = NewPool(PoolLog(log.Printf, log.Printf, log.Printf)) if err != nil { log.Fatal(err) } diff --git a/cmd/chromedp-gen/internal/types.go b/cmd/chromedp-gen/internal/types.go index f151b1a..d3e74b5 100644 --- a/cmd/chromedp-gen/internal/types.go +++ b/cmd/chromedp-gen/internal/types.go @@ -360,8 +360,8 @@ func (t *Type) EmptyRetList(d *Domain, domains []*Domain) string { return strings.TrimSuffix(s, ", ") } -// RetValueList returns the return value list for a command. -func (t *Type) RetValueList(d *Domain, domains []*Domain) string { +// RetNameList returns a . list for a command's return list. +func (t *Type) RetNameList(valname string, d *Domain, domains []*Domain) string { var s string b64ret := t.Base64EncodedRetParam() for _, p := range t.Returns { @@ -369,7 +369,7 @@ func (t *Type) RetValueList(d *Domain, domains []*Domain) string { continue } - n := "r." + p.GoName(false) + n := valname + "." + p.GoName(false) if b64ret != nil && b64ret.Name == p.Name { n = "dec" } diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json index cad0424..8b9d64f 100644 --- a/cmd/chromedp-gen/protocol.json +++ b/cmd/chromedp-gen/protocol.json @@ -7174,12 +7174,6 @@ "optional": true, "description": "Event original handler function value." }, - { - "name": "removeFunction", - "$ref": "Runtime.RemoteObject", - "optional": true, - "description": "Event listener remove function." - }, { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", diff --git a/cmd/chromedp-gen/templates/domain.qtpl b/cmd/chromedp-gen/templates/domain.qtpl index 1bbbcc6..6c7b840 100644 --- a/cmd/chromedp-gen/templates/domain.qtpl +++ b/cmd/chromedp-gen/templates/domain.qtpl @@ -86,7 +86,7 @@ func (p {%s= typ %}) {%s= optName %}({%s= v %} {%s= t.GoType(d, domains) %}) *{% retTypeList += ", " } - retValueList := c.RetValueList(d, domains) + retValueList := c.RetNameList("res", d, domains) if retValueList != "" { retValueList += ", " } @@ -102,63 +102,36 @@ func (p {%s= typ %}) {%s= optName %}({%s= v %} {%s= t.GoType(d, domains) %}) *{% break } } + + pval := "p" + if hasEmptyParams { + pval = "nil" + } %} // Do executes {%s= c.ProtoName(d) %} against the provided context and -// target handler.{% if len(c.Returns) > 0 %} +// target handler.{% if !hasEmptyRet %} // // returns:{% for _, p := range c.Returns %}{% if p.Name == internal.Base64EncodedParamName %}{% continue %}{% end %} // {%s= p.String() %}{% endfor %}{% endif %} -func (p *{%s= typ %}) Do(ctxt context.Context, h cdp.Handler) ({%s= retTypeList %}err error) { - if ctxt == nil { - ctxt = context.Background() - }{% if !hasEmptyParams %} - - // marshal - buf, err := easyjson.Marshal(p) +func (p *{%s= typ %}) Do(ctxt context.Context, h cdp.Handler) ({%s= retTypeList %}err error) {{% if hasEmptyRet %} + return h.Execute(ctxt, cdp.{%s= c.CommandMethodType(d) %}, {%s= pval %}, nil){% else %} + // execute + var res {%s= c.CommandReturnsType() %} + err = h.Execute(ctxt, cdp.{%s= c.CommandMethodType(d) %}, {%s= pval %}, &res) if err != nil { return {%s= emptyRet %}err - }{% endif %} - - // execute - ch := h.Execute(ctxt, cdp.{%s= c.CommandMethodType(d) %}, {% if hasEmptyParams %}cdp.Empty{% else %}easyjson.RawMessage(buf){% end %}) - - // read response - select { - case res := <-ch: - if res == nil { - return {%s= emptyRet %}cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage:{% if !hasEmptyRet %} - // unmarshal - var r {%s= c.CommandReturnsType() %} - err = easyjson.Unmarshal(v, &r) - if err != nil { - return {%s= emptyRet %}cdp.ErrInvalidResult - }{% if b64ret != nil %} - - // decode - var dec []byte{% if b64cond %} - if r.Base64encoded {{% endif %} - dec, err = base64.StdEncoding.DecodeString(r.{%s= b64ret.GoName(false) %}) - if err != nil { - return nil, err - }{% if b64cond %} - } else { - dec = []byte(r.{%s= b64ret.GoName(false) %}) - }{% endif %}{% endif %} - {% endif %} - return {%s= retValueList %}nil - - case error: - return {%s= emptyRet %}v - } - - case <-ctxt.Done(): - return {%s= emptyRet %}ctxt.Err() } - - return {%s= emptyRet %}cdp.ErrUnknownResult + {% if b64ret != nil %} + // decode + var dec []byte{% if b64cond %} + if res.Base64encoded {{% endif %} + dec, err = base64.StdEncoding.DecodeString(res.{%s= b64ret.GoName(false) %}) + if err != nil { + return nil, err + }{% if b64cond %} + } else { + dec = []byte(res.{%s= b64ret.GoName(false) %}) + }{% endif %}{% endif %} + return {%s= retValueList %}nil{% endif %} } {% endfunc %} diff --git a/cmd/chromedp-gen/templates/domain.qtpl.go b/cmd/chromedp-gen/templates/domain.qtpl.go index fe19708..91d5473 100644 --- a/cmd/chromedp-gen/templates/domain.qtpl.go +++ b/cmd/chromedp-gen/templates/domain.qtpl.go @@ -424,7 +424,7 @@ func StreamCommandDoFuncTemplate(qw422016 *qt422016.Writer, c *internal.Type, d retTypeList += ", " } - retValueList := c.RetValueList(d, domains) + retValueList := c.RetNameList("res", d, domains) if retValueList != "" { retValueList += ", " } @@ -441,220 +441,169 @@ func StreamCommandDoFuncTemplate(qw422016 *qt422016.Writer, c *internal.Type, d } } - //line templates/domain.qtpl:105 + pval := "p" + if hasEmptyParams { + pval = "nil" + } + + //line templates/domain.qtpl:110 qw422016.N().S(` // Do executes `) - //line templates/domain.qtpl:106 + //line templates/domain.qtpl:111 qw422016.N().S(c.ProtoName(d)) - //line templates/domain.qtpl:106 + //line templates/domain.qtpl:111 qw422016.N().S(` against the provided context and // target handler.`) - //line templates/domain.qtpl:107 - if len(c.Returns) > 0 { - //line templates/domain.qtpl:107 + //line templates/domain.qtpl:112 + if !hasEmptyRet { + //line templates/domain.qtpl:112 qw422016.N().S(` // // returns:`) - //line templates/domain.qtpl:109 + //line templates/domain.qtpl:114 for _, p := range c.Returns { - //line templates/domain.qtpl:109 + //line templates/domain.qtpl:114 if p.Name == internal.Base64EncodedParamName { - //line templates/domain.qtpl:109 + //line templates/domain.qtpl:114 continue - //line templates/domain.qtpl:109 + //line templates/domain.qtpl:114 } - //line templates/domain.qtpl:109 + //line templates/domain.qtpl:114 qw422016.N().S(` // `) - //line templates/domain.qtpl:110 + //line templates/domain.qtpl:115 qw422016.N().S(p.String()) - //line templates/domain.qtpl:110 + //line templates/domain.qtpl:115 } - //line templates/domain.qtpl:110 + //line templates/domain.qtpl:115 } - //line templates/domain.qtpl:110 + //line templates/domain.qtpl:115 qw422016.N().S(` func (p *`) - //line templates/domain.qtpl:111 + //line templates/domain.qtpl:116 qw422016.N().S(typ) - //line templates/domain.qtpl:111 + //line templates/domain.qtpl:116 qw422016.N().S(`) Do(ctxt context.Context, h cdp.Handler) (`) - //line templates/domain.qtpl:111 + //line templates/domain.qtpl:116 qw422016.N().S(retTypeList) - //line templates/domain.qtpl:111 - qw422016.N().S(`err error) { - if ctxt == nil { - ctxt = context.Background() - }`) - //line templates/domain.qtpl:114 - if !hasEmptyParams { - //line templates/domain.qtpl:114 + //line templates/domain.qtpl:116 + qw422016.N().S(`err error) {`) + //line templates/domain.qtpl:116 + if hasEmptyRet { + //line templates/domain.qtpl:116 qw422016.N().S(` - - // marshal - buf, err := easyjson.Marshal(p) + return h.Execute(ctxt, cdp.`) + //line templates/domain.qtpl:117 + qw422016.N().S(c.CommandMethodType(d)) + //line templates/domain.qtpl:117 + qw422016.N().S(`, `) + //line templates/domain.qtpl:117 + qw422016.N().S(pval) + //line templates/domain.qtpl:117 + qw422016.N().S(`, nil)`) + //line templates/domain.qtpl:117 + } else { + //line templates/domain.qtpl:117 + qw422016.N().S(` + // execute + var res `) + //line templates/domain.qtpl:119 + qw422016.N().S(c.CommandReturnsType()) + //line templates/domain.qtpl:119 + qw422016.N().S(` + err = h.Execute(ctxt, cdp.`) + //line templates/domain.qtpl:120 + qw422016.N().S(c.CommandMethodType(d)) + //line templates/domain.qtpl:120 + qw422016.N().S(`, `) + //line templates/domain.qtpl:120 + qw422016.N().S(pval) + //line templates/domain.qtpl:120 + qw422016.N().S(`, &res) if err != nil { return `) - //line templates/domain.qtpl:119 + //line templates/domain.qtpl:122 qw422016.N().S(emptyRet) - //line templates/domain.qtpl:119 + //line templates/domain.qtpl:122 qw422016.N().S(`err - }`) - //line templates/domain.qtpl:120 } - //line templates/domain.qtpl:120 - qw422016.N().S(` - - // execute - ch := h.Execute(ctxt, cdp.`) - //line templates/domain.qtpl:123 - qw422016.N().S(c.CommandMethodType(d)) - //line templates/domain.qtpl:123 - qw422016.N().S(`, `) - //line templates/domain.qtpl:123 - if hasEmptyParams { - //line templates/domain.qtpl:123 - qw422016.N().S(`cdp.Empty`) - //line templates/domain.qtpl:123 - } else { - //line templates/domain.qtpl:123 - qw422016.N().S(`easyjson.RawMessage(buf)`) - //line templates/domain.qtpl:123 - } - //line templates/domain.qtpl:123 - qw422016.N().S(`) - - // read response - select { - case res := <-ch: - if res == nil { - return `) - //line templates/domain.qtpl:129 - qw422016.N().S(emptyRet) - //line templates/domain.qtpl:129 - qw422016.N().S(`cdp.ErrChannelClosed - } - - switch v := res.(type) { - case easyjson.RawMessage:`) - //line templates/domain.qtpl:133 - if !hasEmptyRet { - //line templates/domain.qtpl:133 - qw422016.N().S(` - // unmarshal - var r `) - //line templates/domain.qtpl:135 - qw422016.N().S(c.CommandReturnsType()) - //line templates/domain.qtpl:135 - qw422016.N().S(` - err = easyjson.Unmarshal(v, &r) - if err != nil { - return `) - //line templates/domain.qtpl:138 - qw422016.N().S(emptyRet) - //line templates/domain.qtpl:138 - qw422016.N().S(`cdp.ErrInvalidResult - }`) - //line templates/domain.qtpl:139 + `) + //line templates/domain.qtpl:124 if b64ret != nil { - //line templates/domain.qtpl:139 + //line templates/domain.qtpl:124 qw422016.N().S(` - - // decode - var dec []byte`) - //line templates/domain.qtpl:142 + // decode + var dec []byte`) + //line templates/domain.qtpl:126 if b64cond { - //line templates/domain.qtpl:142 + //line templates/domain.qtpl:126 qw422016.N().S(` - if r.Base64encoded {`) - //line templates/domain.qtpl:143 + if res.Base64encoded {`) + //line templates/domain.qtpl:127 } - //line templates/domain.qtpl:143 + //line templates/domain.qtpl:127 qw422016.N().S(` - dec, err = base64.StdEncoding.DecodeString(r.`) - //line templates/domain.qtpl:144 + dec, err = base64.StdEncoding.DecodeString(res.`) + //line templates/domain.qtpl:128 qw422016.N().S(b64ret.GoName(false)) - //line templates/domain.qtpl:144 + //line templates/domain.qtpl:128 qw422016.N().S(`) - if err != nil { - return nil, err - }`) - //line templates/domain.qtpl:147 + if err != nil { + return nil, err + }`) + //line templates/domain.qtpl:131 if b64cond { - //line templates/domain.qtpl:147 + //line templates/domain.qtpl:131 qw422016.N().S(` - } else { - dec = []byte(r.`) - //line templates/domain.qtpl:149 + } else { + dec = []byte(res.`) + //line templates/domain.qtpl:133 qw422016.N().S(b64ret.GoName(false)) - //line templates/domain.qtpl:149 + //line templates/domain.qtpl:133 qw422016.N().S(`) - }`) - //line templates/domain.qtpl:150 + }`) + //line templates/domain.qtpl:134 } - //line templates/domain.qtpl:150 + //line templates/domain.qtpl:134 } - //line templates/domain.qtpl:150 + //line templates/domain.qtpl:134 qw422016.N().S(` - `) - //line templates/domain.qtpl:151 - } - //line templates/domain.qtpl:151 - qw422016.N().S(` - return `) - //line templates/domain.qtpl:152 - qw422016.N().S(retValueList) - //line templates/domain.qtpl:152 - qw422016.N().S(`nil - - case error: - return `) - //line templates/domain.qtpl:155 - qw422016.N().S(emptyRet) - //line templates/domain.qtpl:155 - qw422016.N().S(`v - } - - case <-ctxt.Done(): - return `) - //line templates/domain.qtpl:159 - qw422016.N().S(emptyRet) - //line templates/domain.qtpl:159 - qw422016.N().S(`ctxt.Err() - } - return `) - //line templates/domain.qtpl:162 - qw422016.N().S(emptyRet) - //line templates/domain.qtpl:162 - qw422016.N().S(`cdp.ErrUnknownResult + //line templates/domain.qtpl:135 + qw422016.N().S(retValueList) + //line templates/domain.qtpl:135 + qw422016.N().S(`nil`) + //line templates/domain.qtpl:135 + } + //line templates/domain.qtpl:135 + qw422016.N().S(` } `) -//line templates/domain.qtpl:164 +//line templates/domain.qtpl:137 } -//line templates/domain.qtpl:164 +//line templates/domain.qtpl:137 func WriteCommandDoFuncTemplate(qq422016 qtio422016.Writer, c *internal.Type, d *internal.Domain, domains []*internal.Domain) { - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 qw422016 := qt422016.AcquireWriter(qq422016) - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 StreamCommandDoFuncTemplate(qw422016, c, d, domains) - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 qt422016.ReleaseWriter(qw422016) -//line templates/domain.qtpl:164 +//line templates/domain.qtpl:137 } -//line templates/domain.qtpl:164 +//line templates/domain.qtpl:137 func CommandDoFuncTemplate(c *internal.Type, d *internal.Domain, domains []*internal.Domain) string { - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 qb422016 := qt422016.AcquireByteBuffer() - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 WriteCommandDoFuncTemplate(qb422016, c, d, domains) - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 qs422016 := string(qb422016.B) - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 qt422016.ReleaseByteBuffer(qb422016) - //line templates/domain.qtpl:164 + //line templates/domain.qtpl:137 return qs422016 -//line templates/domain.qtpl:164 +//line templates/domain.qtpl:137 } diff --git a/cmd/chromedp-gen/templates/extra.qtpl b/cmd/chromedp-gen/templates/extra.qtpl index 5d8dec1..0136ca8 100644 --- a/cmd/chromedp-gen/templates/extra.qtpl +++ b/cmd/chromedp-gen/templates/extra.qtpl @@ -231,7 +231,7 @@ type Handler interface { // Execute executes the specified command using the supplied context and // parameters. - Execute(context.Context, MethodType, easyjson.RawMessage) <-chan interface{} + Execute(context.Context, MethodType, easyjson.Marshaler, easyjson.Unmarshaler) error // Listen creates a channel that will receive an event for the types // specified. @@ -240,9 +240,6 @@ type Handler interface { // Release releases a channel returned from Listen. Release(<-chan interface{}) } - -// Empty is an empty JSON object message. -var Empty = easyjson.RawMessage(`{}`) {% endfunc %} // ExtraUtilTemplate generates the decode func for the Message type. diff --git a/cmd/chromedp-gen/templates/extra.qtpl.go b/cmd/chromedp-gen/templates/extra.qtpl.go index d14c061..ac13991 100644 --- a/cmd/chromedp-gen/templates/extra.qtpl.go +++ b/cmd/chromedp-gen/templates/extra.qtpl.go @@ -492,7 +492,7 @@ type Handler interface { // Execute executes the specified command using the supplied context and // parameters. - Execute(context.Context, MethodType, easyjson.RawMessage) <-chan interface{} + Execute(context.Context, MethodType, easyjson.Marshaler, easyjson.Unmarshaler) error // Listen creates a channel that will receive an event for the types // specified. @@ -501,52 +501,41 @@ type Handler interface { // Release releases a channel returned from Listen. Release(<-chan interface{}) } - -// Empty is an empty JSON object message. -var Empty = easyjson.RawMessage(`) - //line templates/extra.qtpl:211 - qw422016.N().S("`") - //line templates/extra.qtpl:211 - qw422016.N().S(`{}`) - //line templates/extra.qtpl:211 - qw422016.N().S("`") - //line templates/extra.qtpl:211 - qw422016.N().S(`) `) -//line templates/extra.qtpl:246 +//line templates/extra.qtpl:243 } -//line templates/extra.qtpl:246 +//line templates/extra.qtpl:243 func WriteExtraCDPTypes(qq422016 qtio422016.Writer) { - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 qw422016 := qt422016.AcquireWriter(qq422016) - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 StreamExtraCDPTypes(qw422016) - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 qt422016.ReleaseWriter(qw422016) -//line templates/extra.qtpl:246 +//line templates/extra.qtpl:243 } -//line templates/extra.qtpl:246 +//line templates/extra.qtpl:243 func ExtraCDPTypes() string { - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 qb422016 := qt422016.AcquireByteBuffer() - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 WriteExtraCDPTypes(qb422016) - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 qs422016 := string(qb422016.B) - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 qt422016.ReleaseByteBuffer(qb422016) - //line templates/extra.qtpl:246 + //line templates/extra.qtpl:243 return qs422016 -//line templates/extra.qtpl:246 +//line templates/extra.qtpl:243 } // ExtraUtilTemplate generates the decode func for the Message type. -//line templates/extra.qtpl:249 +//line templates/extra.qtpl:246 func StreamExtraUtilTemplate(qw422016 *qt422016.Writer, domains []*internal.Domain) { - //line templates/extra.qtpl:249 + //line templates/extra.qtpl:246 qw422016.N().S(` type empty struct{} var emptyVal = &empty{} @@ -555,66 +544,66 @@ var emptyVal = &empty{} func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { var v easyjson.Unmarshaler switch msg.Method {`) - //line templates/extra.qtpl:256 + //line templates/extra.qtpl:253 for _, d := range domains { - //line templates/extra.qtpl:256 + //line templates/extra.qtpl:253 for _, c := range d.Commands { - //line templates/extra.qtpl:256 + //line templates/extra.qtpl:253 qw422016.N().S(` case cdp.`) - //line templates/extra.qtpl:257 + //line templates/extra.qtpl:254 qw422016.N().S(c.CommandMethodType(d)) - //line templates/extra.qtpl:257 + //line templates/extra.qtpl:254 qw422016.N().S(`:`) - //line templates/extra.qtpl:257 + //line templates/extra.qtpl:254 if len(c.Returns) == 0 { - //line templates/extra.qtpl:257 + //line templates/extra.qtpl:254 qw422016.N().S(` return emptyVal, nil`) - //line templates/extra.qtpl:258 + //line templates/extra.qtpl:255 } else { - //line templates/extra.qtpl:258 + //line templates/extra.qtpl:255 qw422016.N().S(` v = new(`) - //line templates/extra.qtpl:259 + //line templates/extra.qtpl:256 qw422016.N().S(d.PackageRefName()) - //line templates/extra.qtpl:259 + //line templates/extra.qtpl:256 qw422016.N().S(`.`) - //line templates/extra.qtpl:259 + //line templates/extra.qtpl:256 qw422016.N().S(c.CommandReturnsType()) - //line templates/extra.qtpl:259 + //line templates/extra.qtpl:256 qw422016.N().S(`)`) - //line templates/extra.qtpl:259 + //line templates/extra.qtpl:256 } - //line templates/extra.qtpl:259 + //line templates/extra.qtpl:256 qw422016.N().S(` + `) + //line templates/extra.qtpl:257 + } + //line templates/extra.qtpl:257 + for _, e := range d.Events { + //line templates/extra.qtpl:257 + qw422016.N().S(` + case cdp.`) + //line templates/extra.qtpl:258 + qw422016.N().S(e.EventMethodType(d)) + //line templates/extra.qtpl:258 + qw422016.N().S(`: + v = new(`) + //line templates/extra.qtpl:259 + qw422016.N().S(d.PackageRefName()) + //line templates/extra.qtpl:259 + qw422016.N().S(`.`) + //line templates/extra.qtpl:259 + qw422016.N().S(e.EventType()) + //line templates/extra.qtpl:259 + qw422016.N().S(`) `) //line templates/extra.qtpl:260 } //line templates/extra.qtpl:260 - for _, e := range d.Events { - //line templates/extra.qtpl:260 - qw422016.N().S(` - case cdp.`) - //line templates/extra.qtpl:261 - qw422016.N().S(e.EventMethodType(d)) - //line templates/extra.qtpl:261 - qw422016.N().S(`: - v = new(`) - //line templates/extra.qtpl:262 - qw422016.N().S(d.PackageRefName()) - //line templates/extra.qtpl:262 - qw422016.N().S(`.`) - //line templates/extra.qtpl:262 - qw422016.N().S(e.EventType()) - //line templates/extra.qtpl:262 - qw422016.N().S(`) - `) - //line templates/extra.qtpl:263 - } - //line templates/extra.qtpl:263 } - //line templates/extra.qtpl:263 + //line templates/extra.qtpl:260 qw422016.N().S(`} var buf easyjson.RawMessage @@ -637,69 +626,69 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { return v, nil } `) -//line templates/extra.qtpl:284 +//line templates/extra.qtpl:281 } -//line templates/extra.qtpl:284 +//line templates/extra.qtpl:281 func WriteExtraUtilTemplate(qq422016 qtio422016.Writer, domains []*internal.Domain) { - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 qw422016 := qt422016.AcquireWriter(qq422016) - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 StreamExtraUtilTemplate(qw422016, domains) - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 qt422016.ReleaseWriter(qw422016) -//line templates/extra.qtpl:284 +//line templates/extra.qtpl:281 } -//line templates/extra.qtpl:284 +//line templates/extra.qtpl:281 func ExtraUtilTemplate(domains []*internal.Domain) string { - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 qb422016 := qt422016.AcquireByteBuffer() - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 WriteExtraUtilTemplate(qb422016, domains) - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 qs422016 := string(qb422016.B) - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 qt422016.ReleaseByteBuffer(qb422016) - //line templates/extra.qtpl:284 + //line templates/extra.qtpl:281 return qs422016 -//line templates/extra.qtpl:284 +//line templates/extra.qtpl:281 } -//line templates/extra.qtpl:286 +//line templates/extra.qtpl:283 func StreamExtraMethodTypeDomainDecoder(qw422016 *qt422016.Writer) { - //line templates/extra.qtpl:286 + //line templates/extra.qtpl:283 qw422016.N().S(` // Domain returns the Chrome Debugging Protocol domain of the event or command. func (t MethodType) Domain() string { return string(t[:strings.IndexByte(string(t), '.')]) } `) -//line templates/extra.qtpl:291 +//line templates/extra.qtpl:288 } -//line templates/extra.qtpl:291 +//line templates/extra.qtpl:288 func WriteExtraMethodTypeDomainDecoder(qq422016 qtio422016.Writer) { - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 qw422016 := qt422016.AcquireWriter(qq422016) - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 StreamExtraMethodTypeDomainDecoder(qw422016) - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 qt422016.ReleaseWriter(qw422016) -//line templates/extra.qtpl:291 +//line templates/extra.qtpl:288 } -//line templates/extra.qtpl:291 +//line templates/extra.qtpl:288 func ExtraMethodTypeDomainDecoder() string { - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 qb422016 := qt422016.AcquireByteBuffer() - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 WriteExtraMethodTypeDomainDecoder(qb422016) - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 qs422016 := string(qb422016.B) - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 qt422016.ReleaseByteBuffer(qb422016) - //line templates/extra.qtpl:291 + //line templates/extra.qtpl:288 return qs422016 -//line templates/extra.qtpl:291 +//line templates/extra.qtpl:288 } diff --git a/examples/click/main.go b/examples/click/main.go index e3f100f..02f7926 100644 --- a/examples/click/main.go +++ b/examples/click/main.go @@ -16,7 +16,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/edge-simple/main.go b/examples/edge-simple/main.go index f6c736c..2619447 100644 --- a/examples/edge-simple/main.go +++ b/examples/edge-simple/main.go @@ -9,9 +9,9 @@ import ( "log" "time" - cdp "github.com/knq/chromedp" - cdptypes "github.com/knq/chromedp/cdp" - "github.com/knq/chromedp/client" + cdp "github.com/knq/cdp" + cdptypes "github.com/knq/cdp/cdp" + "github.com/knq/cdp/client" ) func main() { @@ -22,13 +22,13 @@ func main() { defer cancel() // create edge instance -- FIXME: not able to launch separate process (yet) - /*cdp, err := chromedp.New(ctxt, chromedp.WithRunnerOptions( + /*cdp, err := cdp.New(ctxt, cdp.WithRunnerOptions( runner.EdgeDiagnosticsAdapter(), ))*/ // create edge instance watch := client.New().WatchPageTargets(ctxt) - c, err := chromedp.New(ctxt, chromedp.WithTargets(watch)) + c, err := cdp.New(ctxt, cdp.WithTargets(watch), cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/eval/main.go b/examples/eval/main.go index 245d2a8..cc1c865 100644 --- a/examples/eval/main.go +++ b/examples/eval/main.go @@ -15,7 +15,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/headless/main.go b/examples/headless/main.go index 87c0fae..d86e7db 100644 --- a/examples/headless/main.go +++ b/examples/headless/main.go @@ -20,7 +20,7 @@ func main() { defer cancel() // create chrome - c, err := cdp.New(ctxt, cdp.WithTargets(client.New().WatchPageTargets(ctxt))) + c, err := cdp.New(ctxt, cdp.WithTargets(client.New().WatchPageTargets(ctxt)), cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/keys/main.go b/examples/keys/main.go index 2cf7e63..6e7e5ad 100644 --- a/examples/keys/main.go +++ b/examples/keys/main.go @@ -18,7 +18,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/screenshot/main.go b/examples/screenshot/main.go index 9ac474c..53fd090 100644 --- a/examples/screenshot/main.go +++ b/examples/screenshot/main.go @@ -17,7 +17,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/simple/main.go b/examples/simple/main.go index 5a0de2a..6e3c1a9 100644 --- a/examples/simple/main.go +++ b/examples/simple/main.go @@ -19,7 +19,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/submit/main.go b/examples/submit/main.go index 3020e5e..242d7be 100644 --- a/examples/submit/main.go +++ b/examples/submit/main.go @@ -15,7 +15,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/text/main.go b/examples/text/main.go index 3fa5638..6c1168e 100644 --- a/examples/text/main.go +++ b/examples/text/main.go @@ -15,7 +15,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/examples/visible/main.go b/examples/visible/main.go index 05a3078..f8e3424 100644 --- a/examples/visible/main.go +++ b/examples/visible/main.go @@ -20,7 +20,7 @@ func main() { defer cancel() // create chrome instance - c, err := cdp.New(ctxt) + c, err := cdp.New(ctxt, cdp.WithLog(log.Printf)) if err != nil { log.Fatal(err) } diff --git a/handler.go b/handler.go index 79b3061..18bf06d 100644 --- a/handler.go +++ b/handler.go @@ -50,7 +50,7 @@ type TargetHandler struct { lastm sync.Mutex // res is the id->result channel map. - res map[int64]chan interface{} + res map[int64]chan easyjson.RawMessage resrw sync.RWMutex // logging funcs @@ -87,7 +87,7 @@ func (h *TargetHandler) Run(ctxt context.Context) error { h.qcmd = make(chan *cdp.Message) h.qres = make(chan *cdp.Message) h.qevents = make(chan *cdp.Message) - h.res = make(map[int64]chan interface{}) + h.res = make(map[int64]chan easyjson.RawMessage) h.detached = make(chan *inspector.EventDetached) h.pageWaitGroup = new(sync.WaitGroup) h.domWaitGroup = new(sync.WaitGroup) @@ -182,19 +182,19 @@ func (h *TargetHandler) run(ctxt context.Context) { case ev := <-h.qevents: err = h.processEvent(ctxt, ev) if err != nil { - h.errorf("could not process event, got: %v", err) + h.errorf("could not process event %s, got: %v", ev.Method, err) } case res := <-h.qres: err = h.processResult(res) if err != nil { - h.errorf("could not process command result, got: %v", err) + h.errorf("could not process result for message %d, got: %v", res.ID, err) } case cmd := <-h.qcmd: err = h.processCommand(cmd) if err != nil { - h.errorf("could not process command, got: %v", err) + h.errorf("could not process command message %d, got: %v", cmd.ID, err) } case <-ctxt.Done(): @@ -295,31 +295,27 @@ func (h *TargetHandler) documentUpdated(ctxt context.Context) { // processResult processes an incoming command result. func (h *TargetHandler) processResult(msg *cdp.Message) error { - h.resrw.Lock() - defer h.resrw.Unlock() + h.resrw.RLock() + defer h.resrw.RUnlock() - res, ok := h.res[msg.ID] + ch, ok := h.res[msg.ID] if !ok { - err := fmt.Errorf("expected result to be present for message id %d", msg.ID) - h.errorf(err.Error()) - return err + return fmt.Errorf("id %d not present in res map", msg.ID) } + defer close(ch) if msg.Error != nil { - res <- msg.Error - } else { - res <- msg.Result + return msg.Error } - delete(h.res, msg.ID) + ch <- msg.Result return nil } // processCommand writes a command to the client connection. func (h *TargetHandler) processCommand(cmd *cdp.Message) error { - // FIXME: there are two possible error conditions here, check and - // do some kind of logging ... + // marshal buf, err := easyjson.Marshal(cmd) if err != nil { return err @@ -327,61 +323,70 @@ func (h *TargetHandler) processCommand(cmd *cdp.Message) error { h.debugf("<- %s", string(buf)) - // write return h.conn.Write(buf) } +// emptyObj is an empty JSON object message. +var emptyObj = easyjson.RawMessage([]byte(`{}`)) + // Execute executes commandType against the endpoint passed to Run, using the -// provided context and the raw JSON encoded params. -// -// Returns a result channel that will receive AT MOST ONE result. A result is -// either the command's result value (as a raw JSON encoded value), or any -// error encountered during operation. After the result (or an error) is passed -// to the returned channel, the channel will be closed. -// -// Note: the returned channel will be closed after the result is read. If the -// passed context finishes prior to receiving the command result, then -// ctxt.Err() will be sent to the channel. -func (h *TargetHandler) Execute(ctxt context.Context, commandType cdp.MethodType, params easyjson.RawMessage) <-chan interface{} { - ch := make(chan interface{}, 1) - - go func() { - defer close(ch) - - res := make(chan interface{}, 1) - defer close(res) - - // get next id - h.lastm.Lock() - h.last++ - id := h.last - h.lastm.Unlock() - - // save channel - h.resrw.Lock() - h.res[id] = res - h.resrw.Unlock() - - h.qcmd <- &cdp.Message{ - ID: id, - Method: commandType, - Params: params, +// provided context and params, decoding the result of the command to res. +func (h *TargetHandler) Execute(ctxt context.Context, commandType cdp.MethodType, params easyjson.Marshaler, res easyjson.Unmarshaler) error { + var paramsBuf easyjson.RawMessage + if params == nil { + paramsBuf = emptyObj + } else { + var err error + paramsBuf, err = easyjson.Marshal(params) + if err != nil { + return err } + } + + id := h.next() + + // save channel + ch := make(chan easyjson.RawMessage, 1) + h.resrw.Lock() + h.res[id] = ch + h.resrw.Unlock() + + // queue message + h.qcmd <- &cdp.Message{ + ID: id, + Method: commandType, + Params: paramsBuf, + } + + errch := make(chan error, 1) + go func() { + defer close(errch) select { - case v := <-res: - if v != nil { - ch <- v - } else { - ch <- cdp.ErrChannelClosed + case msg := <-ch: + if res != nil { + errch <- easyjson.Unmarshal(msg, res) } case <-ctxt.Done(): - ch <- ctxt.Err() + errch <- ctxt.Err() } + + h.resrw.Lock() + defer h.resrw.Unlock() + + delete(h.res, id) }() - return ch + return <-errch +} + +// next returns the next message id. +func (h *TargetHandler) next() int64 { + h.lastm.Lock() + defer h.lastm.Unlock() + h.last++ + return h.last } // GetRoot returns the current top level frame's root document node. diff --git a/util.go b/util.go index 8f807e6..88faec0 100644 --- a/util.go +++ b/util.go @@ -346,8 +346,8 @@ func removeNode(n []*cdp.Node, id cdp.NodeID) []*cdp.Node { return append(n[:i], n[i+1:]...) } -// isCouldNotComputeBoxModelError unwraps the err as a MessagError and -// determines if it is a compute box model error. +// isCouldNotComputeBoxModelError unwraps err as a MessageError and determines +// if it is a compute box model error. func isCouldNotComputeBoxModelError(err error) bool { e, ok := err.(*cdp.MessageError) return ok && e.Code == -32000 && e.Message == "Could not compute box model."