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

package meta

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 easyjson3c44e3bdDecodeGithubComAntihaxGoesiMeta(in *jlexer.Lexer, out *GetStatusItemList) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(GetStatusItemList, 0, 0)
			} else {
				*out = GetStatusItemList{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v1 GetStatusItem
			(v1).UnmarshalEasyJSON(in)
			*out = append(*out, v1)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3c44e3bdEncodeGithubComAntihaxGoesiMeta(out *jwriter.Writer, in GetStatusItemList) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v2, v3 := range in {
			if v2 > 0 {
				out.RawByte(',')
			}
			(v3).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

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

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

// UnmarshalJSON supports json.Unmarshaler interface
func (v *GetStatusItemList) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3c44e3bdDecodeGithubComAntihaxGoesiMeta(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetStatusItemList) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3c44e3bdDecodeGithubComAntihaxGoesiMeta(l, v)
}
func easyjson3c44e3bdDecodeGithubComAntihaxGoesiMeta1(in *jlexer.Lexer, out *GetStatusItem) {
	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 "endpoint":
			out.Endpoint = string(in.String())
		case "method":
			out.Method = string(in.String())
		case "route":
			out.Route = string(in.String())
		case "status":
			out.Status = string(in.String())
		case "tags":
			if in.IsNull() {
				in.Skip()
				out.Tags = nil
			} else {
				in.Delim('[')
				if out.Tags == nil {
					if !in.IsDelim(']') {
						out.Tags = make([]string, 0, 4)
					} else {
						out.Tags = []string{}
					}
				} else {
					out.Tags = (out.Tags)[:0]
				}
				for !in.IsDelim(']') {
					var v4 string
					v4 = string(in.String())
					out.Tags = append(out.Tags, v4)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3c44e3bdEncodeGithubComAntihaxGoesiMeta1(out *jwriter.Writer, in GetStatusItem) {
	out.RawByte('{')
	first := true
	_ = first
	if in.Endpoint != "" {
		const prefix string = ",\"endpoint\":"
		first = false
		out.RawString(prefix[1:])
		out.String(string(in.Endpoint))
	}
	if in.Method != "" {
		const prefix string = ",\"method\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.String(string(in.Method))
	}
	if in.Route != "" {
		const prefix string = ",\"route\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.String(string(in.Route))
	}
	if in.Status != "" {
		const prefix string = ",\"status\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.String(string(in.Status))
	}
	if len(in.Tags) != 0 {
		const prefix string = ",\"tags\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		{
			out.RawByte('[')
			for v5, v6 := range in.Tags {
				if v5 > 0 {
					out.RawByte(',')
				}
				out.String(string(v6))
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

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

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

// UnmarshalJSON supports json.Unmarshaler interface
func (v *GetStatusItem) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3c44e3bdDecodeGithubComAntihaxGoesiMeta1(&r, v)
	return r.Error()
}

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