chromedp/cdp/tracing/easyjson.go

1091 lines
26 KiB
Go
Raw Normal View History

2017-01-24 15:09:23 +00:00
// AUTOGENERATED FILE: easyjson marshaler/unmarshalers.
package tracing
import (
json "encoding/json"
io "github.com/knq/chromedp/cdp/io"
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 easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(in *jlexer.Lexer, out *EventBufferUsage) {
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 "percentFull":
out.PercentFull = float64(in.Float64())
case "eventCount":
out.EventCount = float64(in.Float64())
case "value":
out.Value = float64(in.Float64())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(out *jwriter.Writer, in EventBufferUsage) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if in.PercentFull != 0 {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"percentFull\":")
out.Float64(float64(in.PercentFull))
2017-01-24 15:09:23 +00:00
}
if in.EventCount != 0 {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"eventCount\":")
out.Float64(float64(in.EventCount))
2017-01-24 15:09:23 +00:00
}
if in.Value != 0 {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"value\":")
out.Float64(float64(in.Value))
2017-01-24 15:09:23 +00:00
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v EventBufferUsage) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventBufferUsage) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventBufferUsage) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventBufferUsage) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(in *jlexer.Lexer, out *EventTracingComplete) {
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 "stream":
out.Stream = io.StreamHandle(in.String())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(out *jwriter.Writer, in EventTracingComplete) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if in.Stream != "" {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"stream\":")
out.String(string(in.Stream))
2017-01-24 15:09:23 +00:00
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v EventTracingComplete) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventTracingComplete) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing1(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventTracingComplete) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventTracingComplete) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing1(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(in *jlexer.Lexer, out *EventDataCollected) {
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 "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 v1 easyjson.RawMessage
(v1).UnmarshalEasyJSON(in)
out.Value = append(out.Value, v1)
in.WantComma()
}
in.Delim(']')
}
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(out *jwriter.Writer, in EventDataCollected) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if len(in.Value) != 0 {
2017-01-24 15:09:23 +00:00
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 v2, v3 := range in.Value {
if v2 > 0 {
out.RawByte(',')
}
(v3).MarshalEasyJSON(out)
}
out.RawByte(']')
2017-01-24 15:09:23 +00:00
}
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v EventDataCollected) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventDataCollected) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing2(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventDataCollected) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventDataCollected) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing2(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(in *jlexer.Lexer, out *RecordClockSyncMarkerParams) {
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 "syncId":
out.SyncID = string(in.String())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(out *jwriter.Writer, in RecordClockSyncMarkerParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"syncId\":")
out.String(string(in.SyncID))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RecordClockSyncMarkerParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RecordClockSyncMarkerParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing3(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RecordClockSyncMarkerParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RecordClockSyncMarkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing3(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(in *jlexer.Lexer, out *RequestMemoryDumpReturns) {
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 "dumpGuid":
out.DumpGUID = string(in.String())
case "success":
out.Success = bool(in.Bool())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(out *jwriter.Writer, in RequestMemoryDumpReturns) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if in.DumpGUID != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"dumpGuid\":")
out.String(string(in.DumpGUID))
}
if in.Success {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"success\":")
out.Bool(bool(in.Success))
2017-01-24 15:09:23 +00:00
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RequestMemoryDumpReturns) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestMemoryDumpReturns) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing4(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RequestMemoryDumpReturns) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestMemoryDumpReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing4(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(in *jlexer.Lexer, out *RequestMemoryDumpParams) {
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 {
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(out *jwriter.Writer, in RequestMemoryDumpParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v RequestMemoryDumpParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestMemoryDumpParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing5(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *RequestMemoryDumpParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestMemoryDumpParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing5(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing6(in *jlexer.Lexer, out *GetCategoriesReturns) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "categories":
if in.IsNull() {
in.Skip()
out.Categories = nil
} else {
in.Delim('[')
if !in.IsDelim(']') {
out.Categories = make([]string, 0, 4)
} else {
out.Categories = []string{}
}
for !in.IsDelim(']') {
var v4 string
v4 = string(in.String())
out.Categories = append(out.Categories, v4)
2017-01-24 15:09:23 +00:00
in.WantComma()
}
in.Delim(']')
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing6(out *jwriter.Writer, in GetCategoriesReturns) {
out.RawByte('{')
first := true
_ = first
if len(in.Categories) != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"categories\":")
if in.Categories == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v5, v6 := range in.Categories {
if v5 > 0 {
2017-01-24 15:09:23 +00:00
out.RawByte(',')
}
out.String(string(v6))
2017-01-24 15:09:23 +00:00
}
out.RawByte(']')
}
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v GetCategoriesReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing6(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCategoriesReturns) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing6(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *GetCategoriesReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing6(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCategoriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing6(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing7(in *jlexer.Lexer, out *GetCategoriesParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.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 easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing7(out *jwriter.Writer, in GetCategoriesParams) {
out.RawByte('{')
first := true
_ = first
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v GetCategoriesParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing7(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetCategoriesParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing7(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *GetCategoriesParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing7(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetCategoriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing7(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(in *jlexer.Lexer, out *EndParams) {
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 {
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(out *jwriter.Writer, in EndParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v EndParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EndParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing8(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EndParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EndParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing8(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(in *jlexer.Lexer, out *StartParams) {
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 "bufferUsageReportingInterval":
out.BufferUsageReportingInterval = float64(in.Float64())
case "transferMode":
(out.TransferMode).UnmarshalEasyJSON(in)
case "traceConfig":
2017-01-24 15:09:23 +00:00
if in.IsNull() {
in.Skip()
out.TraceConfig = nil
2017-01-24 15:09:23 +00:00
} else {
if out.TraceConfig == nil {
out.TraceConfig = new(TraceConfig)
2017-01-24 15:09:23 +00:00
}
(*out.TraceConfig).UnmarshalEasyJSON(in)
2017-01-24 15:09:23 +00:00
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(out *jwriter.Writer, in StartParams) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if in.BufferUsageReportingInterval != 0 {
2017-01-24 15:09:23 +00:00
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 {
2017-01-24 15:09:23 +00:00
out.RawString("null")
} else {
(*in.TraceConfig).MarshalEasyJSON(out)
2017-01-24 15:09:23 +00:00
}
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v StartParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *StartParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing9(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(in *jlexer.Lexer, out *TraceConfig) {
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 "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)
}
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(out *jwriter.Writer, in TraceConfig) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if in.RecordMode != "" {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"recordMode\":")
(in.RecordMode).MarshalEasyJSON(out)
2017-01-24 15:09:23 +00:00
}
if in.EnableSampling {
2017-01-24 15:09:23 +00:00
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"enableSampling\":")
out.Bool(bool(in.EnableSampling))
2017-01-24 15:09:23 +00:00
}
if in.EnableSystrace {
2017-01-24 15:09:23 +00:00
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)
}
2017-01-24 15:09:23 +00:00
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v TraceConfig) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v TraceConfig) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing10(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *TraceConfig) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *TraceConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing10(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(in *jlexer.Lexer, out *MemoryDumpConfig) {
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 {
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(out *jwriter.Writer, in MemoryDumpConfig) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v MemoryDumpConfig) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v MemoryDumpConfig) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing11(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *MemoryDumpConfig) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *MemoryDumpConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTracing11(l, v)
}