chromedp/cdp/cachestorage/easyjson.go

714 lines
17 KiB
Go
Raw Normal View History

// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
2017-01-24 15:09:23 +00:00
package cachestorage
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 easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(in *jlexer.Lexer, out *RequestEntriesReturns) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "cacheDataEntries":
if in.IsNull() {
in.Skip()
out.CacheDataEntries = nil
} else {
in.Delim('[')
if out.CacheDataEntries == nil {
if !in.IsDelim(']') {
out.CacheDataEntries = make([]*DataEntry, 0, 8)
} else {
out.CacheDataEntries = []*DataEntry{}
}
} else {
out.CacheDataEntries = (out.CacheDataEntries)[:0]
}
for !in.IsDelim(']') {
var v1 *DataEntry
if in.IsNull() {
in.Skip()
v1 = nil
} else {
if v1 == nil {
v1 = new(DataEntry)
}
(*v1).UnmarshalEasyJSON(in)
}
out.CacheDataEntries = append(out.CacheDataEntries, v1)
in.WantComma()
}
in.Delim(']')
}
case "hasMore":
out.HasMore = bool(in.Bool())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(out *jwriter.Writer, in RequestEntriesReturns) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if len(in.CacheDataEntries) != 0 {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"cacheDataEntries\":")
if in.CacheDataEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v2, v3 := range in.CacheDataEntries {
if v2 > 0 {
out.RawByte(',')
}
if v3 == nil {
out.RawString("null")
} else {
(*v3).MarshalEasyJSON(out)
}
}
out.RawByte(']')
2017-01-24 15:09:23 +00:00
}
}
if in.HasMore {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"hasMore\":")
out.Bool(bool(in.HasMore))
2017-01-24 15:09:23 +00:00
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RequestEntriesReturns) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestEntriesReturns) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RequestEntriesReturns) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestEntriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(in *jlexer.Lexer, out *RequestEntriesParams) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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 "skipCount":
out.SkipCount = int64(in.Int64())
case "pageSize":
out.PageSize = int64(in.Int64())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(out *jwriter.Writer, in RequestEntriesParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"cacheId\":")
out.String(string(in.CacheID))
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"skipCount\":")
out.Int64(int64(in.SkipCount))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"pageSize\":")
out.Int64(int64(in.PageSize))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RequestEntriesParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestEntriesParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage1(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RequestEntriesParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage1(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(in *jlexer.Lexer, out *RequestCacheNamesReturns) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "caches":
if in.IsNull() {
in.Skip()
out.Caches = nil
} else {
in.Delim('[')
if out.Caches == nil {
if !in.IsDelim(']') {
out.Caches = make([]*Cache, 0, 8)
} else {
out.Caches = []*Cache{}
}
} else {
out.Caches = (out.Caches)[:0]
}
for !in.IsDelim(']') {
var v4 *Cache
if in.IsNull() {
in.Skip()
v4 = nil
} else {
if v4 == nil {
v4 = new(Cache)
}
(*v4).UnmarshalEasyJSON(in)
}
out.Caches = append(out.Caches, v4)
in.WantComma()
}
in.Delim(']')
}
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(out *jwriter.Writer, in RequestCacheNamesReturns) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if len(in.Caches) != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"caches\":")
if in.Caches == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v5, v6 := range in.Caches {
if v5 > 0 {
out.RawByte(',')
}
if v6 == nil {
out.RawString("null")
} else {
(*v6).MarshalEasyJSON(out)
}
}
out.RawByte(']')
}
2017-01-24 15:09:23 +00:00
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RequestCacheNamesReturns) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestCacheNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage2(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RequestCacheNamesReturns) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestCacheNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage2(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(in *jlexer.Lexer, out *RequestCacheNamesParams) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(out *jwriter.Writer, in RequestCacheNamesParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"securityOrigin\":")
out.String(string(in.SecurityOrigin))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RequestCacheNamesParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestCacheNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage3(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RequestCacheNamesParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestCacheNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage3(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(in *jlexer.Lexer, out *DeleteEntryParams) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(out *jwriter.Writer, in DeleteEntryParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"cacheId\":")
out.String(string(in.CacheID))
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"request\":")
out.String(string(in.Request))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v DeleteEntryParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v DeleteEntryParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage4(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *DeleteEntryParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DeleteEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage4(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(in *jlexer.Lexer, out *DeleteCacheParams) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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) {
2017-01-24 15:09:23 +00:00
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) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v DeleteCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage5(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *DeleteCacheParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DeleteCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage5(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(in *jlexer.Lexer, out *DataEntry) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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())
case "responseTime":
out.ResponseTime = float64(in.Float64())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(out *jwriter.Writer, in DataEntry) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"request\":")
out.String(string(in.Request))
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"response\":")
out.String(string(in.Response))
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"responseTime\":")
out.Float64(float64(in.ResponseTime))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v DataEntry) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *DataEntry) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage6(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(in *jlexer.Lexer, out *Cache) {
2017-01-24 15:09:23 +00:00
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
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())
2017-01-24 15:09:23 +00:00
case "securityOrigin":
out.SecurityOrigin = string(in.String())
case "cacheName":
out.CacheName = string(in.String())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(out *jwriter.Writer, in Cache) {
2017-01-24 15:09:23 +00:00
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("\"securityOrigin\":")
out.String(string(in.SecurityOrigin))
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"cacheName\":")
out.String(string(in.CacheName))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Cache) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Cache) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Cache) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCachestorage7(l, v)
}