1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package media
- 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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(in *jlexer.Lexer, out *PlayerProperty) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(out *jwriter.Writer, in PlayerProperty) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v PlayerProperty) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v PlayerProperty) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *PlayerProperty) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *PlayerProperty) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(in *jlexer.Lexer, out *PlayerMessage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "level":
- (out.Level).UnmarshalEasyJSON(in)
- case "message":
- out.Message = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(out *jwriter.Writer, in PlayerMessage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"level\":"
- out.RawString(prefix[1:])
- (in.Level).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix)
- out.String(string(in.Message))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v PlayerMessage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v PlayerMessage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *PlayerMessage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *PlayerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(in *jlexer.Lexer, out *PlayerEvent) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- out.Timestamp = Timestamp(in.Float64())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(out *jwriter.Writer, in PlayerEvent) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Timestamp))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v PlayerEvent) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v PlayerEvent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *PlayerEvent) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *PlayerEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out *PlayerErrorSourceLocation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "file":
- out.File = string(in.String())
- case "line":
- out.Line = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(out *jwriter.Writer, in PlayerErrorSourceLocation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"file\":"
- out.RawString(prefix[1:])
- out.String(string(in.File))
- }
- {
- const prefix string = ",\"line\":"
- out.RawString(prefix)
- out.Int64(int64(in.Line))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v PlayerErrorSourceLocation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v PlayerErrorSourceLocation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *PlayerErrorSourceLocation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *PlayerErrorSourceLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out *PlayerError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "errorType":
- out.ErrorType = string(in.String())
- case "code":
- out.Code = int64(in.Int64())
- case "stack":
- if in.IsNull() {
- in.Skip()
- out.Stack = nil
- } else {
- in.Delim('[')
- if out.Stack == nil {
- if !in.IsDelim(']') {
- out.Stack = make([]*PlayerErrorSourceLocation, 0, 8)
- } else {
- out.Stack = []*PlayerErrorSourceLocation{}
- }
- } else {
- out.Stack = (out.Stack)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *PlayerErrorSourceLocation
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(PlayerErrorSourceLocation)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Stack = append(out.Stack, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "cause":
- if in.IsNull() {
- in.Skip()
- out.Cause = nil
- } else {
- in.Delim('[')
- if out.Cause == nil {
- if !in.IsDelim(']') {
- out.Cause = make([]*PlayerError, 0, 8)
- } else {
- out.Cause = []*PlayerError{}
- }
- } else {
- out.Cause = (out.Cause)[:0]
- }
- for !in.IsDelim(']') {
- var v2 *PlayerError
- if in.IsNull() {
- in.Skip()
- v2 = nil
- } else {
- if v2 == nil {
- v2 = new(PlayerError)
- }
- (*v2).UnmarshalEasyJSON(in)
- }
- out.Cause = append(out.Cause, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "data":
- (out.Data).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, in PlayerError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"errorType\":"
- out.RawString(prefix[1:])
- out.String(string(in.ErrorType))
- }
- {
- const prefix string = ",\"code\":"
- out.RawString(prefix)
- out.Int64(int64(in.Code))
- }
- {
- const prefix string = ",\"stack\":"
- out.RawString(prefix)
- if in.Stack == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v3, v4 := range in.Stack {
- if v3 > 0 {
- out.RawByte(',')
- }
- if v4 == nil {
- out.RawString("null")
- } else {
- (*v4).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"cause\":"
- out.RawString(prefix)
- if in.Cause == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Cause {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- (in.Data).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v PlayerError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v PlayerError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *PlayerError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *PlayerError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out *EventPlayersCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "players":
- if in.IsNull() {
- in.Skip()
- out.Players = nil
- } else {
- in.Delim('[')
- if out.Players == nil {
- if !in.IsDelim(']') {
- out.Players = make([]PlayerID, 0, 4)
- } else {
- out.Players = []PlayerID{}
- }
- } else {
- out.Players = (out.Players)[:0]
- }
- for !in.IsDelim(']') {
- var v7 PlayerID
- v7 = PlayerID(in.String())
- out.Players = append(out.Players, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, in EventPlayersCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"players\":"
- out.RawString(prefix[1:])
- if in.Players == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Players {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPlayersCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPlayersCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPlayersCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPlayersCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out *EventPlayerPropertiesChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "properties":
- if in.IsNull() {
- in.Skip()
- out.Properties = nil
- } else {
- in.Delim('[')
- if out.Properties == nil {
- if !in.IsDelim(']') {
- out.Properties = make([]*PlayerProperty, 0, 8)
- } else {
- out.Properties = []*PlayerProperty{}
- }
- } else {
- out.Properties = (out.Properties)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *PlayerProperty
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(PlayerProperty)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Properties = append(out.Properties, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, in EventPlayerPropertiesChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"properties\":"
- out.RawString(prefix)
- if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Properties {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPlayerPropertiesChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPlayerPropertiesChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPlayerPropertiesChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPlayerPropertiesChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out *EventPlayerMessagesLogged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "messages":
- if in.IsNull() {
- in.Skip()
- out.Messages = nil
- } else {
- in.Delim('[')
- if out.Messages == nil {
- if !in.IsDelim(']') {
- out.Messages = make([]*PlayerMessage, 0, 8)
- } else {
- out.Messages = []*PlayerMessage{}
- }
- } else {
- out.Messages = (out.Messages)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *PlayerMessage
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(PlayerMessage)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Messages = append(out.Messages, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, in EventPlayerMessagesLogged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"messages\":"
- out.RawString(prefix)
- if in.Messages == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Messages {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPlayerMessagesLogged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPlayerMessagesLogged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPlayerMessagesLogged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPlayerMessagesLogged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out *EventPlayerEventsAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "events":
- if in.IsNull() {
- in.Skip()
- out.Events = nil
- } else {
- in.Delim('[')
- if out.Events == nil {
- if !in.IsDelim(']') {
- out.Events = make([]*PlayerEvent, 0, 8)
- } else {
- out.Events = []*PlayerEvent{}
- }
- } else {
- out.Events = (out.Events)[:0]
- }
- for !in.IsDelim(']') {
- var v16 *PlayerEvent
- if in.IsNull() {
- in.Skip()
- v16 = nil
- } else {
- if v16 == nil {
- v16 = new(PlayerEvent)
- }
- (*v16).UnmarshalEasyJSON(in)
- }
- out.Events = append(out.Events, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, in EventPlayerEventsAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"events\":"
- out.RawString(prefix)
- if in.Events == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v17, v18 := range in.Events {
- if v17 > 0 {
- out.RawByte(',')
- }
- if v18 == nil {
- out.RawString("null")
- } else {
- (*v18).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPlayerEventsAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPlayerEventsAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPlayerEventsAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPlayerEventsAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(in *jlexer.Lexer, out *EventPlayerErrorsRaised) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "errors":
- if in.IsNull() {
- in.Skip()
- out.Errors = nil
- } else {
- in.Delim('[')
- if out.Errors == nil {
- if !in.IsDelim(']') {
- out.Errors = make([]*PlayerError, 0, 8)
- } else {
- out.Errors = []*PlayerError{}
- }
- } else {
- out.Errors = (out.Errors)[:0]
- }
- for !in.IsDelim(']') {
- var v19 *PlayerError
- if in.IsNull() {
- in.Skip()
- v19 = nil
- } else {
- if v19 == nil {
- v19 = new(PlayerError)
- }
- (*v19).UnmarshalEasyJSON(in)
- }
- out.Errors = append(out.Errors, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(out *jwriter.Writer, in EventPlayerErrorsRaised) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"errors\":"
- out.RawString(prefix)
- if in.Errors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v20, v21 := range in.Errors {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPlayerErrorsRaised) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPlayerErrorsRaised) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPlayerErrorsRaised) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPlayerErrorsRaised) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(l, v)
- }
|