8346 lines
192 KiB
Go
8346 lines
192 KiB
Go
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
|
|
|
package meilisearch
|
|
|
|
import (
|
|
json "encoding/json"
|
|
_v4 "github.com/golang-jwt/jwt/v4"
|
|
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 easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo(in *jlexer.Lexer, out *Version) {
|
|
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 "commitSha":
|
|
out.CommitSha = string(in.String())
|
|
case "commitDate":
|
|
out.CommitDate = string(in.String())
|
|
case "pkgVersion":
|
|
out.PkgVersion = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo(out *jwriter.Writer, in Version) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"commitSha\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.CommitSha))
|
|
}
|
|
{
|
|
const prefix string = ",\"commitDate\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.CommitDate))
|
|
}
|
|
{
|
|
const prefix string = ",\"pkgVersion\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.PkgVersion))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Version) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Version) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Version) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Version) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo1(in *jlexer.Lexer, out *UpdateIndexRequest) {
|
|
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 "primaryKey":
|
|
out.PrimaryKey = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo1(out *jwriter.Writer, in UpdateIndexRequest) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"primaryKey\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.PrimaryKey))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v UpdateIndexRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo1(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v UpdateIndexRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo1(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *UpdateIndexRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo1(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *UpdateIndexRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo1(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo2(in *jlexer.Lexer, out *UpdateDocumentByFunctionRequest) {
|
|
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 "filter":
|
|
out.Filter = string(in.String())
|
|
case "function":
|
|
out.Function = string(in.String())
|
|
case "context":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Context = make(map[string]interface{})
|
|
} else {
|
|
out.Context = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v1 interface{}
|
|
if m, ok := v1.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v1.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v1 = in.Interface()
|
|
}
|
|
(out.Context)[key] = v1
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo2(out *jwriter.Writer, in UpdateDocumentByFunctionRequest) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Filter != "" {
|
|
const prefix string = ",\"filter\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Filter))
|
|
}
|
|
{
|
|
const prefix string = ",\"function\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Function))
|
|
}
|
|
if len(in.Context) != 0 {
|
|
const prefix string = ",\"context\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('{')
|
|
v2First := true
|
|
for v2Name, v2Value := range in.Context {
|
|
if v2First {
|
|
v2First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v2Name))
|
|
out.RawByte(':')
|
|
if m, ok := v2Value.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v2Value.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v2Value))
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v UpdateDocumentByFunctionRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo2(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v UpdateDocumentByFunctionRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo2(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *UpdateDocumentByFunctionRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo2(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *UpdateDocumentByFunctionRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo2(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo3(in *jlexer.Lexer, out *TypoTolerance) {
|
|
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 "enabled":
|
|
out.Enabled = bool(in.Bool())
|
|
case "minWordSizeForTypos":
|
|
(out.MinWordSizeForTypos).UnmarshalEasyJSON(in)
|
|
case "disableOnWords":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.DisableOnWords = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.DisableOnWords == nil {
|
|
if !in.IsDelim(']') {
|
|
out.DisableOnWords = make([]string, 0, 4)
|
|
} else {
|
|
out.DisableOnWords = []string{}
|
|
}
|
|
} else {
|
|
out.DisableOnWords = (out.DisableOnWords)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v3 string
|
|
v3 = string(in.String())
|
|
out.DisableOnWords = append(out.DisableOnWords, v3)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "disableOnAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.DisableOnAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.DisableOnAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.DisableOnAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.DisableOnAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.DisableOnAttributes = (out.DisableOnAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v4 string
|
|
v4 = string(in.String())
|
|
out.DisableOnAttributes = append(out.DisableOnAttributes, v4)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo3(out *jwriter.Writer, in TypoTolerance) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"enabled\":"
|
|
out.RawString(prefix[1:])
|
|
out.Bool(bool(in.Enabled))
|
|
}
|
|
if true {
|
|
const prefix string = ",\"minWordSizeForTypos\":"
|
|
out.RawString(prefix)
|
|
(in.MinWordSizeForTypos).MarshalEasyJSON(out)
|
|
}
|
|
if len(in.DisableOnWords) != 0 {
|
|
const prefix string = ",\"disableOnWords\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v5, v6 := range in.DisableOnWords {
|
|
if v5 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v6))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.DisableOnAttributes) != 0 {
|
|
const prefix string = ",\"disableOnAttributes\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v7, v8 := range in.DisableOnAttributes {
|
|
if v7 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v8))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v TypoTolerance) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo3(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v TypoTolerance) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo3(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *TypoTolerance) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo3(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *TypoTolerance) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo3(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo4(in *jlexer.Lexer, out *TenantTokenOptions) {
|
|
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 "APIKey":
|
|
out.APIKey = string(in.String())
|
|
case "ExpiresAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.ExpiresAt).UnmarshalJSON(data))
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo4(out *jwriter.Writer, in TenantTokenOptions) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"APIKey\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.APIKey))
|
|
}
|
|
{
|
|
const prefix string = ",\"ExpiresAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.ExpiresAt).MarshalJSON())
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v TenantTokenOptions) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo4(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v TenantTokenOptions) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo4(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *TenantTokenOptions) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo4(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *TenantTokenOptions) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo4(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo5(in *jlexer.Lexer, out *TenantTokenClaims) {
|
|
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 "apiKeyUid":
|
|
out.APIKeyUID = string(in.String())
|
|
case "searchRules":
|
|
if m, ok := out.SearchRules.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := out.SearchRules.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
out.SearchRules = in.Interface()
|
|
}
|
|
case "iss":
|
|
out.Issuer = string(in.String())
|
|
case "sub":
|
|
out.Subject = string(in.String())
|
|
case "aud":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.Audience).UnmarshalJSON(data))
|
|
}
|
|
case "exp":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.ExpiresAt = nil
|
|
} else {
|
|
if out.ExpiresAt == nil {
|
|
out.ExpiresAt = new(_v4.NumericDate)
|
|
}
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((*out.ExpiresAt).UnmarshalJSON(data))
|
|
}
|
|
}
|
|
case "nbf":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.NotBefore = nil
|
|
} else {
|
|
if out.NotBefore == nil {
|
|
out.NotBefore = new(_v4.NumericDate)
|
|
}
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((*out.NotBefore).UnmarshalJSON(data))
|
|
}
|
|
}
|
|
case "iat":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.IssuedAt = nil
|
|
} else {
|
|
if out.IssuedAt == nil {
|
|
out.IssuedAt = new(_v4.NumericDate)
|
|
}
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((*out.IssuedAt).UnmarshalJSON(data))
|
|
}
|
|
}
|
|
case "jti":
|
|
out.ID = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo5(out *jwriter.Writer, in TenantTokenClaims) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"apiKeyUid\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.APIKeyUID))
|
|
}
|
|
{
|
|
const prefix string = ",\"searchRules\":"
|
|
out.RawString(prefix)
|
|
if m, ok := in.SearchRules.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := in.SearchRules.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(in.SearchRules))
|
|
}
|
|
}
|
|
if in.Issuer != "" {
|
|
const prefix string = ",\"iss\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Issuer))
|
|
}
|
|
if in.Subject != "" {
|
|
const prefix string = ",\"sub\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Subject))
|
|
}
|
|
if len(in.Audience) != 0 {
|
|
const prefix string = ",\"aud\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.Audience).MarshalJSON())
|
|
}
|
|
if in.ExpiresAt != nil {
|
|
const prefix string = ",\"exp\":"
|
|
out.RawString(prefix)
|
|
out.Raw((*in.ExpiresAt).MarshalJSON())
|
|
}
|
|
if in.NotBefore != nil {
|
|
const prefix string = ",\"nbf\":"
|
|
out.RawString(prefix)
|
|
out.Raw((*in.NotBefore).MarshalJSON())
|
|
}
|
|
if in.IssuedAt != nil {
|
|
const prefix string = ",\"iat\":"
|
|
out.RawString(prefix)
|
|
out.Raw((*in.IssuedAt).MarshalJSON())
|
|
}
|
|
if in.ID != "" {
|
|
const prefix string = ",\"jti\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.ID))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v TenantTokenClaims) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo5(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v TenantTokenClaims) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo5(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *TenantTokenClaims) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo5(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *TenantTokenClaims) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo5(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo6(in *jlexer.Lexer, out *TasksQuery) {
|
|
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 "UIDS":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.UIDS = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.UIDS == nil {
|
|
if !in.IsDelim(']') {
|
|
out.UIDS = make([]int64, 0, 8)
|
|
} else {
|
|
out.UIDS = []int64{}
|
|
}
|
|
} else {
|
|
out.UIDS = (out.UIDS)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v9 int64
|
|
v9 = int64(in.Int64())
|
|
out.UIDS = append(out.UIDS, v9)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "From":
|
|
out.From = int64(in.Int64())
|
|
case "IndexUIDS":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.IndexUIDS = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.IndexUIDS == nil {
|
|
if !in.IsDelim(']') {
|
|
out.IndexUIDS = make([]string, 0, 4)
|
|
} else {
|
|
out.IndexUIDS = []string{}
|
|
}
|
|
} else {
|
|
out.IndexUIDS = (out.IndexUIDS)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v10 string
|
|
v10 = string(in.String())
|
|
out.IndexUIDS = append(out.IndexUIDS, v10)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Statuses":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Statuses = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Statuses == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Statuses = make([]TaskStatus, 0, 4)
|
|
} else {
|
|
out.Statuses = []TaskStatus{}
|
|
}
|
|
} else {
|
|
out.Statuses = (out.Statuses)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v11 TaskStatus
|
|
v11 = TaskStatus(in.String())
|
|
out.Statuses = append(out.Statuses, v11)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Types":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Types = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Types == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Types = make([]TaskType, 0, 4)
|
|
} else {
|
|
out.Types = []TaskType{}
|
|
}
|
|
} else {
|
|
out.Types = (out.Types)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v12 TaskType
|
|
v12 = TaskType(in.String())
|
|
out.Types = append(out.Types, v12)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "CanceledBy":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.CanceledBy = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.CanceledBy == nil {
|
|
if !in.IsDelim(']') {
|
|
out.CanceledBy = make([]int64, 0, 8)
|
|
} else {
|
|
out.CanceledBy = []int64{}
|
|
}
|
|
} else {
|
|
out.CanceledBy = (out.CanceledBy)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v13 int64
|
|
v13 = int64(in.Int64())
|
|
out.CanceledBy = append(out.CanceledBy, v13)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "BeforeEnqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeEnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterEnqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterEnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "BeforeStartedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeStartedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterStartedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterStartedAt).UnmarshalJSON(data))
|
|
}
|
|
case "BeforeFinishedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeFinishedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterFinishedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterFinishedAt).UnmarshalJSON(data))
|
|
}
|
|
case "Reverse":
|
|
out.Reverse = bool(in.Bool())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo6(out *jwriter.Writer, in TasksQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"UIDS\":"
|
|
out.RawString(prefix[1:])
|
|
if in.UIDS == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v14, v15 := range in.UIDS {
|
|
if v14 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Int64(int64(v15))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"From\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.From))
|
|
}
|
|
{
|
|
const prefix string = ",\"IndexUIDS\":"
|
|
out.RawString(prefix)
|
|
if in.IndexUIDS == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v16, v17 := range in.IndexUIDS {
|
|
if v16 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v17))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Statuses\":"
|
|
out.RawString(prefix)
|
|
if in.Statuses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v18, v19 := range in.Statuses {
|
|
if v18 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v19))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Types\":"
|
|
out.RawString(prefix)
|
|
if in.Types == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v20, v21 := range in.Types {
|
|
if v20 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v21))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"CanceledBy\":"
|
|
out.RawString(prefix)
|
|
if in.CanceledBy == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v22, v23 := range in.CanceledBy {
|
|
if v22 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Int64(int64(v23))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeEnqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeEnqueuedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterEnqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterEnqueuedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeStartedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeStartedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterStartedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterStartedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeFinishedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeFinishedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterFinishedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterFinishedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"Reverse\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.Reverse))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v TasksQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo6(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v TasksQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo6(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *TasksQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo6(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *TasksQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo6(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo7(in *jlexer.Lexer, out *TaskResult) {
|
|
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 "results":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Results = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Results == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Results = make([]Task, 0, 0)
|
|
} else {
|
|
out.Results = []Task{}
|
|
}
|
|
} else {
|
|
out.Results = (out.Results)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v24 Task
|
|
(v24).UnmarshalEasyJSON(in)
|
|
out.Results = append(out.Results, v24)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "from":
|
|
out.From = int64(in.Int64())
|
|
case "next":
|
|
out.Next = int64(in.Int64())
|
|
case "total":
|
|
out.Total = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo7(out *jwriter.Writer, in TaskResult) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"results\":"
|
|
out.RawString(prefix[1:])
|
|
if in.Results == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v25, v26 := range in.Results {
|
|
if v25 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
(v26).MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"from\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.From))
|
|
}
|
|
{
|
|
const prefix string = ",\"next\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Next))
|
|
}
|
|
{
|
|
const prefix string = ",\"total\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Total))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v TaskResult) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo7(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v TaskResult) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo7(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *TaskResult) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo7(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *TaskResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo7(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo8(in *jlexer.Lexer, out *TaskInfo) {
|
|
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 "status":
|
|
out.Status = TaskStatus(in.String())
|
|
case "taskUid":
|
|
out.TaskUID = int64(in.Int64())
|
|
case "indexUid":
|
|
out.IndexUID = string(in.String())
|
|
case "type":
|
|
out.Type = TaskType(in.String())
|
|
case "enqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.EnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo8(out *jwriter.Writer, in TaskInfo) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"status\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Status))
|
|
}
|
|
{
|
|
const prefix string = ",\"taskUid\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.TaskUID))
|
|
}
|
|
{
|
|
const prefix string = ",\"indexUid\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.IndexUID))
|
|
}
|
|
{
|
|
const prefix string = ",\"type\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Type))
|
|
}
|
|
{
|
|
const prefix string = ",\"enqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.EnqueuedAt).MarshalJSON())
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v TaskInfo) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo8(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v TaskInfo) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo8(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *TaskInfo) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo8(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *TaskInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo8(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo9(in *jlexer.Lexer, out *Task) {
|
|
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 "status":
|
|
out.Status = TaskStatus(in.String())
|
|
case "uid":
|
|
out.UID = int64(in.Int64())
|
|
case "taskUid":
|
|
out.TaskUID = int64(in.Int64())
|
|
case "indexUid":
|
|
out.IndexUID = string(in.String())
|
|
case "type":
|
|
out.Type = TaskType(in.String())
|
|
case "error":
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(in, &out.Error)
|
|
case "duration":
|
|
out.Duration = string(in.String())
|
|
case "enqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.EnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "startedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.StartedAt).UnmarshalJSON(data))
|
|
}
|
|
case "finishedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.FinishedAt).UnmarshalJSON(data))
|
|
}
|
|
case "details":
|
|
(out.Details).UnmarshalEasyJSON(in)
|
|
case "canceledBy":
|
|
out.CanceledBy = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo9(out *jwriter.Writer, in Task) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"status\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Status))
|
|
}
|
|
if in.UID != 0 {
|
|
const prefix string = ",\"uid\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.UID))
|
|
}
|
|
if in.TaskUID != 0 {
|
|
const prefix string = ",\"taskUid\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.TaskUID))
|
|
}
|
|
{
|
|
const prefix string = ",\"indexUid\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.IndexUID))
|
|
}
|
|
{
|
|
const prefix string = ",\"type\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Type))
|
|
}
|
|
if true {
|
|
const prefix string = ",\"error\":"
|
|
out.RawString(prefix)
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(out, in.Error)
|
|
}
|
|
if in.Duration != "" {
|
|
const prefix string = ",\"duration\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Duration))
|
|
}
|
|
{
|
|
const prefix string = ",\"enqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.EnqueuedAt).MarshalJSON())
|
|
}
|
|
if true {
|
|
const prefix string = ",\"startedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.StartedAt).MarshalJSON())
|
|
}
|
|
if true {
|
|
const prefix string = ",\"finishedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.FinishedAt).MarshalJSON())
|
|
}
|
|
if true {
|
|
const prefix string = ",\"details\":"
|
|
out.RawString(prefix)
|
|
(in.Details).MarshalEasyJSON(out)
|
|
}
|
|
if in.CanceledBy != 0 {
|
|
const prefix string = ",\"canceledBy\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.CanceledBy))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Task) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo9(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Task) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo9(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Task) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo9(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Task) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo9(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo10(in *jlexer.Lexer, out *meilisearchApiError) {
|
|
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 "message":
|
|
out.Message = string(in.String())
|
|
case "code":
|
|
out.Code = string(in.String())
|
|
case "type":
|
|
out.Type = string(in.String())
|
|
case "link":
|
|
out.Link = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo10(out *jwriter.Writer, in meilisearchApiError) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"message\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Message))
|
|
}
|
|
{
|
|
const prefix string = ",\"code\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Code))
|
|
}
|
|
{
|
|
const prefix string = ",\"type\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Type))
|
|
}
|
|
{
|
|
const prefix string = ",\"link\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Link))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(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 v27 string
|
|
v27 = string(in.String())
|
|
out.Indexes = append(out.Indexes, v27)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(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 v28, v29 := range in.Indexes {
|
|
if v28 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v29))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SwapIndexesParams) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SwapIndexesParams) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo11(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SwapIndexesParams) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SwapIndexesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo11(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(in *jlexer.Lexer, out *StatsIndex) {
|
|
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 "numberOfDocuments":
|
|
out.NumberOfDocuments = int64(in.Int64())
|
|
case "isIndexing":
|
|
out.IsIndexing = bool(in.Bool())
|
|
case "fieldDistribution":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
out.FieldDistribution = make(map[string]int64)
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v30 int64
|
|
v30 = int64(in.Int64())
|
|
(out.FieldDistribution)[key] = v30
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
case "rawDocumentDbSize":
|
|
out.RawDocumentDbSize = int64(in.Int64())
|
|
case "avgDocumentSize":
|
|
out.AvgDocumentSize = int64(in.Int64())
|
|
case "numberOfEmbeddedDocuments":
|
|
out.NumberOfEmbeddedDocuments = int64(in.Int64())
|
|
case "numberOfEmbeddings":
|
|
out.NumberOfEmbeddings = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(out *jwriter.Writer, in StatsIndex) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"numberOfDocuments\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.NumberOfDocuments))
|
|
}
|
|
{
|
|
const prefix string = ",\"isIndexing\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.IsIndexing))
|
|
}
|
|
{
|
|
const prefix string = ",\"fieldDistribution\":"
|
|
out.RawString(prefix)
|
|
if in.FieldDistribution == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
|
|
out.RawString(`null`)
|
|
} else {
|
|
out.RawByte('{')
|
|
v31First := true
|
|
for v31Name, v31Value := range in.FieldDistribution {
|
|
if v31First {
|
|
v31First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v31Name))
|
|
out.RawByte(':')
|
|
out.Int64(int64(v31Value))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"rawDocumentDbSize\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.RawDocumentDbSize))
|
|
}
|
|
{
|
|
const prefix string = ",\"avgDocumentSize\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.AvgDocumentSize))
|
|
}
|
|
{
|
|
const prefix string = ",\"numberOfEmbeddedDocuments\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.NumberOfEmbeddedDocuments))
|
|
}
|
|
{
|
|
const prefix string = ",\"numberOfEmbeddings\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.NumberOfEmbeddings))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v StatsIndex) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v StatsIndex) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo12(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *StatsIndex) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *StatsIndex) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo12(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(in *jlexer.Lexer, out *Stats) {
|
|
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 "databaseSize":
|
|
out.DatabaseSize = int64(in.Int64())
|
|
case "usedDatabaseSize":
|
|
out.UsedDatabaseSize = int64(in.Int64())
|
|
case "lastUpdate":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.LastUpdate).UnmarshalJSON(data))
|
|
}
|
|
case "indexes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
out.Indexes = make(map[string]StatsIndex)
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v32 StatsIndex
|
|
(v32).UnmarshalEasyJSON(in)
|
|
(out.Indexes)[key] = v32
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(out *jwriter.Writer, in Stats) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"databaseSize\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.DatabaseSize))
|
|
}
|
|
{
|
|
const prefix string = ",\"usedDatabaseSize\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.UsedDatabaseSize))
|
|
}
|
|
{
|
|
const prefix string = ",\"lastUpdate\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.LastUpdate).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"indexes\":"
|
|
out.RawString(prefix)
|
|
if in.Indexes == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
|
|
out.RawString(`null`)
|
|
} else {
|
|
out.RawByte('{')
|
|
v33First := true
|
|
for v33Name, v33Value := range in.Indexes {
|
|
if v33First {
|
|
v33First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v33Name))
|
|
out.RawByte(':')
|
|
(v33Value).MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Stats) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Stats) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo13(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Stats) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Stats) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo13(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(in *jlexer.Lexer, out *SimilarDocumentResult) {
|
|
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([]interface{}, 0, 4)
|
|
} else {
|
|
out.Hits = []interface{}{}
|
|
}
|
|
} else {
|
|
out.Hits = (out.Hits)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v34 interface{}
|
|
if m, ok := v34.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v34.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v34 = in.Interface()
|
|
}
|
|
out.Hits = append(out.Hits, v34)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "id":
|
|
out.ID = string(in.String())
|
|
case "processingTimeMs":
|
|
out.ProcessingTimeMS = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "estimatedTotalHits":
|
|
out.EstimatedTotalHits = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(out *jwriter.Writer, in SimilarDocumentResult) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if len(in.Hits) != 0 {
|
|
const prefix string = ",\"hits\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
{
|
|
out.RawByte('[')
|
|
for v35, v36 := range in.Hits {
|
|
if v35 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if m, ok := v36.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v36.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v36))
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.ID != "" {
|
|
const prefix string = ",\"id\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.ID))
|
|
}
|
|
if in.ProcessingTimeMS != 0 {
|
|
const prefix string = ",\"processingTimeMs\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.ProcessingTimeMS))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.EstimatedTotalHits != 0 {
|
|
const prefix string = ",\"estimatedTotalHits\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.EstimatedTotalHits))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SimilarDocumentResult) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SimilarDocumentResult) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo14(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SimilarDocumentResult) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SimilarDocumentResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo14(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(in *jlexer.Lexer, out *SimilarDocumentQuery) {
|
|
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":
|
|
if m, ok := out.Id.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := out.Id.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
out.Id = in.Interface()
|
|
}
|
|
case "embedder":
|
|
out.Embedder = string(in.String())
|
|
case "attributesToRetrieve":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributesToRetrieve = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributesToRetrieve == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributesToRetrieve = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributesToRetrieve = []string{}
|
|
}
|
|
} else {
|
|
out.AttributesToRetrieve = (out.AttributesToRetrieve)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v37 string
|
|
v37 = string(in.String())
|
|
out.AttributesToRetrieve = append(out.AttributesToRetrieve, v37)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "filter":
|
|
out.Filter = string(in.String())
|
|
case "showRankingScore":
|
|
out.ShowRankingScore = bool(in.Bool())
|
|
case "showRankingScoreDetails":
|
|
out.ShowRankingScoreDetails = bool(in.Bool())
|
|
case "rankingScoreThreshold":
|
|
out.RankingScoreThreshold = float64(in.Float64())
|
|
case "retrieveVectors":
|
|
out.RetrieveVectors = bool(in.Bool())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(out *jwriter.Writer, in SimilarDocumentQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Id != nil {
|
|
const prefix string = ",\"id\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
if m, ok := in.Id.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := in.Id.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(in.Id))
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"embedder\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Embedder))
|
|
}
|
|
if len(in.AttributesToRetrieve) != 0 {
|
|
const prefix string = ",\"attributesToRetrieve\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v38, v39 := range in.AttributesToRetrieve {
|
|
if v38 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v39))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
if in.Filter != "" {
|
|
const prefix string = ",\"filter\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Filter))
|
|
}
|
|
if in.ShowRankingScore {
|
|
const prefix string = ",\"showRankingScore\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.ShowRankingScore))
|
|
}
|
|
if in.ShowRankingScoreDetails {
|
|
const prefix string = ",\"showRankingScoreDetails\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.ShowRankingScoreDetails))
|
|
}
|
|
if in.RankingScoreThreshold != 0 {
|
|
const prefix string = ",\"rankingScoreThreshold\":"
|
|
out.RawString(prefix)
|
|
out.Float64(float64(in.RankingScoreThreshold))
|
|
}
|
|
if in.RetrieveVectors {
|
|
const prefix string = ",\"retrieveVectors\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.RetrieveVectors))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SimilarDocumentQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SimilarDocumentQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo15(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SimilarDocumentQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SimilarDocumentQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo15(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(in *jlexer.Lexer, out *Settings) {
|
|
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 "rankingRules":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.RankingRules = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.RankingRules == nil {
|
|
if !in.IsDelim(']') {
|
|
out.RankingRules = make([]string, 0, 4)
|
|
} else {
|
|
out.RankingRules = []string{}
|
|
}
|
|
} else {
|
|
out.RankingRules = (out.RankingRules)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v40 string
|
|
v40 = string(in.String())
|
|
out.RankingRules = append(out.RankingRules, v40)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "distinctAttribute":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.DistinctAttribute = nil
|
|
} else {
|
|
if out.DistinctAttribute == nil {
|
|
out.DistinctAttribute = new(string)
|
|
}
|
|
*out.DistinctAttribute = string(in.String())
|
|
}
|
|
case "searchableAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.SearchableAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.SearchableAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.SearchableAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.SearchableAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.SearchableAttributes = (out.SearchableAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v41 string
|
|
v41 = string(in.String())
|
|
out.SearchableAttributes = append(out.SearchableAttributes, v41)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "dictionary":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Dictionary = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Dictionary == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Dictionary = make([]string, 0, 4)
|
|
} else {
|
|
out.Dictionary = []string{}
|
|
}
|
|
} else {
|
|
out.Dictionary = (out.Dictionary)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v42 string
|
|
v42 = string(in.String())
|
|
out.Dictionary = append(out.Dictionary, v42)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "searchCutoffMs":
|
|
out.SearchCutoffMs = int64(in.Int64())
|
|
case "proximityPrecision":
|
|
out.ProximityPrecision = ProximityPrecisionType(in.String())
|
|
case "separatorTokens":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.SeparatorTokens = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.SeparatorTokens == nil {
|
|
if !in.IsDelim(']') {
|
|
out.SeparatorTokens = make([]string, 0, 4)
|
|
} else {
|
|
out.SeparatorTokens = []string{}
|
|
}
|
|
} else {
|
|
out.SeparatorTokens = (out.SeparatorTokens)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v43 string
|
|
v43 = string(in.String())
|
|
out.SeparatorTokens = append(out.SeparatorTokens, v43)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "nonSeparatorTokens":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.NonSeparatorTokens = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.NonSeparatorTokens == nil {
|
|
if !in.IsDelim(']') {
|
|
out.NonSeparatorTokens = make([]string, 0, 4)
|
|
} else {
|
|
out.NonSeparatorTokens = []string{}
|
|
}
|
|
} else {
|
|
out.NonSeparatorTokens = (out.NonSeparatorTokens)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v44 string
|
|
v44 = string(in.String())
|
|
out.NonSeparatorTokens = append(out.NonSeparatorTokens, v44)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "displayedAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.DisplayedAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.DisplayedAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.DisplayedAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.DisplayedAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.DisplayedAttributes = (out.DisplayedAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v45 string
|
|
v45 = string(in.String())
|
|
out.DisplayedAttributes = append(out.DisplayedAttributes, v45)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "stopWords":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.StopWords = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.StopWords == nil {
|
|
if !in.IsDelim(']') {
|
|
out.StopWords = make([]string, 0, 4)
|
|
} else {
|
|
out.StopWords = []string{}
|
|
}
|
|
} else {
|
|
out.StopWords = (out.StopWords)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v46 string
|
|
v46 = string(in.String())
|
|
out.StopWords = append(out.StopWords, v46)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "synonyms":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Synonyms = make(map[string][]string)
|
|
} else {
|
|
out.Synonyms = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v47 []string
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
v47 = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if v47 == nil {
|
|
if !in.IsDelim(']') {
|
|
v47 = make([]string, 0, 4)
|
|
} else {
|
|
v47 = []string{}
|
|
}
|
|
} else {
|
|
v47 = (v47)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v48 string
|
|
v48 = string(in.String())
|
|
v47 = append(v47, v48)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
(out.Synonyms)[key] = v47
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
case "filterableAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.FilterableAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.FilterableAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.FilterableAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.FilterableAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.FilterableAttributes = (out.FilterableAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v49 string
|
|
v49 = string(in.String())
|
|
out.FilterableAttributes = append(out.FilterableAttributes, v49)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "sortableAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.SortableAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.SortableAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.SortableAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.SortableAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.SortableAttributes = (out.SortableAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v50 string
|
|
v50 = string(in.String())
|
|
out.SortableAttributes = append(out.SortableAttributes, v50)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "localizedAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.LocalizedAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.LocalizedAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.LocalizedAttributes = make([]*LocalizedAttributes, 0, 8)
|
|
} else {
|
|
out.LocalizedAttributes = []*LocalizedAttributes{}
|
|
}
|
|
} else {
|
|
out.LocalizedAttributes = (out.LocalizedAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v51 *LocalizedAttributes
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
v51 = nil
|
|
} else {
|
|
if v51 == nil {
|
|
v51 = new(LocalizedAttributes)
|
|
}
|
|
(*v51).UnmarshalEasyJSON(in)
|
|
}
|
|
out.LocalizedAttributes = append(out.LocalizedAttributes, v51)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "typoTolerance":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.TypoTolerance = nil
|
|
} else {
|
|
if out.TypoTolerance == nil {
|
|
out.TypoTolerance = new(TypoTolerance)
|
|
}
|
|
(*out.TypoTolerance).UnmarshalEasyJSON(in)
|
|
}
|
|
case "pagination":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Pagination = nil
|
|
} else {
|
|
if out.Pagination == nil {
|
|
out.Pagination = new(Pagination)
|
|
}
|
|
(*out.Pagination).UnmarshalEasyJSON(in)
|
|
}
|
|
case "faceting":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Faceting = nil
|
|
} else {
|
|
if out.Faceting == nil {
|
|
out.Faceting = new(Faceting)
|
|
}
|
|
(*out.Faceting).UnmarshalEasyJSON(in)
|
|
}
|
|
case "embedders":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Embedders = make(map[string]Embedder)
|
|
} else {
|
|
out.Embedders = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v52 Embedder
|
|
(v52).UnmarshalEasyJSON(in)
|
|
(out.Embedders)[key] = v52
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
case "prefixSearch":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.PrefixSearch = nil
|
|
} else {
|
|
if out.PrefixSearch == nil {
|
|
out.PrefixSearch = new(string)
|
|
}
|
|
*out.PrefixSearch = string(in.String())
|
|
}
|
|
case "facetSearch":
|
|
out.FacetSearch = bool(in.Bool())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(out *jwriter.Writer, in Settings) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if len(in.RankingRules) != 0 {
|
|
const prefix string = ",\"rankingRules\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
{
|
|
out.RawByte('[')
|
|
for v53, v54 := range in.RankingRules {
|
|
if v53 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v54))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.DistinctAttribute != nil {
|
|
const prefix string = ",\"distinctAttribute\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(*in.DistinctAttribute))
|
|
}
|
|
if len(in.SearchableAttributes) != 0 {
|
|
const prefix string = ",\"searchableAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v55, v56 := range in.SearchableAttributes {
|
|
if v55 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v56))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Dictionary) != 0 {
|
|
const prefix string = ",\"dictionary\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v57, v58 := range in.Dictionary {
|
|
if v57 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v58))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.SearchCutoffMs != 0 {
|
|
const prefix string = ",\"searchCutoffMs\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.SearchCutoffMs))
|
|
}
|
|
if in.ProximityPrecision != "" {
|
|
const prefix string = ",\"proximityPrecision\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.ProximityPrecision))
|
|
}
|
|
if len(in.SeparatorTokens) != 0 {
|
|
const prefix string = ",\"separatorTokens\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v59, v60 := range in.SeparatorTokens {
|
|
if v59 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v60))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.NonSeparatorTokens) != 0 {
|
|
const prefix string = ",\"nonSeparatorTokens\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v61, v62 := range in.NonSeparatorTokens {
|
|
if v61 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v62))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.DisplayedAttributes) != 0 {
|
|
const prefix string = ",\"displayedAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v63, v64 := range in.DisplayedAttributes {
|
|
if v63 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v64))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.StopWords) != 0 {
|
|
const prefix string = ",\"stopWords\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v65, v66 := range in.StopWords {
|
|
if v65 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v66))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Synonyms) != 0 {
|
|
const prefix string = ",\"synonyms\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('{')
|
|
v67First := true
|
|
for v67Name, v67Value := range in.Synonyms {
|
|
if v67First {
|
|
v67First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v67Name))
|
|
out.RawByte(':')
|
|
if v67Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v68, v69 := range v67Value {
|
|
if v68 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v69))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
if len(in.FilterableAttributes) != 0 {
|
|
const prefix string = ",\"filterableAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v70, v71 := range in.FilterableAttributes {
|
|
if v70 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v71))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.SortableAttributes) != 0 {
|
|
const prefix string = ",\"sortableAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v72, v73 := range in.SortableAttributes {
|
|
if v72 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v73))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.LocalizedAttributes) != 0 {
|
|
const prefix string = ",\"localizedAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v74, v75 := range in.LocalizedAttributes {
|
|
if v74 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if v75 == nil {
|
|
out.RawString("null")
|
|
} else {
|
|
(*v75).MarshalEasyJSON(out)
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.TypoTolerance != nil {
|
|
const prefix string = ",\"typoTolerance\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
(*in.TypoTolerance).MarshalEasyJSON(out)
|
|
}
|
|
if in.Pagination != nil {
|
|
const prefix string = ",\"pagination\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
(*in.Pagination).MarshalEasyJSON(out)
|
|
}
|
|
if in.Faceting != nil {
|
|
const prefix string = ",\"faceting\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
(*in.Faceting).MarshalEasyJSON(out)
|
|
}
|
|
if len(in.Embedders) != 0 {
|
|
const prefix string = ",\"embedders\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('{')
|
|
v76First := true
|
|
for v76Name, v76Value := range in.Embedders {
|
|
if v76First {
|
|
v76First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v76Name))
|
|
out.RawByte(':')
|
|
(v76Value).MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
if in.PrefixSearch != nil {
|
|
const prefix string = ",\"prefixSearch\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(*in.PrefixSearch))
|
|
}
|
|
if in.FacetSearch {
|
|
const prefix string = ",\"facetSearch\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(in.FacetSearch))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Settings) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Settings) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo16(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Settings) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Settings) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo16(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(in *jlexer.Lexer, out *SearchResponse) {
|
|
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([]interface{}, 0, 4)
|
|
} else {
|
|
out.Hits = []interface{}{}
|
|
}
|
|
} else {
|
|
out.Hits = (out.Hits)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v77 interface{}
|
|
if m, ok := v77.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v77.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v77 = in.Interface()
|
|
}
|
|
out.Hits = append(out.Hits, v77)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "estimatedTotalHits":
|
|
out.EstimatedTotalHits = int64(in.Int64())
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "processingTimeMs":
|
|
out.ProcessingTimeMs = int64(in.Int64())
|
|
case "query":
|
|
out.Query = string(in.String())
|
|
case "facetDistribution":
|
|
if m, ok := out.FacetDistribution.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := out.FacetDistribution.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
out.FacetDistribution = in.Interface()
|
|
}
|
|
case "totalHits":
|
|
out.TotalHits = int64(in.Int64())
|
|
case "hitsPerPage":
|
|
out.HitsPerPage = int64(in.Int64())
|
|
case "page":
|
|
out.Page = int64(in.Int64())
|
|
case "totalPages":
|
|
out.TotalPages = int64(in.Int64())
|
|
case "facetStats":
|
|
if m, ok := out.FacetStats.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := out.FacetStats.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
out.FacetStats = in.Interface()
|
|
}
|
|
case "indexUid":
|
|
out.IndexUID = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(out *jwriter.Writer, in SearchResponse) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"hits\":"
|
|
out.RawString(prefix[1:])
|
|
if in.Hits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v78, v79 := range in.Hits {
|
|
if v78 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if m, ok := v79.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v79.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v79))
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.EstimatedTotalHits != 0 {
|
|
const prefix string = ",\"estimatedTotalHits\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.EstimatedTotalHits))
|
|
}
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"processingTimeMs\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.ProcessingTimeMs))
|
|
}
|
|
{
|
|
const prefix string = ",\"query\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Query))
|
|
}
|
|
if in.FacetDistribution != nil {
|
|
const prefix string = ",\"facetDistribution\":"
|
|
out.RawString(prefix)
|
|
if m, ok := in.FacetDistribution.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := in.FacetDistribution.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(in.FacetDistribution))
|
|
}
|
|
}
|
|
if in.TotalHits != 0 {
|
|
const prefix string = ",\"totalHits\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.TotalHits))
|
|
}
|
|
if in.HitsPerPage != 0 {
|
|
const prefix string = ",\"hitsPerPage\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.HitsPerPage))
|
|
}
|
|
if in.Page != 0 {
|
|
const prefix string = ",\"page\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Page))
|
|
}
|
|
if in.TotalPages != 0 {
|
|
const prefix string = ",\"totalPages\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.TotalPages))
|
|
}
|
|
if in.FacetStats != nil {
|
|
const prefix string = ",\"facetStats\":"
|
|
out.RawString(prefix)
|
|
if m, ok := in.FacetStats.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := in.FacetStats.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(in.FacetStats))
|
|
}
|
|
}
|
|
if in.IndexUID != "" {
|
|
const prefix string = ",\"indexUid\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.IndexUID))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SearchResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SearchResponse) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo17(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SearchResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SearchResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo17(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(in *jlexer.Lexer, out *SearchRequestHybrid) {
|
|
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 "semanticRatio":
|
|
out.SemanticRatio = float64(in.Float64())
|
|
case "embedder":
|
|
out.Embedder = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(out *jwriter.Writer, in SearchRequestHybrid) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.SemanticRatio != 0 {
|
|
const prefix string = ",\"semanticRatio\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Float64(float64(in.SemanticRatio))
|
|
}
|
|
{
|
|
const prefix string = ",\"embedder\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Embedder))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SearchRequestHybrid) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SearchRequestHybrid) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo18(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SearchRequestHybrid) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SearchRequestHybrid) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo18(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(in *jlexer.Lexer, out *SearchRequest) {
|
|
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 "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "attributesToRetrieve":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributesToRetrieve = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributesToRetrieve == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributesToRetrieve = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributesToRetrieve = []string{}
|
|
}
|
|
} else {
|
|
out.AttributesToRetrieve = (out.AttributesToRetrieve)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v80 string
|
|
v80 = string(in.String())
|
|
out.AttributesToRetrieve = append(out.AttributesToRetrieve, v80)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "attributesToSearchOn":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributesToSearchOn = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributesToSearchOn == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributesToSearchOn = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributesToSearchOn = []string{}
|
|
}
|
|
} else {
|
|
out.AttributesToSearchOn = (out.AttributesToSearchOn)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v81 string
|
|
v81 = string(in.String())
|
|
out.AttributesToSearchOn = append(out.AttributesToSearchOn, v81)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "attributesToCrop":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributesToCrop = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributesToCrop == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributesToCrop = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributesToCrop = []string{}
|
|
}
|
|
} else {
|
|
out.AttributesToCrop = (out.AttributesToCrop)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v82 string
|
|
v82 = string(in.String())
|
|
out.AttributesToCrop = append(out.AttributesToCrop, v82)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "cropLength":
|
|
out.CropLength = int64(in.Int64())
|
|
case "cropMarker":
|
|
out.CropMarker = string(in.String())
|
|
case "attributesToHighlight":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributesToHighlight = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributesToHighlight == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributesToHighlight = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributesToHighlight = []string{}
|
|
}
|
|
} else {
|
|
out.AttributesToHighlight = (out.AttributesToHighlight)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v83 string
|
|
v83 = string(in.String())
|
|
out.AttributesToHighlight = append(out.AttributesToHighlight, v83)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "highlightPreTag":
|
|
out.HighlightPreTag = string(in.String())
|
|
case "highlightPostTag":
|
|
out.HighlightPostTag = string(in.String())
|
|
case "matchingStrategy":
|
|
out.MatchingStrategy = MatchingStrategy(in.String())
|
|
case "filter":
|
|
if m, ok := out.Filter.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := out.Filter.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
out.Filter = in.Interface()
|
|
}
|
|
case "showMatchesPosition":
|
|
out.ShowMatchesPosition = bool(in.Bool())
|
|
case "showRankingScore":
|
|
out.ShowRankingScore = bool(in.Bool())
|
|
case "showRankingScoreDetails":
|
|
out.ShowRankingScoreDetails = bool(in.Bool())
|
|
case "facets":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Facets = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Facets == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Facets = make([]string, 0, 4)
|
|
} else {
|
|
out.Facets = []string{}
|
|
}
|
|
} else {
|
|
out.Facets = (out.Facets)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v84 string
|
|
v84 = string(in.String())
|
|
out.Facets = append(out.Facets, v84)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "sort":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Sort = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Sort == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Sort = make([]string, 0, 4)
|
|
} else {
|
|
out.Sort = []string{}
|
|
}
|
|
} else {
|
|
out.Sort = (out.Sort)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v85 string
|
|
v85 = string(in.String())
|
|
out.Sort = append(out.Sort, v85)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "vector":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Vector = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Vector == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Vector = make([]float32, 0, 16)
|
|
} else {
|
|
out.Vector = []float32{}
|
|
}
|
|
} else {
|
|
out.Vector = (out.Vector)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v86 float32
|
|
v86 = float32(in.Float32())
|
|
out.Vector = append(out.Vector, v86)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "hitsPerPage":
|
|
out.HitsPerPage = int64(in.Int64())
|
|
case "page":
|
|
out.Page = int64(in.Int64())
|
|
case "indexUid":
|
|
out.IndexUID = string(in.String())
|
|
case "q":
|
|
out.Query = string(in.String())
|
|
case "distinct":
|
|
out.Distinct = string(in.String())
|
|
case "hybrid":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Hybrid = nil
|
|
} else {
|
|
if out.Hybrid == nil {
|
|
out.Hybrid = new(SearchRequestHybrid)
|
|
}
|
|
(*out.Hybrid).UnmarshalEasyJSON(in)
|
|
}
|
|
case "retrieveVectors":
|
|
out.RetrieveVectors = bool(in.Bool())
|
|
case "rankingScoreThreshold":
|
|
out.RankingScoreThreshold = float64(in.Float64())
|
|
case "federationOptions":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.FederationOptions = nil
|
|
} else {
|
|
if out.FederationOptions == nil {
|
|
out.FederationOptions = new(SearchFederationOptions)
|
|
}
|
|
(*out.FederationOptions).UnmarshalEasyJSON(in)
|
|
}
|
|
case "locales":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Locates = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Locates == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Locates = make([]string, 0, 4)
|
|
} else {
|
|
out.Locates = []string{}
|
|
}
|
|
} else {
|
|
out.Locates = (out.Locates)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v87 string
|
|
v87 = string(in.String())
|
|
out.Locates = append(out.Locates, v87)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(out *jwriter.Writer, in SearchRequest) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
if len(in.AttributesToRetrieve) != 0 {
|
|
const prefix string = ",\"attributesToRetrieve\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v88, v89 := range in.AttributesToRetrieve {
|
|
if v88 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v89))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.AttributesToSearchOn) != 0 {
|
|
const prefix string = ",\"attributesToSearchOn\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v90, v91 := range in.AttributesToSearchOn {
|
|
if v90 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v91))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.AttributesToCrop) != 0 {
|
|
const prefix string = ",\"attributesToCrop\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v92, v93 := range in.AttributesToCrop {
|
|
if v92 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v93))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.CropLength != 0 {
|
|
const prefix string = ",\"cropLength\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.CropLength))
|
|
}
|
|
if in.CropMarker != "" {
|
|
const prefix string = ",\"cropMarker\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.CropMarker))
|
|
}
|
|
if len(in.AttributesToHighlight) != 0 {
|
|
const prefix string = ",\"attributesToHighlight\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v94, v95 := range in.AttributesToHighlight {
|
|
if v94 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v95))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.HighlightPreTag != "" {
|
|
const prefix string = ",\"highlightPreTag\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.HighlightPreTag))
|
|
}
|
|
if in.HighlightPostTag != "" {
|
|
const prefix string = ",\"highlightPostTag\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.HighlightPostTag))
|
|
}
|
|
if in.MatchingStrategy != "" {
|
|
const prefix string = ",\"matchingStrategy\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.MatchingStrategy))
|
|
}
|
|
if in.Filter != nil {
|
|
const prefix string = ",\"filter\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
if m, ok := in.Filter.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := in.Filter.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(in.Filter))
|
|
}
|
|
}
|
|
if in.ShowMatchesPosition {
|
|
const prefix string = ",\"showMatchesPosition\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(in.ShowMatchesPosition))
|
|
}
|
|
if in.ShowRankingScore {
|
|
const prefix string = ",\"showRankingScore\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(in.ShowRankingScore))
|
|
}
|
|
if in.ShowRankingScoreDetails {
|
|
const prefix string = ",\"showRankingScoreDetails\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(in.ShowRankingScoreDetails))
|
|
}
|
|
if len(in.Facets) != 0 {
|
|
const prefix string = ",\"facets\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v96, v97 := range in.Facets {
|
|
if v96 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v97))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Sort) != 0 {
|
|
const prefix string = ",\"sort\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v98, v99 := range in.Sort {
|
|
if v98 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v99))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Vector) != 0 {
|
|
const prefix string = ",\"vector\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v100, v101 := range in.Vector {
|
|
if v100 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Float32(float32(v101))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.HitsPerPage != 0 {
|
|
const prefix string = ",\"hitsPerPage\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.HitsPerPage))
|
|
}
|
|
if in.Page != 0 {
|
|
const prefix string = ",\"page\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Page))
|
|
}
|
|
if in.IndexUID != "" {
|
|
const prefix string = ",\"indexUid\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.IndexUID))
|
|
}
|
|
{
|
|
const prefix string = ",\"q\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Query))
|
|
}
|
|
if in.Distinct != "" {
|
|
const prefix string = ",\"distinct\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Distinct))
|
|
}
|
|
{
|
|
const prefix string = ",\"hybrid\":"
|
|
out.RawString(prefix)
|
|
if in.Hybrid == nil {
|
|
out.RawString("null")
|
|
} else {
|
|
(*in.Hybrid).MarshalEasyJSON(out)
|
|
}
|
|
}
|
|
if in.RetrieveVectors {
|
|
const prefix string = ",\"retrieveVectors\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.RetrieveVectors))
|
|
}
|
|
if in.RankingScoreThreshold != 0 {
|
|
const prefix string = ",\"rankingScoreThreshold\":"
|
|
out.RawString(prefix)
|
|
out.Float64(float64(in.RankingScoreThreshold))
|
|
}
|
|
if in.FederationOptions != nil {
|
|
const prefix string = ",\"federationOptions\":"
|
|
out.RawString(prefix)
|
|
(*in.FederationOptions).MarshalEasyJSON(out)
|
|
}
|
|
if len(in.Locates) != 0 {
|
|
const prefix string = ",\"locales\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v102, v103 := range in.Locates {
|
|
if v102 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v103))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SearchRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SearchRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo19(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SearchRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SearchRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo19(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(in *jlexer.Lexer, out *SearchFederationOptions) {
|
|
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 "weight":
|
|
out.Weight = float64(in.Float64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(out *jwriter.Writer, in SearchFederationOptions) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"weight\":"
|
|
out.RawString(prefix[1:])
|
|
out.Float64(float64(in.Weight))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v SearchFederationOptions) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v SearchFederationOptions) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo20(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *SearchFederationOptions) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *SearchFederationOptions) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo20(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(in *jlexer.Lexer, out *Pagination) {
|
|
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 "maxTotalHits":
|
|
out.MaxTotalHits = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(out *jwriter.Writer, in Pagination) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"maxTotalHits\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.MaxTotalHits))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Pagination) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Pagination) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo21(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Pagination) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Pagination) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo21(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(in *jlexer.Lexer, out *MultiSearchResponse) {
|
|
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 "results":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Results = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Results == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Results = make([]SearchResponse, 0, 0)
|
|
} else {
|
|
out.Results = []SearchResponse{}
|
|
}
|
|
} else {
|
|
out.Results = (out.Results)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v104 SearchResponse
|
|
(v104).UnmarshalEasyJSON(in)
|
|
out.Results = append(out.Results, v104)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "hits":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Hits = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Hits == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Hits = make([]interface{}, 0, 4)
|
|
} else {
|
|
out.Hits = []interface{}{}
|
|
}
|
|
} else {
|
|
out.Hits = (out.Hits)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v105 interface{}
|
|
if m, ok := v105.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v105.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v105 = in.Interface()
|
|
}
|
|
out.Hits = append(out.Hits, v105)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "processingTimeMs":
|
|
out.ProcessingTimeMs = int64(in.Int64())
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "estimatedTotalHits":
|
|
out.EstimatedTotalHits = int64(in.Int64())
|
|
case "semanticHitCount":
|
|
out.SemanticHitCount = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(out *jwriter.Writer, in MultiSearchResponse) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if len(in.Results) != 0 {
|
|
const prefix string = ",\"results\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
{
|
|
out.RawByte('[')
|
|
for v106, v107 := range in.Results {
|
|
if v106 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
(v107).MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Hits) != 0 {
|
|
const prefix string = ",\"hits\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v108, v109 := range in.Hits {
|
|
if v108 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if m, ok := v109.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v109.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v109))
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.ProcessingTimeMs != 0 {
|
|
const prefix string = ",\"processingTimeMs\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.ProcessingTimeMs))
|
|
}
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
if in.EstimatedTotalHits != 0 {
|
|
const prefix string = ",\"estimatedTotalHits\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.EstimatedTotalHits))
|
|
}
|
|
if in.SemanticHitCount != 0 {
|
|
const prefix string = ",\"semanticHitCount\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.SemanticHitCount))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v MultiSearchResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v MultiSearchResponse) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo22(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *MultiSearchResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *MultiSearchResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo22(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(in *jlexer.Lexer, out *MultiSearchRequest) {
|
|
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 "federation":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Federation = nil
|
|
} else {
|
|
if out.Federation == nil {
|
|
out.Federation = new(MultiSearchFederation)
|
|
}
|
|
(*out.Federation).UnmarshalEasyJSON(in)
|
|
}
|
|
case "queries":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Queries = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Queries == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Queries = make([]*SearchRequest, 0, 8)
|
|
} else {
|
|
out.Queries = []*SearchRequest{}
|
|
}
|
|
} else {
|
|
out.Queries = (out.Queries)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v110 *SearchRequest
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
v110 = nil
|
|
} else {
|
|
if v110 == nil {
|
|
v110 = new(SearchRequest)
|
|
}
|
|
(*v110).UnmarshalEasyJSON(in)
|
|
}
|
|
out.Queries = append(out.Queries, v110)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(out *jwriter.Writer, in MultiSearchRequest) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Federation != nil {
|
|
const prefix string = ",\"federation\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
(*in.Federation).MarshalEasyJSON(out)
|
|
}
|
|
{
|
|
const prefix string = ",\"queries\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
if in.Queries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v111, v112 := range in.Queries {
|
|
if v111 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if v112 == nil {
|
|
out.RawString("null")
|
|
} else {
|
|
(*v112).MarshalEasyJSON(out)
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v MultiSearchRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v MultiSearchRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo23(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *MultiSearchRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *MultiSearchRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo23(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(in *jlexer.Lexer, out *MultiSearchFederation) {
|
|
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 "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(out *jwriter.Writer, in MultiSearchFederation) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v MultiSearchFederation) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v MultiSearchFederation) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo24(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *MultiSearchFederation) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *MultiSearchFederation) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo24(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(in *jlexer.Lexer, out *MinWordSizeForTypos) {
|
|
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 "oneTypo":
|
|
out.OneTypo = int64(in.Int64())
|
|
case "twoTypos":
|
|
out.TwoTypos = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(out *jwriter.Writer, in MinWordSizeForTypos) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.OneTypo != 0 {
|
|
const prefix string = ",\"oneTypo\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.OneTypo))
|
|
}
|
|
if in.TwoTypos != 0 {
|
|
const prefix string = ",\"twoTypos\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.TwoTypos))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v MinWordSizeForTypos) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v MinWordSizeForTypos) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo25(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *MinWordSizeForTypos) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *MinWordSizeForTypos) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo25(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(in *jlexer.Lexer, out *LocalizedAttributes) {
|
|
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 "locales":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Locales = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Locales == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Locales = make([]string, 0, 4)
|
|
} else {
|
|
out.Locales = []string{}
|
|
}
|
|
} else {
|
|
out.Locales = (out.Locales)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v113 string
|
|
v113 = string(in.String())
|
|
out.Locales = append(out.Locales, v113)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "attributePatterns":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributePatterns = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributePatterns == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributePatterns = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributePatterns = []string{}
|
|
}
|
|
} else {
|
|
out.AttributePatterns = (out.AttributePatterns)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v114 string
|
|
v114 = string(in.String())
|
|
out.AttributePatterns = append(out.AttributePatterns, v114)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(out *jwriter.Writer, in LocalizedAttributes) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if len(in.Locales) != 0 {
|
|
const prefix string = ",\"locales\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
{
|
|
out.RawByte('[')
|
|
for v115, v116 := range in.Locales {
|
|
if v115 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v116))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.AttributePatterns) != 0 {
|
|
const prefix string = ",\"attributePatterns\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v117, v118 := range in.AttributePatterns {
|
|
if v117 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v118))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v LocalizedAttributes) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v LocalizedAttributes) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo26(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *LocalizedAttributes) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *LocalizedAttributes) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo26(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(in *jlexer.Lexer, out *KeysResults) {
|
|
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 "results":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Results = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Results == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Results = make([]Key, 0, 0)
|
|
} else {
|
|
out.Results = []Key{}
|
|
}
|
|
} else {
|
|
out.Results = (out.Results)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v119 Key
|
|
(v119).UnmarshalEasyJSON(in)
|
|
out.Results = append(out.Results, v119)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "total":
|
|
out.Total = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(out *jwriter.Writer, in KeysResults) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"results\":"
|
|
out.RawString(prefix[1:])
|
|
if in.Results == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v120, v121 := range in.Results {
|
|
if v120 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
(v121).MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
{
|
|
const prefix string = ",\"limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"total\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Total))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v KeysResults) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v KeysResults) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo27(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *KeysResults) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *KeysResults) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo27(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(in *jlexer.Lexer, out *KeysQuery) {
|
|
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 "Limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "Offset":
|
|
out.Offset = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(out *jwriter.Writer, in KeysQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"Limit\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"Offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v KeysQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v KeysQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo28(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *KeysQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *KeysQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo28(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(in *jlexer.Lexer, out *KeyUpdate) {
|
|
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 "name":
|
|
out.Name = string(in.String())
|
|
case "description":
|
|
out.Description = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(out *jwriter.Writer, in KeyUpdate) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Name != "" {
|
|
const prefix string = ",\"name\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Name))
|
|
}
|
|
if in.Description != "" {
|
|
const prefix string = ",\"description\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Description))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v KeyUpdate) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v KeyUpdate) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo29(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *KeyUpdate) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *KeyUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo29(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(in *jlexer.Lexer, out *KeyParsed) {
|
|
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 "name":
|
|
out.Name = string(in.String())
|
|
case "description":
|
|
out.Description = string(in.String())
|
|
case "uid":
|
|
out.UID = string(in.String())
|
|
case "actions":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Actions = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Actions == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Actions = make([]string, 0, 4)
|
|
} else {
|
|
out.Actions = []string{}
|
|
}
|
|
} else {
|
|
out.Actions = (out.Actions)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v122 string
|
|
v122 = string(in.String())
|
|
out.Actions = append(out.Actions, v122)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
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 v123 string
|
|
v123 = string(in.String())
|
|
out.Indexes = append(out.Indexes, v123)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "expiresAt":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.ExpiresAt = nil
|
|
} else {
|
|
if out.ExpiresAt == nil {
|
|
out.ExpiresAt = new(string)
|
|
}
|
|
*out.ExpiresAt = string(in.String())
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(out *jwriter.Writer, in KeyParsed) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"name\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Name))
|
|
}
|
|
{
|
|
const prefix string = ",\"description\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Description))
|
|
}
|
|
if in.UID != "" {
|
|
const prefix string = ",\"uid\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.UID))
|
|
}
|
|
if len(in.Actions) != 0 {
|
|
const prefix string = ",\"actions\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v124, v125 := range in.Actions {
|
|
if v124 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v125))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Indexes) != 0 {
|
|
const prefix string = ",\"indexes\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v126, v127 := range in.Indexes {
|
|
if v126 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v127))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"expiresAt\":"
|
|
out.RawString(prefix)
|
|
if in.ExpiresAt == nil {
|
|
out.RawString("null")
|
|
} else {
|
|
out.String(string(*in.ExpiresAt))
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v KeyParsed) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v KeyParsed) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo30(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *KeyParsed) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *KeyParsed) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo30(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(in *jlexer.Lexer, out *Key) {
|
|
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 "name":
|
|
out.Name = string(in.String())
|
|
case "description":
|
|
out.Description = string(in.String())
|
|
case "key":
|
|
out.Key = string(in.String())
|
|
case "uid":
|
|
out.UID = string(in.String())
|
|
case "actions":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Actions = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Actions == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Actions = make([]string, 0, 4)
|
|
} else {
|
|
out.Actions = []string{}
|
|
}
|
|
} else {
|
|
out.Actions = (out.Actions)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v128 string
|
|
v128 = string(in.String())
|
|
out.Actions = append(out.Actions, v128)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
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 v129 string
|
|
v129 = string(in.String())
|
|
out.Indexes = append(out.Indexes, v129)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "createdAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.CreatedAt).UnmarshalJSON(data))
|
|
}
|
|
case "updatedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.UpdatedAt).UnmarshalJSON(data))
|
|
}
|
|
case "expiresAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.ExpiresAt).UnmarshalJSON(data))
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(out *jwriter.Writer, in Key) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"name\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Name))
|
|
}
|
|
{
|
|
const prefix string = ",\"description\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Description))
|
|
}
|
|
if in.Key != "" {
|
|
const prefix string = ",\"key\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Key))
|
|
}
|
|
if in.UID != "" {
|
|
const prefix string = ",\"uid\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.UID))
|
|
}
|
|
if len(in.Actions) != 0 {
|
|
const prefix string = ",\"actions\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v130, v131 := range in.Actions {
|
|
if v130 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v131))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Indexes) != 0 {
|
|
const prefix string = ",\"indexes\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('[')
|
|
for v132, v133 := range in.Indexes {
|
|
if v132 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v133))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if true {
|
|
const prefix string = ",\"createdAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.CreatedAt).MarshalJSON())
|
|
}
|
|
if true {
|
|
const prefix string = ",\"updatedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.UpdatedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"expiresAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.ExpiresAt).MarshalJSON())
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Key) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Key) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo31(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Key) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo31(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(in *jlexer.Lexer, out *IndexesResults) {
|
|
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 "results":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Results = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Results == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Results = make([]*IndexResult, 0, 8)
|
|
} else {
|
|
out.Results = []*IndexResult{}
|
|
}
|
|
} else {
|
|
out.Results = (out.Results)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v134 *IndexResult
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
v134 = nil
|
|
} else {
|
|
if v134 == nil {
|
|
v134 = new(IndexResult)
|
|
}
|
|
(*v134).UnmarshalEasyJSON(in)
|
|
}
|
|
out.Results = append(out.Results, v134)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "total":
|
|
out.Total = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(out *jwriter.Writer, in IndexesResults) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"results\":"
|
|
out.RawString(prefix[1:])
|
|
if in.Results == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v135, v136 := range in.Results {
|
|
if v135 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if v136 == nil {
|
|
out.RawString("null")
|
|
} else {
|
|
(*v136).MarshalEasyJSON(out)
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
{
|
|
const prefix string = ",\"limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"total\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Total))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v IndexesResults) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v IndexesResults) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo32(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *IndexesResults) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *IndexesResults) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo32(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo33(in *jlexer.Lexer, out *IndexesQuery) {
|
|
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 "Limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "Offset":
|
|
out.Offset = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo33(out *jwriter.Writer, in IndexesQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"Limit\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"Offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v IndexesQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo33(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v IndexesQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo33(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *IndexesQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo33(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *IndexesQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo33(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo34(in *jlexer.Lexer, out *IndexResult) {
|
|
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 "uid":
|
|
out.UID = string(in.String())
|
|
case "createdAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.CreatedAt).UnmarshalJSON(data))
|
|
}
|
|
case "updatedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.UpdatedAt).UnmarshalJSON(data))
|
|
}
|
|
case "primaryKey":
|
|
out.PrimaryKey = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo34(out *jwriter.Writer, in IndexResult) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"uid\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.UID))
|
|
}
|
|
{
|
|
const prefix string = ",\"createdAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.CreatedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"updatedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.UpdatedAt).MarshalJSON())
|
|
}
|
|
if in.PrimaryKey != "" {
|
|
const prefix string = ",\"primaryKey\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.PrimaryKey))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v IndexResult) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo34(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v IndexResult) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo34(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *IndexResult) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo34(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *IndexResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo34(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo35(in *jlexer.Lexer, out *IndexConfig) {
|
|
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 "Uid":
|
|
out.Uid = string(in.String())
|
|
case "PrimaryKey":
|
|
out.PrimaryKey = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo35(out *jwriter.Writer, in IndexConfig) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"Uid\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Uid))
|
|
}
|
|
{
|
|
const prefix string = ",\"PrimaryKey\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.PrimaryKey))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v IndexConfig) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo35(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v IndexConfig) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo35(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *IndexConfig) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo35(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *IndexConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo35(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo36(in *jlexer.Lexer, out *Health) {
|
|
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 "status":
|
|
out.Status = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo36(out *jwriter.Writer, in Health) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"status\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Status))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Health) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo36(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Health) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo36(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Health) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo36(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Health) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo36(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo37(in *jlexer.Lexer, out *Faceting) {
|
|
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 "maxValuesPerFacet":
|
|
out.MaxValuesPerFacet = int64(in.Int64())
|
|
case "sortFacetValuesBy":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
out.SortFacetValuesBy = make(map[string]SortFacetType)
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v137 SortFacetType
|
|
v137 = SortFacetType(in.String())
|
|
(out.SortFacetValuesBy)[key] = v137
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo37(out *jwriter.Writer, in Faceting) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"maxValuesPerFacet\":"
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.MaxValuesPerFacet))
|
|
}
|
|
{
|
|
const prefix string = ",\"sortFacetValuesBy\":"
|
|
out.RawString(prefix)
|
|
if in.SortFacetValuesBy == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
|
|
out.RawString(`null`)
|
|
} else {
|
|
out.RawByte('{')
|
|
v138First := true
|
|
for v138Name, v138Value := range in.SortFacetValuesBy {
|
|
if v138First {
|
|
v138First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v138Name))
|
|
out.RawByte(':')
|
|
out.String(string(v138Value))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Faceting) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo37(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Faceting) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo37(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Faceting) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo37(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Faceting) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo37(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo38(in *jlexer.Lexer, out *FacetSearchResponse) {
|
|
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 "facetHits":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.FacetHits = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.FacetHits == nil {
|
|
if !in.IsDelim(']') {
|
|
out.FacetHits = make([]interface{}, 0, 4)
|
|
} else {
|
|
out.FacetHits = []interface{}{}
|
|
}
|
|
} else {
|
|
out.FacetHits = (out.FacetHits)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v139 interface{}
|
|
if m, ok := v139.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v139.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v139 = in.Interface()
|
|
}
|
|
out.FacetHits = append(out.FacetHits, v139)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "facetQuery":
|
|
out.FacetQuery = string(in.String())
|
|
case "processingTimeMs":
|
|
out.ProcessingTimeMs = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo38(out *jwriter.Writer, in FacetSearchResponse) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"facetHits\":"
|
|
out.RawString(prefix[1:])
|
|
if in.FacetHits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v140, v141 := range in.FacetHits {
|
|
if v140 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if m, ok := v141.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v141.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v141))
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"facetQuery\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.FacetQuery))
|
|
}
|
|
{
|
|
const prefix string = ",\"processingTimeMs\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.ProcessingTimeMs))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v FacetSearchResponse) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo38(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v FacetSearchResponse) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo38(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *FacetSearchResponse) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo38(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *FacetSearchResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo38(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo39(in *jlexer.Lexer, out *FacetSearchRequest) {
|
|
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 "facetName":
|
|
out.FacetName = string(in.String())
|
|
case "facetQuery":
|
|
out.FacetQuery = string(in.String())
|
|
case "q":
|
|
out.Q = string(in.String())
|
|
case "filter":
|
|
out.Filter = string(in.String())
|
|
case "matchingStrategy":
|
|
out.MatchingStrategy = string(in.String())
|
|
case "attributesToSearchOn":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.AttributesToSearchOn = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.AttributesToSearchOn == nil {
|
|
if !in.IsDelim(']') {
|
|
out.AttributesToSearchOn = make([]string, 0, 4)
|
|
} else {
|
|
out.AttributesToSearchOn = []string{}
|
|
}
|
|
} else {
|
|
out.AttributesToSearchOn = (out.AttributesToSearchOn)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v142 string
|
|
v142 = string(in.String())
|
|
out.AttributesToSearchOn = append(out.AttributesToSearchOn, v142)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo39(out *jwriter.Writer, in FacetSearchRequest) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.FacetName != "" {
|
|
const prefix string = ",\"facetName\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.FacetName))
|
|
}
|
|
if in.FacetQuery != "" {
|
|
const prefix string = ",\"facetQuery\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.FacetQuery))
|
|
}
|
|
if in.Q != "" {
|
|
const prefix string = ",\"q\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Q))
|
|
}
|
|
if in.Filter != "" {
|
|
const prefix string = ",\"filter\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.Filter))
|
|
}
|
|
if in.MatchingStrategy != "" {
|
|
const prefix string = ",\"matchingStrategy\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.MatchingStrategy))
|
|
}
|
|
if len(in.AttributesToSearchOn) != 0 {
|
|
const prefix string = ",\"attributesToSearchOn\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v143, v144 := range in.AttributesToSearchOn {
|
|
if v143 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v144))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v FacetSearchRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo39(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v FacetSearchRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo39(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *FacetSearchRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo39(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *FacetSearchRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo39(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo40(in *jlexer.Lexer, out *ExperimentalFeaturesResult) {
|
|
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 "logsRoute":
|
|
out.LogsRoute = bool(in.Bool())
|
|
case "metrics":
|
|
out.Metrics = bool(in.Bool())
|
|
case "editDocumentsByFunction":
|
|
out.EditDocumentsByFunction = bool(in.Bool())
|
|
case "containsFilter":
|
|
out.ContainsFilter = bool(in.Bool())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo40(out *jwriter.Writer, in ExperimentalFeaturesResult) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"logsRoute\":"
|
|
out.RawString(prefix[1:])
|
|
out.Bool(bool(in.LogsRoute))
|
|
}
|
|
{
|
|
const prefix string = ",\"metrics\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.Metrics))
|
|
}
|
|
{
|
|
const prefix string = ",\"editDocumentsByFunction\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.EditDocumentsByFunction))
|
|
}
|
|
{
|
|
const prefix string = ",\"containsFilter\":"
|
|
out.RawString(prefix)
|
|
out.Bool(bool(in.ContainsFilter))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v ExperimentalFeaturesResult) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo40(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v ExperimentalFeaturesResult) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo40(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *ExperimentalFeaturesResult) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo40(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *ExperimentalFeaturesResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo40(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo41(in *jlexer.Lexer, out *ExperimentalFeaturesBase) {
|
|
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 "logsRoute":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.LogsRoute = nil
|
|
} else {
|
|
if out.LogsRoute == nil {
|
|
out.LogsRoute = new(bool)
|
|
}
|
|
*out.LogsRoute = bool(in.Bool())
|
|
}
|
|
case "metrics":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Metrics = nil
|
|
} else {
|
|
if out.Metrics == nil {
|
|
out.Metrics = new(bool)
|
|
}
|
|
*out.Metrics = bool(in.Bool())
|
|
}
|
|
case "editDocumentsByFunction":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.EditDocumentsByFunction = nil
|
|
} else {
|
|
if out.EditDocumentsByFunction == nil {
|
|
out.EditDocumentsByFunction = new(bool)
|
|
}
|
|
*out.EditDocumentsByFunction = bool(in.Bool())
|
|
}
|
|
case "containsFilter":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.ContainsFilter = nil
|
|
} else {
|
|
if out.ContainsFilter == nil {
|
|
out.ContainsFilter = new(bool)
|
|
}
|
|
*out.ContainsFilter = bool(in.Bool())
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo41(out *jwriter.Writer, in ExperimentalFeaturesBase) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.LogsRoute != nil {
|
|
const prefix string = ",\"logsRoute\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Bool(bool(*in.LogsRoute))
|
|
}
|
|
if in.Metrics != nil {
|
|
const prefix string = ",\"metrics\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(*in.Metrics))
|
|
}
|
|
if in.EditDocumentsByFunction != nil {
|
|
const prefix string = ",\"editDocumentsByFunction\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(*in.EditDocumentsByFunction))
|
|
}
|
|
if in.ContainsFilter != nil {
|
|
const prefix string = ",\"containsFilter\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Bool(bool(*in.ContainsFilter))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v ExperimentalFeaturesBase) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo41(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v ExperimentalFeaturesBase) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo41(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *ExperimentalFeaturesBase) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo41(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *ExperimentalFeaturesBase) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo41(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo42(in *jlexer.Lexer, out *Embedder) {
|
|
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 "source":
|
|
out.Source = string(in.String())
|
|
case "model":
|
|
out.Model = string(in.String())
|
|
case "apiKey":
|
|
out.APIKey = string(in.String())
|
|
case "documentTemplate":
|
|
out.DocumentTemplate = string(in.String())
|
|
case "dimensions":
|
|
out.Dimensions = int(in.Int())
|
|
case "distribution":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Distribution = nil
|
|
} else {
|
|
if out.Distribution == nil {
|
|
out.Distribution = new(Distribution)
|
|
}
|
|
(*out.Distribution).UnmarshalEasyJSON(in)
|
|
}
|
|
case "url":
|
|
out.URL = string(in.String())
|
|
case "revision":
|
|
out.Revision = string(in.String())
|
|
case "request":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Request = make(map[string]interface{})
|
|
} else {
|
|
out.Request = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v145 interface{}
|
|
if m, ok := v145.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v145.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v145 = in.Interface()
|
|
}
|
|
(out.Request)[key] = v145
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
case "response":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Response = make(map[string]interface{})
|
|
} else {
|
|
out.Response = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v146 interface{}
|
|
if m, ok := v146.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v146.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v146 = in.Interface()
|
|
}
|
|
(out.Response)[key] = v146
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
case "headers":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Headers = make(map[string]string)
|
|
} else {
|
|
out.Headers = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v147 string
|
|
v147 = string(in.String())
|
|
(out.Headers)[key] = v147
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo42(out *jwriter.Writer, in Embedder) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"source\":"
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.Source))
|
|
}
|
|
if in.Model != "" {
|
|
const prefix string = ",\"model\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Model))
|
|
}
|
|
if in.APIKey != "" {
|
|
const prefix string = ",\"apiKey\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.APIKey))
|
|
}
|
|
if in.DocumentTemplate != "" {
|
|
const prefix string = ",\"documentTemplate\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.DocumentTemplate))
|
|
}
|
|
if in.Dimensions != 0 {
|
|
const prefix string = ",\"dimensions\":"
|
|
out.RawString(prefix)
|
|
out.Int(int(in.Dimensions))
|
|
}
|
|
if in.Distribution != nil {
|
|
const prefix string = ",\"distribution\":"
|
|
out.RawString(prefix)
|
|
(*in.Distribution).MarshalEasyJSON(out)
|
|
}
|
|
if in.URL != "" {
|
|
const prefix string = ",\"url\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.URL))
|
|
}
|
|
if in.Revision != "" {
|
|
const prefix string = ",\"revision\":"
|
|
out.RawString(prefix)
|
|
out.String(string(in.Revision))
|
|
}
|
|
if len(in.Request) != 0 {
|
|
const prefix string = ",\"request\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('{')
|
|
v148First := true
|
|
for v148Name, v148Value := range in.Request {
|
|
if v148First {
|
|
v148First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v148Name))
|
|
out.RawByte(':')
|
|
if m, ok := v148Value.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v148Value.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v148Value))
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
if len(in.Response) != 0 {
|
|
const prefix string = ",\"response\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('{')
|
|
v149First := true
|
|
for v149Name, v149Value := range in.Response {
|
|
if v149First {
|
|
v149First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v149Name))
|
|
out.RawByte(':')
|
|
if m, ok := v149Value.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v149Value.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v149Value))
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
if len(in.Headers) != 0 {
|
|
const prefix string = ",\"headers\":"
|
|
out.RawString(prefix)
|
|
{
|
|
out.RawByte('{')
|
|
v150First := true
|
|
for v150Name, v150Value := range in.Headers {
|
|
if v150First {
|
|
v150First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v150Name))
|
|
out.RawByte(':')
|
|
out.String(string(v150Value))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Embedder) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo42(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Embedder) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo42(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Embedder) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo42(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Embedder) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo42(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo43(in *jlexer.Lexer, out *DocumentsResult) {
|
|
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 "results":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Results = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Results == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Results = make([]map[string]interface{}, 0, 8)
|
|
} else {
|
|
out.Results = []map[string]interface{}{}
|
|
}
|
|
} else {
|
|
out.Results = (out.Results)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v151 map[string]interface{}
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
v151 = make(map[string]interface{})
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v152 interface{}
|
|
if m, ok := v152.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := v152.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
v152 = in.Interface()
|
|
}
|
|
(v151)[key] = v152
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
out.Results = append(out.Results, v151)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "total":
|
|
out.Total = int64(in.Int64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo43(out *jwriter.Writer, in DocumentsResult) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"results\":"
|
|
out.RawString(prefix[1:])
|
|
if in.Results == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v153, v154 := range in.Results {
|
|
if v153 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
if v154 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
|
|
out.RawString(`null`)
|
|
} else {
|
|
out.RawByte('{')
|
|
v155First := true
|
|
for v155Name, v155Value := range v154 {
|
|
if v155First {
|
|
v155First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v155Name))
|
|
out.RawByte(':')
|
|
if m, ok := v155Value.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := v155Value.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(v155Value))
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"limit\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
{
|
|
const prefix string = ",\"offset\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
{
|
|
const prefix string = ",\"total\":"
|
|
out.RawString(prefix)
|
|
out.Int64(int64(in.Total))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v DocumentsResult) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo43(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v DocumentsResult) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo43(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *DocumentsResult) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo43(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *DocumentsResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo43(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo44(in *jlexer.Lexer, out *DocumentsQuery) {
|
|
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 "offset":
|
|
out.Offset = int64(in.Int64())
|
|
case "limit":
|
|
out.Limit = int64(in.Int64())
|
|
case "fields":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Fields = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Fields == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Fields = make([]string, 0, 4)
|
|
} else {
|
|
out.Fields = []string{}
|
|
}
|
|
} else {
|
|
out.Fields = (out.Fields)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v156 string
|
|
v156 = string(in.String())
|
|
out.Fields = append(out.Fields, v156)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "filter":
|
|
if m, ok := out.Filter.(easyjson.Unmarshaler); ok {
|
|
m.UnmarshalEasyJSON(in)
|
|
} else if m, ok := out.Filter.(json.Unmarshaler); ok {
|
|
_ = m.UnmarshalJSON(in.Raw())
|
|
} else {
|
|
out.Filter = in.Interface()
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo44(out *jwriter.Writer, in DocumentsQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.Offset != 0 {
|
|
const prefix string = ",\"offset\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.Offset))
|
|
}
|
|
if in.Limit != 0 {
|
|
const prefix string = ",\"limit\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.Limit))
|
|
}
|
|
if len(in.Fields) != 0 {
|
|
const prefix string = ",\"fields\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v157, v158 := range in.Fields {
|
|
if v157 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v158))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.Filter != nil {
|
|
const prefix string = ",\"filter\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
if m, ok := in.Filter.(easyjson.Marshaler); ok {
|
|
m.MarshalEasyJSON(out)
|
|
} else if m, ok := in.Filter.(json.Marshaler); ok {
|
|
out.Raw(m.MarshalJSON())
|
|
} else {
|
|
out.Raw(json.Marshal(in.Filter))
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v DocumentsQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo44(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v DocumentsQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo44(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *DocumentsQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo44(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *DocumentsQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo44(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo45(in *jlexer.Lexer, out *DocumentQuery) {
|
|
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 "fields":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Fields = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Fields == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Fields = make([]string, 0, 4)
|
|
} else {
|
|
out.Fields = []string{}
|
|
}
|
|
} else {
|
|
out.Fields = (out.Fields)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v159 string
|
|
v159 = string(in.String())
|
|
out.Fields = append(out.Fields, v159)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo45(out *jwriter.Writer, in DocumentQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if len(in.Fields) != 0 {
|
|
const prefix string = ",\"fields\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
{
|
|
out.RawByte('[')
|
|
for v160, v161 := range in.Fields {
|
|
if v160 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v161))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v DocumentQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo45(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v DocumentQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo45(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *DocumentQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo45(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *DocumentQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo45(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo46(in *jlexer.Lexer, out *Distribution) {
|
|
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 "mean":
|
|
out.Mean = float64(in.Float64())
|
|
case "sigma":
|
|
out.Sigma = float64(in.Float64())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo46(out *jwriter.Writer, in Distribution) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"mean\":"
|
|
out.RawString(prefix[1:])
|
|
out.Float64(float64(in.Mean))
|
|
}
|
|
{
|
|
const prefix string = ",\"sigma\":"
|
|
out.RawString(prefix)
|
|
out.Float64(float64(in.Sigma))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Distribution) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo46(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Distribution) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo46(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Distribution) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo46(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Distribution) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo46(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo47(in *jlexer.Lexer, out *Details) {
|
|
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 "receivedDocuments":
|
|
out.ReceivedDocuments = int64(in.Int64())
|
|
case "indexedDocuments":
|
|
out.IndexedDocuments = int64(in.Int64())
|
|
case "deletedDocuments":
|
|
out.DeletedDocuments = int64(in.Int64())
|
|
case "primaryKey":
|
|
out.PrimaryKey = string(in.String())
|
|
case "providedIds":
|
|
out.ProvidedIds = int64(in.Int64())
|
|
case "rankingRules":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.RankingRules = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.RankingRules == nil {
|
|
if !in.IsDelim(']') {
|
|
out.RankingRules = make([]string, 0, 4)
|
|
} else {
|
|
out.RankingRules = []string{}
|
|
}
|
|
} else {
|
|
out.RankingRules = (out.RankingRules)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v162 string
|
|
v162 = string(in.String())
|
|
out.RankingRules = append(out.RankingRules, v162)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "distinctAttribute":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.DistinctAttribute = nil
|
|
} else {
|
|
if out.DistinctAttribute == nil {
|
|
out.DistinctAttribute = new(string)
|
|
}
|
|
*out.DistinctAttribute = string(in.String())
|
|
}
|
|
case "searchableAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.SearchableAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.SearchableAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.SearchableAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.SearchableAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.SearchableAttributes = (out.SearchableAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v163 string
|
|
v163 = string(in.String())
|
|
out.SearchableAttributes = append(out.SearchableAttributes, v163)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "displayedAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.DisplayedAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.DisplayedAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.DisplayedAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.DisplayedAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.DisplayedAttributes = (out.DisplayedAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v164 string
|
|
v164 = string(in.String())
|
|
out.DisplayedAttributes = append(out.DisplayedAttributes, v164)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "stopWords":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.StopWords = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.StopWords == nil {
|
|
if !in.IsDelim(']') {
|
|
out.StopWords = make([]string, 0, 4)
|
|
} else {
|
|
out.StopWords = []string{}
|
|
}
|
|
} else {
|
|
out.StopWords = (out.StopWords)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v165 string
|
|
v165 = string(in.String())
|
|
out.StopWords = append(out.StopWords, v165)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "synonyms":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
} else {
|
|
in.Delim('{')
|
|
if !in.IsDelim('}') {
|
|
out.Synonyms = make(map[string][]string)
|
|
} else {
|
|
out.Synonyms = nil
|
|
}
|
|
for !in.IsDelim('}') {
|
|
key := string(in.String())
|
|
in.WantColon()
|
|
var v166 []string
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
v166 = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if v166 == nil {
|
|
if !in.IsDelim(']') {
|
|
v166 = make([]string, 0, 4)
|
|
} else {
|
|
v166 = []string{}
|
|
}
|
|
} else {
|
|
v166 = (v166)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v167 string
|
|
v167 = string(in.String())
|
|
v166 = append(v166, v167)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
(out.Synonyms)[key] = v166
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
}
|
|
case "filterableAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.FilterableAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.FilterableAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.FilterableAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.FilterableAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.FilterableAttributes = (out.FilterableAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v168 string
|
|
v168 = string(in.String())
|
|
out.FilterableAttributes = append(out.FilterableAttributes, v168)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "sortableAttributes":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.SortableAttributes = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.SortableAttributes == nil {
|
|
if !in.IsDelim(']') {
|
|
out.SortableAttributes = make([]string, 0, 4)
|
|
} else {
|
|
out.SortableAttributes = []string{}
|
|
}
|
|
} else {
|
|
out.SortableAttributes = (out.SortableAttributes)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v169 string
|
|
v169 = string(in.String())
|
|
out.SortableAttributes = append(out.SortableAttributes, v169)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "typoTolerance":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.TypoTolerance = nil
|
|
} else {
|
|
if out.TypoTolerance == nil {
|
|
out.TypoTolerance = new(TypoTolerance)
|
|
}
|
|
(*out.TypoTolerance).UnmarshalEasyJSON(in)
|
|
}
|
|
case "pagination":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Pagination = nil
|
|
} else {
|
|
if out.Pagination == nil {
|
|
out.Pagination = new(Pagination)
|
|
}
|
|
(*out.Pagination).UnmarshalEasyJSON(in)
|
|
}
|
|
case "faceting":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Faceting = nil
|
|
} else {
|
|
if out.Faceting == nil {
|
|
out.Faceting = new(Faceting)
|
|
}
|
|
(*out.Faceting).UnmarshalEasyJSON(in)
|
|
}
|
|
case "matchedTasks":
|
|
out.MatchedTasks = int64(in.Int64())
|
|
case "canceledTasks":
|
|
out.CanceledTasks = int64(in.Int64())
|
|
case "deletedTasks":
|
|
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 v170 SwapIndexesParams
|
|
(v170).UnmarshalEasyJSON(in)
|
|
out.Swaps = append(out.Swaps, v170)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "dumpUid":
|
|
out.DumpUid = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo47(out *jwriter.Writer, in Details) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.ReceivedDocuments != 0 {
|
|
const prefix string = ",\"receivedDocuments\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.Int64(int64(in.ReceivedDocuments))
|
|
}
|
|
if in.IndexedDocuments != 0 {
|
|
const prefix string = ",\"indexedDocuments\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.IndexedDocuments))
|
|
}
|
|
if in.DeletedDocuments != 0 {
|
|
const prefix string = ",\"deletedDocuments\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.DeletedDocuments))
|
|
}
|
|
if in.PrimaryKey != "" {
|
|
const prefix string = ",\"primaryKey\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.PrimaryKey))
|
|
}
|
|
if in.ProvidedIds != 0 {
|
|
const prefix string = ",\"providedIds\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.ProvidedIds))
|
|
}
|
|
if len(in.RankingRules) != 0 {
|
|
const prefix string = ",\"rankingRules\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v171, v172 := range in.RankingRules {
|
|
if v171 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v172))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.DistinctAttribute != nil {
|
|
const prefix string = ",\"distinctAttribute\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(*in.DistinctAttribute))
|
|
}
|
|
if len(in.SearchableAttributes) != 0 {
|
|
const prefix string = ",\"searchableAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v173, v174 := range in.SearchableAttributes {
|
|
if v173 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v174))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.DisplayedAttributes) != 0 {
|
|
const prefix string = ",\"displayedAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v175, v176 := range in.DisplayedAttributes {
|
|
if v175 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v176))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.StopWords) != 0 {
|
|
const prefix string = ",\"stopWords\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v177, v178 := range in.StopWords {
|
|
if v177 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v178))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.Synonyms) != 0 {
|
|
const prefix string = ",\"synonyms\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('{')
|
|
v179First := true
|
|
for v179Name, v179Value := range in.Synonyms {
|
|
if v179First {
|
|
v179First = false
|
|
} else {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v179Name))
|
|
out.RawByte(':')
|
|
if v179Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v180, v181 := range v179Value {
|
|
if v180 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v181))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
}
|
|
if len(in.FilterableAttributes) != 0 {
|
|
const prefix string = ",\"filterableAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v182, v183 := range in.FilterableAttributes {
|
|
if v182 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v183))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if len(in.SortableAttributes) != 0 {
|
|
const prefix string = ",\"sortableAttributes\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
{
|
|
out.RawByte('[')
|
|
for v184, v185 := range in.SortableAttributes {
|
|
if v184 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v185))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.TypoTolerance != nil {
|
|
const prefix string = ",\"typoTolerance\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
(*in.TypoTolerance).MarshalEasyJSON(out)
|
|
}
|
|
if in.Pagination != nil {
|
|
const prefix string = ",\"pagination\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
(*in.Pagination).MarshalEasyJSON(out)
|
|
}
|
|
if in.Faceting != nil {
|
|
const prefix string = ",\"faceting\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
(*in.Faceting).MarshalEasyJSON(out)
|
|
}
|
|
if in.MatchedTasks != 0 {
|
|
const prefix string = ",\"matchedTasks\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.MatchedTasks))
|
|
}
|
|
if in.CanceledTasks != 0 {
|
|
const prefix string = ",\"canceledTasks\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.CanceledTasks))
|
|
}
|
|
if in.DeletedTasks != 0 {
|
|
const prefix string = ",\"deletedTasks\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.Int64(int64(in.DeletedTasks))
|
|
}
|
|
if in.OriginalFilter != "" {
|
|
const prefix string = ",\"originalFilter\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
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 v186, v187 := range in.Swaps {
|
|
if v186 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
(v187).MarshalEasyJSON(out)
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
if in.DumpUid != "" {
|
|
const prefix string = ",\"dumpUid\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.DumpUid))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v Details) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo47(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v Details) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo47(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *Details) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo47(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *Details) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo47(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo48(in *jlexer.Lexer, out *DeleteTasksQuery) {
|
|
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 "UIDS":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.UIDS = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.UIDS == nil {
|
|
if !in.IsDelim(']') {
|
|
out.UIDS = make([]int64, 0, 8)
|
|
} else {
|
|
out.UIDS = []int64{}
|
|
}
|
|
} else {
|
|
out.UIDS = (out.UIDS)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v188 int64
|
|
v188 = int64(in.Int64())
|
|
out.UIDS = append(out.UIDS, v188)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "IndexUIDS":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.IndexUIDS = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.IndexUIDS == nil {
|
|
if !in.IsDelim(']') {
|
|
out.IndexUIDS = make([]string, 0, 4)
|
|
} else {
|
|
out.IndexUIDS = []string{}
|
|
}
|
|
} else {
|
|
out.IndexUIDS = (out.IndexUIDS)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v189 string
|
|
v189 = string(in.String())
|
|
out.IndexUIDS = append(out.IndexUIDS, v189)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Statuses":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Statuses = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Statuses == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Statuses = make([]TaskStatus, 0, 4)
|
|
} else {
|
|
out.Statuses = []TaskStatus{}
|
|
}
|
|
} else {
|
|
out.Statuses = (out.Statuses)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v190 TaskStatus
|
|
v190 = TaskStatus(in.String())
|
|
out.Statuses = append(out.Statuses, v190)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Types":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Types = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Types == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Types = make([]TaskType, 0, 4)
|
|
} else {
|
|
out.Types = []TaskType{}
|
|
}
|
|
} else {
|
|
out.Types = (out.Types)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v191 TaskType
|
|
v191 = TaskType(in.String())
|
|
out.Types = append(out.Types, v191)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "CanceledBy":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.CanceledBy = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.CanceledBy == nil {
|
|
if !in.IsDelim(']') {
|
|
out.CanceledBy = make([]int64, 0, 8)
|
|
} else {
|
|
out.CanceledBy = []int64{}
|
|
}
|
|
} else {
|
|
out.CanceledBy = (out.CanceledBy)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v192 int64
|
|
v192 = int64(in.Int64())
|
|
out.CanceledBy = append(out.CanceledBy, v192)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "BeforeEnqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeEnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterEnqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterEnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "BeforeStartedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeStartedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterStartedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterStartedAt).UnmarshalJSON(data))
|
|
}
|
|
case "BeforeFinishedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeFinishedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterFinishedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterFinishedAt).UnmarshalJSON(data))
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo48(out *jwriter.Writer, in DeleteTasksQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"UIDS\":"
|
|
out.RawString(prefix[1:])
|
|
if in.UIDS == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v193, v194 := range in.UIDS {
|
|
if v193 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Int64(int64(v194))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"IndexUIDS\":"
|
|
out.RawString(prefix)
|
|
if in.IndexUIDS == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v195, v196 := range in.IndexUIDS {
|
|
if v195 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v196))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Statuses\":"
|
|
out.RawString(prefix)
|
|
if in.Statuses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v197, v198 := range in.Statuses {
|
|
if v197 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v198))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Types\":"
|
|
out.RawString(prefix)
|
|
if in.Types == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v199, v200 := range in.Types {
|
|
if v199 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v200))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"CanceledBy\":"
|
|
out.RawString(prefix)
|
|
if in.CanceledBy == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v201, v202 := range in.CanceledBy {
|
|
if v201 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Int64(int64(v202))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeEnqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeEnqueuedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterEnqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterEnqueuedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeStartedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeStartedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterStartedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterStartedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeFinishedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeFinishedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterFinishedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterFinishedAt).MarshalJSON())
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v DeleteTasksQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo48(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v DeleteTasksQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo48(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *DeleteTasksQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo48(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *DeleteTasksQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo48(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo49(in *jlexer.Lexer, out *CsvDocumentsQuery) {
|
|
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 "primaryKey":
|
|
out.PrimaryKey = string(in.String())
|
|
case "csvDelimiter":
|
|
out.CsvDelimiter = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo49(out *jwriter.Writer, in CsvDocumentsQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.PrimaryKey != "" {
|
|
const prefix string = ",\"primaryKey\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.PrimaryKey))
|
|
}
|
|
if in.CsvDelimiter != "" {
|
|
const prefix string = ",\"csvDelimiter\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.CsvDelimiter))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v CsvDocumentsQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo49(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v CsvDocumentsQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo49(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *CsvDocumentsQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo49(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *CsvDocumentsQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo49(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo50(in *jlexer.Lexer, out *CreateIndexRequest) {
|
|
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 "uid":
|
|
out.UID = string(in.String())
|
|
case "primaryKey":
|
|
out.PrimaryKey = string(in.String())
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo50(out *jwriter.Writer, in CreateIndexRequest) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
if in.UID != "" {
|
|
const prefix string = ",\"uid\":"
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
out.String(string(in.UID))
|
|
}
|
|
if in.PrimaryKey != "" {
|
|
const prefix string = ",\"primaryKey\":"
|
|
if first {
|
|
first = false
|
|
out.RawString(prefix[1:])
|
|
} else {
|
|
out.RawString(prefix)
|
|
}
|
|
out.String(string(in.PrimaryKey))
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v CreateIndexRequest) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo50(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v CreateIndexRequest) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo50(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *CreateIndexRequest) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo50(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *CreateIndexRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo50(l, v)
|
|
}
|
|
func easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo51(in *jlexer.Lexer, out *CancelTasksQuery) {
|
|
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 "UIDS":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.UIDS = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.UIDS == nil {
|
|
if !in.IsDelim(']') {
|
|
out.UIDS = make([]int64, 0, 8)
|
|
} else {
|
|
out.UIDS = []int64{}
|
|
}
|
|
} else {
|
|
out.UIDS = (out.UIDS)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v203 int64
|
|
v203 = int64(in.Int64())
|
|
out.UIDS = append(out.UIDS, v203)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "IndexUIDS":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.IndexUIDS = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.IndexUIDS == nil {
|
|
if !in.IsDelim(']') {
|
|
out.IndexUIDS = make([]string, 0, 4)
|
|
} else {
|
|
out.IndexUIDS = []string{}
|
|
}
|
|
} else {
|
|
out.IndexUIDS = (out.IndexUIDS)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v204 string
|
|
v204 = string(in.String())
|
|
out.IndexUIDS = append(out.IndexUIDS, v204)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Statuses":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Statuses = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Statuses == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Statuses = make([]TaskStatus, 0, 4)
|
|
} else {
|
|
out.Statuses = []TaskStatus{}
|
|
}
|
|
} else {
|
|
out.Statuses = (out.Statuses)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v205 TaskStatus
|
|
v205 = TaskStatus(in.String())
|
|
out.Statuses = append(out.Statuses, v205)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "Types":
|
|
if in.IsNull() {
|
|
in.Skip()
|
|
out.Types = nil
|
|
} else {
|
|
in.Delim('[')
|
|
if out.Types == nil {
|
|
if !in.IsDelim(']') {
|
|
out.Types = make([]TaskType, 0, 4)
|
|
} else {
|
|
out.Types = []TaskType{}
|
|
}
|
|
} else {
|
|
out.Types = (out.Types)[:0]
|
|
}
|
|
for !in.IsDelim(']') {
|
|
var v206 TaskType
|
|
v206 = TaskType(in.String())
|
|
out.Types = append(out.Types, v206)
|
|
in.WantComma()
|
|
}
|
|
in.Delim(']')
|
|
}
|
|
case "BeforeEnqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeEnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterEnqueuedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterEnqueuedAt).UnmarshalJSON(data))
|
|
}
|
|
case "BeforeStartedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.BeforeStartedAt).UnmarshalJSON(data))
|
|
}
|
|
case "AfterStartedAt":
|
|
if data := in.Raw(); in.Ok() {
|
|
in.AddError((out.AfterStartedAt).UnmarshalJSON(data))
|
|
}
|
|
default:
|
|
in.SkipRecursive()
|
|
}
|
|
in.WantComma()
|
|
}
|
|
in.Delim('}')
|
|
if isTopLevel {
|
|
in.Consumed()
|
|
}
|
|
}
|
|
func easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo51(out *jwriter.Writer, in CancelTasksQuery) {
|
|
out.RawByte('{')
|
|
first := true
|
|
_ = first
|
|
{
|
|
const prefix string = ",\"UIDS\":"
|
|
out.RawString(prefix[1:])
|
|
if in.UIDS == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v207, v208 := range in.UIDS {
|
|
if v207 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.Int64(int64(v208))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"IndexUIDS\":"
|
|
out.RawString(prefix)
|
|
if in.IndexUIDS == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v209, v210 := range in.IndexUIDS {
|
|
if v209 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v210))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Statuses\":"
|
|
out.RawString(prefix)
|
|
if in.Statuses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v211, v212 := range in.Statuses {
|
|
if v211 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v212))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"Types\":"
|
|
out.RawString(prefix)
|
|
if in.Types == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
|
out.RawString("null")
|
|
} else {
|
|
out.RawByte('[')
|
|
for v213, v214 := range in.Types {
|
|
if v213 > 0 {
|
|
out.RawByte(',')
|
|
}
|
|
out.String(string(v214))
|
|
}
|
|
out.RawByte(']')
|
|
}
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeEnqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeEnqueuedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterEnqueuedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterEnqueuedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"BeforeStartedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.BeforeStartedAt).MarshalJSON())
|
|
}
|
|
{
|
|
const prefix string = ",\"AfterStartedAt\":"
|
|
out.RawString(prefix)
|
|
out.Raw((in.AfterStartedAt).MarshalJSON())
|
|
}
|
|
out.RawByte('}')
|
|
}
|
|
|
|
// MarshalJSON supports json.Marshaler interface
|
|
func (v CancelTasksQuery) MarshalJSON() ([]byte, error) {
|
|
w := jwriter.Writer{}
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo51(&w, v)
|
|
return w.Buffer.BuildBytes(), w.Error
|
|
}
|
|
|
|
// MarshalEasyJSON supports easyjson.Marshaler interface
|
|
func (v CancelTasksQuery) MarshalEasyJSON(w *jwriter.Writer) {
|
|
easyjson6601e8cdEncodeGithubComMeilisearchMeilisearchGo51(w, v)
|
|
}
|
|
|
|
// UnmarshalJSON supports json.Unmarshaler interface
|
|
func (v *CancelTasksQuery) UnmarshalJSON(data []byte) error {
|
|
r := jlexer.Lexer{Data: data}
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo51(&r, v)
|
|
return r.Error()
|
|
}
|
|
|
|
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
|
func (v *CancelTasksQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
|
easyjson6601e8cdDecodeGithubComMeilisearchMeilisearchGo51(l, v)
|
|
}
|