func easyjsonCef4e921DecodeGithubComElasticFleetServerV7InternalPkgBulk()

in internal/pkg/bulk/schema_easyjson.go [25:93]


func easyjsonCef4e921DecodeGithubComElasticFleetServerV7InternalPkgBulk(in *jlexer.Lexer, out *bulkStubItem) {
	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 "index":
			if in.IsNull() {
				in.Skip()
				out.Index = nil
			} else {
				if out.Index == nil {
					out.Index = new(BulkIndexerResponseItem)
				}
				(*out.Index).UnmarshalEasyJSON(in)
			}
		case "delete":
			if in.IsNull() {
				in.Skip()
				out.Delete = nil
			} else {
				if out.Delete == nil {
					out.Delete = new(BulkIndexerResponseItem)
				}
				(*out.Delete).UnmarshalEasyJSON(in)
			}
		case "create":
			if in.IsNull() {
				in.Skip()
				out.Create = nil
			} else {
				if out.Create == nil {
					out.Create = new(BulkIndexerResponseItem)
				}
				(*out.Create).UnmarshalEasyJSON(in)
			}
		case "update":
			if in.IsNull() {
				in.Skip()
				out.Update = nil
			} else {
				if out.Update == nil {
					out.Update = new(BulkIndexerResponseItem)
				}
				(*out.Update).UnmarshalEasyJSON(in)
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}