in internal/pkg/bulk/schema_easyjson.go [556:619]
func easyjsonCef4e921DecodeGithubComElasticFleetServerV7InternalPkgEs(in *jlexer.Lexer, out *es.HitsT) {
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 "hits":
if in.IsNull() {
in.Skip()
out.Hits = nil
} else {
in.Delim('[')
if out.Hits == nil {
if !in.IsDelim(']') {
out.Hits = make([]es.HitT, 0, 0)
} else {
out.Hits = []es.HitT{}
}
} else {
out.Hits = (out.Hits)[:0]
}
for !in.IsDelim(']') {
var v9 es.HitT
easyjsonCef4e921DecodeGithubComElasticFleetServerV7InternalPkgEs3(in, &v9)
out.Hits = append(out.Hits, v9)
in.WantComma()
}
in.Delim(']')
}
case "total":
easyjsonCef4e921Decode1(in, &out.Total)
case "max_score":
if in.IsNull() {
in.Skip()
out.MaxScore = nil
} else {
if out.MaxScore == nil {
out.MaxScore = new(float64)
}
*out.MaxScore = float64(in.Float64())
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}