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

package performancetimeline

import (
	json 
	cdp 
	dom 
	easyjson 
	jlexer 
	jwriter 
)

// suppress unused package warning
var (
	_ *json.RawMessage
	_ *jlexer.Lexer
	_ *jwriter.Writer
	_ easyjson.Marshaler
)

func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline( *jlexer.Lexer,  *TimelineEvent) {
	 := .IsStart()
	if .IsNull() {
		if  {
			.Consumed()
		}
		.Skip()
		return
	}
	.Delim('{')
	for !.IsDelim('}') {
		 := .UnsafeFieldName(false)
		.WantColon()
		if .IsNull() {
			.Skip()
			.WantComma()
			continue
		}
		switch  {
		case "frameId":
			(.FrameID).UnmarshalEasyJSON()
		case "type":
			.Type = string(.String())
		case "name":
			.Name = string(.String())
		case "time":
			if .IsNull() {
				.Skip()
				.Time = nil
			} else {
				if .Time == nil {
					.Time = new(cdp.TimeSinceEpoch)
				}
				(*.Time).UnmarshalEasyJSON()
			}
		case "duration":
			.Duration = float64(.Float64())
		case "lcpDetails":
			if .IsNull() {
				.Skip()
				.LcpDetails = nil
			} else {
				if .LcpDetails == nil {
					.LcpDetails = new(LargestContentfulPaint)
				}
				(*.LcpDetails).UnmarshalEasyJSON()
			}
		case "layoutShiftDetails":
			if .IsNull() {
				.Skip()
				.LayoutShiftDetails = nil
			} else {
				if .LayoutShiftDetails == nil {
					.LayoutShiftDetails = new(LayoutShift)
				}
				(*.LayoutShiftDetails).UnmarshalEasyJSON()
			}
		default:
			.SkipRecursive()
		}
		.WantComma()
	}
	.Delim('}')
	if  {
		.Consumed()
	}
}
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline( *jwriter.Writer,  TimelineEvent) {
	.RawByte('{')
	 := true
	_ = 
	{
		const  string = ",\"frameId\":"
		.RawString([1:])
		.String(string(.FrameID))
	}
	{
		const  string = ",\"type\":"
		.RawString()
		.String(string(.Type))
	}
	{
		const  string = ",\"name\":"
		.RawString()
		.String(string(.Name))
	}
	{
		const  string = ",\"time\":"
		.RawString()
		if .Time == nil {
			.RawString("null")
		} else {
			(*.Time).MarshalEasyJSON()
		}
	}
	if .Duration != 0 {
		const  string = ",\"duration\":"
		.RawString()
		.Float64(float64(.Duration))
	}
	if .LcpDetails != nil {
		const  string = ",\"lcpDetails\":"
		.RawString()
		(*.LcpDetails).MarshalEasyJSON()
	}
	if .LayoutShiftDetails != nil {
		const  string = ",\"layoutShiftDetails\":"
		.RawString()
		(*.LayoutShiftDetails).MarshalEasyJSON()
	}
	.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func ( TimelineEvent) () ([]byte, error) {
	 := jwriter.Writer{}
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline(&, )
	return .Buffer.BuildBytes(), .Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func ( TimelineEvent) ( *jwriter.Writer) {
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline(, )
}

// UnmarshalJSON supports json.Unmarshaler interface
func ( *TimelineEvent) ( []byte) error {
	 := jlexer.Lexer{Data: }
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline(&, )
	return .Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func ( *TimelineEvent) ( *jlexer.Lexer) {
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline(, )
}
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline1( *jlexer.Lexer,  *LayoutShiftAttribution) {
	 := .IsStart()
	if .IsNull() {
		if  {
			.Consumed()
		}
		.Skip()
		return
	}
	.Delim('{')
	for !.IsDelim('}') {
		 := .UnsafeFieldName(false)
		.WantColon()
		if .IsNull() {
			.Skip()
			.WantComma()
			continue
		}
		switch  {
		case "previousRect":
			if .IsNull() {
				.Skip()
				.PreviousRect = nil
			} else {
				if .PreviousRect == nil {
					.PreviousRect = new(dom.Rect)
				}
				(*.PreviousRect).UnmarshalEasyJSON()
			}
		case "currentRect":
			if .IsNull() {
				.Skip()
				.CurrentRect = nil
			} else {
				if .CurrentRect == nil {
					.CurrentRect = new(dom.Rect)
				}
				(*.CurrentRect).UnmarshalEasyJSON()
			}
		case "nodeId":
			(.NodeID).UnmarshalEasyJSON()
		default:
			.SkipRecursive()
		}
		.WantComma()
	}
	.Delim('}')
	if  {
		.Consumed()
	}
}
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline1( *jwriter.Writer,  LayoutShiftAttribution) {
	.RawByte('{')
	 := true
	_ = 
	{
		const  string = ",\"previousRect\":"
		.RawString([1:])
		if .PreviousRect == nil {
			.RawString("null")
		} else {
			(*.PreviousRect).MarshalEasyJSON()
		}
	}
	{
		const  string = ",\"currentRect\":"
		.RawString()
		if .CurrentRect == nil {
			.RawString("null")
		} else {
			(*.CurrentRect).MarshalEasyJSON()
		}
	}
	if .NodeID != 0 {
		const  string = ",\"nodeId\":"
		.RawString()
		.Int64(int64(.NodeID))
	}
	.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func ( LayoutShiftAttribution) () ([]byte, error) {
	 := jwriter.Writer{}
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline1(&, )
	return .Buffer.BuildBytes(), .Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func ( LayoutShiftAttribution) ( *jwriter.Writer) {
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline1(, )
}

// UnmarshalJSON supports json.Unmarshaler interface
func ( *LayoutShiftAttribution) ( []byte) error {
	 := jlexer.Lexer{Data: }
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline1(&, )
	return .Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func ( *LayoutShiftAttribution) ( *jlexer.Lexer) {
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline1(, )
}
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline2( *jlexer.Lexer,  *LayoutShift) {
	 := .IsStart()
	if .IsNull() {
		if  {
			.Consumed()
		}
		.Skip()
		return
	}
	.Delim('{')
	for !.IsDelim('}') {
		 := .UnsafeFieldName(false)
		.WantColon()
		if .IsNull() {
			.Skip()
			.WantComma()
			continue
		}
		switch  {
		case "value":
			.Value = float64(.Float64())
		case "hadRecentInput":
			.HadRecentInput = bool(.Bool())
		case "lastInputTime":
			if .IsNull() {
				.Skip()
				.LastInputTime = nil
			} else {
				if .LastInputTime == nil {
					.LastInputTime = new(cdp.TimeSinceEpoch)
				}
				(*.LastInputTime).UnmarshalEasyJSON()
			}
		case "sources":
			if .IsNull() {
				.Skip()
				.Sources = nil
			} else {
				.Delim('[')
				if .Sources == nil {
					if !.IsDelim(']') {
						.Sources = make([]*LayoutShiftAttribution, 0, 8)
					} else {
						.Sources = []*LayoutShiftAttribution{}
					}
				} else {
					.Sources = (.Sources)[:0]
				}
				for !.IsDelim(']') {
					var  *LayoutShiftAttribution
					if .IsNull() {
						.Skip()
						 = nil
					} else {
						if  == nil {
							 = new(LayoutShiftAttribution)
						}
						(*).UnmarshalEasyJSON()
					}
					.Sources = append(.Sources, )
					.WantComma()
				}
				.Delim(']')
			}
		default:
			.SkipRecursive()
		}
		.WantComma()
	}
	.Delim('}')
	if  {
		.Consumed()
	}
}
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline2( *jwriter.Writer,  LayoutShift) {
	.RawByte('{')
	 := true
	_ = 
	{
		const  string = ",\"value\":"
		.RawString([1:])
		.Float64(float64(.Value))
	}
	{
		const  string = ",\"hadRecentInput\":"
		.RawString()
		.Bool(bool(.HadRecentInput))
	}
	{
		const  string = ",\"lastInputTime\":"
		.RawString()
		if .LastInputTime == nil {
			.RawString("null")
		} else {
			(*.LastInputTime).MarshalEasyJSON()
		}
	}
	{
		const  string = ",\"sources\":"
		.RawString()
		if .Sources == nil && (.Flags&jwriter.NilSliceAsEmpty) == 0 {
			.RawString("null")
		} else {
			.RawByte('[')
			for ,  := range .Sources {
				if  > 0 {
					.RawByte(',')
				}
				if  == nil {
					.RawString("null")
				} else {
					(*).MarshalEasyJSON()
				}
			}
			.RawByte(']')
		}
	}
	.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func ( LayoutShift) () ([]byte, error) {
	 := jwriter.Writer{}
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline2(&, )
	return .Buffer.BuildBytes(), .Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func ( LayoutShift) ( *jwriter.Writer) {
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline2(, )
}

// UnmarshalJSON supports json.Unmarshaler interface
func ( *LayoutShift) ( []byte) error {
	 := jlexer.Lexer{Data: }
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline2(&, )
	return .Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func ( *LayoutShift) ( *jlexer.Lexer) {
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline2(, )
}
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline3( *jlexer.Lexer,  *LargestContentfulPaint) {
	 := .IsStart()
	if .IsNull() {
		if  {
			.Consumed()
		}
		.Skip()
		return
	}
	.Delim('{')
	for !.IsDelim('}') {
		 := .UnsafeFieldName(false)
		.WantColon()
		if .IsNull() {
			.Skip()
			.WantComma()
			continue
		}
		switch  {
		case "renderTime":
			if .IsNull() {
				.Skip()
				.RenderTime = nil
			} else {
				if .RenderTime == nil {
					.RenderTime = new(cdp.TimeSinceEpoch)
				}
				(*.RenderTime).UnmarshalEasyJSON()
			}
		case "loadTime":
			if .IsNull() {
				.Skip()
				.LoadTime = nil
			} else {
				if .LoadTime == nil {
					.LoadTime = new(cdp.TimeSinceEpoch)
				}
				(*.LoadTime).UnmarshalEasyJSON()
			}
		case "size":
			.Size = float64(.Float64())
		case "elementId":
			.ElementID = string(.String())
		case "url":
			.URL = string(.String())
		case "nodeId":
			(.NodeID).UnmarshalEasyJSON()
		default:
			.SkipRecursive()
		}
		.WantComma()
	}
	.Delim('}')
	if  {
		.Consumed()
	}
}
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline3( *jwriter.Writer,  LargestContentfulPaint) {
	.RawByte('{')
	 := true
	_ = 
	{
		const  string = ",\"renderTime\":"
		.RawString([1:])
		if .RenderTime == nil {
			.RawString("null")
		} else {
			(*.RenderTime).MarshalEasyJSON()
		}
	}
	{
		const  string = ",\"loadTime\":"
		.RawString()
		if .LoadTime == nil {
			.RawString("null")
		} else {
			(*.LoadTime).MarshalEasyJSON()
		}
	}
	{
		const  string = ",\"size\":"
		.RawString()
		.Float64(float64(.Size))
	}
	if .ElementID != "" {
		const  string = ",\"elementId\":"
		.RawString()
		.String(string(.ElementID))
	}
	if .URL != "" {
		const  string = ",\"url\":"
		.RawString()
		.String(string(.URL))
	}
	if .NodeID != 0 {
		const  string = ",\"nodeId\":"
		.RawString()
		.Int64(int64(.NodeID))
	}
	.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func ( LargestContentfulPaint) () ([]byte, error) {
	 := jwriter.Writer{}
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline3(&, )
	return .Buffer.BuildBytes(), .Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func ( LargestContentfulPaint) ( *jwriter.Writer) {
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline3(, )
}

// UnmarshalJSON supports json.Unmarshaler interface
func ( *LargestContentfulPaint) ( []byte) error {
	 := jlexer.Lexer{Data: }
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline3(&, )
	return .Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func ( *LargestContentfulPaint) ( *jlexer.Lexer) {
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline3(, )
}
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline4( *jlexer.Lexer,  *EventTimelineEventAdded) {
	 := .IsStart()
	if .IsNull() {
		if  {
			.Consumed()
		}
		.Skip()
		return
	}
	.Delim('{')
	for !.IsDelim('}') {
		 := .UnsafeFieldName(false)
		.WantColon()
		if .IsNull() {
			.Skip()
			.WantComma()
			continue
		}
		switch  {
		case "event":
			if .IsNull() {
				.Skip()
				.Event = nil
			} else {
				if .Event == nil {
					.Event = new(TimelineEvent)
				}
				(*.Event).UnmarshalEasyJSON()
			}
		default:
			.SkipRecursive()
		}
		.WantComma()
	}
	.Delim('}')
	if  {
		.Consumed()
	}
}
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline4( *jwriter.Writer,  EventTimelineEventAdded) {
	.RawByte('{')
	 := true
	_ = 
	{
		const  string = ",\"event\":"
		.RawString([1:])
		if .Event == nil {
			.RawString("null")
		} else {
			(*.Event).MarshalEasyJSON()
		}
	}
	.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func ( EventTimelineEventAdded) () ([]byte, error) {
	 := jwriter.Writer{}
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline4(&, )
	return .Buffer.BuildBytes(), .Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func ( EventTimelineEventAdded) ( *jwriter.Writer) {
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline4(, )
}

// UnmarshalJSON supports json.Unmarshaler interface
func ( *EventTimelineEventAdded) ( []byte) error {
	 := jlexer.Lexer{Data: }
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline4(&, )
	return .Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func ( *EventTimelineEventAdded) ( *jlexer.Lexer) {
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline4(, )
}
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline5( *jlexer.Lexer,  *EnableParams) {
	 := .IsStart()
	if .IsNull() {
		if  {
			.Consumed()
		}
		.Skip()
		return
	}
	.Delim('{')
	for !.IsDelim('}') {
		 := .UnsafeFieldName(false)
		.WantColon()
		if .IsNull() {
			.Skip()
			.WantComma()
			continue
		}
		switch  {
		case "eventTypes":
			if .IsNull() {
				.Skip()
				.EventTypes = nil
			} else {
				.Delim('[')
				if .EventTypes == nil {
					if !.IsDelim(']') {
						.EventTypes = make([]string, 0, 4)
					} else {
						.EventTypes = []string{}
					}
				} else {
					.EventTypes = (.EventTypes)[:0]
				}
				for !.IsDelim(']') {
					var  string
					 = string(.String())
					.EventTypes = append(.EventTypes, )
					.WantComma()
				}
				.Delim(']')
			}
		default:
			.SkipRecursive()
		}
		.WantComma()
	}
	.Delim('}')
	if  {
		.Consumed()
	}
}
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline5( *jwriter.Writer,  EnableParams) {
	.RawByte('{')
	 := true
	_ = 
	{
		const  string = ",\"eventTypes\":"
		.RawString([1:])
		if .EventTypes == nil && (.Flags&jwriter.NilSliceAsEmpty) == 0 {
			.RawString("null")
		} else {
			.RawByte('[')
			for ,  := range .EventTypes {
				if  > 0 {
					.RawByte(',')
				}
				.String(string())
			}
			.RawByte(']')
		}
	}
	.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func ( EnableParams) () ([]byte, error) {
	 := jwriter.Writer{}
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline5(&, )
	return .Buffer.BuildBytes(), .Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func ( EnableParams) ( *jwriter.Writer) {
	easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline5(, )
}

// UnmarshalJSON supports json.Unmarshaler interface
func ( *EnableParams) ( []byte) error {
	 := jlexer.Lexer{Data: }
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline5(&, )
	return .Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func ( *EnableParams) ( *jlexer.Lexer) {
	easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline5(, )
}