// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.

package easyjson

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 easyjsonB0f55b16DecodeGithubComAlecthomasGoSerializationBenchmarks(in *jlexer.Lexer, out *NoTimeNoStringNoFloatA) {
	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":
			if in.IsNull() {
				in.Skip()
				out.Name = nil
			} else {
				out.Name = in.Bytes()
			}
		case "BirthDay":
			out.BirthDay = uint64(in.Uint64())
		case "Phone":
			if in.IsNull() {
				in.Skip()
				out.Phone = nil
			} else {
				out.Phone = in.Bytes()
			}
		case "Siblings":
			out.Siblings = uint32(in.Uint32())
		case "Spouse":
			out.Spouse = bool(in.Bool())
		case "Money":
			out.Money = uint64(in.Uint64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjsonB0f55b16EncodeGithubComAlecthomasGoSerializationBenchmarks(out *jwriter.Writer, in NoTimeNoStringNoFloatA) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"Name\":"
		out.RawString(prefix[1:])
		out.Base64Bytes(in.Name)
	}
	{
		const prefix string = ",\"BirthDay\":"
		out.RawString(prefix)
		out.Uint64(uint64(in.BirthDay))
	}
	{
		const prefix string = ",\"Phone\":"
		out.RawString(prefix)
		out.Base64Bytes(in.Phone)
	}
	{
		const prefix string = ",\"Siblings\":"
		out.RawString(prefix)
		out.Uint32(uint32(in.Siblings))
	}
	{
		const prefix string = ",\"Spouse\":"
		out.RawString(prefix)
		out.Bool(bool(in.Spouse))
	}
	{
		const prefix string = ",\"Money\":"
		out.RawString(prefix)
		out.Uint64(uint64(in.Money))
	}
	out.RawByte('}')
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v NoTimeNoStringNoFloatA) MarshalEasyJSON(w *jwriter.Writer) {
	easyjsonB0f55b16EncodeGithubComAlecthomasGoSerializationBenchmarks(w, v)
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *NoTimeNoStringNoFloatA) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjsonB0f55b16DecodeGithubComAlecthomasGoSerializationBenchmarks(l, v)
}
func easyjsonB0f55b16DecodeGithubComAlecthomasGoSerializationBenchmarks1(in *jlexer.Lexer, out *NoTimeA) {
	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 "BirthDay":
			out.BirthDay = int64(in.Int64())
		case "Phone":
			out.Phone = string(in.String())
		case "Siblings":
			out.Siblings = int(in.Int())
		case "Spouse":
			out.Spouse = bool(in.Bool())
		case "Money":
			out.Money = float64(in.Float64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjsonB0f55b16EncodeGithubComAlecthomasGoSerializationBenchmarks1(out *jwriter.Writer, in NoTimeA) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"Name\":"
		out.RawString(prefix[1:])
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"BirthDay\":"
		out.RawString(prefix)
		out.Int64(int64(in.BirthDay))
	}
	{
		const prefix string = ",\"Phone\":"
		out.RawString(prefix)
		out.String(string(in.Phone))
	}
	{
		const prefix string = ",\"Siblings\":"
		out.RawString(prefix)
		out.Int(int(in.Siblings))
	}
	{
		const prefix string = ",\"Spouse\":"
		out.RawString(prefix)
		out.Bool(bool(in.Spouse))
	}
	{
		const prefix string = ",\"Money\":"
		out.RawString(prefix)
		out.Float64(float64(in.Money))
	}
	out.RawByte('}')
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v NoTimeA) MarshalEasyJSON(w *jwriter.Writer) {
	easyjsonB0f55b16EncodeGithubComAlecthomasGoSerializationBenchmarks1(w, v)
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *NoTimeA) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjsonB0f55b16DecodeGithubComAlecthomasGoSerializationBenchmarks1(l, v)
}
func easyjsonB0f55b16DecodeGithubComAlecthomasGoSerializationBenchmarks2(in *jlexer.Lexer, out *A) {
	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 "BirthDay":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.BirthDay).UnmarshalJSON(data))
			}
		case "Phone":
			out.Phone = string(in.String())
		case "Siblings":
			out.Siblings = int(in.Int())
		case "Spouse":
			out.Spouse = bool(in.Bool())
		case "Money":
			out.Money = float64(in.Float64())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjsonB0f55b16EncodeGithubComAlecthomasGoSerializationBenchmarks2(out *jwriter.Writer, in A) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"Name\":"
		out.RawString(prefix[1:])
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"BirthDay\":"
		out.RawString(prefix)
		out.Raw((in.BirthDay).MarshalJSON())
	}
	{
		const prefix string = ",\"Phone\":"
		out.RawString(prefix)
		out.String(string(in.Phone))
	}
	{
		const prefix string = ",\"Siblings\":"
		out.RawString(prefix)
		out.Int(int(in.Siblings))
	}
	{
		const prefix string = ",\"Spouse\":"
		out.RawString(prefix)
		out.Bool(bool(in.Spouse))
	}
	{
		const prefix string = ",\"Money\":"
		out.RawString(prefix)
		out.Float64(float64(in.Money))
	}
	out.RawByte('}')
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v A) MarshalEasyJSON(w *jwriter.Writer) {
	easyjsonB0f55b16EncodeGithubComAlecthomasGoSerializationBenchmarks2(w, v)
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *A) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjsonB0f55b16DecodeGithubComAlecthomasGoSerializationBenchmarks2(l, v)
}
