// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. package browser import ( json "encoding/json" target "github.com/knq/chromedp/cdp/target" easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" ) // suppress unused package warning var ( _ *json.RawMessage _ *jlexer.Lexer _ *jwriter.Writer _ easyjson.Marshaler ) func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser(in *jlexer.Lexer, out *SetWindowBoundsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeString() in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "windowId": out.WindowID = WindowID(in.Int64()) case "bounds": if in.IsNull() { in.Skip() out.Bounds = nil } else { if out.Bounds == nil { out.Bounds = new(Bounds) } (*out.Bounds).UnmarshalEasyJSON(in) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser(out *jwriter.Writer, in SetWindowBoundsParams) { out.RawByte('{') first := true _ = first if !first { out.RawByte(',') } first = false out.RawString("\"windowId\":") out.Int64(int64(in.WindowID)) if !first { out.RawByte(',') } first = false out.RawString("\"bounds\":") if in.Bounds == nil { out.RawString("null") } else { (*in.Bounds).MarshalEasyJSON(out) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v SetWindowBoundsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SetWindowBoundsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser1(in *jlexer.Lexer, out *GetWindowForTargetReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeString() in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "windowId": out.WindowID = WindowID(in.Int64()) case "bounds": if in.IsNull() { in.Skip() out.Bounds = nil } else { if out.Bounds == nil { out.Bounds = new(Bounds) } (*out.Bounds).UnmarshalEasyJSON(in) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser1(out *jwriter.Writer, in GetWindowForTargetReturns) { out.RawByte('{') first := true _ = first if in.WindowID != 0 { if !first { out.RawByte(',') } first = false out.RawString("\"windowId\":") out.Int64(int64(in.WindowID)) } if in.Bounds != nil { if !first { out.RawByte(',') } first = false out.RawString("\"bounds\":") if in.Bounds == nil { out.RawString("null") } else { (*in.Bounds).MarshalEasyJSON(out) } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v GetWindowForTargetReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser1(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetWindowForTargetReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser1(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetWindowForTargetReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser1(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetWindowForTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser1(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser2(in *jlexer.Lexer, out *GetWindowForTargetParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } 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 = target.ID(in.String()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser2(out *jwriter.Writer, in GetWindowForTargetParams) { 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 GetWindowForTargetParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetWindowForTargetParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetWindowForTargetParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser2(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetWindowForTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser2(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser3(in *jlexer.Lexer, out *GetWindowBoundsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } 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 { if out.Bounds == nil { out.Bounds = new(Bounds) } (*out.Bounds).UnmarshalEasyJSON(in) } default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser3(out *jwriter.Writer, in GetWindowBoundsReturns) { out.RawByte('{') first := true _ = first if in.Bounds != nil { if !first { out.RawByte(',') } first = false out.RawString("\"bounds\":") if in.Bounds == nil { out.RawString("null") } else { (*in.Bounds).MarshalEasyJSON(out) } } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v GetWindowBoundsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetWindowBoundsReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetWindowBoundsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser3(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetWindowBoundsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser3(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser4(in *jlexer.Lexer, out *GetWindowBoundsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeString() in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "windowId": out.WindowID = WindowID(in.Int64()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser4(out *jwriter.Writer, in GetWindowBoundsParams) { out.RawByte('{') first := true _ = first if !first { out.RawByte(',') } first = false out.RawString("\"windowId\":") out.Int64(int64(in.WindowID)) out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v GetWindowBoundsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetWindowBoundsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser4(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser4(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser5(in *jlexer.Lexer, out *GetVersionReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeString() in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "protocolVersion": out.ProtocolVersion = string(in.String()) case "product": out.Product = string(in.String()) case "revision": out.Revision = string(in.String()) case "userAgent": out.UserAgent = string(in.String()) case "jsVersion": out.JsVersion = string(in.String()) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser5(out *jwriter.Writer, in GetVersionReturns) { out.RawByte('{') first := true _ = first if in.ProtocolVersion != "" { if !first { out.RawByte(',') } first = false out.RawString("\"protocolVersion\":") out.String(string(in.ProtocolVersion)) } if in.Product != "" { if !first { out.RawByte(',') } first = false out.RawString("\"product\":") out.String(string(in.Product)) } if in.Revision != "" { if !first { out.RawByte(',') } first = false out.RawString("\"revision\":") out.String(string(in.Revision)) } if in.UserAgent != "" { if !first { out.RawByte(',') } first = false out.RawString("\"userAgent\":") out.String(string(in.UserAgent)) } if in.JsVersion != "" { if !first { out.RawByte(',') } first = false out.RawString("\"jsVersion\":") out.String(string(in.JsVersion)) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v GetVersionReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetVersionReturns) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetVersionReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser5(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetVersionReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser5(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser6(in *jlexer.Lexer, out *GetVersionParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.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 easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser6(out *jwriter.Writer, in GetVersionParams) { out.RawByte('{') first := true _ = first out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v GetVersionParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetVersionParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetVersionParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser6(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetVersionParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser6(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(in *jlexer.Lexer, out *Bounds) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { in.Consumed() } in.Skip() return } in.Delim('{') for !in.IsDelim('}') { key := in.UnsafeString() in.WantColon() if in.IsNull() { in.Skip() in.WantComma() continue } switch key { case "left": out.Left = int64(in.Int64()) case "top": out.Top = int64(in.Int64()) case "width": out.Width = int64(in.Int64()) case "height": out.Height = int64(in.Int64()) case "windowState": (out.WindowState).UnmarshalEasyJSON(in) default: in.SkipRecursive() } in.WantComma() } in.Delim('}') if isTopLevel { in.Consumed() } } func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(out *jwriter.Writer, in Bounds) { out.RawByte('{') first := true _ = first if in.Left != 0 { if !first { out.RawByte(',') } first = false out.RawString("\"left\":") out.Int64(int64(in.Left)) } if in.Top != 0 { if !first { out.RawByte(',') } first = false out.RawString("\"top\":") out.Int64(int64(in.Top)) } 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.WindowState != "" { if !first { out.RawByte(',') } first = false out.RawString("\"windowState\":") (in.WindowState).MarshalEasyJSON(out) } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v Bounds) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Bounds) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpBrowser7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Bounds) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Bounds) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpBrowser7(l, v) }