in internal/pkg/bulk/schema_easyjson.go [711:783]
func easyjsonCef4e921DecodeGithubComElasticFleetServerV7InternalPkgEs3(in *jlexer.Lexer, out *es.HitT) {
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 "_id":
out.ID = string(in.String())
case "_seq_no":
out.SeqNo = int64(in.Int64())
case "version":
out.Version = int64(in.Int64())
case "_index":
out.Index = string(in.String())
case "_source":
if data := in.Raw(); in.Ok() {
in.AddError((out.Source).UnmarshalJSON(data))
}
case "_score":
if in.IsNull() {
in.Skip()
out.Score = nil
} else {
if out.Score == nil {
out.Score = new(float64)
}
*out.Score = float64(in.Float64())
}
case "fields":
if in.IsNull() {
in.Skip()
} else {
in.Delim('{')
out.Fields = make(map[string]interface{})
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
var v12 interface{}
if m, ok := v12.(easyjson.Unmarshaler); ok {
m.UnmarshalEasyJSON(in)
} else if m, ok := v12.(json.Unmarshaler); ok {
_ = m.UnmarshalJSON(in.Raw())
} else {
v12 = in.Interface()
}
(out.Fields)[key] = v12
in.WantComma()
}
in.Delim('}')
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}