chromedp/cdp/tethering/easyjson.go

229 lines
5.3 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 tethering
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 easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(in *jlexer.Lexer, out *UnbindParams) {
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 "port":
out.Port = int64(in.Int64())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(out *jwriter.Writer, in UnbindParams) {
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("\"port\":")
out.Int64(int64(in.Port))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v UnbindParams) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v UnbindParams) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *UnbindParams) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *UnbindParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(in *jlexer.Lexer, out *EventAccepted) {
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 "port":
out.Port = int64(in.Int64())
case "connectionId":
out.ConnectionID = string(in.String())
2017-01-24 15:09:23 +00:00
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(out *jwriter.Writer, in EventAccepted) {
2017-01-24 15:09:23 +00:00
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"port\":")
out.Int64(int64(in.Port))
if !first {
out.RawByte(',')
2017-01-24 15:09:23 +00:00
}
first = false
out.RawString("\"connectionId\":")
out.String(string(in.ConnectionID))
2017-01-24 15:09:23 +00:00
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v EventAccepted) MarshalJSON() ([]byte, error) {
2017-01-24 15:09:23 +00:00
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventAccepted) MarshalEasyJSON(w *jwriter.Writer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *EventAccepted) UnmarshalJSON(data []byte) error {
2017-01-24 15:09:23 +00:00
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventAccepted) UnmarshalEasyJSON(l *jlexer.Lexer) {
2017-01-24 15:09:23 +00:00
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering1(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering2(in *jlexer.Lexer, out *BindParams) {
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 "port":
out.Port = int64(in.Int64())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering2(out *jwriter.Writer, in BindParams) {
out.RawByte('{')
first := true
_ = first
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"port\":")
out.Int64(int64(in.Port))
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v BindParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering2(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v BindParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering2(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *BindParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering2(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *BindParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpTethering2(l, v)
}