From 6d8eaedf74ac385e44590ce3a855d3ef4073cdea Mon Sep 17 00:00:00 2001 From: alallema Date: Wed, 7 Dec 2022 13:04:40 +0100 Subject: [PATCH] Add swap indexes api for v0.30.0 --- client.go | 18 + client_test.go | 57 +++ types.go | 5 + types_easyjson.go | 886 +++++++++++++++++++++++++++------------------- 4 files changed, 593 insertions(+), 373 deletions(-) diff --git a/client.go b/client.go index 5aaa5701..fc3ac87a 100644 --- a/client.go +++ b/client.go @@ -55,6 +55,7 @@ type ClientInterface interface { GetTask(taskUID int64) (resp *Task, err error) GetTasks(param *TasksQuery) (resp *TaskResult, err error) CancelTasks(param *TasksQuery) (resp *TaskInfo, err error) + SwapIndexes(param []SwapIndexesParams) (resp *TaskInfo, err error) WaitForTask(taskUID int64, options ...WaitParams) (*Task, error) GenerateTenantToken(APIKeyUID string, searchRules map[string]interface{}, options *TenantTokenOptions) (resp string, err error) } @@ -306,6 +307,23 @@ func (c *Client) CancelTasks(param *TasksQuery) (resp *TaskInfo, err error) { return resp, nil } +func (c *Client) SwapIndexes(param []SwapIndexesParams) (resp *TaskInfo, err error) { + resp = &TaskInfo{} + req := internalRequest{ + endpoint: "/swap-indexes", + method: http.MethodPost, + contentType: contentTypeJSON, + withRequest: param, + withResponse: &resp, + acceptedStatusCodes: []int{http.StatusAccepted}, + functionName: "SwapIndexes", + } + if err := c.executeRequest(req); err != nil { + return nil, err + } + return resp, nil +} + // WaitForTask waits for a task to be processed // // The function will check by regular interval provided in parameter interval diff --git a/client_test.go b/client_test.go index 0c131c99..2654ebfe 100644 --- a/client_test.go +++ b/client_test.go @@ -957,6 +957,63 @@ func TestClient_CancelTasks(t *testing.T) { } } +func TestClient_SwapIndexes(t *testing.T) { + type args struct { + UID string + client *Client + query []SwapIndexesParams + } + tests := []struct { + name string + args args + }{ + { + name: "TestBasicSwapIndexes", + args: args{ + UID: "indexUID", + client: defaultClient, + query: []SwapIndexesParams{ + {Indexes: []string{"IndexA", "IndexB"}}, + }, + }, + }, + { + name: "TestSwapIndexesWithMultipleIndexes", + args: args{ + UID: "indexUID", + client: defaultClient, + query: []SwapIndexesParams{ + {Indexes: []string{"IndexA", "IndexB"}}, + {Indexes: []string{"Index1", "Index2"}}, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := tt.args.client + t.Cleanup(cleanup(c)) + + gotResp, err := c.SwapIndexes(tt.args.query) + require.NoError(t, err) + + _, err = c.WaitForTask(gotResp.TaskUID) + require.NoError(t, err) + + gotTask, err := c.GetTask(gotResp.TaskUID) + require.NoError(t, err) + + require.NotNil(t, gotResp.Status) + require.NotNil(t, gotResp.Type) + require.NotNil(t, gotResp.TaskUID) + require.NotNil(t, gotResp.EnqueuedAt) + require.Equal(t, "", gotResp.IndexUID) + require.Equal(t, "indexSwap", gotResp.Type) + require.Equal(t, tt.args.query, gotTask.Details.Swaps) + }) + } +} + func TestClient_DefaultWaitForTask(t *testing.T) { type args struct { UID string diff --git a/types.go b/types.go index b70d2f12..eb0d9edd 100644 --- a/types.go +++ b/types.go @@ -182,6 +182,7 @@ type Details struct { CanceledTasks int64 `json:"canceledTasks,omitempty"` DeletedTasks int64 `json:"deletedTasks,omitempty"` OriginalFilter string `json:"originalFilter,omitempty"` + Swaps []SwapIndexesParams `json:"swaps,omitempty"` } // Return of multiple tasks is wrap in a TaskResult @@ -317,6 +318,10 @@ type DocumentsResult struct { Total int64 `json:"total"` } +type SwapIndexesParams struct { + Indexes []string `json:"indexes"` +} + // RawType is an alias for raw byte[] type RawType []byte diff --git a/types_easyjson.go b/types_easyjson.go index 0a6bebb0..c5977eee 100644 --- a/types_easyjson.go +++ b/types_easyjson.go @@ -1317,7 +1317,105 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo9(out *jwriter.Write } out.RawByte('}') } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(in *jlexer.Lexer, out *StatsIndex) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(in *jlexer.Lexer, out *SwapIndexesParams) { + 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 "indexes": + if in.IsNull() { + in.Skip() + out.Indexes = nil + } else { + in.Delim('[') + if out.Indexes == nil { + if !in.IsDelim(']') { + out.Indexes = make([]string, 0, 4) + } else { + out.Indexes = []string{} + } + } else { + out.Indexes = (out.Indexes)[:0] + } + for !in.IsDelim(']') { + var v25 string + v25 = string(in.String()) + out.Indexes = append(out.Indexes, v25) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(out *jwriter.Writer, in SwapIndexesParams) { + out.RawByte('{') + first := true + _ = first + { + const prefix string = ",\"indexes\":" + out.RawString(prefix[1:]) + if in.Indexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v26, v27 := range in.Indexes { + if v26 > 0 { + out.RawByte(',') + } + out.String(string(v27)) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SwapIndexesParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SwapIndexesParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SwapIndexesParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SwapIndexesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(l, v) +} +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(in *jlexer.Lexer, out *StatsIndex) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1349,9 +1447,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(in *jlexer.Lexer, for !in.IsDelim('}') { key := string(in.String()) in.WantColon() - var v25 int64 - v25 = int64(in.Int64()) - (out.FieldDistribution)[key] = v25 + var v28 int64 + v28 = int64(in.Int64()) + (out.FieldDistribution)[key] = v28 in.WantComma() } in.Delim('}') @@ -1366,7 +1464,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(out *jwriter.Writer, in StatsIndex) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(out *jwriter.Writer, in StatsIndex) { out.RawByte('{') first := true _ = first @@ -1387,16 +1485,16 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(out *jwriter.Writ out.RawString(`null`) } else { out.RawByte('{') - v26First := true - for v26Name, v26Value := range in.FieldDistribution { - if v26First { - v26First = false + v29First := true + for v29Name, v29Value := range in.FieldDistribution { + if v29First { + v29First = false } else { out.RawByte(',') } - out.String(string(v26Name)) + out.String(string(v29Name)) out.RawByte(':') - out.Int64(int64(v26Value)) + out.Int64(int64(v29Value)) } out.RawByte('}') } @@ -1407,27 +1505,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v StatsIndex) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v StatsIndex) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *StatsIndex) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *StatsIndex) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(in *jlexer.Lexer, out *Stats) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out *Stats) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1461,9 +1559,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(in *jlexer.Lexer, for !in.IsDelim('}') { key := string(in.String()) in.WantColon() - var v27 StatsIndex - (v27).UnmarshalEasyJSON(in) - (out.Indexes)[key] = v27 + var v30 StatsIndex + (v30).UnmarshalEasyJSON(in) + (out.Indexes)[key] = v30 in.WantComma() } in.Delim('}') @@ -1478,7 +1576,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(out *jwriter.Writer, in Stats) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writer, in Stats) { out.RawByte('{') first := true _ = first @@ -1499,16 +1597,16 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(out *jwriter.Writ out.RawString(`null`) } else { out.RawByte('{') - v28First := true - for v28Name, v28Value := range in.Indexes { - if v28First { - v28First = false + v31First := true + for v31Name, v31Value := range in.Indexes { + if v31First { + v31First = false } else { out.RawByte(',') } - out.String(string(v28Name)) + out.String(string(v31Name)) out.RawByte(':') - (v28Value).MarshalEasyJSON(out) + (v31Value).MarshalEasyJSON(out) } out.RawByte('}') } @@ -1519,27 +1617,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Stats) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Stats) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Stats) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Stats) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out *Settings) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(in *jlexer.Lexer, out *Settings) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1574,9 +1672,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out.RankingRules = (out.RankingRules)[:0] } for !in.IsDelim(']') { - var v29 string - v29 = string(in.String()) - out.RankingRules = append(out.RankingRules, v29) + var v32 string + v32 = string(in.String()) + out.RankingRules = append(out.RankingRules, v32) in.WantComma() } in.Delim(']') @@ -1607,9 +1705,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out.SearchableAttributes = (out.SearchableAttributes)[:0] } for !in.IsDelim(']') { - var v30 string - v30 = string(in.String()) - out.SearchableAttributes = append(out.SearchableAttributes, v30) + var v33 string + v33 = string(in.String()) + out.SearchableAttributes = append(out.SearchableAttributes, v33) in.WantComma() } in.Delim(']') @@ -1630,9 +1728,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out.DisplayedAttributes = (out.DisplayedAttributes)[:0] } for !in.IsDelim(']') { - var v31 string - v31 = string(in.String()) - out.DisplayedAttributes = append(out.DisplayedAttributes, v31) + var v34 string + v34 = string(in.String()) + out.DisplayedAttributes = append(out.DisplayedAttributes, v34) in.WantComma() } in.Delim(']') @@ -1653,9 +1751,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out.StopWords = (out.StopWords)[:0] } for !in.IsDelim(']') { - var v32 string - v32 = string(in.String()) - out.StopWords = append(out.StopWords, v32) + var v35 string + v35 = string(in.String()) + out.StopWords = append(out.StopWords, v35) in.WantComma() } in.Delim(']') @@ -1673,30 +1771,30 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, for !in.IsDelim('}') { key := string(in.String()) in.WantColon() - var v33 []string + var v36 []string if in.IsNull() { in.Skip() - v33 = nil + v36 = nil } else { in.Delim('[') - if v33 == nil { + if v36 == nil { if !in.IsDelim(']') { - v33 = make([]string, 0, 4) + v36 = make([]string, 0, 4) } else { - v33 = []string{} + v36 = []string{} } } else { - v33 = (v33)[:0] + v36 = (v36)[:0] } for !in.IsDelim(']') { - var v34 string - v34 = string(in.String()) - v33 = append(v33, v34) + var v37 string + v37 = string(in.String()) + v36 = append(v36, v37) in.WantComma() } in.Delim(']') } - (out.Synonyms)[key] = v33 + (out.Synonyms)[key] = v36 in.WantComma() } in.Delim('}') @@ -1717,9 +1815,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out.FilterableAttributes = (out.FilterableAttributes)[:0] } for !in.IsDelim(']') { - var v35 string - v35 = string(in.String()) - out.FilterableAttributes = append(out.FilterableAttributes, v35) + var v38 string + v38 = string(in.String()) + out.FilterableAttributes = append(out.FilterableAttributes, v38) in.WantComma() } in.Delim(']') @@ -1740,9 +1838,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out.SortableAttributes = (out.SortableAttributes)[:0] } for !in.IsDelim(']') { - var v36 string - v36 = string(in.String()) - out.SortableAttributes = append(out.SortableAttributes, v36) + var v39 string + v39 = string(in.String()) + out.SortableAttributes = append(out.SortableAttributes, v39) in.WantComma() } in.Delim(']') @@ -1787,7 +1885,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writer, in Settings) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(out *jwriter.Writer, in Settings) { out.RawByte('{') first := true _ = first @@ -1797,11 +1895,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ out.RawString(prefix[1:]) { out.RawByte('[') - for v37, v38 := range in.RankingRules { - if v37 > 0 { + for v40, v41 := range in.RankingRules { + if v40 > 0 { out.RawByte(',') } - out.String(string(v38)) + out.String(string(v41)) } out.RawByte(']') } @@ -1826,11 +1924,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ } { out.RawByte('[') - for v39, v40 := range in.SearchableAttributes { - if v39 > 0 { + for v42, v43 := range in.SearchableAttributes { + if v42 > 0 { out.RawByte(',') } - out.String(string(v40)) + out.String(string(v43)) } out.RawByte(']') } @@ -1845,11 +1943,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ } { out.RawByte('[') - for v41, v42 := range in.DisplayedAttributes { - if v41 > 0 { + for v44, v45 := range in.DisplayedAttributes { + if v44 > 0 { out.RawByte(',') } - out.String(string(v42)) + out.String(string(v45)) } out.RawByte(']') } @@ -1864,11 +1962,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ } { out.RawByte('[') - for v43, v44 := range in.StopWords { - if v43 > 0 { + for v46, v47 := range in.StopWords { + if v46 > 0 { out.RawByte(',') } - out.String(string(v44)) + out.String(string(v47)) } out.RawByte(']') } @@ -1883,24 +1981,24 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ } { out.RawByte('{') - v45First := true - for v45Name, v45Value := range in.Synonyms { - if v45First { - v45First = false + v48First := true + for v48Name, v48Value := range in.Synonyms { + if v48First { + v48First = false } else { out.RawByte(',') } - out.String(string(v45Name)) + out.String(string(v48Name)) out.RawByte(':') - if v45Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if v48Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v46, v47 := range v45Value { - if v46 > 0 { + for v49, v50 := range v48Value { + if v49 > 0 { out.RawByte(',') } - out.String(string(v47)) + out.String(string(v50)) } out.RawByte(']') } @@ -1918,11 +2016,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ } { out.RawByte('[') - for v48, v49 := range in.FilterableAttributes { - if v48 > 0 { + for v51, v52 := range in.FilterableAttributes { + if v51 > 0 { out.RawByte(',') } - out.String(string(v49)) + out.String(string(v52)) } out.RawByte(']') } @@ -1937,11 +2035,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ } { out.RawByte('[') - for v50, v51 := range in.SortableAttributes { - if v50 > 0 { + for v53, v54 := range in.SortableAttributes { + if v53 > 0 { out.RawByte(',') } - out.String(string(v51)) + out.String(string(v54)) } out.RawByte(']') } @@ -1982,27 +2080,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Settings) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Settings) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Settings) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Settings) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(in *jlexer.Lexer, out *SearchResponse) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out *SearchResponse) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2037,15 +2135,15 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(in *jlexer.Lexer, out.Hits = (out.Hits)[:0] } for !in.IsDelim(']') { - var v52 interface{} - if m, ok := v52.(easyjson.Unmarshaler); ok { + var v55 interface{} + if m, ok := v55.(easyjson.Unmarshaler); ok { m.UnmarshalEasyJSON(in) - } else if m, ok := v52.(json.Unmarshaler); ok { + } else if m, ok := v55.(json.Unmarshaler); ok { _ = m.UnmarshalJSON(in.Raw()) } else { - v52 = in.Interface() + v55 = in.Interface() } - out.Hits = append(out.Hits, v52) + out.Hits = append(out.Hits, v55) in.WantComma() } in.Delim(']') @@ -2078,7 +2176,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(out *jwriter.Writer, in SearchResponse) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writer, in SearchResponse) { out.RawByte('{') first := true _ = first @@ -2089,16 +2187,16 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v53, v54 := range in.Hits { - if v53 > 0 { + for v56, v57 := range in.Hits { + if v56 > 0 { out.RawByte(',') } - if m, ok := v54.(easyjson.Marshaler); ok { + if m, ok := v57.(easyjson.Marshaler); ok { m.MarshalEasyJSON(out) - } else if m, ok := v54.(json.Marshaler); ok { + } else if m, ok := v57.(json.Marshaler); ok { out.Raw(m.MarshalJSON()) } else { - out.Raw(json.Marshal(v54)) + out.Raw(json.Marshal(v57)) } } out.RawByte(']') @@ -2146,27 +2244,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v SearchResponse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SearchResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SearchResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SearchResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out *SearchRequest) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(in *jlexer.Lexer, out *SearchRequest) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2205,9 +2303,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out.AttributesToRetrieve = (out.AttributesToRetrieve)[:0] } for !in.IsDelim(']') { - var v55 string - v55 = string(in.String()) - out.AttributesToRetrieve = append(out.AttributesToRetrieve, v55) + var v58 string + v58 = string(in.String()) + out.AttributesToRetrieve = append(out.AttributesToRetrieve, v58) in.WantComma() } in.Delim(']') @@ -2228,9 +2326,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out.AttributesToCrop = (out.AttributesToCrop)[:0] } for !in.IsDelim(']') { - var v56 string - v56 = string(in.String()) - out.AttributesToCrop = append(out.AttributesToCrop, v56) + var v59 string + v59 = string(in.String()) + out.AttributesToCrop = append(out.AttributesToCrop, v59) in.WantComma() } in.Delim(']') @@ -2255,9 +2353,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out.AttributesToHighlight = (out.AttributesToHighlight)[:0] } for !in.IsDelim(']') { - var v57 string - v57 = string(in.String()) - out.AttributesToHighlight = append(out.AttributesToHighlight, v57) + var v60 string + v60 = string(in.String()) + out.AttributesToHighlight = append(out.AttributesToHighlight, v60) in.WantComma() } in.Delim(']') @@ -2294,9 +2392,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out.Facets = (out.Facets)[:0] } for !in.IsDelim(']') { - var v58 string - v58 = string(in.String()) - out.Facets = append(out.Facets, v58) + var v61 string + v61 = string(in.String()) + out.Facets = append(out.Facets, v61) in.WantComma() } in.Delim(']') @@ -2319,9 +2417,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out.Sort = (out.Sort)[:0] } for !in.IsDelim(']') { - var v59 string - v59 = string(in.String()) - out.Sort = append(out.Sort, v59) + var v62 string + v62 = string(in.String()) + out.Sort = append(out.Sort, v62) in.WantComma() } in.Delim(']') @@ -2336,7 +2434,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writer, in SearchRequest) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(out *jwriter.Writer, in SearchRequest) { out.RawByte('{') first := true _ = first @@ -2357,11 +2455,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v60, v61 := range in.AttributesToRetrieve { - if v60 > 0 { + for v63, v64 := range in.AttributesToRetrieve { + if v63 > 0 { out.RawByte(',') } - out.String(string(v61)) + out.String(string(v64)) } out.RawByte(']') } @@ -2373,11 +2471,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v62, v63 := range in.AttributesToCrop { - if v62 > 0 { + for v65, v66 := range in.AttributesToCrop { + if v65 > 0 { out.RawByte(',') } - out.String(string(v63)) + out.String(string(v66)) } out.RawByte(']') } @@ -2399,11 +2497,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v64, v65 := range in.AttributesToHighlight { - if v64 > 0 { + for v67, v68 := range in.AttributesToHighlight { + if v67 > 0 { out.RawByte(',') } - out.String(string(v65)) + out.String(string(v68)) } out.RawByte(']') } @@ -2446,11 +2544,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v66, v67 := range in.Facets { - if v66 > 0 { + for v69, v70 := range in.Facets { + if v69 > 0 { out.RawByte(',') } - out.String(string(v67)) + out.String(string(v70)) } out.RawByte(']') } @@ -2467,11 +2565,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v68, v69 := range in.Sort { - if v68 > 0 { + for v71, v72 := range in.Sort { + if v71 > 0 { out.RawByte(',') } - out.String(string(v69)) + out.String(string(v72)) } out.RawByte(']') } @@ -2482,27 +2580,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v SearchRequest) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SearchRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SearchRequest) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SearchRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(in *jlexer.Lexer, out *Pagination) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(in *jlexer.Lexer, out *Pagination) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2533,7 +2631,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(out *jwriter.Writer, in Pagination) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(out *jwriter.Writer, in Pagination) { out.RawByte('{') first := true _ = first @@ -2548,27 +2646,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Pagination) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Pagination) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Pagination) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Pagination) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(in *jlexer.Lexer, out *MinWordSizeForTypos) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(in *jlexer.Lexer, out *MinWordSizeForTypos) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2601,7 +2699,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(out *jwriter.Writer, in MinWordSizeForTypos) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(out *jwriter.Writer, in MinWordSizeForTypos) { out.RawByte('{') first := true _ = first @@ -2627,27 +2725,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v MinWordSizeForTypos) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v MinWordSizeForTypos) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *MinWordSizeForTypos) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *MinWordSizeForTypos) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(in *jlexer.Lexer, out *KeysResults) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(in *jlexer.Lexer, out *KeysResults) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2682,9 +2780,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(in *jlexer.Lexer, out.Results = (out.Results)[:0] } for !in.IsDelim(']') { - var v70 Key - (v70).UnmarshalEasyJSON(in) - out.Results = append(out.Results, v70) + var v73 Key + (v73).UnmarshalEasyJSON(in) + out.Results = append(out.Results, v73) in.WantComma() } in.Delim(']') @@ -2705,7 +2803,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(out *jwriter.Writer, in KeysResults) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(out *jwriter.Writer, in KeysResults) { out.RawByte('{') first := true _ = first @@ -2716,11 +2814,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v71, v72 := range in.Results { - if v71 > 0 { + for v74, v75 := range in.Results { + if v74 > 0 { out.RawByte(',') } - (v72).MarshalEasyJSON(out) + (v75).MarshalEasyJSON(out) } out.RawByte(']') } @@ -2746,27 +2844,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v KeysResults) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v KeysResults) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *KeysResults) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *KeysResults) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(in *jlexer.Lexer, out *KeysQuery) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(in *jlexer.Lexer, out *KeysQuery) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2799,7 +2897,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(out *jwriter.Writer, in KeysQuery) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(out *jwriter.Writer, in KeysQuery) { out.RawByte('{') first := true _ = first @@ -2819,27 +2917,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v KeysQuery) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v KeysQuery) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *KeysQuery) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *KeysQuery) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(in *jlexer.Lexer, out *KeyUpdate) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(in *jlexer.Lexer, out *KeyUpdate) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2872,7 +2970,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(out *jwriter.Writer, in KeyUpdate) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(out *jwriter.Writer, in KeyUpdate) { out.RawByte('{') first := true _ = first @@ -2898,27 +2996,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v KeyUpdate) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v KeyUpdate) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *KeyUpdate) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *KeyUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(in *jlexer.Lexer, out *KeyParsed) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(in *jlexer.Lexer, out *KeyParsed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2959,9 +3057,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(in *jlexer.Lexer, out.Actions = (out.Actions)[:0] } for !in.IsDelim(']') { - var v73 string - v73 = string(in.String()) - out.Actions = append(out.Actions, v73) + var v76 string + v76 = string(in.String()) + out.Actions = append(out.Actions, v76) in.WantComma() } in.Delim(']') @@ -2982,9 +3080,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(in *jlexer.Lexer, out.Indexes = (out.Indexes)[:0] } for !in.IsDelim(']') { - var v74 string - v74 = string(in.String()) - out.Indexes = append(out.Indexes, v74) + var v77 string + v77 = string(in.String()) + out.Indexes = append(out.Indexes, v77) in.WantComma() } in.Delim(']') @@ -3017,7 +3115,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(out *jwriter.Writer, in KeyParsed) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(out *jwriter.Writer, in KeyParsed) { out.RawByte('{') first := true _ = first @@ -3041,11 +3139,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(out *jwriter.Writ out.RawString(prefix) { out.RawByte('[') - for v75, v76 := range in.Actions { - if v75 > 0 { + for v78, v79 := range in.Actions { + if v78 > 0 { out.RawByte(',') } - out.String(string(v76)) + out.String(string(v79)) } out.RawByte(']') } @@ -3055,11 +3153,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(out *jwriter.Writ out.RawString(prefix) { out.RawByte('[') - for v77, v78 := range in.Indexes { - if v77 > 0 { + for v80, v81 := range in.Indexes { + if v80 > 0 { out.RawByte(',') } - out.String(string(v78)) + out.String(string(v81)) } out.RawByte(']') } @@ -3089,27 +3187,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v KeyParsed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v KeyParsed) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *KeyParsed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *KeyParsed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(in *jlexer.Lexer, out *Key) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(in *jlexer.Lexer, out *Key) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3152,9 +3250,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(in *jlexer.Lexer, out.Actions = (out.Actions)[:0] } for !in.IsDelim(']') { - var v79 string - v79 = string(in.String()) - out.Actions = append(out.Actions, v79) + var v82 string + v82 = string(in.String()) + out.Actions = append(out.Actions, v82) in.WantComma() } in.Delim(']') @@ -3175,9 +3273,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(in *jlexer.Lexer, out.Indexes = (out.Indexes)[:0] } for !in.IsDelim(']') { - var v80 string - v80 = string(in.String()) - out.Indexes = append(out.Indexes, v80) + var v83 string + v83 = string(in.String()) + out.Indexes = append(out.Indexes, v83) in.WantComma() } in.Delim(']') @@ -3204,7 +3302,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(out *jwriter.Writer, in Key) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(out *jwriter.Writer, in Key) { out.RawByte('{') first := true _ = first @@ -3233,11 +3331,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(out *jwriter.Writ out.RawString(prefix) { out.RawByte('[') - for v81, v82 := range in.Actions { - if v81 > 0 { + for v84, v85 := range in.Actions { + if v84 > 0 { out.RawByte(',') } - out.String(string(v82)) + out.String(string(v85)) } out.RawByte(']') } @@ -3247,11 +3345,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(out *jwriter.Writ out.RawString(prefix) { out.RawByte('[') - for v83, v84 := range in.Indexes { - if v83 > 0 { + for v86, v87 := range in.Indexes { + if v86 > 0 { out.RawByte(',') } - out.String(string(v84)) + out.String(string(v87)) } out.RawByte(']') } @@ -3277,27 +3375,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Key) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Key) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Key) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(in *jlexer.Lexer, out *IndexesResults) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(in *jlexer.Lexer, out *IndexesResults) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3332,9 +3430,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(in *jlexer.Lexer, out.Results = (out.Results)[:0] } for !in.IsDelim(']') { - var v85 Index - (v85).UnmarshalEasyJSON(in) - out.Results = append(out.Results, v85) + var v88 Index + (v88).UnmarshalEasyJSON(in) + out.Results = append(out.Results, v88) in.WantComma() } in.Delim(']') @@ -3355,7 +3453,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(out *jwriter.Writer, in IndexesResults) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(out *jwriter.Writer, in IndexesResults) { out.RawByte('{') first := true _ = first @@ -3366,11 +3464,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v86, v87 := range in.Results { - if v86 > 0 { + for v89, v90 := range in.Results { + if v89 > 0 { out.RawByte(',') } - (v87).MarshalEasyJSON(out) + (v90).MarshalEasyJSON(out) } out.RawByte(']') } @@ -3396,27 +3494,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v IndexesResults) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v IndexesResults) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *IndexesResults) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *IndexesResults) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(in *jlexer.Lexer, out *IndexesQuery) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(in *jlexer.Lexer, out *IndexesQuery) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3449,7 +3547,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(out *jwriter.Writer, in IndexesQuery) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(out *jwriter.Writer, in IndexesQuery) { out.RawByte('{') first := true _ = first @@ -3469,27 +3567,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v IndexesQuery) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v IndexesQuery) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *IndexesQuery) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *IndexesQuery) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(in *jlexer.Lexer, out *Index) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(in *jlexer.Lexer, out *Index) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3530,7 +3628,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(out *jwriter.Writer, in Index) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(out *jwriter.Writer, in Index) { out.RawByte('{') first := true _ = first @@ -3560,27 +3658,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Index) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Index) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Index) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Index) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(in *jlexer.Lexer, out *Health) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(in *jlexer.Lexer, out *Health) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3611,7 +3709,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(out *jwriter.Writer, in Health) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(out *jwriter.Writer, in Health) { out.RawByte('{') first := true _ = first @@ -3626,27 +3724,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Health) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Health) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Health) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Health) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(in *jlexer.Lexer, out *Faceting) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(in *jlexer.Lexer, out *Faceting) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3677,7 +3775,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(out *jwriter.Writer, in Faceting) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(out *jwriter.Writer, in Faceting) { out.RawByte('{') first := true _ = first @@ -3692,27 +3790,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Faceting) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Faceting) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Faceting) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Faceting) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(in *jlexer.Lexer, out *DocumentsResult) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(in *jlexer.Lexer, out *DocumentsResult) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3747,29 +3845,29 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(in *jlexer.Lexer, out.Results = (out.Results)[:0] } for !in.IsDelim(']') { - var v88 map[string]interface{} + var v91 map[string]interface{} if in.IsNull() { in.Skip() } else { in.Delim('{') - v88 = make(map[string]interface{}) + v91 = make(map[string]interface{}) for !in.IsDelim('}') { key := string(in.String()) in.WantColon() - var v89 interface{} - if m, ok := v89.(easyjson.Unmarshaler); ok { + var v92 interface{} + if m, ok := v92.(easyjson.Unmarshaler); ok { m.UnmarshalEasyJSON(in) - } else if m, ok := v89.(json.Unmarshaler); ok { + } else if m, ok := v92.(json.Unmarshaler); ok { _ = m.UnmarshalJSON(in.Raw()) } else { - v89 = in.Interface() + v92 = in.Interface() } - (v88)[key] = v89 + (v91)[key] = v92 in.WantComma() } in.Delim('}') } - out.Results = append(out.Results, v88) + out.Results = append(out.Results, v91) in.WantComma() } in.Delim(']') @@ -3790,7 +3888,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(out *jwriter.Writer, in DocumentsResult) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(out *jwriter.Writer, in DocumentsResult) { out.RawByte('{') first := true _ = first @@ -3801,29 +3899,29 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(out *jwriter.Writ out.RawString("null") } else { out.RawByte('[') - for v90, v91 := range in.Results { - if v90 > 0 { + for v93, v94 := range in.Results { + if v93 > 0 { out.RawByte(',') } - if v91 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { + if v94 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { out.RawString(`null`) } else { out.RawByte('{') - v92First := true - for v92Name, v92Value := range v91 { - if v92First { - v92First = false + v95First := true + for v95Name, v95Value := range v94 { + if v95First { + v95First = false } else { out.RawByte(',') } - out.String(string(v92Name)) + out.String(string(v95Name)) out.RawByte(':') - if m, ok := v92Value.(easyjson.Marshaler); ok { + if m, ok := v95Value.(easyjson.Marshaler); ok { m.MarshalEasyJSON(out) - } else if m, ok := v92Value.(json.Marshaler); ok { + } else if m, ok := v95Value.(json.Marshaler); ok { out.Raw(m.MarshalJSON()) } else { - out.Raw(json.Marshal(v92Value)) + out.Raw(json.Marshal(v95Value)) } } out.RawByte('}') @@ -3853,27 +3951,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v DocumentsResult) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DocumentsResult) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DocumentsResult) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DocumentsResult) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(in *jlexer.Lexer, out *DocumentsQuery) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(in *jlexer.Lexer, out *DocumentsQuery) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3912,9 +4010,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(in *jlexer.Lexer, out.Fields = (out.Fields)[:0] } for !in.IsDelim(']') { - var v93 string - v93 = string(in.String()) - out.Fields = append(out.Fields, v93) + var v96 string + v96 = string(in.String()) + out.Fields = append(out.Fields, v96) in.WantComma() } in.Delim(']') @@ -3929,7 +4027,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(out *jwriter.Writer, in DocumentsQuery) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(out *jwriter.Writer, in DocumentsQuery) { out.RawByte('{') first := true _ = first @@ -3959,11 +4057,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(out *jwriter.Writ } { out.RawByte('[') - for v94, v95 := range in.Fields { - if v94 > 0 { + for v97, v98 := range in.Fields { + if v97 > 0 { out.RawByte(',') } - out.String(string(v95)) + out.String(string(v98)) } out.RawByte(']') } @@ -3974,27 +4072,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v DocumentsQuery) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DocumentsQuery) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DocumentsQuery) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DocumentsQuery) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(in *jlexer.Lexer, out *DocumentQuery) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out *DocumentQuery) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4029,9 +4127,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(in *jlexer.Lexer, out.Fields = (out.Fields)[:0] } for !in.IsDelim(']') { - var v96 string - v96 = string(in.String()) - out.Fields = append(out.Fields, v96) + var v99 string + v99 = string(in.String()) + out.Fields = append(out.Fields, v99) in.WantComma() } in.Delim(']') @@ -4046,7 +4144,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(out *jwriter.Writer, in DocumentQuery) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writer, in DocumentQuery) { out.RawByte('{') first := true _ = first @@ -4056,11 +4154,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(out *jwriter.Writ out.RawString(prefix[1:]) { out.RawByte('[') - for v97, v98 := range in.Fields { - if v97 > 0 { + for v100, v101 := range in.Fields { + if v100 > 0 { out.RawByte(',') } - out.String(string(v98)) + out.String(string(v101)) } out.RawByte(']') } @@ -4071,27 +4169,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v DocumentQuery) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DocumentQuery) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DocumentQuery) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DocumentQuery) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out *Details) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(in *jlexer.Lexer, out *Details) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4136,9 +4234,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.RankingRules = (out.RankingRules)[:0] } for !in.IsDelim(']') { - var v99 string - v99 = string(in.String()) - out.RankingRules = append(out.RankingRules, v99) + var v102 string + v102 = string(in.String()) + out.RankingRules = append(out.RankingRules, v102) in.WantComma() } in.Delim(']') @@ -4169,9 +4267,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.SearchableAttributes = (out.SearchableAttributes)[:0] } for !in.IsDelim(']') { - var v100 string - v100 = string(in.String()) - out.SearchableAttributes = append(out.SearchableAttributes, v100) + var v103 string + v103 = string(in.String()) + out.SearchableAttributes = append(out.SearchableAttributes, v103) in.WantComma() } in.Delim(']') @@ -4192,9 +4290,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.DisplayedAttributes = (out.DisplayedAttributes)[:0] } for !in.IsDelim(']') { - var v101 string - v101 = string(in.String()) - out.DisplayedAttributes = append(out.DisplayedAttributes, v101) + var v104 string + v104 = string(in.String()) + out.DisplayedAttributes = append(out.DisplayedAttributes, v104) in.WantComma() } in.Delim(']') @@ -4215,9 +4313,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.StopWords = (out.StopWords)[:0] } for !in.IsDelim(']') { - var v102 string - v102 = string(in.String()) - out.StopWords = append(out.StopWords, v102) + var v105 string + v105 = string(in.String()) + out.StopWords = append(out.StopWords, v105) in.WantComma() } in.Delim(']') @@ -4235,30 +4333,30 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, for !in.IsDelim('}') { key := string(in.String()) in.WantColon() - var v103 []string + var v106 []string if in.IsNull() { in.Skip() - v103 = nil + v106 = nil } else { in.Delim('[') - if v103 == nil { + if v106 == nil { if !in.IsDelim(']') { - v103 = make([]string, 0, 4) + v106 = make([]string, 0, 4) } else { - v103 = []string{} + v106 = []string{} } } else { - v103 = (v103)[:0] + v106 = (v106)[:0] } for !in.IsDelim(']') { - var v104 string - v104 = string(in.String()) - v103 = append(v103, v104) + var v107 string + v107 = string(in.String()) + v106 = append(v106, v107) in.WantComma() } in.Delim(']') } - (out.Synonyms)[key] = v103 + (out.Synonyms)[key] = v106 in.WantComma() } in.Delim('}') @@ -4279,9 +4377,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.FilterableAttributes = (out.FilterableAttributes)[:0] } for !in.IsDelim(']') { - var v105 string - v105 = string(in.String()) - out.FilterableAttributes = append(out.FilterableAttributes, v105) + var v108 string + v108 = string(in.String()) + out.FilterableAttributes = append(out.FilterableAttributes, v108) in.WantComma() } in.Delim(']') @@ -4302,9 +4400,9 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.SortableAttributes = (out.SortableAttributes)[:0] } for !in.IsDelim(']') { - var v106 string - v106 = string(in.String()) - out.SortableAttributes = append(out.SortableAttributes, v106) + var v109 string + v109 = string(in.String()) + out.SortableAttributes = append(out.SortableAttributes, v109) in.WantComma() } in.Delim(']') @@ -4347,6 +4445,29 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out.DeletedTasks = int64(in.Int64()) case "originalFilter": out.OriginalFilter = string(in.String()) + case "swaps": + if in.IsNull() { + in.Skip() + out.Swaps = nil + } else { + in.Delim('[') + if out.Swaps == nil { + if !in.IsDelim(']') { + out.Swaps = make([]SwapIndexesParams, 0, 2) + } else { + out.Swaps = []SwapIndexesParams{} + } + } else { + out.Swaps = (out.Swaps)[:0] + } + for !in.IsDelim(']') { + var v110 SwapIndexesParams + (v110).UnmarshalEasyJSON(in) + out.Swaps = append(out.Swaps, v110) + in.WantComma() + } + in.Delim(']') + } default: in.SkipRecursive() } @@ -4357,7 +4478,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writer, in Details) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(out *jwriter.Writer, in Details) { out.RawByte('{') first := true _ = first @@ -4417,11 +4538,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('[') - for v107, v108 := range in.RankingRules { - if v107 > 0 { + for v111, v112 := range in.RankingRules { + if v111 > 0 { out.RawByte(',') } - out.String(string(v108)) + out.String(string(v112)) } out.RawByte(']') } @@ -4446,11 +4567,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('[') - for v109, v110 := range in.SearchableAttributes { - if v109 > 0 { + for v113, v114 := range in.SearchableAttributes { + if v113 > 0 { out.RawByte(',') } - out.String(string(v110)) + out.String(string(v114)) } out.RawByte(']') } @@ -4465,11 +4586,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('[') - for v111, v112 := range in.DisplayedAttributes { - if v111 > 0 { + for v115, v116 := range in.DisplayedAttributes { + if v115 > 0 { out.RawByte(',') } - out.String(string(v112)) + out.String(string(v116)) } out.RawByte(']') } @@ -4484,11 +4605,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('[') - for v113, v114 := range in.StopWords { - if v113 > 0 { + for v117, v118 := range in.StopWords { + if v117 > 0 { out.RawByte(',') } - out.String(string(v114)) + out.String(string(v118)) } out.RawByte(']') } @@ -4503,24 +4624,24 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('{') - v115First := true - for v115Name, v115Value := range in.Synonyms { - if v115First { - v115First = false + v119First := true + for v119Name, v119Value := range in.Synonyms { + if v119First { + v119First = false } else { out.RawByte(',') } - out.String(string(v115Name)) + out.String(string(v119Name)) out.RawByte(':') - if v115Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if v119Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v116, v117 := range v115Value { - if v116 > 0 { + for v120, v121 := range v119Value { + if v120 > 0 { out.RawByte(',') } - out.String(string(v117)) + out.String(string(v121)) } out.RawByte(']') } @@ -4538,11 +4659,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('[') - for v118, v119 := range in.FilterableAttributes { - if v118 > 0 { + for v122, v123 := range in.FilterableAttributes { + if v122 > 0 { out.RawByte(',') } - out.String(string(v119)) + out.String(string(v123)) } out.RawByte(']') } @@ -4557,11 +4678,11 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } { out.RawByte('[') - for v120, v121 := range in.SortableAttributes { - if v120 > 0 { + for v124, v125 := range in.SortableAttributes { + if v124 > 0 { out.RawByte(',') } - out.String(string(v121)) + out.String(string(v125)) } out.RawByte(']') } @@ -4636,33 +4757,52 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writ } out.String(string(in.OriginalFilter)) } + if len(in.Swaps) != 0 { + const prefix string = ",\"swaps\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + { + out.RawByte('[') + for v126, v127 := range in.Swaps { + if v126 > 0 { + out.RawByte(',') + } + (v127).MarshalEasyJSON(out) + } + out.RawByte(']') + } + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v Details) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Details) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Details) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Details) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(in *jlexer.Lexer, out *CreateIndexRequest) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(in *jlexer.Lexer, out *CreateIndexRequest) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4695,7 +4835,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(out *jwriter.Writer, in CreateIndexRequest) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(out *jwriter.Writer, in CreateIndexRequest) { out.RawByte('{') first := true _ = first @@ -4721,27 +4861,27 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v CreateIndexRequest) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CreateIndexRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CreateIndexRequest) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CreateIndexRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(l, v) } -func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(in *jlexer.Lexer, out *Client) { +func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo33(in *jlexer.Lexer, out *Client) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4770,7 +4910,7 @@ func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(in *jlexer.Lexer, in.Consumed() } } -func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(out *jwriter.Writer, in Client) { +func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo33(out *jwriter.Writer, in Client) { out.RawByte('{') first := true _ = first @@ -4780,23 +4920,23 @@ func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(out *jwriter.Writ // MarshalJSON supports json.Marshaler interface func (v Client) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(&w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo33(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Client) MarshalEasyJSON(w *jwriter.Writer) { - easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(w, v) + easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo33(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Client) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(&r, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo33(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Client) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(l, v) + easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo33(l, v) }