chromedp/cdp/har/easyjson.go

2262 lines
48 KiB
Go
Raw Normal View History

// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
package har
import (
json "encoding/json"
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 easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar(in *jlexer.Lexer, out *Timings) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "blocked":
out.Blocked = float64(in.Float64())
case "dns":
out.DNS = float64(in.Float64())
case "connect":
out.Connect = float64(in.Float64())
case "send":
out.Send = float64(in.Float64())
case "wait":
out.Wait = float64(in.Float64())
case "receive":
out.Receive = float64(in.Float64())
case "ssl":
out.Ssl = float64(in.Float64())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar(out *jwriter.Writer, in Timings) {
out.RawByte('{')
first := true
_ = first
if in.Blocked != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"blocked\":")
out.Float64(float64(in.Blocked))
}
if in.DNS != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"dns\":")
out.Float64(float64(in.DNS))
}
if in.Connect != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"connect\":")
out.Float64(float64(in.Connect))
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"send\":")
out.Float64(float64(in.Send))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"wait\":")
out.Float64(float64(in.Wait))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"receive\":")
out.Float64(float64(in.Receive))
if in.Ssl != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"ssl\":")
out.Float64(float64(in.Ssl))
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Timings) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Timings) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Timings) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Timings) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar1(in *jlexer.Lexer, out *Response) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 = int64(in.Int64())
case "statusText":
out.StatusText = string(in.String())
case "httpVersion":
out.HTTPVersion = string(in.String())
case "cookies":
if in.IsNull() {
in.Skip()
out.Cookies = nil
} else {
in.Delim('[')
if out.Cookies == nil {
if !in.IsDelim(']') {
out.Cookies = make([]*Cookie, 0, 8)
} else {
out.Cookies = []*Cookie{}
}
} else {
out.Cookies = (out.Cookies)[:0]
}
for !in.IsDelim(']') {
var v1 *Cookie
if in.IsNull() {
in.Skip()
v1 = nil
} else {
if v1 == nil {
v1 = new(Cookie)
}
(*v1).UnmarshalEasyJSON(in)
}
out.Cookies = append(out.Cookies, v1)
in.WantComma()
}
in.Delim(']')
}
case "headers":
if in.IsNull() {
in.Skip()
out.Headers = nil
} else {
in.Delim('[')
if out.Headers == nil {
if !in.IsDelim(']') {
out.Headers = make([]*NameValuePair, 0, 8)
} else {
out.Headers = []*NameValuePair{}
}
} else {
out.Headers = (out.Headers)[:0]
}
for !in.IsDelim(']') {
var v2 *NameValuePair
if in.IsNull() {
in.Skip()
v2 = nil
} else {
if v2 == nil {
v2 = new(NameValuePair)
}
(*v2).UnmarshalEasyJSON(in)
}
out.Headers = append(out.Headers, v2)
in.WantComma()
}
in.Delim(']')
}
case "content":
if in.IsNull() {
in.Skip()
out.Content = nil
} else {
if out.Content == nil {
out.Content = new(Content)
}
(*out.Content).UnmarshalEasyJSON(in)
}
case "redirectURL":
out.RedirectURL = string(in.String())
case "headersSize":
out.HeadersSize = int64(in.Int64())
case "bodySize":
out.BodySize = int64(in.Int64())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar1(out *jwriter.Writer, in Response) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"status\":")
out.Int64(int64(in.Status))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"statusText\":")
out.String(string(in.StatusText))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"httpVersion\":")
out.String(string(in.HTTPVersion))
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 v3, v4 := range in.Cookies {
if v3 > 0 {
out.RawByte(',')
}
if v4 == nil {
out.RawString("null")
} else {
(*v4).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"headers\":")
if in.Headers == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v5, v6 := range in.Headers {
if v5 > 0 {
out.RawByte(',')
}
if v6 == nil {
out.RawString("null")
} else {
(*v6).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"content\":")
if in.Content == nil {
out.RawString("null")
} else {
(*in.Content).MarshalEasyJSON(out)
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"redirectURL\":")
out.String(string(in.RedirectURL))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"headersSize\":")
out.Int64(int64(in.HeadersSize))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"bodySize\":")
out.Int64(int64(in.BodySize))
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Response) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar1(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Response) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar1(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Response) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar1(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar1(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar2(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 "method":
out.Method = string(in.String())
case "url":
out.URL = string(in.String())
case "httpVersion":
out.HTTPVersion = string(in.String())
case "cookies":
if in.IsNull() {
in.Skip()
out.Cookies = nil
} else {
in.Delim('[')
if out.Cookies == nil {
if !in.IsDelim(']') {
out.Cookies = make([]*Cookie, 0, 8)
} else {
out.Cookies = []*Cookie{}
}
} else {
out.Cookies = (out.Cookies)[:0]
}
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(']')
}
case "headers":
if in.IsNull() {
in.Skip()
out.Headers = nil
} else {
in.Delim('[')
if out.Headers == nil {
if !in.IsDelim(']') {
out.Headers = make([]*NameValuePair, 0, 8)
} else {
out.Headers = []*NameValuePair{}
}
} else {
out.Headers = (out.Headers)[:0]
}
for !in.IsDelim(']') {
var v8 *NameValuePair
if in.IsNull() {
in.Skip()
v8 = nil
} else {
if v8 == nil {
v8 = new(NameValuePair)
}
(*v8).UnmarshalEasyJSON(in)
}
out.Headers = append(out.Headers, v8)
in.WantComma()
}
in.Delim(']')
}
case "queryString":
if in.IsNull() {
in.Skip()
out.QueryString = nil
} else {
in.Delim('[')
if out.QueryString == nil {
if !in.IsDelim(']') {
out.QueryString = make([]*NameValuePair, 0, 8)
} else {
out.QueryString = []*NameValuePair{}
}
} else {
out.QueryString = (out.QueryString)[:0]
}
for !in.IsDelim(']') {
var v9 *NameValuePair
if in.IsNull() {
in.Skip()
v9 = nil
} else {
if v9 == nil {
v9 = new(NameValuePair)
}
(*v9).UnmarshalEasyJSON(in)
}
out.QueryString = append(out.QueryString, v9)
in.WantComma()
}
in.Delim(']')
}
case "postData":
if in.IsNull() {
in.Skip()
out.PostData = nil
} else {
if out.PostData == nil {
out.PostData = new(PostData)
}
(*out.PostData).UnmarshalEasyJSON(in)
}
case "headersSize":
out.HeadersSize = int64(in.Int64())
case "bodySize":
out.BodySize = int64(in.Int64())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar2(out *jwriter.Writer, in Request) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"method\":")
out.String(string(in.Method))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"url\":")
out.String(string(in.URL))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"httpVersion\":")
out.String(string(in.HTTPVersion))
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 v10, v11 := range in.Cookies {
if v10 > 0 {
out.RawByte(',')
}
if v11 == nil {
out.RawString("null")
} else {
(*v11).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"headers\":")
if in.Headers == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v12, v13 := range in.Headers {
if v12 > 0 {
out.RawByte(',')
}
if v13 == nil {
out.RawString("null")
} else {
(*v13).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"queryString\":")
if in.QueryString == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v14, v15 := range in.QueryString {
if v14 > 0 {
out.RawByte(',')
}
if v15 == nil {
out.RawString("null")
} else {
(*v15).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
if in.PostData != nil {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"postData\":")
if in.PostData == nil {
out.RawString("null")
} else {
(*in.PostData).MarshalEasyJSON(out)
}
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"headersSize\":")
out.Int64(int64(in.HeadersSize))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"bodySize\":")
out.Int64(int64(in.BodySize))
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Request) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar2(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Request) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar2(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Request) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar2(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar2(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar3(in *jlexer.Lexer, out *PostData) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "mimeType":
out.MimeType = string(in.String())
case "params":
if in.IsNull() {
in.Skip()
out.Params = nil
} else {
in.Delim('[')
if out.Params == nil {
if !in.IsDelim(']') {
out.Params = make([]*Param, 0, 8)
} else {
out.Params = []*Param{}
}
} else {
out.Params = (out.Params)[:0]
}
for !in.IsDelim(']') {
var v16 *Param
if in.IsNull() {
in.Skip()
v16 = nil
} else {
if v16 == nil {
v16 = new(Param)
}
(*v16).UnmarshalEasyJSON(in)
}
out.Params = append(out.Params, v16)
in.WantComma()
}
in.Delim(']')
}
case "text":
out.Text = string(in.String())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar3(out *jwriter.Writer, in PostData) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"mimeType\":")
out.String(string(in.MimeType))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"params\":")
if in.Params == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v17, v18 := range in.Params {
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("\"text\":")
out.String(string(in.Text))
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v PostData) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar3(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v PostData) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar3(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *PostData) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar3(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *PostData) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar3(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar4(in *jlexer.Lexer, out *Param) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 "fileName":
out.FileName = string(in.String())
case "contentType":
out.ContentType = string(in.String())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar4(out *jwriter.Writer, in Param) {
out.RawByte('{')
first := true
_ = first
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.FileName != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"fileName\":")
out.String(string(in.FileName))
}
if in.ContentType != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"contentType\":")
out.String(string(in.ContentType))
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Param) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar4(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Param) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar4(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Param) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar4(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Param) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar4(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar5(in *jlexer.Lexer, out *PageTimings) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "onContentLoad":
out.OnContentLoad = float64(in.Float64())
case "onLoad":
out.OnLoad = float64(in.Float64())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar5(out *jwriter.Writer, in PageTimings) {
out.RawByte('{')
first := true
_ = first
if in.OnContentLoad != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"onContentLoad\":")
out.Float64(float64(in.OnContentLoad))
}
if in.OnLoad != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"onLoad\":")
out.Float64(float64(in.OnLoad))
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v PageTimings) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar5(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v PageTimings) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar5(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *PageTimings) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar5(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *PageTimings) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar5(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar6(in *jlexer.Lexer, out *Page) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "startedDateTime":
out.StartedDateTime = string(in.String())
case "id":
out.ID = string(in.String())
case "title":
out.Title = string(in.String())
case "pageTimings":
if in.IsNull() {
in.Skip()
out.PageTimings = nil
} else {
if out.PageTimings == nil {
out.PageTimings = new(PageTimings)
}
(*out.PageTimings).UnmarshalEasyJSON(in)
}
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar6(out *jwriter.Writer, in Page) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"startedDateTime\":")
out.String(string(in.StartedDateTime))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"id\":")
out.String(string(in.ID))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"title\":")
out.String(string(in.Title))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"pageTimings\":")
if in.PageTimings == nil {
out.RawString("null")
} else {
(*in.PageTimings).MarshalEasyJSON(out)
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Page) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar6(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Page) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar6(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Page) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar6(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Page) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar6(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar7(in *jlexer.Lexer, out *NameValuePair) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar7(out *jwriter.Writer, in NameValuePair) {
out.RawByte('{')
first := true
_ = first
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))
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v NameValuePair) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar7(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v NameValuePair) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar7(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *NameValuePair) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar7(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *NameValuePair) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar7(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar8(in *jlexer.Lexer, out *Log) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "version":
out.Version = string(in.String())
case "creator":
if in.IsNull() {
in.Skip()
out.Creator = nil
} else {
if out.Creator == nil {
out.Creator = new(Creator)
}
(*out.Creator).UnmarshalEasyJSON(in)
}
case "browser":
if in.IsNull() {
in.Skip()
out.Browser = nil
} else {
if out.Browser == nil {
out.Browser = new(Creator)
}
(*out.Browser).UnmarshalEasyJSON(in)
}
case "pages":
if in.IsNull() {
in.Skip()
out.Pages = nil
} else {
in.Delim('[')
if out.Pages == nil {
if !in.IsDelim(']') {
out.Pages = make([]*Page, 0, 8)
} else {
out.Pages = []*Page{}
}
} else {
out.Pages = (out.Pages)[:0]
}
for !in.IsDelim(']') {
var v19 *Page
if in.IsNull() {
in.Skip()
v19 = nil
} else {
if v19 == nil {
v19 = new(Page)
}
(*v19).UnmarshalEasyJSON(in)
}
out.Pages = append(out.Pages, v19)
in.WantComma()
}
in.Delim(']')
}
case "entries":
if in.IsNull() {
in.Skip()
out.Entries = nil
} else {
in.Delim('[')
if out.Entries == nil {
if !in.IsDelim(']') {
out.Entries = make([]*Entry, 0, 8)
} else {
out.Entries = []*Entry{}
}
} else {
out.Entries = (out.Entries)[:0]
}
for !in.IsDelim(']') {
var v20 *Entry
if in.IsNull() {
in.Skip()
v20 = nil
} else {
if v20 == nil {
v20 = new(Entry)
}
(*v20).UnmarshalEasyJSON(in)
}
out.Entries = append(out.Entries, v20)
in.WantComma()
}
in.Delim(']')
}
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar8(out *jwriter.Writer, in Log) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"version\":")
out.String(string(in.Version))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"creator\":")
if in.Creator == nil {
out.RawString("null")
} else {
(*in.Creator).MarshalEasyJSON(out)
}
if in.Browser != nil {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"browser\":")
if in.Browser == nil {
out.RawString("null")
} else {
(*in.Browser).MarshalEasyJSON(out)
}
}
if len(in.Pages) != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"pages\":")
if in.Pages == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v21, v22 := range in.Pages {
if v21 > 0 {
out.RawByte(',')
}
if v22 == nil {
out.RawString("null")
} else {
(*v22).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
}
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 v23, v24 := range in.Entries {
if v23 > 0 {
out.RawByte(',')
}
if v24 == nil {
out.RawString("null")
} else {
(*v24).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Log) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar8(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Log) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar8(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Log) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar8(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Log) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar8(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar9(in *jlexer.Lexer, out *HAR) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "log":
if in.IsNull() {
in.Skip()
out.Log = nil
} else {
if out.Log == nil {
out.Log = new(Log)
}
(*out.Log).UnmarshalEasyJSON(in)
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar9(out *jwriter.Writer, in HAR) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"log\":")
if in.Log == nil {
out.RawString("null")
} else {
(*in.Log).MarshalEasyJSON(out)
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v HAR) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar9(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v HAR) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar9(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *HAR) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar9(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *HAR) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar9(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar10(in *jlexer.Lexer, out *Entry) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "pageref":
out.Pageref = string(in.String())
case "startedDateTime":
out.StartedDateTime = string(in.String())
case "time":
out.Time = float64(in.Float64())
case "request":
if in.IsNull() {
in.Skip()
out.Request = nil
} else {
if out.Request == nil {
out.Request = new(Request)
}
(*out.Request).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 "cache":
if in.IsNull() {
in.Skip()
out.Cache = nil
} else {
if out.Cache == nil {
out.Cache = new(Cache)
}
(*out.Cache).UnmarshalEasyJSON(in)
}
case "timings":
if in.IsNull() {
in.Skip()
out.Timings = nil
} else {
if out.Timings == nil {
out.Timings = new(Timings)
}
(*out.Timings).UnmarshalEasyJSON(in)
}
case "serverIPAddress":
out.ServerIPAddress = string(in.String())
case "connection":
out.Connection = string(in.String())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar10(out *jwriter.Writer, in Entry) {
out.RawByte('{')
first := true
_ = first
if in.Pageref != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"pageref\":")
out.String(string(in.Pageref))
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"startedDateTime\":")
out.String(string(in.StartedDateTime))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"time\":")
out.Float64(float64(in.Time))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"request\":")
if in.Request == nil {
out.RawString("null")
} else {
(*in.Request).MarshalEasyJSON(out)
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"response\":")
if in.Response == nil {
out.RawString("null")
} else {
(*in.Response).MarshalEasyJSON(out)
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"cache\":")
if in.Cache == nil {
out.RawString("null")
} else {
(*in.Cache).MarshalEasyJSON(out)
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"timings\":")
if in.Timings == nil {
out.RawString("null")
} else {
(*in.Timings).MarshalEasyJSON(out)
}
if in.ServerIPAddress != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"serverIPAddress\":")
out.String(string(in.ServerIPAddress))
}
if in.Connection != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"connection\":")
out.String(string(in.Connection))
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Entry) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar10(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Entry) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar10(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Entry) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar10(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Entry) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar10(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar11(in *jlexer.Lexer, out *Creator) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 "version":
out.Version = string(in.String())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar11(out *jwriter.Writer, in Creator) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"name\":")
out.String(string(in.Name))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"version\":")
out.String(string(in.Version))
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Creator) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar11(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Creator) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar11(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Creator) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar11(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Creator) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar11(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar12(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 "path":
out.Path = string(in.String())
case "domain":
out.Domain = string(in.String())
case "expires":
out.Expires = string(in.String())
case "httpOnly":
out.HTTPOnly = bool(in.Bool())
case "secure":
out.Secure = bool(in.Bool())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar12(out *jwriter.Writer, in Cookie) {
out.RawByte('{')
first := true
_ = first
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))
if in.Path != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"path\":")
out.String(string(in.Path))
}
if in.Domain != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"domain\":")
out.String(string(in.Domain))
}
if in.Expires != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"expires\":")
out.String(string(in.Expires))
}
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.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Cookie) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar12(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Cookie) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar12(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Cookie) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar12(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Cookie) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar12(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar13(in *jlexer.Lexer, out *Content) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "size":
out.Size = int64(in.Int64())
case "compression":
out.Compression = int64(in.Int64())
case "mimeType":
out.MimeType = string(in.String())
case "text":
out.Text = string(in.String())
case "encoding":
out.Encoding = string(in.String())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar13(out *jwriter.Writer, in Content) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"size\":")
out.Int64(int64(in.Size))
if in.Compression != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"compression\":")
out.Int64(int64(in.Compression))
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"mimeType\":")
out.String(string(in.MimeType))
if in.Text != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"text\":")
out.String(string(in.Text))
}
if in.Encoding != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"encoding\":")
out.String(string(in.Encoding))
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Content) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar13(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Content) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar13(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Content) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar13(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Content) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar13(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar14(in *jlexer.Lexer, out *CacheData) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "expires":
out.Expires = string(in.String())
case "lastAccess":
out.LastAccess = string(in.String())
case "eTag":
out.ETag = string(in.String())
case "hitCount":
out.HitCount = int64(in.Int64())
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar14(out *jwriter.Writer, in CacheData) {
out.RawByte('{')
first := true
_ = first
if in.Expires != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"expires\":")
out.String(string(in.Expires))
}
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"lastAccess\":")
out.String(string(in.LastAccess))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"eTag\":")
out.String(string(in.ETag))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"hitCount\":")
out.Int64(int64(in.HitCount))
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v CacheData) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar14(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CacheData) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar14(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *CacheData) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar14(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CacheData) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar14(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar15(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 "beforeRequest":
if in.IsNull() {
in.Skip()
out.BeforeRequest = nil
} else {
if out.BeforeRequest == nil {
out.BeforeRequest = new(CacheData)
}
(*out.BeforeRequest).UnmarshalEasyJSON(in)
}
case "afterRequest":
if in.IsNull() {
in.Skip()
out.AfterRequest = nil
} else {
if out.AfterRequest == nil {
out.AfterRequest = new(CacheData)
}
(*out.AfterRequest).UnmarshalEasyJSON(in)
}
case "comment":
out.Comment = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar15(out *jwriter.Writer, in Cache) {
out.RawByte('{')
first := true
_ = first
if in.BeforeRequest != nil {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"beforeRequest\":")
if in.BeforeRequest == nil {
out.RawString("null")
} else {
(*in.BeforeRequest).MarshalEasyJSON(out)
}
}
if in.AfterRequest != nil {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"afterRequest\":")
if in.AfterRequest == nil {
out.RawString("null")
} else {
(*in.AfterRequest).MarshalEasyJSON(out)
}
}
if in.Comment != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"comment\":")
out.String(string(in.Comment))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Cache) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar15(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Cache) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHar15(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Cache) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar15(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpHar15(l, v)
}