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

package cloudapi

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 easyjsonC9ac27e5DecodeGoK6IoK6Cloudapi(in *jlexer.Lexer, out *msgStreams) {
	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 "stream":
			if in.IsNull() {
				in.Skip()
			} else {
				in.Delim('{')
				out.Stream = make(map[string]string)
				for !in.IsDelim('}') {
					key := string(in.String())
					in.WantColon()
					var v1 string
					v1 = string(in.String())
					(out.Stream)[key] = v1
					in.WantComma()
				}
				in.Delim('}')
			}
		case "values":
			if in.IsNull() {
				in.Skip()
				out.Values = nil
			} else {
				in.Delim('[')
				if out.Values == nil {
					if !in.IsDelim(']') {
						out.Values = make([][2]string, 0, 2)
					} else {
						out.Values = [][2]string{}
					}
				} else {
					out.Values = (out.Values)[:0]
				}
				for !in.IsDelim(']') {
					var v2 [2]string
					if in.IsNull() {
						in.Skip()
					} else {
						in.Delim('[')
						v3 := 0
						for !in.IsDelim(']') {
							if v3 < 2 {
								(v2)[v3] = string(in.String())
								v3++
							} else {
								in.SkipRecursive()
							}
							in.WantComma()
						}
						in.Delim(']')
					}
					out.Values = append(out.Values, v2)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjsonC9ac27e5EncodeGoK6IoK6Cloudapi(out *jwriter.Writer, in msgStreams) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"stream\":"
		out.RawString(prefix[1:])
		if in.Stream == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
			out.RawString(`null`)
		} else {
			out.RawByte('{')
			v4First := true
			for v4Name, v4Value := range in.Stream {
				if v4First {
					v4First = false
				} else {
					out.RawByte(',')
				}
				out.String(string(v4Name))
				out.RawByte(':')
				out.String(string(v4Value))
			}
			out.RawByte('}')
		}
	}
	{
		const prefix string = ",\"values\":"
		out.RawString(prefix)
		if in.Values == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v5, v6 := range in.Values {
				if v5 > 0 {
					out.RawByte(',')
				}
				out.RawByte('[')
				for v7 := range v6 {
					if v7 > 0 {
						out.RawByte(',')
					}
					out.String(string((v6)[v7]))
				}
				out.RawByte(']')
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

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

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *msgStreams) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjsonC9ac27e5DecodeGoK6IoK6Cloudapi(l, v)
}
func easyjsonC9ac27e5DecodeGoK6IoK6Cloudapi1(in *jlexer.Lexer, out *msgDroppedEntries) {
	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 "labels":
			if in.IsNull() {
				in.Skip()
			} else {
				in.Delim('{')
				out.Labels = make(map[string]string)
				for !in.IsDelim('}') {
					key := string(in.String())
					in.WantColon()
					var v8 string
					v8 = string(in.String())
					(out.Labels)[key] = v8
					in.WantComma()
				}
				in.Delim('}')
			}
		case "timestamp":
			out.Timestamp = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjsonC9ac27e5EncodeGoK6IoK6Cloudapi1(out *jwriter.Writer, in msgDroppedEntries) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"labels\":"
		out.RawString(prefix[1:])
		if in.Labels == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
			out.RawString(`null`)
		} else {
			out.RawByte('{')
			v9First := true
			for v9Name, v9Value := range in.Labels {
				if v9First {
					v9First = false
				} else {
					out.RawByte(',')
				}
				out.String(string(v9Name))
				out.RawByte(':')
				out.String(string(v9Value))
			}
			out.RawByte('}')
		}
	}
	{
		const prefix string = ",\"timestamp\":"
		out.RawString(prefix)
		out.String(string(in.Timestamp))
	}
	out.RawByte('}')
}

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

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *msgDroppedEntries) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjsonC9ac27e5DecodeGoK6IoK6Cloudapi1(l, v)
}
func easyjsonC9ac27e5DecodeGoK6IoK6Cloudapi2(in *jlexer.Lexer, out *msg) {
	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 "streams":
			if in.IsNull() {
				in.Skip()
				out.Streams = nil
			} else {
				in.Delim('[')
				if out.Streams == nil {
					if !in.IsDelim(']') {
						out.Streams = make([]msgStreams, 0, 2)
					} else {
						out.Streams = []msgStreams{}
					}
				} else {
					out.Streams = (out.Streams)[:0]
				}
				for !in.IsDelim(']') {
					var v10 msgStreams
					(v10).UnmarshalEasyJSON(in)
					out.Streams = append(out.Streams, v10)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "dropped_entries":
			if in.IsNull() {
				in.Skip()
				out.DroppedEntries = nil
			} else {
				in.Delim('[')
				if out.DroppedEntries == nil {
					if !in.IsDelim(']') {
						out.DroppedEntries = make([]msgDroppedEntries, 0, 2)
					} else {
						out.DroppedEntries = []msgDroppedEntries{}
					}
				} else {
					out.DroppedEntries = (out.DroppedEntries)[:0]
				}
				for !in.IsDelim(']') {
					var v11 msgDroppedEntries
					(v11).UnmarshalEasyJSON(in)
					out.DroppedEntries = append(out.DroppedEntries, v11)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjsonC9ac27e5EncodeGoK6IoK6Cloudapi2(out *jwriter.Writer, in msg) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"streams\":"
		out.RawString(prefix[1:])
		if in.Streams == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v12, v13 := range in.Streams {
				if v12 > 0 {
					out.RawByte(',')
				}
				(v13).MarshalEasyJSON(out)
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"dropped_entries\":"
		out.RawString(prefix)
		if in.DroppedEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v14, v15 := range in.DroppedEntries {
				if v14 > 0 {
					out.RawByte(',')
				}
				(v15).MarshalEasyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

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

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