diff --git a/CHANGELOG.md b/CHANGELOG.md index 981597c195..9827788532 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 8.19.0 + +# API + +* Updated APIs to 8.19.0 + +# Typed API + +* Update TypedAPI to latest [elasticsearch-specification 8.19](https://github.com/elastic/elasticsearch-specification/commit/470b4b9) + # 8.18.1 * This patch release fixes the broken build found in 8.18.0. If you are using the `TypedClient`, you should update to this version. diff --git a/esapi/api._.go b/esapi/api._.go index 298fb4cf37..d966a3c771 100755 --- a/esapi/api._.go +++ b/esapi/api._.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. // -// Code generated from specification version 8.19.0 (2af113d): DO NOT EDIT +// Code generated from specification version 8.19.0 (de1d79b): DO NOT EDIT package esapi @@ -135,10 +135,13 @@ type API struct { InferenceInference InferenceInference InferencePutAlibabacloud InferencePutAlibabacloud InferencePutAmazonbedrock InferencePutAmazonbedrock + InferencePutAmazonsagemaker InferencePutAmazonsagemaker InferencePutAnthropic InferencePutAnthropic InferencePutAzureaistudio InferencePutAzureaistudio InferencePutAzureopenai InferencePutAzureopenai InferencePutCohere InferencePutCohere + InferencePutCustom InferencePutCustom + InferencePutDeepseek InferencePutDeepseek InferencePutElasticsearch InferencePutElasticsearch InferencePutElser InferencePutElser InferencePutGoogleaistudio InferencePutGoogleaistudio @@ -216,6 +219,9 @@ type API struct { SlmPutLifecycle SlmPutLifecycle SlmStart SlmStart SlmStop SlmStop + StreamsLogsDisable StreamsLogsDisable + StreamsLogsEnable StreamsLogsEnable + StreamsStatus StreamsStatus SynonymsDeleteSynonym SynonymsDeleteSynonym SynonymsDeleteSynonymRule SynonymsDeleteSynonymRule SynonymsGetSynonym SynonymsGetSynonym @@ -310,6 +316,7 @@ type Indices struct { DataStreamsStats IndicesDataStreamsStats DeleteAlias IndicesDeleteAlias DeleteDataLifecycle IndicesDeleteDataLifecycle + DeleteDataStreamOptions IndicesDeleteDataStreamOptions DeleteDataStream IndicesDeleteDataStream DeleteIndexTemplate IndicesDeleteIndexTemplate Delete IndicesDelete @@ -327,7 +334,9 @@ type Indices struct { GetAlias IndicesGetAlias GetDataLifecycle IndicesGetDataLifecycle GetDataLifecycleStats IndicesGetDataLifecycleStats + GetDataStreamOptions IndicesGetDataStreamOptions GetDataStream IndicesGetDataStream + GetDataStreamSettings IndicesGetDataStreamSettings GetFieldMapping IndicesGetFieldMapping GetIndexTemplate IndicesGetIndexTemplate GetMapping IndicesGetMapping @@ -342,6 +351,8 @@ type Indices struct { PromoteDataStream IndicesPromoteDataStream PutAlias IndicesPutAlias PutDataLifecycle IndicesPutDataLifecycle + PutDataStreamOptions IndicesPutDataStreamOptions + PutDataStreamSettings IndicesPutDataStreamSettings PutIndexTemplate IndicesPutIndexTemplate PutMapping IndicesPutMapping PutSettings IndicesPutSettings @@ -772,10 +783,13 @@ func New(t Transport) *API { InferenceInference: newInferenceInferenceFunc(t), InferencePutAlibabacloud: newInferencePutAlibabacloudFunc(t), InferencePutAmazonbedrock: newInferencePutAmazonbedrockFunc(t), + InferencePutAmazonsagemaker: newInferencePutAmazonsagemakerFunc(t), InferencePutAnthropic: newInferencePutAnthropicFunc(t), InferencePutAzureaistudio: newInferencePutAzureaistudioFunc(t), InferencePutAzureopenai: newInferencePutAzureopenaiFunc(t), InferencePutCohere: newInferencePutCohereFunc(t), + InferencePutCustom: newInferencePutCustomFunc(t), + InferencePutDeepseek: newInferencePutDeepseekFunc(t), InferencePutElasticsearch: newInferencePutElasticsearchFunc(t), InferencePutElser: newInferencePutElserFunc(t), InferencePutGoogleaistudio: newInferencePutGoogleaistudioFunc(t), @@ -853,6 +867,9 @@ func New(t Transport) *API { SlmPutLifecycle: newSlmPutLifecycleFunc(t), SlmStart: newSlmStartFunc(t), SlmStop: newSlmStopFunc(t), + StreamsLogsDisable: newStreamsLogsDisableFunc(t), + StreamsLogsEnable: newStreamsLogsEnableFunc(t), + StreamsStatus: newStreamsStatusFunc(t), SynonymsDeleteSynonym: newSynonymsDeleteSynonymFunc(t), SynonymsDeleteSynonymRule: newSynonymsDeleteSynonymRuleFunc(t), SynonymsGetSynonym: newSynonymsGetSynonymFunc(t), @@ -940,6 +957,7 @@ func New(t Transport) *API { DataStreamsStats: newIndicesDataStreamsStatsFunc(t), DeleteAlias: newIndicesDeleteAliasFunc(t), DeleteDataLifecycle: newIndicesDeleteDataLifecycleFunc(t), + DeleteDataStreamOptions: newIndicesDeleteDataStreamOptionsFunc(t), DeleteDataStream: newIndicesDeleteDataStreamFunc(t), DeleteIndexTemplate: newIndicesDeleteIndexTemplateFunc(t), Delete: newIndicesDeleteFunc(t), @@ -957,7 +975,9 @@ func New(t Transport) *API { GetAlias: newIndicesGetAliasFunc(t), GetDataLifecycle: newIndicesGetDataLifecycleFunc(t), GetDataLifecycleStats: newIndicesGetDataLifecycleStatsFunc(t), + GetDataStreamOptions: newIndicesGetDataStreamOptionsFunc(t), GetDataStream: newIndicesGetDataStreamFunc(t), + GetDataStreamSettings: newIndicesGetDataStreamSettingsFunc(t), GetFieldMapping: newIndicesGetFieldMappingFunc(t), GetIndexTemplate: newIndicesGetIndexTemplateFunc(t), GetMapping: newIndicesGetMappingFunc(t), @@ -972,6 +992,8 @@ func New(t Transport) *API { PromoteDataStream: newIndicesPromoteDataStreamFunc(t), PutAlias: newIndicesPutAliasFunc(t), PutDataLifecycle: newIndicesPutDataLifecycleFunc(t), + PutDataStreamOptions: newIndicesPutDataStreamOptionsFunc(t), + PutDataStreamSettings: newIndicesPutDataStreamSettingsFunc(t), PutIndexTemplate: newIndicesPutIndexTemplateFunc(t), PutMapping: newIndicesPutMappingFunc(t), PutSettings: newIndicesPutSettingsFunc(t), diff --git a/esapi/api.cluster.get_component_template.go b/esapi/api.cluster.get_component_template.go index 34792aeb83..7a457377ec 100644 --- a/esapi/api.cluster.get_component_template.go +++ b/esapi/api.cluster.get_component_template.go @@ -53,9 +53,11 @@ type ClusterGetComponentTemplate func(o ...func(*ClusterGetComponentTemplateRequ type ClusterGetComponentTemplateRequest struct { Name []string + FlatSettings *bool IncludeDefaults *bool Local *bool MasterTimeout time.Duration + SettingsFilter string Pretty bool Human bool @@ -102,6 +104,10 @@ func (r ClusterGetComponentTemplateRequest) Do(providedCtx context.Context, tran params = make(map[string]string) + if r.FlatSettings != nil { + params["flat_settings"] = strconv.FormatBool(*r.FlatSettings) + } + if r.IncludeDefaults != nil { params["include_defaults"] = strconv.FormatBool(*r.IncludeDefaults) } @@ -114,6 +120,10 @@ func (r ClusterGetComponentTemplateRequest) Do(providedCtx context.Context, tran params["master_timeout"] = formatDuration(r.MasterTimeout) } + if r.SettingsFilter != "" { + params["settings_filter"] = r.SettingsFilter + } + if r.Pretty { params["pretty"] = "true" } @@ -199,6 +209,13 @@ func (f ClusterGetComponentTemplate) WithName(v ...string) func(*ClusterGetCompo } } +// WithFlatSettings - return settings in flat format (default: false). +func (f ClusterGetComponentTemplate) WithFlatSettings(v bool) func(*ClusterGetComponentTemplateRequest) { + return func(r *ClusterGetComponentTemplateRequest) { + r.FlatSettings = &v + } +} + // WithIncludeDefaults - return all default configurations for the component template (default: false). func (f ClusterGetComponentTemplate) WithIncludeDefaults(v bool) func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { @@ -220,6 +237,13 @@ func (f ClusterGetComponentTemplate) WithMasterTimeout(v time.Duration) func(*Cl } } +// WithSettingsFilter - filter out results, for example to filter out sensitive information. supports wildcards or full settings keys. +func (f ClusterGetComponentTemplate) WithSettingsFilter(v string) func(*ClusterGetComponentTemplateRequest) { + return func(r *ClusterGetComponentTemplateRequest) { + r.SettingsFilter = v + } +} + // WithPretty makes the response body pretty-printed. func (f ClusterGetComponentTemplate) WithPretty() func(*ClusterGetComponentTemplateRequest) { return func(r *ClusterGetComponentTemplateRequest) { diff --git a/esapi/api.cluster.put_component_template.go b/esapi/api.cluster.put_component_template.go index 37b3887377..e34dd3dc38 100644 --- a/esapi/api.cluster.put_component_template.go +++ b/esapi/api.cluster.put_component_template.go @@ -56,9 +56,9 @@ type ClusterPutComponentTemplateRequest struct { Name string + Cause string Create *bool MasterTimeout time.Duration - Timeout time.Duration Pretty bool Human bool @@ -103,6 +103,10 @@ func (r ClusterPutComponentTemplateRequest) Do(providedCtx context.Context, tran params = make(map[string]string) + if r.Cause != "" { + params["cause"] = r.Cause + } + if r.Create != nil { params["create"] = strconv.FormatBool(*r.Create) } @@ -111,10 +115,6 @@ func (r ClusterPutComponentTemplateRequest) Do(providedCtx context.Context, tran params["master_timeout"] = formatDuration(r.MasterTimeout) } - if r.Timeout != 0 { - params["timeout"] = formatDuration(r.Timeout) - } - if r.Pretty { params["pretty"] = "true" } @@ -200,6 +200,13 @@ func (f ClusterPutComponentTemplate) WithContext(v context.Context) func(*Cluste } } +// WithCause - user defined reason for create the component template. +func (f ClusterPutComponentTemplate) WithCause(v string) func(*ClusterPutComponentTemplateRequest) { + return func(r *ClusterPutComponentTemplateRequest) { + r.Cause = v + } +} + // WithCreate - whether the index template should only be added if new or can also replace an existing one. func (f ClusterPutComponentTemplate) WithCreate(v bool) func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { @@ -214,13 +221,6 @@ func (f ClusterPutComponentTemplate) WithMasterTimeout(v time.Duration) func(*Cl } } -// WithTimeout - explicit operation timeout. -func (f ClusterPutComponentTemplate) WithTimeout(v time.Duration) func(*ClusterPutComponentTemplateRequest) { - return func(r *ClusterPutComponentTemplateRequest) { - r.Timeout = v - } -} - // WithPretty makes the response body pretty-printed. func (f ClusterPutComponentTemplate) WithPretty() func(*ClusterPutComponentTemplateRequest) { return func(r *ClusterPutComponentTemplateRequest) { diff --git a/esapi/api.create.go b/esapi/api.create.go index c30190e89b..295963ea7e 100644 --- a/esapi/api.create.go +++ b/esapi/api.create.go @@ -62,6 +62,8 @@ type CreateRequest struct { IncludeSourceOnError *bool Pipeline string Refresh string + RequireAlias *bool + RequireDataStream *bool Routing string Timeout time.Duration Version *int @@ -128,6 +130,14 @@ func (r CreateRequest) Do(providedCtx context.Context, transport Transport) (*Re params["refresh"] = r.Refresh } + if r.RequireAlias != nil { + params["require_alias"] = strconv.FormatBool(*r.RequireAlias) + } + + if r.RequireDataStream != nil { + params["require_data_stream"] = strconv.FormatBool(*r.RequireDataStream) + } + if r.Routing != "" { params["routing"] = r.Routing } @@ -254,6 +264,20 @@ func (f Create) WithRefresh(v string) func(*CreateRequest) { } } +// WithRequireAlias - when true, requires destination to be an alias. default is false. +func (f Create) WithRequireAlias(v bool) func(*CreateRequest) { + return func(r *CreateRequest) { + r.RequireAlias = &v + } +} + +// WithRequireDataStream - when true, requires destination to be a data stream (existing or to be created). default is false. +func (f Create) WithRequireDataStream(v bool) func(*CreateRequest) { + return func(r *CreateRequest) { + r.RequireDataStream = &v + } +} + // WithRouting - specific routing value. func (f Create) WithRouting(v string) func(*CreateRequest) { return func(r *CreateRequest) { diff --git a/esapi/api.indices.put_data_stream_options.go b/esapi/api.indices.put_data_stream_options.go new file mode 100644 index 0000000000..ab063c32f2 --- /dev/null +++ b/esapi/api.indices.put_data_stream_options.go @@ -0,0 +1,285 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "io" + "net/http" + "strings" + "time" +) + +func newIndicesPutDataStreamOptionsFunc(t Transport) IndicesPutDataStreamOptions { + return func(name []string, o ...func(*IndicesPutDataStreamOptionsRequest)) (*Response, error) { + var r = IndicesPutDataStreamOptionsRequest{Name: name} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesPutDataStreamOptions updates the data stream options of the selected data streams. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +type IndicesPutDataStreamOptions func(name []string, o ...func(*IndicesPutDataStreamOptionsRequest)) (*Response, error) + +// IndicesPutDataStreamOptionsRequest configures the Indices Put Data Stream Options API request. +type IndicesPutDataStreamOptionsRequest struct { + Body io.Reader + + Name []string + + ExpandWildcards string + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesPutDataStreamOptionsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.put_data_stream_options") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_options")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(strings.Join(r.Name, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) + } + path.WriteString("/") + path.WriteString("_options") + + params = make(map[string]string) + + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.put_data_stream_options") + if reader := instrument.RecordRequestBody(ctx, "indices.put_data_stream_options", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.put_data_stream_options") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesPutDataStreamOptions) WithContext(v context.Context) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.ctx = v + } +} + +// WithBody - The data stream options configuration that consist of the failure store configuration. +func (f IndicesPutDataStreamOptions) WithBody(v io.Reader) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.Body = v + } +} + +// WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). +func (f IndicesPutDataStreamOptions) WithExpandWildcards(v string) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.ExpandWildcards = v + } +} + +// WithMasterTimeout - specify timeout for connection to master. +func (f IndicesPutDataStreamOptions) WithMasterTimeout(v time.Duration) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit timestamp for the document. +func (f IndicesPutDataStreamOptions) WithTimeout(v time.Duration) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesPutDataStreamOptions) WithPretty() func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesPutDataStreamOptions) WithHuman() func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesPutDataStreamOptions) WithErrorTrace() func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesPutDataStreamOptions) WithFilterPath(v ...string) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesPutDataStreamOptions) WithHeader(h map[string]string) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesPutDataStreamOptions) WithOpaqueID(s string) func(*IndicesPutDataStreamOptionsRequest) { + return func(r *IndicesPutDataStreamOptionsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.put_data_stream_settings.go b/esapi/api.indices.put_data_stream_settings.go new file mode 100644 index 0000000000..27939e249e --- /dev/null +++ b/esapi/api.indices.put_data_stream_settings.go @@ -0,0 +1,274 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strconv" + "strings" + "time" +) + +func newIndicesPutDataStreamSettingsFunc(t Transport) IndicesPutDataStreamSettings { + return func(name string, body io.Reader, o ...func(*IndicesPutDataStreamSettingsRequest)) (*Response, error) { + var r = IndicesPutDataStreamSettingsRequest{Name: name, Body: body} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesPutDataStreamSettings updates a data stream's settings +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +type IndicesPutDataStreamSettings func(name string, body io.Reader, o ...func(*IndicesPutDataStreamSettingsRequest)) (*Response, error) + +// IndicesPutDataStreamSettingsRequest configures the Indices Put Data Stream Settings API request. +type IndicesPutDataStreamSettingsRequest struct { + Body io.Reader + + Name string + + DryRun *bool + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesPutDataStreamSettingsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.put_data_stream_settings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(r.Name) + 1 + len("_settings")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(r.Name) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.Name) + } + path.WriteString("/") + path.WriteString("_settings") + + params = make(map[string]string) + + if r.DryRun != nil { + params["dry_run"] = strconv.FormatBool(*r.DryRun) + } + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.put_data_stream_settings") + if reader := instrument.RecordRequestBody(ctx, "indices.put_data_stream_settings", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.put_data_stream_settings") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesPutDataStreamSettings) WithContext(v context.Context) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.ctx = v + } +} + +// WithDryRun - whether this request should only be a dry run rather than actually applying settings. +func (f IndicesPutDataStreamSettings) WithDryRun(v bool) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.DryRun = &v + } +} + +// WithMasterTimeout - period to wait for a connection to the master node. +func (f IndicesPutDataStreamSettings) WithMasterTimeout(v time.Duration) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - period to wait for a response. +func (f IndicesPutDataStreamSettings) WithTimeout(v time.Duration) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesPutDataStreamSettings) WithPretty() func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesPutDataStreamSettings) WithHuman() func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesPutDataStreamSettings) WithErrorTrace() func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesPutDataStreamSettings) WithFilterPath(v ...string) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesPutDataStreamSettings) WithHeader(h map[string]string) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesPutDataStreamSettings) WithOpaqueID(s string) func(*IndicesPutDataStreamSettingsRequest) { + return func(r *IndicesPutDataStreamSettingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.indices.recovery.go b/esapi/api.indices.recovery.go index 79c472b780..27b3466cb1 100644 --- a/esapi/api.indices.recovery.go +++ b/esapi/api.indices.recovery.go @@ -52,8 +52,11 @@ type IndicesRecovery func(o ...func(*IndicesRecoveryRequest)) (*Response, error) type IndicesRecoveryRequest struct { Index []string - ActiveOnly *bool - Detailed *bool + ActiveOnly *bool + AllowNoIndices *bool + Detailed *bool + ExpandWildcards string + IgnoreUnavailable *bool Pretty bool Human bool @@ -104,10 +107,22 @@ func (r IndicesRecoveryRequest) Do(providedCtx context.Context, transport Transp params["active_only"] = strconv.FormatBool(*r.ActiveOnly) } + if r.AllowNoIndices != nil { + params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) + } + if r.Detailed != nil { params["detailed"] = strconv.FormatBool(*r.Detailed) } + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + if r.Pretty { params["pretty"] = "true" } @@ -200,6 +215,13 @@ func (f IndicesRecovery) WithActiveOnly(v bool) func(*IndicesRecoveryRequest) { } } +// WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). +func (f IndicesRecovery) WithAllowNoIndices(v bool) func(*IndicesRecoveryRequest) { + return func(r *IndicesRecoveryRequest) { + r.AllowNoIndices = &v + } +} + // WithDetailed - whether to display detailed information about shard recovery. func (f IndicesRecovery) WithDetailed(v bool) func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { @@ -207,6 +229,20 @@ func (f IndicesRecovery) WithDetailed(v bool) func(*IndicesRecoveryRequest) { } } +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +func (f IndicesRecovery) WithExpandWildcards(v string) func(*IndicesRecoveryRequest) { + return func(r *IndicesRecoveryRequest) { + r.ExpandWildcards = v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +func (f IndicesRecovery) WithIgnoreUnavailable(v bool) func(*IndicesRecoveryRequest) { + return func(r *IndicesRecoveryRequest) { + r.IgnoreUnavailable = &v + } +} + // WithPretty makes the response body pretty-printed. func (f IndicesRecovery) WithPretty() func(*IndicesRecoveryRequest) { return func(r *IndicesRecoveryRequest) { diff --git a/esapi/api.inference.put_amazonsagemaker.go b/esapi/api.inference.put_amazonsagemaker.go new file mode 100644 index 0000000000..7468d628f4 --- /dev/null +++ b/esapi/api.inference.put_amazonsagemaker.go @@ -0,0 +1,246 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newInferencePutAmazonsagemakerFunc(t Transport) InferencePutAmazonsagemaker { + return func(amazonsagemaker_inference_id string, task_type string, o ...func(*InferencePutAmazonsagemakerRequest)) (*Response, error) { + var r = InferencePutAmazonsagemakerRequest{AmazonsagemakerInferenceID: amazonsagemaker_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutAmazonsagemaker configure a Amazon SageMaker inference endpoint +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html. +type InferencePutAmazonsagemaker func(amazonsagemaker_inference_id string, task_type string, o ...func(*InferencePutAmazonsagemakerRequest)) (*Response, error) + +// InferencePutAmazonsagemakerRequest configures the Inference Put Amazonsagemaker API request. +type InferencePutAmazonsagemakerRequest struct { + Body io.Reader + + AmazonsagemakerInferenceID string + TaskType string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutAmazonsagemakerRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_amazonsagemaker") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.AmazonsagemakerInferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.AmazonsagemakerInferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "amazonsagemaker_inference_id", r.AmazonsagemakerInferenceID) + } + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_amazonsagemaker") + if reader := instrument.RecordRequestBody(ctx, "inference.put_amazonsagemaker", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_amazonsagemaker") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutAmazonsagemaker) WithContext(v context.Context) func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + r.ctx = v + } +} + +// WithBody - The inference endpoint's task and service settings. +func (f InferencePutAmazonsagemaker) WithBody(v io.Reader) func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + r.Body = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutAmazonsagemaker) WithPretty() func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutAmazonsagemaker) WithHuman() func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutAmazonsagemaker) WithErrorTrace() func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutAmazonsagemaker) WithFilterPath(v ...string) func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutAmazonsagemaker) WithHeader(h map[string]string) func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutAmazonsagemaker) WithOpaqueID(s string) func(*InferencePutAmazonsagemakerRequest) { + return func(r *InferencePutAmazonsagemakerRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_custom.go b/esapi/api.inference.put_custom.go new file mode 100644 index 0000000000..200ac43c2a --- /dev/null +++ b/esapi/api.inference.put_custom.go @@ -0,0 +1,246 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newInferencePutCustomFunc(t Transport) InferencePutCustom { + return func(custom_inference_id string, task_type string, o ...func(*InferencePutCustomRequest)) (*Response, error) { + var r = InferencePutCustomRequest{CustomInferenceID: custom_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutCustom configure a custom inference endpoint +// +// See full documentation at https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom. +type InferencePutCustom func(custom_inference_id string, task_type string, o ...func(*InferencePutCustomRequest)) (*Response, error) + +// InferencePutCustomRequest configures the Inference Put Custom API request. +type InferencePutCustomRequest struct { + Body io.Reader + + CustomInferenceID string + TaskType string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutCustomRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_custom") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.CustomInferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.CustomInferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "custom_inference_id", r.CustomInferenceID) + } + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_custom") + if reader := instrument.RecordRequestBody(ctx, "inference.put_custom", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_custom") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutCustom) WithContext(v context.Context) func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + r.ctx = v + } +} + +// WithBody - The inference endpoint's task and service settings. +func (f InferencePutCustom) WithBody(v io.Reader) func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + r.Body = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutCustom) WithPretty() func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutCustom) WithHuman() func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutCustom) WithErrorTrace() func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutCustom) WithFilterPath(v ...string) func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutCustom) WithHeader(h map[string]string) func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutCustom) WithOpaqueID(s string) func(*InferencePutCustomRequest) { + return func(r *InferencePutCustomRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_deepseek.go b/esapi/api.inference.put_deepseek.go new file mode 100644 index 0000000000..b7cff1c63c --- /dev/null +++ b/esapi/api.inference.put_deepseek.go @@ -0,0 +1,246 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "io" + "net/http" + "strings" +) + +func newInferencePutDeepseekFunc(t Transport) InferencePutDeepseek { + return func(deepseek_inference_id string, task_type string, o ...func(*InferencePutDeepseekRequest)) (*Response, error) { + var r = InferencePutDeepseekRequest{DeepseekInferenceID: deepseek_inference_id, TaskType: task_type} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// InferencePutDeepseek configure a DeepSeek inference endpoint +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html. +type InferencePutDeepseek func(deepseek_inference_id string, task_type string, o ...func(*InferencePutDeepseekRequest)) (*Response, error) + +// InferencePutDeepseekRequest configures the Inference Put Deepseek API request. +type InferencePutDeepseekRequest struct { + Body io.Reader + + DeepseekInferenceID string + TaskType string + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r InferencePutDeepseekRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_deepseek") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "PUT" + + path.Grow(7 + 1 + len("_inference") + 1 + len(r.TaskType) + 1 + len(r.DeepseekInferenceID)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + path.WriteString(r.TaskType) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "task_type", r.TaskType) + } + path.WriteString("/") + path.WriteString(r.DeepseekInferenceID) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "deepseek_inference_id", r.DeepseekInferenceID) + } + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), r.Body) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if r.Body != nil && req.Header.Get(headerContentType) == "" { + req.Header[headerContentType] = headerContentTypeJSON + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_deepseek") + if reader := instrument.RecordRequestBody(ctx, "inference.put_deepseek", r.Body); reader != nil { + req.Body = reader + } + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_deepseek") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f InferencePutDeepseek) WithContext(v context.Context) func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + r.ctx = v + } +} + +// WithBody - The inference endpoint's task and service settings. +func (f InferencePutDeepseek) WithBody(v io.Reader) func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + r.Body = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f InferencePutDeepseek) WithPretty() func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f InferencePutDeepseek) WithHuman() func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f InferencePutDeepseek) WithErrorTrace() func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f InferencePutDeepseek) WithFilterPath(v ...string) func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f InferencePutDeepseek) WithHeader(h map[string]string) func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f InferencePutDeepseek) WithOpaqueID(s string) func(*InferencePutDeepseekRequest) { + return func(r *InferencePutDeepseekRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.ingest.delete_geoip_database.go b/esapi/api.ingest.delete_geoip_database.go index cee652e0b5..9c1ecf9e25 100644 --- a/esapi/api.ingest.delete_geoip_database.go +++ b/esapi/api.ingest.delete_geoip_database.go @@ -24,6 +24,7 @@ import ( "errors" "net/http" "strings" + "time" ) func newIngestDeleteGeoipDatabaseFunc(t Transport) IngestDeleteGeoipDatabase { @@ -52,6 +53,9 @@ type IngestDeleteGeoipDatabase func(id []string, o ...func(*IngestDeleteGeoipDat type IngestDeleteGeoipDatabaseRequest struct { DocumentID []string + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +107,14 @@ func (r IngestDeleteGeoipDatabaseRequest) Do(providedCtx context.Context, transp params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -181,6 +193,20 @@ func (f IngestDeleteGeoipDatabase) WithContext(v context.Context) func(*IngestDe } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f IngestDeleteGeoipDatabase) WithMasterTimeout(v time.Duration) func(*IngestDeleteGeoipDatabaseRequest) { + return func(r *IngestDeleteGeoipDatabaseRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f IngestDeleteGeoipDatabase) WithTimeout(v time.Duration) func(*IngestDeleteGeoipDatabaseRequest) { + return func(r *IngestDeleteGeoipDatabaseRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f IngestDeleteGeoipDatabase) WithPretty() func(*IngestDeleteGeoipDatabaseRequest) { return func(r *IngestDeleteGeoipDatabaseRequest) { diff --git a/esapi/api.ingest.delete_ip_location_database.go b/esapi/api.ingest.delete_ip_location_database.go index 655472bc1a..ab78cd7bb7 100644 --- a/esapi/api.ingest.delete_ip_location_database.go +++ b/esapi/api.ingest.delete_ip_location_database.go @@ -24,6 +24,7 @@ import ( "errors" "net/http" "strings" + "time" ) func newIngestDeleteIPLocationDatabaseFunc(t Transport) IngestDeleteIPLocationDatabase { @@ -52,6 +53,9 @@ type IngestDeleteIPLocationDatabase func(id []string, o ...func(*IngestDeleteIPL type IngestDeleteIPLocationDatabaseRequest struct { DocumentID []string + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -103,6 +107,14 @@ func (r IngestDeleteIPLocationDatabaseRequest) Do(providedCtx context.Context, t params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -181,6 +193,20 @@ func (f IngestDeleteIPLocationDatabase) WithContext(v context.Context) func(*Ing } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f IngestDeleteIPLocationDatabase) WithMasterTimeout(v time.Duration) func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f IngestDeleteIPLocationDatabase) WithTimeout(v time.Duration) func(*IngestDeleteIPLocationDatabaseRequest) { + return func(r *IngestDeleteIPLocationDatabaseRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f IngestDeleteIPLocationDatabase) WithPretty() func(*IngestDeleteIPLocationDatabaseRequest) { return func(r *IngestDeleteIPLocationDatabaseRequest) { diff --git a/esapi/api.ingest.put_geoip_database.go b/esapi/api.ingest.put_geoip_database.go index 0d27ea7145..b0f06fedeb 100644 --- a/esapi/api.ingest.put_geoip_database.go +++ b/esapi/api.ingest.put_geoip_database.go @@ -24,6 +24,7 @@ import ( "io" "net/http" "strings" + "time" ) func newIngestPutGeoipDatabaseFunc(t Transport) IngestPutGeoipDatabase { @@ -54,6 +55,9 @@ type IngestPutGeoipDatabaseRequest struct { Body io.Reader + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -101,6 +105,14 @@ func (r IngestPutGeoipDatabaseRequest) Do(providedCtx context.Context, transport params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -186,6 +198,20 @@ func (f IngestPutGeoipDatabase) WithContext(v context.Context) func(*IngestPutGe } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f IngestPutGeoipDatabase) WithMasterTimeout(v time.Duration) func(*IngestPutGeoipDatabaseRequest) { + return func(r *IngestPutGeoipDatabaseRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f IngestPutGeoipDatabase) WithTimeout(v time.Duration) func(*IngestPutGeoipDatabaseRequest) { + return func(r *IngestPutGeoipDatabaseRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f IngestPutGeoipDatabase) WithPretty() func(*IngestPutGeoipDatabaseRequest) { return func(r *IngestPutGeoipDatabaseRequest) { diff --git a/esapi/api.ingest.put_ip_location_database.go b/esapi/api.ingest.put_ip_location_database.go index 97944120ae..94767dc3ad 100644 --- a/esapi/api.ingest.put_ip_location_database.go +++ b/esapi/api.ingest.put_ip_location_database.go @@ -24,6 +24,7 @@ import ( "io" "net/http" "strings" + "time" ) func newIngestPutIPLocationDatabaseFunc(t Transport) IngestPutIPLocationDatabase { @@ -54,6 +55,9 @@ type IngestPutIPLocationDatabaseRequest struct { Body io.Reader + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -101,6 +105,14 @@ func (r IngestPutIPLocationDatabaseRequest) Do(providedCtx context.Context, tran params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -186,6 +198,20 @@ func (f IngestPutIPLocationDatabase) WithContext(v context.Context) func(*Ingest } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f IngestPutIPLocationDatabase) WithMasterTimeout(v time.Duration) func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f IngestPutIPLocationDatabase) WithTimeout(v time.Duration) func(*IngestPutIPLocationDatabaseRequest) { + return func(r *IngestPutIPLocationDatabaseRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f IngestPutIPLocationDatabase) WithPretty() func(*IngestPutIPLocationDatabaseRequest) { return func(r *IngestPutIPLocationDatabaseRequest) { diff --git a/esapi/api.msearch.go b/esapi/api.msearch.go index d72c77f62c..cf924b5abb 100644 --- a/esapi/api.msearch.go +++ b/esapi/api.msearch.go @@ -55,11 +55,17 @@ type MsearchRequest struct { Body io.Reader + AllowNoIndices *bool CcsMinimizeRoundtrips *bool + ExpandWildcards string + IgnoreThrottled *bool + IgnoreUnavailable *bool + IncludeNamedQueriesScore *bool MaxConcurrentSearches *int MaxConcurrentShardRequests *int PreFilterShardSize *int RestTotalHitsAsInt *bool + Routing []string SearchType string TypedKeys *bool @@ -108,10 +114,34 @@ func (r MsearchRequest) Do(providedCtx context.Context, transport Transport) (*R params = make(map[string]string) + if r.AllowNoIndices != nil { + params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) + } + if r.CcsMinimizeRoundtrips != nil { params["ccs_minimize_roundtrips"] = strconv.FormatBool(*r.CcsMinimizeRoundtrips) } + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.IgnoreThrottled != nil { + params["ignore_throttled"] = strconv.FormatBool(*r.IgnoreThrottled) + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + + if r.IncludeNamedQueriesScore != nil { + params["include_named_queries_score"] = strconv.FormatBool(*r.IncludeNamedQueriesScore) + } + + if len(r.Index) > 0 { + params["index"] = strings.Join(r.Index, ",") + } + if r.MaxConcurrentSearches != nil { params["max_concurrent_searches"] = strconv.FormatInt(int64(*r.MaxConcurrentSearches), 10) } @@ -128,6 +158,10 @@ func (r MsearchRequest) Do(providedCtx context.Context, transport Transport) (*R params["rest_total_hits_as_int"] = strconv.FormatBool(*r.RestTotalHitsAsInt) } + if len(r.Routing) > 0 { + params["routing"] = strings.Join(r.Routing, ",") + } + if r.SearchType != "" { params["search_type"] = r.SearchType } @@ -228,6 +262,13 @@ func (f Msearch) WithIndex(v ...string) func(*MsearchRequest) { } } +// WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). +func (f Msearch) WithAllowNoIndices(v bool) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.AllowNoIndices = &v + } +} + // WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. func (f Msearch) WithCcsMinimizeRoundtrips(v bool) func(*MsearchRequest) { return func(r *MsearchRequest) { @@ -235,6 +276,34 @@ func (f Msearch) WithCcsMinimizeRoundtrips(v bool) func(*MsearchRequest) { } } +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +func (f Msearch) WithExpandWildcards(v string) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.ExpandWildcards = v + } +} + +// WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled. +func (f Msearch) WithIgnoreThrottled(v bool) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.IgnoreThrottled = &v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +func (f Msearch) WithIgnoreUnavailable(v bool) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.IgnoreUnavailable = &v + } +} + +// WithIncludeNamedQueriesScore - indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false). +func (f Msearch) WithIncludeNamedQueriesScore(v bool) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.IncludeNamedQueriesScore = &v + } +} + // WithMaxConcurrentSearches - controls the maximum number of concurrent searches the multi search api will execute. func (f Msearch) WithMaxConcurrentSearches(v int) func(*MsearchRequest) { return func(r *MsearchRequest) { @@ -263,6 +332,13 @@ func (f Msearch) WithRestTotalHitsAsInt(v bool) func(*MsearchRequest) { } } +// WithRouting - a list of specific routing values. +func (f Msearch) WithRouting(v ...string) func(*MsearchRequest) { + return func(r *MsearchRequest) { + r.Routing = v + } +} + // WithSearchType - search operation type. func (f Msearch) WithSearchType(v string) func(*MsearchRequest) { return func(r *MsearchRequest) { diff --git a/esapi/api.reindex.go b/esapi/api.reindex.go index 35bd184173..2ffb317a19 100644 --- a/esapi/api.reindex.go +++ b/esapi/api.reindex.go @@ -60,6 +60,7 @@ type ReindexRequest struct { MaxDocs *int Refresh *bool RequestsPerSecond *int + RequireAlias *bool Scroll time.Duration Slices interface{} Timeout time.Duration @@ -115,6 +116,10 @@ func (r ReindexRequest) Do(providedCtx context.Context, transport Transport) (*R params["requests_per_second"] = strconv.FormatInt(int64(*r.RequestsPerSecond), 10) } + if r.RequireAlias != nil { + params["require_alias"] = strconv.FormatBool(*r.RequireAlias) + } + if r.Scroll != 0 { params["scroll"] = formatDuration(r.Scroll) } @@ -241,6 +246,13 @@ func (f Reindex) WithRequestsPerSecond(v int) func(*ReindexRequest) { } } +// WithRequireAlias - when true, requires destination to be an alias.. +func (f Reindex) WithRequireAlias(v bool) func(*ReindexRequest) { + return func(r *ReindexRequest) { + r.RequireAlias = &v + } +} + // WithScroll - control how long to keep the search context alive. func (f Reindex) WithScroll(v time.Duration) func(*ReindexRequest) { return func(r *ReindexRequest) { diff --git a/esapi/api.search_mvt.go b/esapi/api.search_mvt.go index df69189466..65f9769eaa 100644 --- a/esapi/api.search_mvt.go +++ b/esapi/api.search_mvt.go @@ -66,6 +66,7 @@ type SearchMvtRequest struct { ExactBounds *bool Extent *int + GridAgg string GridPrecision *int GridType string Size *int @@ -156,6 +157,10 @@ func (r SearchMvtRequest) Do(providedCtx context.Context, transport Transport) ( params["extent"] = strconv.FormatInt(int64(*r.Extent), 10) } + if r.GridAgg != "" { + params["grid_agg"] = r.GridAgg + } + if r.GridPrecision != nil { params["grid_precision"] = strconv.FormatInt(int64(*r.GridPrecision), 10) } @@ -282,6 +287,13 @@ func (f SearchMvt) WithExtent(v int) func(*SearchMvtRequest) { } } +// WithGridAgg - aggregation used to create a grid for `field`.. +func (f SearchMvt) WithGridAgg(v string) func(*SearchMvtRequest) { + return func(r *SearchMvtRequest) { + r.GridAgg = v + } +} + // WithGridPrecision - additional zoom levels available through the aggs layer. accepts 0-8.. func (f SearchMvt) WithGridPrecision(v int) func(*SearchMvtRequest) { return func(r *SearchMvtRequest) { diff --git a/esapi/api.snapshot.repository_analyze.go b/esapi/api.snapshot.repository_analyze.go index 07e1a632e5..7197bfea6f 100644 --- a/esapi/api.snapshot.repository_analyze.go +++ b/esapi/api.snapshot.repository_analyze.go @@ -53,17 +53,18 @@ type SnapshotRepositoryAnalyze func(repository string, o ...func(*SnapshotReposi type SnapshotRepositoryAnalyzeRequest struct { Repository string - BlobCount *int - Concurrency *int - Detailed *bool - EarlyReadNodeCount *int - MaxBlobSize string - MaxTotalDataSize string - RareActionProbability *int - RarelyAbortWrites *bool - ReadNodeCount *int - Seed *int - Timeout time.Duration + BlobCount *int + Concurrency *int + Detailed *bool + EarlyReadNodeCount *int + MaxBlobSize string + MaxTotalDataSize string + RareActionProbability *int + RarelyAbortWrites *bool + ReadNodeCount *int + RegisterOperationCount *int + Seed *int + Timeout time.Duration Pretty bool Human bool @@ -146,6 +147,10 @@ func (r SnapshotRepositoryAnalyzeRequest) Do(providedCtx context.Context, transp params["read_node_count"] = strconv.FormatInt(int64(*r.ReadNodeCount), 10) } + if r.RegisterOperationCount != nil { + params["register_operation_count"] = strconv.FormatInt(int64(*r.RegisterOperationCount), 10) + } + if r.Seed != nil { params["seed"] = strconv.FormatInt(int64(*r.Seed), 10) } @@ -295,6 +300,13 @@ func (f SnapshotRepositoryAnalyze) WithReadNodeCount(v int) func(*SnapshotReposi } } +// WithRegisterOperationCount - the minimum number of linearizable register operations to perform in total. defaults to 10.. +func (f SnapshotRepositoryAnalyze) WithRegisterOperationCount(v int) func(*SnapshotRepositoryAnalyzeRequest) { + return func(r *SnapshotRepositoryAnalyzeRequest) { + r.RegisterOperationCount = &v + } +} + // WithSeed - seed for the random number generator used to create the test workload. defaults to a random value.. func (f SnapshotRepositoryAnalyze) WithSeed(v int) func(*SnapshotRepositoryAnalyzeRequest) { return func(r *SnapshotRepositoryAnalyzeRequest) { diff --git a/esapi/api.streams.logs_disable.go b/esapi/api.streams.logs_disable.go new file mode 100644 index 0000000000..26ec53e83a --- /dev/null +++ b/esapi/api.streams.logs_disable.go @@ -0,0 +1,241 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newStreamsLogsDisableFunc(t Transport) StreamsLogsDisable { + return func(o ...func(*StreamsLogsDisableRequest)) (*Response, error) { + var r = StreamsLogsDisableRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// StreamsLogsDisable disable the Logs Streams feature for this cluster +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-disable.html. +type StreamsLogsDisable func(o ...func(*StreamsLogsDisableRequest)) (*Response, error) + +// StreamsLogsDisableRequest configures the Streams Logs Disable API request. +type StreamsLogsDisableRequest struct { + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r StreamsLogsDisableRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.logs_disable") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "POST" + + path.Grow(7 + len("/_streams/logs/_disable")) + path.WriteString("http://") + path.WriteString("/_streams/logs/_disable") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "streams.logs_disable") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "streams.logs_disable") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f StreamsLogsDisable) WithContext(v context.Context) func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - period to wait for a connection to the master node. if no response is received before the timeout expires, the request fails and returns an error.. +func (f StreamsLogsDisable) WithMasterTimeout(v time.Duration) func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - period to wait for a response. if no response is received before the timeout expires, the request fails and returns an error.. +func (f StreamsLogsDisable) WithTimeout(v time.Duration) func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f StreamsLogsDisable) WithPretty() func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f StreamsLogsDisable) WithHuman() func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f StreamsLogsDisable) WithErrorTrace() func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f StreamsLogsDisable) WithFilterPath(v ...string) func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f StreamsLogsDisable) WithHeader(h map[string]string) func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f StreamsLogsDisable) WithOpaqueID(s string) func(*StreamsLogsDisableRequest) { + return func(r *StreamsLogsDisableRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.streams.logs_enable.go b/esapi/api.streams.logs_enable.go new file mode 100644 index 0000000000..42d093795e --- /dev/null +++ b/esapi/api.streams.logs_enable.go @@ -0,0 +1,241 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newStreamsLogsEnableFunc(t Transport) StreamsLogsEnable { + return func(o ...func(*StreamsLogsEnableRequest)) (*Response, error) { + var r = StreamsLogsEnableRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// StreamsLogsEnable enable the Logs Streams feature for this cluster +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-enable.html. +type StreamsLogsEnable func(o ...func(*StreamsLogsEnableRequest)) (*Response, error) + +// StreamsLogsEnableRequest configures the Streams Logs Enable API request. +type StreamsLogsEnableRequest struct { + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r StreamsLogsEnableRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.logs_enable") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "POST" + + path.Grow(7 + len("/_streams/logs/_enable")) + path.WriteString("http://") + path.WriteString("/_streams/logs/_enable") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "streams.logs_enable") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "streams.logs_enable") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f StreamsLogsEnable) WithContext(v context.Context) func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - period to wait for a connection to the master node. if no response is received before the timeout expires, the request fails and returns an error.. +func (f StreamsLogsEnable) WithMasterTimeout(v time.Duration) func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - period to wait for a response. if no response is received before the timeout expires, the request fails and returns an error.. +func (f StreamsLogsEnable) WithTimeout(v time.Duration) func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f StreamsLogsEnable) WithPretty() func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f StreamsLogsEnable) WithHuman() func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f StreamsLogsEnable) WithErrorTrace() func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f StreamsLogsEnable) WithFilterPath(v ...string) func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f StreamsLogsEnable) WithHeader(h map[string]string) func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f StreamsLogsEnable) WithOpaqueID(s string) func(*StreamsLogsEnableRequest) { + return func(r *StreamsLogsEnableRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.streams.status.go b/esapi/api.streams.status.go new file mode 100644 index 0000000000..f5b65f3f63 --- /dev/null +++ b/esapi/api.streams.status.go @@ -0,0 +1,215 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" +) + +func newStreamsStatusFunc(t Transport) StreamsStatus { + return func(o ...func(*StreamsStatusRequest)) (*Response, error) { + var r = StreamsStatusRequest{} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// StreamsStatus return the current status of the streams feature for each streams type +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-status.html. +type StreamsStatus func(o ...func(*StreamsStatusRequest)) (*Response, error) + +// StreamsStatusRequest configures the Streams Status API request. +type StreamsStatusRequest struct { + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r StreamsStatusRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.status") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + len("/_streams/status")) + path.WriteString("http://") + path.WriteString("/_streams/status") + + params = make(map[string]string) + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "streams.status") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "streams.status") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f StreamsStatus) WithContext(v context.Context) func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + r.ctx = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f StreamsStatus) WithPretty() func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f StreamsStatus) WithHuman() func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f StreamsStatus) WithErrorTrace() func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f StreamsStatus) WithFilterPath(v ...string) func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f StreamsStatus) WithHeader(h map[string]string) func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f StreamsStatus) WithOpaqueID(s string) func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.eql.search.go b/esapi/api.xpack.eql.search.go index f3baa11a21..cd11764e5a 100644 --- a/esapi/api.xpack.eql.search.go +++ b/esapi/api.xpack.eql.search.go @@ -56,8 +56,12 @@ type EqlSearchRequest struct { Body io.Reader + AllowNoIndices *bool AllowPartialSearchResults *bool AllowPartialSequenceResults *bool + CcsMinimizeRoundtrips *bool + ExpandWildcards string + IgnoreUnavailable *bool KeepAlive time.Duration KeepOnCompletion *bool WaitForCompletionTimeout time.Duration @@ -107,6 +111,10 @@ func (r EqlSearchRequest) Do(providedCtx context.Context, transport Transport) ( params = make(map[string]string) + if r.AllowNoIndices != nil { + params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) + } + if r.AllowPartialSearchResults != nil { params["allow_partial_search_results"] = strconv.FormatBool(*r.AllowPartialSearchResults) } @@ -115,6 +123,18 @@ func (r EqlSearchRequest) Do(providedCtx context.Context, transport Transport) ( params["allow_partial_sequence_results"] = strconv.FormatBool(*r.AllowPartialSequenceResults) } + if r.CcsMinimizeRoundtrips != nil { + params["ccs_minimize_roundtrips"] = strconv.FormatBool(*r.CcsMinimizeRoundtrips) + } + + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + if r.KeepAlive != 0 { params["keep_alive"] = formatDuration(r.KeepAlive) } @@ -212,6 +232,13 @@ func (f EqlSearch) WithContext(v context.Context) func(*EqlSearchRequest) { } } +// WithAllowNoIndices - whether to ignore if a wildcard indices expression resolves into no concrete indices. (this includes `_all` string or when no indices have been specified). +func (f EqlSearch) WithAllowNoIndices(v bool) func(*EqlSearchRequest) { + return func(r *EqlSearchRequest) { + r.AllowNoIndices = &v + } +} + // WithAllowPartialSearchResults - control whether the query should keep running in case of shard failures, and return partial results. func (f EqlSearch) WithAllowPartialSearchResults(v bool) func(*EqlSearchRequest) { return func(r *EqlSearchRequest) { @@ -226,6 +253,27 @@ func (f EqlSearch) WithAllowPartialSequenceResults(v bool) func(*EqlSearchReques } } +// WithCcsMinimizeRoundtrips - indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. +func (f EqlSearch) WithCcsMinimizeRoundtrips(v bool) func(*EqlSearchRequest) { + return func(r *EqlSearchRequest) { + r.CcsMinimizeRoundtrips = &v + } +} + +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +func (f EqlSearch) WithExpandWildcards(v string) func(*EqlSearchRequest) { + return func(r *EqlSearchRequest) { + r.ExpandWildcards = v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +func (f EqlSearch) WithIgnoreUnavailable(v bool) func(*EqlSearchRequest) { + return func(r *EqlSearchRequest) { + r.IgnoreUnavailable = &v + } +} + // WithKeepAlive - update the time interval in which the results (partial or final) for this search will be available. func (f EqlSearch) WithKeepAlive(v time.Duration) func(*EqlSearchRequest) { return func(r *EqlSearchRequest) { diff --git a/esapi/api.xpack.esql.async_query.go b/esapi/api.xpack.esql.async_query.go index e740b01f88..b454772ab4 100644 --- a/esapi/api.xpack.esql.async_query.go +++ b/esapi/api.xpack.esql.async_query.go @@ -53,9 +53,10 @@ type EsqlAsyncQuery func(body io.Reader, o ...func(*EsqlAsyncQueryRequest)) (*Re type EsqlAsyncQueryRequest struct { Body io.Reader - Delimiter string - DropNullColumns *bool - Format string + AllowPartialResults *bool + Delimiter string + DropNullColumns *bool + Format string Pretty bool Human bool @@ -94,6 +95,10 @@ func (r EsqlAsyncQueryRequest) Do(providedCtx context.Context, transport Transpo params = make(map[string]string) + if r.AllowPartialResults != nil { + params["allow_partial_results"] = strconv.FormatBool(*r.AllowPartialResults) + } + if r.Delimiter != "" { params["delimiter"] = r.Delimiter } @@ -191,6 +196,13 @@ func (f EsqlAsyncQuery) WithContext(v context.Context) func(*EsqlAsyncQueryReque } } +// WithAllowPartialResults - if `true`, partial results will be returned if there are shard failures, butthe query can continue to execute on other clusters and shards.if `false`, the entire query will fail if there areany failures.. +func (f EsqlAsyncQuery) WithAllowPartialResults(v bool) func(*EsqlAsyncQueryRequest) { + return func(r *EsqlAsyncQueryRequest) { + r.AllowPartialResults = &v + } +} + // WithDelimiter - the character to use between values within a csv row. only valid for the csv format.. func (f EsqlAsyncQuery) WithDelimiter(v string) func(*EsqlAsyncQueryRequest) { return func(r *EsqlAsyncQueryRequest) { diff --git a/esapi/api.xpack.esql.async_query_get.go b/esapi/api.xpack.esql.async_query_get.go index b668f93c32..131cbd0dc1 100644 --- a/esapi/api.xpack.esql.async_query_get.go +++ b/esapi/api.xpack.esql.async_query_get.go @@ -54,6 +54,7 @@ type EsqlAsyncQueryGetRequest struct { DocumentID string DropNullColumns *bool + Format string KeepAlive time.Duration WaitForCompletionTimeout time.Duration @@ -106,6 +107,10 @@ func (r EsqlAsyncQueryGetRequest) Do(providedCtx context.Context, transport Tran params["drop_null_columns"] = strconv.FormatBool(*r.DropNullColumns) } + if r.Format != "" { + params["format"] = r.Format + } + if r.KeepAlive != 0 { params["keep_alive"] = formatDuration(r.KeepAlive) } @@ -199,6 +204,13 @@ func (f EsqlAsyncQueryGet) WithDropNullColumns(v bool) func(*EsqlAsyncQueryGetRe } } +// WithFormat - a short version of the accept header, e.g. json, yaml. +func (f EsqlAsyncQueryGet) WithFormat(v string) func(*EsqlAsyncQueryGetRequest) { + return func(r *EsqlAsyncQueryGetRequest) { + r.Format = v + } +} + // WithKeepAlive - specify the time interval in which the results (partial or final) for this search will be available. func (f EsqlAsyncQueryGet) WithKeepAlive(v time.Duration) func(*EsqlAsyncQueryGetRequest) { return func(r *EsqlAsyncQueryGetRequest) { diff --git a/esapi/api.xpack.esql.query.go b/esapi/api.xpack.esql.query.go index b7dba59b04..018d277744 100644 --- a/esapi/api.xpack.esql.query.go +++ b/esapi/api.xpack.esql.query.go @@ -53,9 +53,10 @@ type EsqlQuery func(body io.Reader, o ...func(*EsqlQueryRequest)) (*Response, er type EsqlQueryRequest struct { Body io.Reader - Delimiter string - DropNullColumns *bool - Format string + AllowPartialResults *bool + Delimiter string + DropNullColumns *bool + Format string Pretty bool Human bool @@ -94,6 +95,10 @@ func (r EsqlQueryRequest) Do(providedCtx context.Context, transport Transport) ( params = make(map[string]string) + if r.AllowPartialResults != nil { + params["allow_partial_results"] = strconv.FormatBool(*r.AllowPartialResults) + } + if r.Delimiter != "" { params["delimiter"] = r.Delimiter } @@ -191,6 +196,13 @@ func (f EsqlQuery) WithContext(v context.Context) func(*EsqlQueryRequest) { } } +// WithAllowPartialResults - if `true`, partial results will be returned if there are shard failures, butthe query can continue to execute on other clusters and shards.if `false`, the entire query will fail if there areany failures.. +func (f EsqlQuery) WithAllowPartialResults(v bool) func(*EsqlQueryRequest) { + return func(r *EsqlQueryRequest) { + r.AllowPartialResults = &v + } +} + // WithDelimiter - the character to use between values within a csv row. only valid for the csv format.. func (f EsqlQuery) WithDelimiter(v string) func(*EsqlQueryRequest) { return func(r *EsqlQueryRequest) { diff --git a/esapi/api.xpack.ilm.delete_lifecycle.go b/esapi/api.xpack.ilm.delete_lifecycle.go index fddcd14b63..4eb6264ddf 100644 --- a/esapi/api.xpack.ilm.delete_lifecycle.go +++ b/esapi/api.xpack.ilm.delete_lifecycle.go @@ -23,6 +23,7 @@ import ( "context" "net/http" "strings" + "time" ) func newILMDeleteLifecycleFunc(t Transport) ILMDeleteLifecycle { @@ -51,6 +52,9 @@ type ILMDeleteLifecycle func(policy string, o ...func(*ILMDeleteLifecycleRequest type ILMDeleteLifecycleRequest struct { Policy string + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -96,6 +100,14 @@ func (r ILMDeleteLifecycleRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -174,6 +186,20 @@ func (f ILMDeleteLifecycle) WithContext(v context.Context) func(*ILMDeleteLifecy } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f ILMDeleteLifecycle) WithMasterTimeout(v time.Duration) func(*ILMDeleteLifecycleRequest) { + return func(r *ILMDeleteLifecycleRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f ILMDeleteLifecycle) WithTimeout(v time.Duration) func(*ILMDeleteLifecycleRequest) { + return func(r *ILMDeleteLifecycleRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f ILMDeleteLifecycle) WithPretty() func(*ILMDeleteLifecycleRequest) { return func(r *ILMDeleteLifecycleRequest) { diff --git a/esapi/api.xpack.ilm.explain_lifecycle.go b/esapi/api.xpack.ilm.explain_lifecycle.go index fba0e8648a..8f922de294 100644 --- a/esapi/api.xpack.ilm.explain_lifecycle.go +++ b/esapi/api.xpack.ilm.explain_lifecycle.go @@ -24,6 +24,7 @@ import ( "net/http" "strconv" "strings" + "time" ) func newILMExplainLifecycleFunc(t Transport) ILMExplainLifecycle { @@ -52,8 +53,9 @@ type ILMExplainLifecycle func(index string, o ...func(*ILMExplainLifecycleReques type ILMExplainLifecycleRequest struct { Index string - OnlyErrors *bool - OnlyManaged *bool + MasterTimeout time.Duration + OnlyErrors *bool + OnlyManaged *bool Pretty bool Human bool @@ -100,6 +102,10 @@ func (r ILMExplainLifecycleRequest) Do(providedCtx context.Context, transport Tr params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + if r.OnlyErrors != nil { params["only_errors"] = strconv.FormatBool(*r.OnlyErrors) } @@ -186,6 +192,13 @@ func (f ILMExplainLifecycle) WithContext(v context.Context) func(*ILMExplainLife } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f ILMExplainLifecycle) WithMasterTimeout(v time.Duration) func(*ILMExplainLifecycleRequest) { + return func(r *ILMExplainLifecycleRequest) { + r.MasterTimeout = v + } +} + // WithOnlyErrors - filters the indices included in the response to ones in an ilm error state, implies only_managed. func (f ILMExplainLifecycle) WithOnlyErrors(v bool) func(*ILMExplainLifecycleRequest) { return func(r *ILMExplainLifecycleRequest) { diff --git a/esapi/api.xpack.ilm.get_lifecycle.go b/esapi/api.xpack.ilm.get_lifecycle.go index 0e82c4cded..b9c9b7725a 100644 --- a/esapi/api.xpack.ilm.get_lifecycle.go +++ b/esapi/api.xpack.ilm.get_lifecycle.go @@ -23,6 +23,7 @@ import ( "context" "net/http" "strings" + "time" ) func newILMGetLifecycleFunc(t Transport) ILMGetLifecycle { @@ -51,6 +52,9 @@ type ILMGetLifecycle func(o ...func(*ILMGetLifecycleRequest)) (*Response, error) type ILMGetLifecycleRequest struct { Policy string + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -98,6 +102,14 @@ func (r ILMGetLifecycleRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -183,6 +195,20 @@ func (f ILMGetLifecycle) WithPolicy(v string) func(*ILMGetLifecycleRequest) { } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f ILMGetLifecycle) WithMasterTimeout(v time.Duration) func(*ILMGetLifecycleRequest) { + return func(r *ILMGetLifecycleRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f ILMGetLifecycle) WithTimeout(v time.Duration) func(*ILMGetLifecycleRequest) { + return func(r *ILMGetLifecycleRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f ILMGetLifecycle) WithPretty() func(*ILMGetLifecycleRequest) { return func(r *ILMGetLifecycleRequest) { diff --git a/esapi/api.xpack.ilm.put_lifecycle.go b/esapi/api.xpack.ilm.put_lifecycle.go index 3656531795..ba88751f7a 100644 --- a/esapi/api.xpack.ilm.put_lifecycle.go +++ b/esapi/api.xpack.ilm.put_lifecycle.go @@ -24,6 +24,7 @@ import ( "io" "net/http" "strings" + "time" ) func newILMPutLifecycleFunc(t Transport) ILMPutLifecycle { @@ -54,6 +55,9 @@ type ILMPutLifecycleRequest struct { Policy string + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -99,6 +103,14 @@ func (r ILMPutLifecycleRequest) Do(providedCtx context.Context, transport Transp params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -191,6 +203,20 @@ func (f ILMPutLifecycle) WithBody(v io.Reader) func(*ILMPutLifecycleRequest) { } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f ILMPutLifecycle) WithMasterTimeout(v time.Duration) func(*ILMPutLifecycleRequest) { + return func(r *ILMPutLifecycleRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f ILMPutLifecycle) WithTimeout(v time.Duration) func(*ILMPutLifecycleRequest) { + return func(r *ILMPutLifecycleRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f ILMPutLifecycle) WithPretty() func(*ILMPutLifecycleRequest) { return func(r *ILMPutLifecycleRequest) { diff --git a/esapi/api.xpack.ilm.start.go b/esapi/api.xpack.ilm.start.go index 58b3046c87..1fca66ce81 100644 --- a/esapi/api.xpack.ilm.start.go +++ b/esapi/api.xpack.ilm.start.go @@ -23,6 +23,7 @@ import ( "context" "net/http" "strings" + "time" ) func newILMStartFunc(t Transport) ILMStart { @@ -49,6 +50,9 @@ type ILMStart func(o ...func(*ILMStartRequest)) (*Response, error) // ILMStartRequest configures the ILM Start API request. type ILMStartRequest struct { + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -86,6 +90,14 @@ func (r ILMStartRequest) Do(providedCtx context.Context, transport Transport) (* params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -164,6 +176,20 @@ func (f ILMStart) WithContext(v context.Context) func(*ILMStartRequest) { } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f ILMStart) WithMasterTimeout(v time.Duration) func(*ILMStartRequest) { + return func(r *ILMStartRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f ILMStart) WithTimeout(v time.Duration) func(*ILMStartRequest) { + return func(r *ILMStartRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f ILMStart) WithPretty() func(*ILMStartRequest) { return func(r *ILMStartRequest) { diff --git a/esapi/api.xpack.ilm.stop.go b/esapi/api.xpack.ilm.stop.go index f8396aa83a..98a510afab 100644 --- a/esapi/api.xpack.ilm.stop.go +++ b/esapi/api.xpack.ilm.stop.go @@ -23,6 +23,7 @@ import ( "context" "net/http" "strings" + "time" ) func newILMStopFunc(t Transport) ILMStop { @@ -49,6 +50,9 @@ type ILMStop func(o ...func(*ILMStopRequest)) (*Response, error) // ILMStopRequest configures the ILM Stop API request. type ILMStopRequest struct { + MasterTimeout time.Duration + Timeout time.Duration + Pretty bool Human bool ErrorTrace bool @@ -86,6 +90,14 @@ func (r ILMStopRequest) Do(providedCtx context.Context, transport Transport) (*R params = make(map[string]string) + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + if r.Pretty { params["pretty"] = "true" } @@ -164,6 +176,20 @@ func (f ILMStop) WithContext(v context.Context) func(*ILMStopRequest) { } } +// WithMasterTimeout - explicit operation timeout for connection to master node. +func (f ILMStop) WithMasterTimeout(v time.Duration) func(*ILMStopRequest) { + return func(r *ILMStopRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f ILMStop) WithTimeout(v time.Duration) func(*ILMStopRequest) { + return func(r *ILMStopRequest) { + r.Timeout = v + } +} + // WithPretty makes the response body pretty-printed. func (f ILMStop) WithPretty() func(*ILMStopRequest) { return func(r *ILMStopRequest) { diff --git a/esapi/api.xpack.indices.delete_data_stream_options.go b/esapi/api.xpack.indices.delete_data_stream_options.go new file mode 100644 index 0000000000..6b4d35f3dd --- /dev/null +++ b/esapi/api.xpack.indices.delete_data_stream_options.go @@ -0,0 +1,268 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "net/http" + "strings" + "time" +) + +func newIndicesDeleteDataStreamOptionsFunc(t Transport) IndicesDeleteDataStreamOptions { + return func(name []string, o ...func(*IndicesDeleteDataStreamOptionsRequest)) (*Response, error) { + var r = IndicesDeleteDataStreamOptionsRequest{Name: name} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesDeleteDataStreamOptions - Deletes the data stream options of the selected data streams. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +type IndicesDeleteDataStreamOptions func(name []string, o ...func(*IndicesDeleteDataStreamOptionsRequest)) (*Response, error) + +// IndicesDeleteDataStreamOptionsRequest configures the Indices Delete Data Stream Options API request. +type IndicesDeleteDataStreamOptionsRequest struct { + Name []string + + ExpandWildcards string + MasterTimeout time.Duration + Timeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesDeleteDataStreamOptionsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.delete_data_stream_options") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "DELETE" + + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_options")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(strings.Join(r.Name, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) + } + path.WriteString("/") + path.WriteString("_options") + + params = make(map[string]string) + + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Timeout != 0 { + params["timeout"] = formatDuration(r.Timeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.delete_data_stream_options") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.delete_data_stream_options") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesDeleteDataStreamOptions) WithContext(v context.Context) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.ctx = v + } +} + +// WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). +func (f IndicesDeleteDataStreamOptions) WithExpandWildcards(v string) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.ExpandWildcards = v + } +} + +// WithMasterTimeout - specify timeout for connection to master. +func (f IndicesDeleteDataStreamOptions) WithMasterTimeout(v time.Duration) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit timestamp for the document. +func (f IndicesDeleteDataStreamOptions) WithTimeout(v time.Duration) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesDeleteDataStreamOptions) WithPretty() func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesDeleteDataStreamOptions) WithHuman() func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesDeleteDataStreamOptions) WithErrorTrace() func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesDeleteDataStreamOptions) WithFilterPath(v ...string) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesDeleteDataStreamOptions) WithHeader(h map[string]string) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesDeleteDataStreamOptions) WithOpaqueID(s string) func(*IndicesDeleteDataStreamOptionsRequest) { + return func(r *IndicesDeleteDataStreamOptionsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.indices.get_data_stream_options.go b/esapi/api.xpack.indices.get_data_stream_options.go new file mode 100644 index 0000000000..aa22f828b1 --- /dev/null +++ b/esapi/api.xpack.indices.get_data_stream_options.go @@ -0,0 +1,256 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "net/http" + "strings" + "time" +) + +func newIndicesGetDataStreamOptionsFunc(t Transport) IndicesGetDataStreamOptions { + return func(name []string, o ...func(*IndicesGetDataStreamOptionsRequest)) (*Response, error) { + var r = IndicesGetDataStreamOptionsRequest{Name: name} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetDataStreamOptions - Returns the data stream options of the selected data streams. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. +type IndicesGetDataStreamOptions func(name []string, o ...func(*IndicesGetDataStreamOptionsRequest)) (*Response, error) + +// IndicesGetDataStreamOptionsRequest configures the Indices Get Data Stream Options API request. +type IndicesGetDataStreamOptionsRequest struct { + Name []string + + ExpandWildcards string + MasterTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetDataStreamOptionsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_data_stream_options") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + if len(r.Name) == 0 { + return nil, errors.New("name is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(strings.Join(r.Name, ",")) + 1 + len("_options")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(strings.Join(r.Name, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", strings.Join(r.Name, ",")) + } + path.WriteString("/") + path.WriteString("_options") + + params = make(map[string]string) + + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_data_stream_options") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_data_stream_options") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetDataStreamOptions) WithContext(v context.Context) func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.ctx = v + } +} + +// WithExpandWildcards - whether wildcard expressions should get expanded to open or closed indices (default: open). +func (f IndicesGetDataStreamOptions) WithExpandWildcards(v string) func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.ExpandWildcards = v + } +} + +// WithMasterTimeout - specify timeout for connection to master. +func (f IndicesGetDataStreamOptions) WithMasterTimeout(v time.Duration) func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.MasterTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetDataStreamOptions) WithPretty() func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetDataStreamOptions) WithHuman() func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetDataStreamOptions) WithErrorTrace() func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetDataStreamOptions) WithFilterPath(v ...string) func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetDataStreamOptions) WithHeader(h map[string]string) func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetDataStreamOptions) WithOpaqueID(s string) func(*IndicesGetDataStreamOptionsRequest) { + return func(r *IndicesGetDataStreamOptionsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.indices.get_data_stream_settings.go b/esapi/api.xpack.indices.get_data_stream_settings.go new file mode 100644 index 0000000000..f1b6290ec6 --- /dev/null +++ b/esapi/api.xpack.indices.get_data_stream_settings.go @@ -0,0 +1,239 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// Code generated from specification version 8.19.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +func newIndicesGetDataStreamSettingsFunc(t Transport) IndicesGetDataStreamSettings { + return func(name string, o ...func(*IndicesGetDataStreamSettingsRequest)) (*Response, error) { + var r = IndicesGetDataStreamSettingsRequest{Name: name} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesGetDataStreamSettings - Gets a data stream's settings +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html. +type IndicesGetDataStreamSettings func(name string, o ...func(*IndicesGetDataStreamSettingsRequest)) (*Response, error) + +// IndicesGetDataStreamSettingsRequest configures the Indices Get Data Stream Settings API request. +type IndicesGetDataStreamSettingsRequest struct { + Name string + + MasterTimeout time.Duration + + Pretty bool + Human bool + ErrorTrace bool + FilterPath []string + + Header http.Header + + ctx context.Context + + Instrument Instrumentation +} + +// Do executes the request and returns response or error. +func (r IndicesGetDataStreamSettingsRequest) Do(providedCtx context.Context, transport Transport) (*Response, error) { + var ( + method string + path strings.Builder + params map[string]string + ctx context.Context + ) + + if instrument, ok := r.Instrument.(Instrumentation); ok { + ctx = instrument.Start(providedCtx, "indices.get_data_stream_settings") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "GET" + + path.Grow(7 + 1 + len("_data_stream") + 1 + len(r.Name) + 1 + len("_settings")) + path.WriteString("http://") + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + path.WriteString(r.Name) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.Name) + } + path.WriteString("/") + path.WriteString("_settings") + + params = make(map[string]string) + + if r.MasterTimeout != 0 { + params["master_timeout"] = formatDuration(r.MasterTimeout) + } + + if r.Pretty { + params["pretty"] = "true" + } + + if r.Human { + params["human"] = "true" + } + + if r.ErrorTrace { + params["error_trace"] = "true" + } + + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + + req, err := newRequest(method, path.String(), nil) + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if len(params) > 0 { + q := req.URL.Query() + for k, v := range params { + q.Set(k, v) + } + req.URL.RawQuery = q.Encode() + } + + if len(r.Header) > 0 { + if len(req.Header) == 0 { + req.Header = r.Header + } else { + for k, vv := range r.Header { + for _, v := range vv { + req.Header.Add(k, v) + } + } + } + } + + if ctx != nil { + req = req.WithContext(ctx) + } + + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.BeforeRequest(req, "indices.get_data_stream_settings") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.get_data_stream_settings") + } + if err != nil { + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + response := Response{ + StatusCode: res.StatusCode, + Body: res.Body, + Header: res.Header, + } + + return &response, nil +} + +// WithContext sets the request context. +func (f IndicesGetDataStreamSettings) WithContext(v context.Context) func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + r.ctx = v + } +} + +// WithMasterTimeout - period to wait for a connection to the master node. +func (f IndicesGetDataStreamSettings) WithMasterTimeout(v time.Duration) func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + r.MasterTimeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesGetDataStreamSettings) WithPretty() func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesGetDataStreamSettings) WithHuman() func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesGetDataStreamSettings) WithErrorTrace() func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesGetDataStreamSettings) WithFilterPath(v ...string) func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesGetDataStreamSettings) WithHeader(h map[string]string) func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + for k, v := range h { + r.Header.Add(k, v) + } + } +} + +// WithOpaqueID adds the X-Opaque-Id header to the HTTP request. +func (f IndicesGetDataStreamSettings) WithOpaqueID(s string) func(*IndicesGetDataStreamSettingsRequest) { + return func(r *IndicesGetDataStreamSettingsRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.xpack.open_point_in_time.go b/esapi/api.xpack.open_point_in_time.go index 4177a8a28d..2124c38b1e 100644 --- a/esapi/api.xpack.open_point_in_time.go +++ b/esapi/api.xpack.open_point_in_time.go @@ -56,12 +56,13 @@ type OpenPointInTimeRequest struct { Body io.Reader - AllowPartialSearchResults *bool - ExpandWildcards string - IgnoreUnavailable *bool - KeepAlive string - Preference string - Routing string + AllowPartialSearchResults *bool + ExpandWildcards string + IgnoreUnavailable *bool + KeepAlive string + MaxConcurrentShardRequests *int + Preference string + Routing string Pretty bool Human bool @@ -126,6 +127,10 @@ func (r OpenPointInTimeRequest) Do(providedCtx context.Context, transport Transp params["keep_alive"] = r.KeepAlive } + if r.MaxConcurrentShardRequests != nil { + params["max_concurrent_shard_requests"] = strconv.FormatInt(int64(*r.MaxConcurrentShardRequests), 10) + } + if r.Preference != "" { params["preference"] = r.Preference } @@ -254,6 +259,13 @@ func (f OpenPointInTime) WithKeepAlive(v string) func(*OpenPointInTimeRequest) { } } +// WithMaxConcurrentShardRequests - the number of concurrent shard requests per node executed concurrently when opening this point-in-time. this value should be used to limit the impact of opening the point-in-time on the cluster. +func (f OpenPointInTime) WithMaxConcurrentShardRequests(v int) func(*OpenPointInTimeRequest) { + return func(r *OpenPointInTimeRequest) { + r.MaxConcurrentShardRequests = &v + } +} + // WithPreference - specify the node or shard the operation should be performed on (default: random). func (f OpenPointInTime) WithPreference(v string) func(*OpenPointInTimeRequest) { return func(r *OpenPointInTimeRequest) { diff --git a/esapi/api.xpack.searchable_snapshots.clear_cache.go b/esapi/api.xpack.searchable_snapshots.clear_cache.go index 87e050de87..08ce908488 100644 --- a/esapi/api.xpack.searchable_snapshots.clear_cache.go +++ b/esapi/api.xpack.searchable_snapshots.clear_cache.go @@ -119,10 +119,6 @@ func (r SearchableSnapshotsClearCacheRequest) Do(providedCtx context.Context, tr params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) } - if len(r.Index) > 0 { - params["index"] = strings.Join(r.Index, ",") - } - if r.Pretty { params["pretty"] = "true" } diff --git a/esapi/api.xpack.text_structure.find_field_structure.go b/esapi/api.xpack.text_structure.find_field_structure.go index 385c0c9b74..5415b95765 100644 --- a/esapi/api.xpack.text_structure.find_field_structure.go +++ b/esapi/api.xpack.text_structure.find_field_structure.go @@ -28,8 +28,8 @@ import ( ) func newTextStructureFindFieldStructureFunc(t Transport) TextStructureFindFieldStructure { - return func(index string, field string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) { - var r = TextStructureFindFieldStructureRequest{Field: field, Index: index} + return func(field string, index string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) { + var r = TextStructureFindFieldStructureRequest{Index: index, Field: field} for _, f := range o { f(&r) } @@ -47,7 +47,7 @@ func newTextStructureFindFieldStructureFunc(t Transport) TextStructureFindFieldS // TextStructureFindFieldStructure - Finds the structure of a text field in an index. // // See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html. -type TextStructureFindFieldStructure func(field string, index string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) +type TextStructureFindFieldStructure func(index string, field string, o ...func(*TextStructureFindFieldStructureRequest)) (*Response, error) // TextStructureFindFieldStructureRequest configures the Text Structure Find Field Structure API request. type TextStructureFindFieldStructureRequest struct { diff --git a/internal/build/cmd/generate/commands/gentests/skips.go b/internal/build/cmd/generate/commands/gentests/skips.go index d0b6fc6f93..30e385e2c5 100644 --- a/internal/build/cmd/generate/commands/gentests/skips.go +++ b/internal/build/cmd/generate/commands/gentests/skips.go @@ -52,6 +52,7 @@ var skipFiles = []string{ "indices.stats/50_disk_usage.yml", // Needs a replacement mechanism implementation "indices.stats/60_field_usage.yml", // Needs a replacement mechanism implementation "indices.stats/100_search_idle.yml", // incompatible maps of array + "indices.stats/80_search_load.yml", "eql/10_basic.yml", "field_caps/50_fieldtype_filter.yml", // Incompatible test, need handling for double escaping keys with dots "aggregations/variable_width_histogram.yml", @@ -68,6 +69,7 @@ var skipFiles = []string{ "deprecation/10_basic.yml", // incompatible test generation "search/520_fetch_fields.yml", // disabled for inconsistency "search.vectors/90_sparse_vector.yml", + "search.vectors/220_dense_vector_node_index_stats.yml", "indices.create/21_synthetic_source_stored.yml", "indices.create/20_synthetic_source.yml", "indices.recovery/20_synthetic_source.yml", @@ -76,6 +78,10 @@ var skipFiles = []string{ "search/600_flattened_ignore_above.yml", "search/540_ignore_above_synthetic_source.yml", "update/100_synthetic_source.yml", + "tsdb/160_nested_fields.yml", + "tsdb/90_unsupported_operations.yml", + ".*inference/.*.yml", // incompatible inference tests + ".*mustache/.*.yml", // incompatible mustache tests } // TODO: Comments into descriptions for `Skip()` @@ -434,6 +440,10 @@ data_stream/10_basic.yml: - Create data stream - Create data stream with invalid name - append-only writes to backing indices prohibited + - Create data stream with failure store + - Get data stream api check existence of replicated field + - Get data stream api check existence of allow_custom_routing field + - Create data stream with match all template # The matcher like 'indices.0.aliases.0' points to internal index data_stream/80_resolve_index_data_streams.yml: @@ -460,6 +470,15 @@ data_stream/90_reindex.yml: data_streams/10_data_stream_resolvability.yml: - Verify data stream resolvability in ILM remove policy API +data_stream/230_data_stream_options.yml: + - Test partially resetting failure store options in template composition + +data_stream/240_data_stream_settings.yml: + - Test single data stream + - Test dry run + - Test null out settings + - Test null out settings component templates only + # Error: constant 9223372036854775808 overflows int (https://play.golang.org/p/7pUdz-_Pdom) unsigned_long/10_basic.yml: unsigned_long/20_null_value.yml: @@ -566,6 +585,9 @@ search/140_pre_filter_search_shards.yml: health/10_usage.yml: - Usage stats on the health API +health/40_diagnosis.yml: + - Diagnosis + esql/10_basic.yml: - Test Mixed Input Params @@ -633,4 +655,18 @@ search.suggest/20_phrase.yml: migrate/30_create_from.yml: - Test create_from with remove_index_blocks default of true + +#unsupported vector searches +search.vectors/41_knn_search_bbq_hnsw.yml: + - Test index configured rescore vector updateable and settable to 0 +search.vectors/41_knn_search_byte_quantized.yml: + - Test index configured rescore vector updateable and settable to 0 +search.vectors/46_knn_search_bbq_ivf.yml: + - Test index configured rescore vector updateable and settable to 0 +search.vectors/41_knn_search_half_byte_quantized.yml: + - Test index configured rescore vector updateable and settable to 0 + +tsdb/25_id_generation.yml: + - delete over _bulk + ` diff --git a/internal/testing/e2e/elasticsearch_integration_test.go b/internal/testing/e2e/elasticsearch_integration_test.go index e520a5d9ef..218d675139 100644 --- a/internal/testing/e2e/elasticsearch_integration_test.go +++ b/internal/testing/e2e/elasticsearch_integration_test.go @@ -26,7 +26,6 @@ import ( "crypto/tls" "crypto/x509" "encoding/json" - "errors" "fmt" "log" "net" @@ -331,9 +330,9 @@ func TestElasticsearchIntegration(t *testing.T) { } // Same faulty index name with error handling - _, err = es.Get("non-existent-index", "9999").Do(context.Background()) - if !errors.As(err, &types.ElasticsearchError{}) && !errors.Is(err, &types.ElasticsearchError{Status: 404}) { - t.Fatalf("expected ElasticsearchError, got: %v", err) + indexget, err := es.Get("non-existent-index", "9999").Do(context.Background()) + if indexget.Found == true { + t.Fatalf("expected Found to be false, got: %v", indexget) } // Simple search matching name diff --git a/typedapi/api._.go b/typedapi/api._.go index 93a558f89d..6c7fed3fd1 100644 --- a/typedapi/api._.go +++ b/typedapi/api._.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package typedapi @@ -268,10 +268,13 @@ import ( inference_put "github.com/elastic/go-elasticsearch/v8/typedapi/inference/put" inference_put_alibabacloud "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putalibabacloud" inference_put_amazonbedrock "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putamazonbedrock" + inference_put_amazonsagemaker "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putamazonsagemaker" inference_put_anthropic "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putanthropic" inference_put_azureaistudio "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putazureaistudio" inference_put_azureopenai "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putazureopenai" inference_put_cohere "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putcohere" + inference_put_custom "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putcustom" + inference_put_deepseek "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putdeepseek" inference_put_elasticsearch "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putelasticsearch" inference_put_elser "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putelser" inference_put_googleaistudio "github.com/elastic/go-elasticsearch/v8/typedapi/inference/putgoogleaistudio" @@ -524,6 +527,9 @@ import ( sql_query "github.com/elastic/go-elasticsearch/v8/typedapi/sql/query" sql_translate "github.com/elastic/go-elasticsearch/v8/typedapi/sql/translate" ssl_certificates "github.com/elastic/go-elasticsearch/v8/typedapi/ssl/certificates" + streams_logs_disable "github.com/elastic/go-elasticsearch/v8/typedapi/streams/logsdisable" + streams_logs_enable "github.com/elastic/go-elasticsearch/v8/typedapi/streams/logsenable" + streams_status "github.com/elastic/go-elasticsearch/v8/typedapi/streams/status" synonyms_delete_synonym "github.com/elastic/go-elasticsearch/v8/typedapi/synonyms/deletesynonym" synonyms_delete_synonym_rule "github.com/elastic/go-elasticsearch/v8/typedapi/synonyms/deletesynonymrule" synonyms_get_synonym "github.com/elastic/go-elasticsearch/v8/typedapi/synonyms/getsynonym" @@ -568,7984 +574,683 @@ import ( ) type AsyncSearch struct { - // Delete an async search. - // - // If the asynchronous search is still running, it is cancelled. - // Otherwise, the saved search results are deleted. - // If the Elasticsearch security features are enabled, the deletion of a - // specific async search is restricted to: the authenticated user that submitted - // the original search request; users that have the `cancel_task` cluster - // privilege. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html Delete async_search_delete.NewDelete - // Get async search results. - // - // Retrieve the results of a previously submitted asynchronous search request. - // If the Elasticsearch security features are enabled, access to the results of - // a specific async search is restricted to the user or API key that submitted - // it. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html - Get async_search_get.NewGet - // Get the async search status. - // - // Get the status of a previously submitted async search request given its - // identifier, without retrieving search results. - // If the Elasticsearch security features are enabled, the access to the status - // of a specific async search is restricted to: - // - // * The user or API key that submitted the original async search request. - // * Users that have the `monitor` cluster privilege or greater privileges. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + Get async_search_get.NewGet Status async_search_status.NewStatus - // Run an async search. - // - // When the primary sort of the results is an indexed field, shards get sorted - // based on minimum and maximum value that they hold for that field. Partial - // results become available following the sort criteria that was requested. - // - // Warning: Asynchronous search does not support scroll or search requests that - // include only the suggest section. - // - // By default, Elasticsearch does not allow you to store an async search - // response larger than 10Mb and an attempt to do this results in an error. - // The maximum allowed size for a stored async search response can be set by - // changing the `search.max_async_search_response_size` cluster level setting. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html Submit async_search_submit.NewSubmit } type Autoscaling struct { - // Delete an autoscaling policy. - // - // NOTE: This feature is designed for indirect use by Elasticsearch Service, - // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not - // supported. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html DeleteAutoscalingPolicy autoscaling_delete_autoscaling_policy.NewDeleteAutoscalingPolicy - // Get the autoscaling capacity. - // - // NOTE: This feature is designed for indirect use by Elasticsearch Service, - // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not - // supported. - // - // This API gets the current autoscaling capacity based on the configured - // autoscaling policy. - // It will return information to size the cluster appropriately to the current - // workload. - // - // The `required_capacity` is calculated as the maximum of the - // `required_capacity` result of all individual deciders that are enabled for - // the policy. - // - // The operator should verify that the `current_nodes` match the operator’s - // knowledge of the cluster to avoid making autoscaling decisions based on stale - // or incomplete information. - // - // The response contains decider-specific information you can use to diagnose - // how and why autoscaling determined a certain capacity was required. - // This information is provided for diagnosis only. - // Do not use this information to make autoscaling decisions. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html - GetAutoscalingCapacity autoscaling_get_autoscaling_capacity.NewGetAutoscalingCapacity - // Get an autoscaling policy. - // - // NOTE: This feature is designed for indirect use by Elasticsearch Service, - // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not - // supported. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html - GetAutoscalingPolicy autoscaling_get_autoscaling_policy.NewGetAutoscalingPolicy - // Create or update an autoscaling policy. - // - // NOTE: This feature is designed for indirect use by Elasticsearch Service, - // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not - // supported. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html - PutAutoscalingPolicy autoscaling_put_autoscaling_policy.NewPutAutoscalingPolicy + GetAutoscalingCapacity autoscaling_get_autoscaling_capacity.NewGetAutoscalingCapacity + GetAutoscalingPolicy autoscaling_get_autoscaling_policy.NewGetAutoscalingPolicy + PutAutoscalingPolicy autoscaling_put_autoscaling_policy.NewPutAutoscalingPolicy } type Capabilities struct { - // Checks if the specified combination of method, API, parameters, and arbitrary - // capabilities are supported - // https://github.com/elastic/elasticsearch/blob/main/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/README.asciidoc#require-or-skip-api-capabilities Capabilities capabilities.NewCapabilities } type Cat struct { - // Get aliases. - // - // Get the cluster's index aliases, including filter and routing information. - // This API does not return data stream aliases. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the command - // line or the Kibana console. They are not intended for use by applications. - // For application consumption, use the aliases API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html - Aliases cat_aliases.NewAliases - // Get shard allocation information. - // - // Get a snapshot of the number of shards allocated to each data node and their - // disk space. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html - Allocation cat_allocation.NewAllocation - // Get component templates. - // - // Get information about component templates in a cluster. - // Component templates are building blocks for constructing index templates that - // specify index mappings, settings, and aliases. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the command - // line or Kibana console. - // They are not intended for use by applications. For application consumption, - // use the get component template API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html - ComponentTemplates cat_component_templates.NewComponentTemplates - // Get a document count. - // - // Get quick access to a document count for a data stream, an index, or an - // entire cluster. - // The document count only includes live documents, not deleted documents which - // have not yet been removed by the merge process. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the command - // line or Kibana console. - // They are not intended for use by applications. For application consumption, - // use the count API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html - Count cat_count.NewCount - // Get field data cache information. - // - // Get the amount of heap memory currently used by the field data cache on every - // data node in the cluster. - // - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. - // They are not intended for use by applications. For application consumption, - // use the nodes stats API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html - Fielddata cat_fielddata.NewFielddata - // Get the cluster health status. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the command - // line or Kibana console. - // They are not intended for use by applications. For application consumption, - // use the cluster health API. - // This API is often used to check malfunctioning clusters. - // To help you track cluster health alongside log files and alerting systems, - // the API returns timestamps in two formats: - // `HH:MM:SS`, which is human-readable but includes no date information; - // `Unix epoch time`, which is machine-sortable and includes date information. - // The latter format is useful for cluster recoveries that take multiple days. - // You can use the cat health API to verify cluster health across multiple - // nodes. - // You also can use the API to track the recovery of a large cluster over a - // longer period of time. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html - Health cat_health.NewHealth - // Get CAT help. - // - // Get help for the CAT APIs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html - Help cat_help.NewHelp - // Get index information. - // - // Get high-level information about indices in a cluster, including backing - // indices for data streams. - // - // Use this request to get the following information for each index in a - // cluster: - // - shard count - // - document count - // - deleted document count - // - primary store size - // - total store size of all shards, including shard replicas - // - // These metrics are retrieved directly from Lucene, which Elasticsearch uses - // internally to power indexing and search. As a result, all document counts - // include hidden nested documents. - // To get an accurate count of Elasticsearch documents, use the cat count or - // count APIs. - // - // CAT APIs are only intended for human consumption using the command line or - // Kibana console. - // They are not intended for use by applications. For application consumption, - // use an index endpoint. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html - Indices cat_indices.NewIndices - // Get master node information. - // - // Get information about the master node, including the ID, bound IP address, - // and name. - // - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the nodes info API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html - Master cat_master.NewMaster - // Get data frame analytics jobs. - // - // Get configuration and usage information about data frame analytics jobs. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the Kibana - // console or command line. They are not intended for use by applications. For - // application consumption, use the get data frame analytics jobs statistics - // API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html + Aliases cat_aliases.NewAliases + Allocation cat_allocation.NewAllocation + ComponentTemplates cat_component_templates.NewComponentTemplates + Count cat_count.NewCount + Fielddata cat_fielddata.NewFielddata + Health cat_health.NewHealth + Help cat_help.NewHelp + Indices cat_indices.NewIndices + Master cat_master.NewMaster MlDataFrameAnalytics cat_ml_data_frame_analytics.NewMlDataFrameAnalytics - // Get datafeeds. - // - // Get configuration and usage information about datafeeds. - // This API returns a maximum of 10,000 datafeeds. - // If the Elasticsearch security features are enabled, you must have - // `monitor_ml`, `monitor`, `manage_ml`, or `manage` - // cluster privileges to use this API. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the Kibana - // console or command line. They are not intended for use by applications. For - // application consumption, use the get datafeed statistics API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html - MlDatafeeds cat_ml_datafeeds.NewMlDatafeeds - // Get anomaly detection jobs. - // - // Get configuration and usage information for anomaly detection jobs. - // This API returns a maximum of 10,000 jobs. - // If the Elasticsearch security features are enabled, you must have - // `monitor_ml`, - // `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the Kibana - // console or command line. They are not intended for use by applications. For - // application consumption, use the get anomaly detection job statistics API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html - MlJobs cat_ml_jobs.NewMlJobs - // Get trained models. - // - // Get configuration and usage information about inference trained models. - // - // IMPORTANT: CAT APIs are only intended for human consumption using the Kibana - // console or command line. They are not intended for use by applications. For - // application consumption, use the get trained models statistics API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html - MlTrainedModels cat_ml_trained_models.NewMlTrainedModels - // Get node attribute information. - // - // Get information about custom node attributes. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the nodes info API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html - Nodeattrs cat_nodeattrs.NewNodeattrs - // Get node information. - // - // Get information about the nodes in a cluster. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the nodes info API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html - Nodes cat_nodes.NewNodes - // Get pending task information. - // - // Get information about cluster-level changes that have not yet taken effect. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the pending cluster tasks API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html - PendingTasks cat_pending_tasks.NewPendingTasks - // Get plugin information. - // - // Get a list of plugins running on each node of a cluster. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the nodes info API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html - Plugins cat_plugins.NewPlugins - // Get shard recovery information. - // - // Get information about ongoing and completed shard recoveries. - // Shard recovery is the process of initializing a shard copy, such as restoring - // a primary shard from a snapshot or syncing a replica shard from a primary - // shard. When a shard recovery completes, the recovered shard is available for - // search and indexing. - // For data streams, the API returns information about the stream’s backing - // indices. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the index recovery API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html - Recovery cat_recovery.NewRecovery - // Get snapshot repository information. - // - // Get a list of snapshot repositories for a cluster. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the get snapshot repository API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html - Repositories cat_repositories.NewRepositories - // Get segment information. - // - // Get low-level information about the Lucene segments in index shards. - // For data streams, the API returns information about the backing indices. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the index segments API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html - Segments cat_segments.NewSegments - // Get shard information. - // - // Get information about the shards in a cluster. - // For data streams, the API returns information about the backing indices. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html - Shards cat_shards.NewShards - // Get snapshot information. - // - // Get information about the snapshots stored in one or more repositories. - // A snapshot is a backup of an index or running Elasticsearch cluster. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the get snapshot API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html - Snapshots cat_snapshots.NewSnapshots - // Get task information. - // - // Get information about tasks currently running in the cluster. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the task management API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-tasks.html - Tasks cat_tasks.NewTasks - // Get index template information. - // - // Get information about the index templates in a cluster. - // You can use index templates to apply index settings and field mappings to new - // indices at creation. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the get index template API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html - Templates cat_templates.NewTemplates - // Get thread pool statistics. - // - // Get thread pool statistics for each node in a cluster. - // Returned information includes all built-in thread pools and custom thread - // pools. - // IMPORTANT: cat APIs are only intended for human consumption using the command - // line or Kibana console. They are not intended for use by applications. For - // application consumption, use the nodes info API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html - ThreadPool cat_thread_pool.NewThreadPool - // Get transform information. - // - // Get configuration and usage information about transforms. - // - // CAT APIs are only intended for human consumption using the Kibana - // console or command line. They are not intended for use by applications. For - // application consumption, use the get transform statistics API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html - Transforms cat_transforms.NewTransforms + MlDatafeeds cat_ml_datafeeds.NewMlDatafeeds + MlJobs cat_ml_jobs.NewMlJobs + MlTrainedModels cat_ml_trained_models.NewMlTrainedModels + Nodeattrs cat_nodeattrs.NewNodeattrs + Nodes cat_nodes.NewNodes + PendingTasks cat_pending_tasks.NewPendingTasks + Plugins cat_plugins.NewPlugins + Recovery cat_recovery.NewRecovery + Repositories cat_repositories.NewRepositories + Segments cat_segments.NewSegments + Shards cat_shards.NewShards + Snapshots cat_snapshots.NewSnapshots + Tasks cat_tasks.NewTasks + Templates cat_templates.NewTemplates + ThreadPool cat_thread_pool.NewThreadPool + Transforms cat_transforms.NewTransforms } type Ccr struct { - // Delete auto-follow patterns. - // - // Delete a collection of cross-cluster replication auto-follow patterns. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html DeleteAutoFollowPattern ccr_delete_auto_follow_pattern.NewDeleteAutoFollowPattern - // Create a follower. - // Create a cross-cluster replication follower index that follows a specific - // leader index. - // When the API returns, the follower index exists and cross-cluster replication - // starts replicating operations from the leader index to the follower index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html - Follow ccr_follow.NewFollow - // Get follower information. - // - // Get information about all cross-cluster replication follower indices. - // For example, the results include follower index names, leader index names, - // replication options, and whether the follower indices are active or paused. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html - FollowInfo ccr_follow_info.NewFollowInfo - // Get follower stats. - // - // Get cross-cluster replication follower stats. - // The API returns shard-level stats about the "following tasks" associated with - // each shard for the specified indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html - FollowStats ccr_follow_stats.NewFollowStats - // Forget a follower. - // Remove the cross-cluster replication follower retention leases from the - // leader. - // - // A following index takes out retention leases on its leader index. - // These leases are used to increase the likelihood that the shards of the - // leader index retain the history of operations that the shards of the - // following index need to run replication. - // When a follower index is converted to a regular index by the unfollow API - // (either by directly calling the API or by index lifecycle management tasks), - // these leases are removed. - // However, removal of the leases can fail, for example when the remote cluster - // containing the leader index is unavailable. - // While the leases will eventually expire on their own, their extended - // existence can cause the leader index to hold more history than necessary and - // prevent index lifecycle management from performing some operations on the - // leader index. - // This API exists to enable manually removing the leases when the unfollow API - // is unable to do so. - // - // NOTE: This API does not stop replication by a following index. If you use - // this API with a follower index that is still actively following, the - // following index will add back retention leases on the leader. - // The only purpose of this API is to handle the case of failure to remove the - // following retention leases after the unfollow API is invoked. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html - ForgetFollower ccr_forget_follower.NewForgetFollower - // Get auto-follow patterns. - // - // Get cross-cluster replication auto-follow patterns. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html - GetAutoFollowPattern ccr_get_auto_follow_pattern.NewGetAutoFollowPattern - // Pause an auto-follow pattern. - // - // Pause a cross-cluster replication auto-follow pattern. - // When the API returns, the auto-follow pattern is inactive. - // New indices that are created on the remote cluster and match the auto-follow - // patterns are ignored. - // - // You can resume auto-following with the resume auto-follow pattern API. - // When it resumes, the auto-follow pattern is active again and automatically - // configures follower indices for newly created indices on the remote cluster - // that match its patterns. - // Remote indices that were created while the pattern was paused will also be - // followed, unless they have been deleted or closed in the interim. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html - PauseAutoFollowPattern ccr_pause_auto_follow_pattern.NewPauseAutoFollowPattern - // Pause a follower. - // - // Pause a cross-cluster replication follower index. - // The follower index will not fetch any additional operations from the leader - // index. - // You can resume following with the resume follower API. - // You can pause and resume a follower index to change the configuration of the - // following task. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html - PauseFollow ccr_pause_follow.NewPauseFollow - // Create or update auto-follow patterns. - // Create a collection of cross-cluster replication auto-follow patterns for a - // remote cluster. - // Newly created indices on the remote cluster that match any of the patterns - // are automatically configured as follower indices. - // Indices on the remote cluster that were created before the auto-follow - // pattern was created will not be auto-followed even if they match the pattern. - // - // This API can also be used to update auto-follow patterns. - // NOTE: Follower indices that were configured automatically before updating an - // auto-follow pattern will remain unchanged even if they do not match against - // the new patterns. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html - PutAutoFollowPattern ccr_put_auto_follow_pattern.NewPutAutoFollowPattern - // Resume an auto-follow pattern. - // - // Resume a cross-cluster replication auto-follow pattern that was paused. - // The auto-follow pattern will resume configuring following indices for newly - // created indices that match its patterns on the remote cluster. - // Remote indices created while the pattern was paused will also be followed - // unless they have been deleted or closed in the interim. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html + Follow ccr_follow.NewFollow + FollowInfo ccr_follow_info.NewFollowInfo + FollowStats ccr_follow_stats.NewFollowStats + ForgetFollower ccr_forget_follower.NewForgetFollower + GetAutoFollowPattern ccr_get_auto_follow_pattern.NewGetAutoFollowPattern + PauseAutoFollowPattern ccr_pause_auto_follow_pattern.NewPauseAutoFollowPattern + PauseFollow ccr_pause_follow.NewPauseFollow + PutAutoFollowPattern ccr_put_auto_follow_pattern.NewPutAutoFollowPattern ResumeAutoFollowPattern ccr_resume_auto_follow_pattern.NewResumeAutoFollowPattern - // Resume a follower. - // Resume a cross-cluster replication follower index that was paused. - // The follower index could have been paused with the pause follower API. - // Alternatively it could be paused due to replication that cannot be retried - // due to failures during following tasks. - // When this API returns, the follower index will resume fetching operations - // from the leader index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html - ResumeFollow ccr_resume_follow.NewResumeFollow - // Get cross-cluster replication stats. - // - // This API returns stats about auto-following and the same shard-level stats as - // the get follower stats API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html - Stats ccr_stats.NewStats - // Unfollow an index. - // - // Convert a cross-cluster replication follower index to a regular index. - // The API stops the following task associated with a follower index and removes - // index metadata and settings associated with cross-cluster replication. - // The follower index must be paused and closed before you call the unfollow - // API. - // - // > info - // > Currently cross-cluster replication does not support converting an existing - // regular index to a follower index. Converting a follower index to a regular - // index is an irreversible operation. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html - Unfollow ccr_unfollow.NewUnfollow + ResumeFollow ccr_resume_follow.NewResumeFollow + Stats ccr_stats.NewStats + Unfollow ccr_unfollow.NewUnfollow } type Cluster struct { - // Explain the shard allocations. - // Get explanations for shard allocations in the cluster. - // For unassigned shards, it provides an explanation for why the shard is - // unassigned. - // For assigned shards, it provides an explanation for why the shard is - // remaining on its current node and has not moved or rebalanced to another - // node. - // This API can be very useful when attempting to diagnose why a shard is - // unassigned or why a shard continues to remain on its current node when you - // might expect otherwise. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html - AllocationExplain cluster_allocation_explain.NewAllocationExplain - // Delete component templates. - // Component templates are building blocks for constructing index templates that - // specify index mappings, settings, and aliases. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html - DeleteComponentTemplate cluster_delete_component_template.NewDeleteComponentTemplate - // Clear cluster voting config exclusions. - // Remove master-eligible nodes from the voting configuration exclusion list. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions + AllocationExplain cluster_allocation_explain.NewAllocationExplain + DeleteComponentTemplate cluster_delete_component_template.NewDeleteComponentTemplate DeleteVotingConfigExclusions cluster_delete_voting_config_exclusions.NewDeleteVotingConfigExclusions - // Check component templates. - // Returns information about whether a particular component template exists. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html - ExistsComponentTemplate cluster_exists_component_template.NewExistsComponentTemplate - // Get component templates. - // Get information about component templates. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html - GetComponentTemplate cluster_get_component_template.NewGetComponentTemplate - // Get cluster-wide settings. - // By default, it returns only settings that have been explicitly defined. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html - GetSettings cluster_get_settings.NewGetSettings - // Get the cluster health status. - // - // You can also use the API to get the health status of only specified data - // streams and indices. - // For data streams, the API retrieves the health status of the stream’s backing - // indices. - // - // The cluster health status is: green, yellow or red. - // On the shard level, a red status indicates that the specific shard is not - // allocated in the cluster. Yellow means that the primary shard is allocated - // but replicas are not. Green means that all shards are allocated. - // The index level status is controlled by the worst shard status. - // - // One of the main benefits of the API is the ability to wait until the cluster - // reaches a certain high watermark health level. - // The cluster status is controlled by the worst index status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html - Health cluster_health.NewHealth - // Get cluster info. - // Returns basic information about the cluster. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html - Info cluster_info.NewInfo - // Get the pending cluster tasks. - // Get information about cluster-level changes (such as create index, update - // mapping, allocate or fail shard) that have not yet taken effect. - // - // NOTE: This API returns a list of any pending updates to the cluster state. - // These are distinct from the tasks reported by the task management API which - // include periodic tasks and tasks initiated by the user, such as node stats, - // search queries, or create index requests. - // However, if a user-initiated task such as a create index command causes a - // cluster state update, the activity of this task might be reported by both - // task api and pending cluster tasks API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html - PendingTasks cluster_pending_tasks.NewPendingTasks - // Update voting configuration exclusions. - // Update the cluster voting config exclusions by node IDs or node names. - // By default, if there are more than three master-eligible nodes in the cluster - // and you remove fewer than half of the master-eligible nodes in the cluster at - // once, the voting configuration automatically shrinks. - // If you want to shrink the voting configuration to contain fewer than three - // nodes or to remove half or more of the master-eligible nodes in the cluster - // at once, use this API to remove departing nodes from the voting configuration - // manually. - // The API adds an entry for each specified node to the cluster’s voting - // configuration exclusions list. - // It then waits until the cluster has reconfigured its voting configuration to - // exclude the specified nodes. - // - // Clusters should have no voting configuration exclusions in normal operation. - // Once the excluded nodes have stopped, clear the voting configuration - // exclusions with `DELETE /_cluster/voting_config_exclusions`. - // This API waits for the nodes to be fully removed from the cluster before it - // returns. - // If your cluster has voting configuration exclusions for nodes that you no - // longer intend to remove, use `DELETE - // /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the - // voting configuration exclusions without waiting for the nodes to leave the - // cluster. - // - // A response to `POST /_cluster/voting_config_exclusions` with an HTTP status - // code of 200 OK guarantees that the node has been removed from the voting - // configuration and will not be reinstated until the voting configuration - // exclusions are cleared by calling `DELETE - // /_cluster/voting_config_exclusions`. - // If the call to `POST /_cluster/voting_config_exclusions` fails or returns a - // response with an HTTP status code other than 200 OK then the node may not - // have been removed from the voting configuration. - // In that case, you may safely retry the call. - // - // NOTE: Voting exclusions are required only when you remove at least half of - // the master-eligible nodes from a cluster in a short time period. - // They are not required when removing master-ineligible nodes or when removing - // fewer than half of the master-eligible nodes. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions - PostVotingConfigExclusions cluster_post_voting_config_exclusions.NewPostVotingConfigExclusions - // Create or update a component template. - // Component templates are building blocks for constructing index templates that - // specify index mappings, settings, and aliases. - // - // An index template can be composed of multiple component templates. - // To use a component template, specify it in an index template’s `composed_of` - // list. - // Component templates are only applied to new data streams and indices as part - // of a matching index template. - // - // Settings and mappings specified directly in the index template or the create - // index request override any settings or mappings specified in a component - // template. - // - // Component templates are only used during index creation. - // For data streams, this includes data stream creation and the creation of a - // stream’s backing indices. - // Changes to component templates do not affect existing indices, including a - // stream’s backing indices. - // - // You can use C-style `/* *\/` block comments in component templates. - // You can include comments anywhere in the request body except before the - // opening curly bracket. - // - // **Applying component templates** - // - // You cannot directly apply a component template to a data stream or index. - // To be applied, a component template must be included in an index template's - // `composed_of` list. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html - PutComponentTemplate cluster_put_component_template.NewPutComponentTemplate - // Update the cluster settings. - // - // Configure and update dynamic settings on a running cluster. - // You can also configure dynamic settings locally on an unstarted or shut down - // node in `elasticsearch.yml`. - // - // Updates made with this API can be persistent, which apply across cluster - // restarts, or transient, which reset after a cluster restart. - // You can also reset transient or persistent settings by assigning them a null - // value. - // - // If you configure the same setting using multiple methods, Elasticsearch - // applies the settings in following order of precedence: 1) Transient setting; - // 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting - // value. - // For example, you can apply a transient setting to override a persistent - // setting or `elasticsearch.yml` setting. - // However, a change to an `elasticsearch.yml` setting will not override a - // defined transient or persistent setting. - // - // TIP: In Elastic Cloud, use the user settings feature to configure all cluster - // settings. This method automatically rejects unsafe settings that could break - // your cluster. - // If you run Elasticsearch on your own hardware, use this API to configure - // dynamic cluster settings. - // Only use `elasticsearch.yml` for static cluster settings and node settings. - // The API doesn’t require a restart and ensures a setting’s value is the same - // on all nodes. - // - // WARNING: Transient cluster settings are no longer recommended. Use persistent - // cluster settings instead. - // If a cluster becomes unstable, transient settings can clear unexpectedly, - // resulting in a potentially undesired cluster configuration. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html - PutSettings cluster_put_settings.NewPutSettings - // Get remote cluster information. - // - // Get information about configured remote clusters. - // The API returns connection and endpoint information keyed by the configured - // remote cluster alias. - // - // > info - // > This API returns information that reflects current state on the local - // cluster. - // > The `connected` field does not necessarily reflect whether a remote cluster - // is down or unavailable, only whether there is currently an open connection to - // it. - // > Elasticsearch does not spontaneously try to reconnect to a disconnected - // remote cluster. - // > To trigger a reconnection, attempt a cross-cluster search, ES|QL - // cross-cluster search, or try the [resolve cluster - // endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster). - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html - RemoteInfo cluster_remote_info.NewRemoteInfo - // Reroute the cluster. - // Manually change the allocation of individual shards in the cluster. - // For example, a shard can be moved from one node to another explicitly, an - // allocation can be canceled, and an unassigned shard can be explicitly - // allocated to a specific node. - // - // It is important to note that after processing any reroute commands - // Elasticsearch will perform rebalancing as normal (respecting the values of - // settings such as `cluster.routing.rebalance.enable`) in order to remain in a - // balanced state. - // For example, if the requested allocation includes moving a shard from node1 - // to node2 then this may cause a shard to be moved from node2 back to node1 to - // even things out. - // - // The cluster can be set to disable allocations using the - // `cluster.routing.allocation.enable` setting. - // If allocations are disabled then the only allocations that will be performed - // are explicit ones given using the reroute command, and consequent allocations - // due to rebalancing. - // - // The cluster will attempt to allocate a shard a maximum of - // `index.allocation.max_retries` times in a row (defaults to `5`), before - // giving up and leaving the shard unallocated. - // This scenario can be caused by structural problems such as having an analyzer - // which refers to a stopwords file which doesn’t exist on all nodes. - // - // Once the problem has been corrected, allocation can be manually retried by - // calling the reroute API with the `?retry_failed` URI query parameter, which - // will attempt a single retry round for these shards. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html - Reroute cluster_reroute.NewReroute - // Get the cluster state. - // Get comprehensive information about the state of the cluster. - // - // The cluster state is an internal data structure which keeps track of a - // variety of information needed by every node, including the identity and - // attributes of the other nodes in the cluster; cluster-wide settings; index - // metadata, including the mapping and settings for each index; the location and - // status of every shard copy in the cluster. - // - // The elected master node ensures that every node in the cluster has a copy of - // the same cluster state. - // This API lets you retrieve a representation of this internal state for - // debugging or diagnostic purposes. - // You may need to consult the Elasticsearch source code to determine the - // precise meaning of the response. - // - // By default the API will route requests to the elected master node since this - // node is the authoritative source of cluster states. - // You can also retrieve the cluster state held on the node handling the API - // request by adding the `?local=true` query parameter. - // - // Elasticsearch may need to expend significant effort to compute a response to - // this API in larger clusters, and the response may comprise a very large - // quantity of data. - // If you use this API repeatedly, your cluster may become unstable. - // - // WARNING: The response is a representation of an internal data structure. - // Its format is not subject to the same compatibility guarantees as other more - // stable APIs and may change from version to version. - // Do not query this API using external monitoring tools. - // Instead, obtain the information you require using other more stable cluster - // APIs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html - State cluster_state.NewState - // Get cluster statistics. - // Get basic index metrics (shard numbers, store size, memory usage) and - // information about the current nodes that form the cluster (number, roles, os, - // jvm versions, memory usage, cpu and installed plugins). - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html - Stats cluster_stats.NewStats + ExistsComponentTemplate cluster_exists_component_template.NewExistsComponentTemplate + GetComponentTemplate cluster_get_component_template.NewGetComponentTemplate + GetSettings cluster_get_settings.NewGetSettings + Health cluster_health.NewHealth + Info cluster_info.NewInfo + PendingTasks cluster_pending_tasks.NewPendingTasks + PostVotingConfigExclusions cluster_post_voting_config_exclusions.NewPostVotingConfigExclusions + PutComponentTemplate cluster_put_component_template.NewPutComponentTemplate + PutSettings cluster_put_settings.NewPutSettings + RemoteInfo cluster_remote_info.NewRemoteInfo + Reroute cluster_reroute.NewReroute + State cluster_state.NewState + Stats cluster_stats.NewStats } type Connector struct { - // Check in a connector. - // - // Update the `last_seen` field in the connector and set it to the current - // timestamp. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html - CheckIn connector_check_in.NewCheckIn - // Delete a connector. - // - // Removes a connector and associated sync jobs. - // This is a destructive action that is not recoverable. - // NOTE: This action doesn’t delete any API keys, ingest pipelines, or data - // indices associated with the connector. - // These need to be removed manually. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html - Delete connector_delete.NewDelete - // Get a connector. - // - // Get the details about a connector. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html - Get connector_get.NewGet - // Update the connector last sync stats. - // - // Update the fields related to the last sync of a connector. - // This action is used for analytics and monitoring. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html - LastSync connector_last_sync.NewLastSync - // Get all connectors. - // - // Get information about all connectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html - List connector_list.NewList - // Create a connector. - // - // Connectors are Elasticsearch integrations that bring content from third-party - // data sources, which can be deployed on Elastic Cloud or hosted on your own - // infrastructure. - // Elastic managed connectors (Native connectors) are a managed service on - // Elastic Cloud. - // Self-managed connectors (Connector clients) are self-managed on your - // infrastructure. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html - Post connector_post.NewPost - // Create or update a connector. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html - Put connector_put.NewPut - // Creates a secret for a Connector. - // - SecretPost connector_secret_post.NewSecretPost - // Cancel a connector sync job. - // - // Cancel a connector sync job, which sets the status to cancelling and updates - // `cancellation_requested_at` to the current time. - // The connector service is then responsible for setting the status of connector - // sync jobs to cancelled. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html - SyncJobCancel connector_sync_job_cancel.NewSyncJobCancel - // Check in a connector sync job. - // Check in a connector sync job and set the `last_seen` field to the current - // time before updating it in the internal index. - // - // To sync data using self-managed connectors, you need to deploy the Elastic - // connector service on your own infrastructure. - // This service runs automatically on Elastic Cloud for Elastic managed - // connectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-sync-job-api.html - SyncJobCheckIn connector_sync_job_check_in.NewSyncJobCheckIn - // Claim a connector sync job. - // This action updates the job status to `in_progress` and sets the `last_seen` - // and `started_at` timestamps to the current time. - // Additionally, it can set the `sync_cursor` property for the sync job. - // - // This API is not intended for direct connector management by users. - // It supports the implementation of services that utilize the connector - // protocol to communicate with Elasticsearch. - // - // To sync data using self-managed connectors, you need to deploy the Elastic - // connector service on your own infrastructure. - // This service runs automatically on Elastic Cloud for Elastic managed - // connectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/claim-connector-sync-job-api.html - SyncJobClaim connector_sync_job_claim.NewSyncJobClaim - // Delete a connector sync job. - // - // Remove a connector sync job and its associated data. - // This is a destructive action that is not recoverable. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html - SyncJobDelete connector_sync_job_delete.NewSyncJobDelete - // Set a connector sync job error. - // Set the `error` field for a connector sync job and set its `status` to - // `error`. - // - // To sync data using self-managed connectors, you need to deploy the Elastic - // connector service on your own infrastructure. - // This service runs automatically on Elastic Cloud for Elastic managed - // connectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-error-api.html - SyncJobError connector_sync_job_error.NewSyncJobError - // Get a connector sync job. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html - SyncJobGet connector_sync_job_get.NewSyncJobGet - // Get all connector sync jobs. - // - // Get information about all stored connector sync jobs listed by their creation - // date in ascending order. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-sync-jobs-api.html - SyncJobList connector_sync_job_list.NewSyncJobList - // Create a connector sync job. - // - // Create a connector sync job document in the internal index and initialize its - // counters and timestamps with default values. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html - SyncJobPost connector_sync_job_post.NewSyncJobPost - // Set the connector sync job stats. - // Stats include: `deleted_document_count`, `indexed_document_count`, - // `indexed_document_volume`, and `total_document_count`. - // You can also update `last_seen`. - // This API is mainly used by the connector service for updating sync job - // information. - // - // To sync data using self-managed connectors, you need to deploy the Elastic - // connector service on your own infrastructure. - // This service runs automatically on Elastic Cloud for Elastic managed - // connectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/set-connector-sync-job-stats-api.html - SyncJobUpdateStats connector_sync_job_update_stats.NewSyncJobUpdateStats - // Activate the connector draft filter. - // - // Activates the valid draft filtering for a connector. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html - UpdateActiveFiltering connector_update_active_filtering.NewUpdateActiveFiltering - // Update the connector API key ID. - // - // Update the `api_key_id` and `api_key_secret_id` fields of a connector. - // You can specify the ID of the API key used for authorization and the ID of - // the connector secret where the API key is stored. - // The connector secret ID is required only for Elastic managed (native) - // connectors. - // Self-managed connectors (connector clients) do not use this field. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html - UpdateApiKeyId connector_update_api_key_id.NewUpdateApiKeyId - // Update the connector configuration. - // - // Update the configuration field in the connector document. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html - UpdateConfiguration connector_update_configuration.NewUpdateConfiguration - // Update the connector error field. - // - // Set the error field for the connector. - // If the error provided in the request body is non-null, the connector’s status - // is updated to error. - // Otherwise, if the error is reset to null, the connector status is updated to - // connected. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html - UpdateError connector_update_error.NewUpdateError - // Update the connector features. - // Update the connector features in the connector document. - // This API can be used to control the following aspects of a connector: - // - // * document-level security - // * incremental syncs - // * advanced sync rules - // * basic sync rules - // - // Normally, the running connector service automatically manages these features. - // However, you can use this API to override the default behavior. - // - // To sync data using self-managed connectors, you need to deploy the Elastic - // connector service on your own infrastructure. - // This service runs automatically on Elastic Cloud for Elastic managed - // connectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-features-api.html - UpdateFeatures connector_update_features.NewUpdateFeatures - // Update the connector filtering. - // - // Update the draft filtering configuration of a connector and marks the draft - // validation state as edited. - // The filtering draft is activated once validated by the running Elastic - // connector service. - // The filtering property is used to configure sync rules (both basic and - // advanced) for a connector. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html - UpdateFiltering connector_update_filtering.NewUpdateFiltering - // Update the connector draft filtering validation. - // - // Update the draft filtering validation info for a connector. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html + CheckIn connector_check_in.NewCheckIn + Delete connector_delete.NewDelete + Get connector_get.NewGet + LastSync connector_last_sync.NewLastSync + List connector_list.NewList + Post connector_post.NewPost + Put connector_put.NewPut + SecretPost connector_secret_post.NewSecretPost + SyncJobCancel connector_sync_job_cancel.NewSyncJobCancel + SyncJobCheckIn connector_sync_job_check_in.NewSyncJobCheckIn + SyncJobClaim connector_sync_job_claim.NewSyncJobClaim + SyncJobDelete connector_sync_job_delete.NewSyncJobDelete + SyncJobError connector_sync_job_error.NewSyncJobError + SyncJobGet connector_sync_job_get.NewSyncJobGet + SyncJobList connector_sync_job_list.NewSyncJobList + SyncJobPost connector_sync_job_post.NewSyncJobPost + SyncJobUpdateStats connector_sync_job_update_stats.NewSyncJobUpdateStats + UpdateActiveFiltering connector_update_active_filtering.NewUpdateActiveFiltering + UpdateApiKeyId connector_update_api_key_id.NewUpdateApiKeyId + UpdateConfiguration connector_update_configuration.NewUpdateConfiguration + UpdateError connector_update_error.NewUpdateError + UpdateFeatures connector_update_features.NewUpdateFeatures + UpdateFiltering connector_update_filtering.NewUpdateFiltering UpdateFilteringValidation connector_update_filtering_validation.NewUpdateFilteringValidation - // Update the connector index name. - // - // Update the `index_name` field of a connector, specifying the index where the - // data ingested by the connector is stored. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html - UpdateIndexName connector_update_index_name.NewUpdateIndexName - // Update the connector name and description. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html - UpdateName connector_update_name.NewUpdateName - // Update the connector is_native flag. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html - UpdateNative connector_update_native.NewUpdateNative - // Update the connector pipeline. - // - // When you create a new connector, the configuration of an ingest pipeline is - // populated with default settings. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html - UpdatePipeline connector_update_pipeline.NewUpdatePipeline - // Update the connector scheduling. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html - UpdateScheduling connector_update_scheduling.NewUpdateScheduling - // Update the connector service type. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html - UpdateServiceType connector_update_service_type.NewUpdateServiceType - // Update the connector status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html - UpdateStatus connector_update_status.NewUpdateStatus + UpdateIndexName connector_update_index_name.NewUpdateIndexName + UpdateName connector_update_name.NewUpdateName + UpdateNative connector_update_native.NewUpdateNative + UpdatePipeline connector_update_pipeline.NewUpdatePipeline + UpdateScheduling connector_update_scheduling.NewUpdateScheduling + UpdateServiceType connector_update_service_type.NewUpdateServiceType + UpdateStatus connector_update_status.NewUpdateStatus } type Core struct { - // Bulk index or delete documents. - // Perform multiple `index`, `create`, `delete`, and `update` actions in a - // single request. - // This reduces overhead and can greatly increase indexing speed. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or index alias: - // - // * To use the `create` action, you must have the `create_doc`, `create`, - // `index`, or `write` index privilege. Data streams support only the `create` - // action. - // * To use the `index` action, you must have the `create`, `index`, or `write` - // index privilege. - // * To use the `delete` action, you must have the `delete` or `write` index - // privilege. - // * To use the `update` action, you must have the `index` or `write` index - // privilege. - // * To automatically create a data stream or index with a bulk API request, you - // must have the `auto_configure`, `create_index`, or `manage` index privilege. - // * To make the result of a bulk operation visible to search using the - // `refresh` parameter, you must have the `maintenance` or `manage` index - // privilege. - // - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // The actions are specified in the request body using a newline delimited JSON - // (NDJSON) structure: - // - // ``` - // action_and_meta_data\n - // optional_source\n - // action_and_meta_data\n - // optional_source\n - // .... - // action_and_meta_data\n - // optional_source\n - // ``` - // - // The `index` and `create` actions expect a source on the next line and have - // the same semantics as the `op_type` parameter in the standard index API. - // A `create` action fails if a document with the same ID already exists in the - // target - // An `index` action adds or replaces a document as necessary. - // - // NOTE: Data streams support only the `create` action. - // To update or delete a document in a data stream, you must target the backing - // index containing the document. - // - // An `update` action expects that the partial doc, upsert, and script and its - // options are specified on the next line. - // - // A `delete` action does not expect a source on the next line and has the same - // semantics as the standard delete API. - // - // NOTE: The final line of data must end with a newline character (`\n`). - // Each newline character may be preceded by a carriage return (`\r`). - // When sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header - // of `application/json` or `application/x-ndjson`. - // Because this format uses literal newline characters (`\n`) as delimiters, - // make sure that the JSON actions and sources are not pretty printed. - // - // If you provide a target in the request path, it is used for any actions that - // don't explicitly specify an `_index` argument. - // - // A note on the format: the idea here is to make processing as fast as - // possible. - // As some of the actions are redirected to other shards on other nodes, only - // `action_meta_data` is parsed on the receiving node side. - // - // Client libraries using this protocol should try and strive to do something - // similar on the client side, and reduce buffering as much as possible. - // - // There is no "correct" number of actions to perform in a single bulk request. - // Experiment with different settings to find the optimal size for your - // particular workload. - // Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by - // default so clients must ensure that no request exceeds this size. - // It is not possible to index a single document that exceeds the size limit, so - // you must pre-process any such documents into smaller pieces before sending - // them to Elasticsearch. - // For instance, split documents into pages or chapters before indexing them, or - // store raw binary data in a system outside Elasticsearch and replace the raw - // data with a link to the external system in the documents that you send to - // Elasticsearch. - // - // **Client suppport for bulk requests** - // - // Some of the officially supported clients provide helpers to assist with bulk - // requests and reindexing: - // - // * Go: Check out `esutil.BulkIndexer` - // * Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and - // `Search::Elasticsearch::Client::5_0::Scroll` - // * Python: Check out `elasticsearch.helpers.*` - // * JavaScript: Check out `client.helpers.*` - // * .NET: Check out `BulkAllObservable` - // * PHP: Check out bulk indexing. - // - // **Submitting bulk requests with cURL** - // - // If you're providing text file input to `curl`, you must use the - // `--data-binary` flag instead of plain `-d`. - // The latter doesn't preserve newlines. For example: - // - // ``` - // $ cat requests - // { "index" : { "_index" : "test", "_id" : "1" } } - // { "field1" : "value1" } - // $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk - // --data-binary "@requests"; echo - // {"took":7, "errors": false, - // "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]} - // ``` - // - // **Optimistic concurrency control** - // - // Each `index` and `delete` action within a bulk API call may include the - // `if_seq_no` and `if_primary_term` parameters in their respective action and - // meta data lines. - // The `if_seq_no` and `if_primary_term` parameters control how operations are - // run, based on the last modification to existing documents. See Optimistic - // concurrency control for more details. - // - // **Versioning** - // - // Each bulk item can include the version value using the `version` field. - // It automatically follows the behavior of the index or delete operation based - // on the `_version` mapping. - // It also support the `version_type`. - // - // **Routing** - // - // Each bulk item can include the routing value using the `routing` field. - // It automatically follows the behavior of the index or delete operation based - // on the `_routing` mapping. - // - // NOTE: Data streams do not support custom routing unless they were created - // with the `allow_custom_routing` setting enabled in the template. - // - // **Wait for active shards** - // - // When making bulk calls, you can set the `wait_for_active_shards` parameter to - // require a minimum number of shard copies to be active before starting to - // process the bulk request. - // - // **Refresh** - // - // Control when the changes made by this request are visible to search. - // - // NOTE: Only the shards that receive the bulk request will be affected by - // refresh. - // Imagine a `_bulk?refresh=wait_for` request with three documents in it that - // happen to be routed to different shards in an index with five shards. - // The request will only wait for those three shards to refresh. - // The other two shards that make up the index do not participate in the `_bulk` - // request at all. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html - Bulk core_bulk.NewBulk - // Clear a scrolling search. - // Clear the search context and results for a scrolling search. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html - ClearScroll core_clear_scroll.NewClearScroll - // Close a point in time. - // A point in time must be opened explicitly before being used in search - // requests. - // The `keep_alive` parameter tells Elasticsearch how long it should persist. - // A point in time is automatically closed when the `keep_alive` period has - // elapsed. - // However, keeping points in time has a cost; close them as soon as they are no - // longer required for search requests. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html - ClosePointInTime core_close_point_in_time.NewClosePointInTime - // Count search results. - // Get the number of documents matching a query. - // - // The query can be provided either by using a simple query string as a - // parameter, or by defining Query DSL within the request body. - // The query is optional. When no query is provided, the API uses `match_all` to - // count all the documents. - // - // The count API supports multi-target syntax. You can run a single count API - // search across multiple data streams and indices. - // - // The operation is broadcast across all shards. - // For each shard ID group, a replica is chosen and the search is run against - // it. - // This means that replicas increase the scalability of the count. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html - Count core_count.NewCount - // Create a new document in the index. - // - // You can index a new JSON document with the `//_doc/` or - // `//_create/<_id>` APIs - // Using `_create` guarantees that the document is indexed only if it does not - // already exist. - // It returns a 409 response when a document with a same ID already exists in - // the index. - // To update an existing document, you must use the `//_doc/` API. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or index alias: - // - // * To add a document using the `PUT //_create/<_id>` or `POST - // //_create/<_id>` request formats, you must have the `create_doc`, - // `create`, `index`, or `write` index privilege. - // * To automatically create a data stream or index with this API request, you - // must have the `auto_configure`, `create_index`, or `manage` index privilege. - // - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // **Automatically create data streams and indices** - // - // If the request's target doesn't exist and matches an index template with a - // `data_stream` definition, the index operation automatically creates the data - // stream. - // - // If the target doesn't exist and doesn't match a data stream template, the - // operation automatically creates the index and applies any matching index - // templates. - // - // NOTE: Elasticsearch includes several built-in index templates. To avoid - // naming collisions with these templates, refer to index pattern documentation. - // - // If no mapping exists, the index operation creates a dynamic mapping. - // By default, new fields and objects are automatically added to the mapping if - // needed. - // - // Automatic index creation is controlled by the `action.auto_create_index` - // setting. - // If it is `true`, any index can be created automatically. - // You can modify this setting to explicitly allow or block automatic creation - // of indices that match specified patterns or set it to `false` to turn off - // automatic index creation entirely. - // Specify a comma-separated list of patterns you want to allow or prefix each - // pattern with `+` or `-` to indicate whether it should be allowed or blocked. - // When a list is specified, the default behaviour is to disallow. - // - // NOTE: The `action.auto_create_index` setting affects the automatic creation - // of indices only. - // It does not affect the creation of data streams. - // - // **Routing** - // - // By default, shard placement — or routing — is controlled by using a hash of - // the document's ID value. - // For more explicit control, the value fed into the hash function used by the - // router can be directly specified on a per-operation basis using the `routing` - // parameter. - // - // When setting up explicit mapping, you can also use the `_routing` field to - // direct the index operation to extract the routing value from the document - // itself. - // This does come at the (very minimal) cost of an additional document parsing - // pass. - // If the `_routing` mapping is defined and set to be required, the index - // operation will fail if no routing value is provided or extracted. - // - // NOTE: Data streams do not support custom routing unless they were created - // with the `allow_custom_routing` setting enabled in the template. - // - // **Distributed** - // - // The index operation is directed to the primary shard based on its route and - // performed on the actual node containing this shard. - // After the primary shard completes the operation, if needed, the update is - // distributed to applicable replicas. - // - // **Active shards** - // - // To improve the resiliency of writes to the system, indexing operations can be - // configured to wait for a certain number of active shard copies before - // proceeding with the operation. - // If the requisite number of active shard copies are not available, then the - // write operation must wait and retry, until either the requisite shard copies - // have started or a timeout occurs. - // By default, write operations only wait for the primary shards to be active - // before proceeding (that is to say `wait_for_active_shards` is `1`). - // This default can be overridden in the index settings dynamically by setting - // `index.write.wait_for_active_shards`. - // To alter this behavior per operation, use the `wait_for_active_shards - // request` parameter. - // - // Valid values are all or any positive integer up to the total number of - // configured copies per shard in the index (which is `number_of_replicas`+1). - // Specifying a negative value or a number greater than the number of shard - // copies will throw an error. - // - // For example, suppose you have a cluster of three nodes, A, B, and C and you - // create an index index with the number of replicas set to 3 (resulting in 4 - // shard copies, one more copy than there are nodes). - // If you attempt an indexing operation, by default the operation will only - // ensure the primary copy of each shard is available before proceeding. - // This means that even if B and C went down and A hosted the primary shard - // copies, the indexing operation would still proceed with only one copy of the - // data. - // If `wait_for_active_shards` is set on the request to `3` (and all three nodes - // are up), the indexing operation will require 3 active shard copies before - // proceeding. - // This requirement should be met because there are 3 active nodes in the - // cluster, each one holding a copy of the shard. - // However, if you set `wait_for_active_shards` to `all` (or to `4`, which is - // the same in this situation), the indexing operation will not proceed as you - // do not have all 4 copies of each shard active in the index. - // The operation will timeout unless a new node is brought up in the cluster to - // host the fourth copy of the shard. - // - // It is important to note that this setting greatly reduces the chances of the - // write operation not writing to the requisite number of shard copies, but it - // does not completely eliminate the possibility, because this check occurs - // before the write operation starts. - // After the write operation is underway, it is still possible for replication - // to fail on any number of shard copies but still succeed on the primary. - // The `_shards` section of the API response reveals the number of shard copies - // on which replication succeeded and failed. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html - Create core_create.NewCreate - // Delete a document. - // - // Remove a JSON document from the specified index. - // - // NOTE: You cannot send deletion requests directly to a data stream. - // To delete a document in a data stream, you must target the backing index - // containing the document. - // - // **Optimistic concurrency control** - // - // Delete operations can be made conditional and only be performed if the last - // modification to the document was assigned the sequence number and primary - // term specified by the `if_seq_no` and `if_primary_term` parameters. - // If a mismatch is detected, the operation will result in a - // `VersionConflictException` and a status code of `409`. - // - // **Versioning** - // - // Each document indexed is versioned. - // When deleting a document, the version can be specified to make sure the - // relevant document you are trying to delete is actually being deleted and it - // has not changed in the meantime. - // Every write operation run on a document, deletes included, causes its version - // to be incremented. - // The version number of a deleted document remains available for a short time - // after deletion to allow for control of concurrent operations. - // The length of time for which a deleted document's version remains available - // is determined by the `index.gc_deletes` index setting. - // - // **Routing** - // - // If routing is used during indexing, the routing value also needs to be - // specified to delete a document. - // - // If the `_routing` mapping is set to `required` and no routing value is - // specified, the delete API throws a `RoutingMissingException` and rejects the - // request. - // - // For example: - // - // ``` - // DELETE /my-index-000001/_doc/1?routing=shard-1 - // ``` - // - // This request deletes the document with ID 1, but it is routed based on the - // user. - // The document is not deleted if the correct routing is not specified. - // - // **Distributed** - // - // The delete operation gets hashed into a specific shard ID. - // It then gets redirected into the primary shard within that ID group and - // replicated (if needed) to shard replicas within that ID group. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html - Delete core_delete.NewDelete - // Delete documents. - // - // Deletes documents that match the specified query. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or alias: - // - // * `read` - // * `delete` or `write` - // - // You can specify the query criteria in the request URI or the request body - // using the same syntax as the search API. - // When you submit a delete by query request, Elasticsearch gets a snapshot of - // the data stream or index when it begins processing the request and deletes - // matching documents using internal versioning. - // If a document changes between the time that the snapshot is taken and the - // delete operation is processed, it results in a version conflict and the - // delete operation fails. - // - // NOTE: Documents with a version equal to 0 cannot be deleted using delete by - // query because internal versioning does not support 0 as a valid version - // number. - // - // While processing a delete by query request, Elasticsearch performs multiple - // search requests sequentially to find all of the matching documents to delete. - // A bulk delete request is performed for each batch of matching documents. - // If a search or bulk request is rejected, the requests are retried up to 10 - // times, with exponential back off. - // If the maximum retry limit is reached, processing halts and all failed - // requests are returned in the response. - // Any delete requests that completed successfully still stick, they are not - // rolled back. - // - // You can opt to count version conflicts instead of halting and returning by - // setting `conflicts` to `proceed`. - // Note that if you opt to count version conflicts the operation could attempt - // to delete more documents from the source than `max_docs` until it has - // successfully deleted `max_docs documents`, or it has gone through every - // document in the source query. - // - // **Throttling delete requests** - // - // To control the rate at which delete by query issues batches of delete - // operations, you can set `requests_per_second` to any positive decimal number. - // This pads each batch with a wait time to throttle the rate. - // Set `requests_per_second` to `-1` to disable throttling. - // - // Throttling uses a wait time between batches so that the internal scroll - // requests can be given a timeout that takes the request padding into account. - // The padding time is the difference between the batch size divided by the - // `requests_per_second` and the time spent writing. - // By default the batch size is `1000`, so if `requests_per_second` is set to - // `500`: - // - // ``` - // target_time = 1000 / 500 per second = 2 seconds - // wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds - // ``` - // - // Since the batch is issued as a single `_bulk` request, large batch sizes - // cause Elasticsearch to create many requests and wait before starting the next - // set. - // This is "bursty" instead of "smooth". - // - // **Slicing** - // - // Delete by query supports sliced scroll to parallelize the delete process. - // This can improve efficiency and provide a convenient way to break the request - // down into smaller parts. - // - // Setting `slices` to `auto` lets Elasticsearch choose the number of slices to - // use. - // This setting will use one slice per shard, up to a certain limit. - // If there are multiple source data streams or indices, it will choose the - // number of slices based on the index or backing index with the smallest number - // of shards. - // Adding slices to the delete by query operation creates sub-requests which - // means it has some quirks: - // - // * You can see these requests in the tasks APIs. These sub-requests are - // "child" tasks of the task for the request with slices. - // * Fetching the status of the task for the request with slices only contains - // the status of completed slices. - // * These sub-requests are individually addressable for things like - // cancellation and rethrottling. - // * Rethrottling the request with `slices` will rethrottle the unfinished - // sub-request proportionally. - // * Canceling the request with `slices` will cancel each sub-request. - // * Due to the nature of `slices` each sub-request won't get a perfectly even - // portion of the documents. All documents will be addressed, but some slices - // may be larger than others. Expect larger slices to have a more even - // distribution. - // * Parameters like `requests_per_second` and `max_docs` on a request with - // `slices` are distributed proportionally to each sub-request. Combine that - // with the earlier point about distribution being uneven and you should - // conclude that using `max_docs` with `slices` might not result in exactly - // `max_docs` documents being deleted. - // * Each sub-request gets a slightly different snapshot of the source data - // stream or index though these are all taken at approximately the same time. - // - // If you're slicing manually or otherwise tuning automatic slicing, keep in - // mind that: - // - // * Query performance is most efficient when the number of slices is equal to - // the number of shards in the index or backing index. If that number is large - // (for example, 500), choose a lower number as too many `slices` hurts - // performance. Setting `slices` higher than the number of shards generally does - // not improve efficiency and adds overhead. - // * Delete performance scales linearly across available resources with the - // number of slices. - // - // Whether query or delete performance dominates the runtime depends on the - // documents being reindexed and cluster resources. - // - // **Cancel a delete by query operation** - // - // Any delete by query can be canceled using the task cancel API. For example: - // - // ``` - // POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel - // ``` - // - // The task ID can be found by using the get tasks API. - // - // Cancellation should happen quickly but might take a few seconds. - // The get task status API will continue to list the delete by query task until - // this task checks that it has been cancelled and terminates itself. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html - DeleteByQuery core_delete_by_query.NewDeleteByQuery - // Throttle a delete by query operation. - // - // Change the number of requests per second for a particular delete by query - // operation. - // Rethrottling that speeds up the query takes effect immediately but - // rethrotting that slows down the query takes effect after completing the - // current batch to prevent scroll timeouts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query-rethrottle + Bulk core_bulk.NewBulk + ClearScroll core_clear_scroll.NewClearScroll + ClosePointInTime core_close_point_in_time.NewClosePointInTime + Count core_count.NewCount + Create core_create.NewCreate + Delete core_delete.NewDelete + DeleteByQuery core_delete_by_query.NewDeleteByQuery DeleteByQueryRethrottle core_delete_by_query_rethrottle.NewDeleteByQueryRethrottle - // Delete a script or search template. - // Deletes a stored script or search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-stored-script-api.html - DeleteScript core_delete_script.NewDeleteScript - // Check a document. - // - // Verify that a document exists. - // For example, check to see if a document with the `_id` 0 exists: - // - // ``` - // HEAD my-index-000001/_doc/0 - // ``` - // - // If the document exists, the API returns a status code of `200 - OK`. - // If the document doesn’t exist, the API returns `404 - Not Found`. - // - // **Versioning support** - // - // You can use the `version` parameter to check the document only if its current - // version is equal to the specified one. - // - // Internally, Elasticsearch has marked the old document as deleted and added an - // entirely new document. - // The old version of the document doesn't disappear immediately, although you - // won't be able to access it. - // Elasticsearch cleans up deleted documents in the background as you continue - // to index more data. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - Exists core_exists.NewExists - // Check for a document source. - // - // Check whether a document source exists in an index. - // For example: - // - // ``` - // HEAD my-index-000001/_source/1 - // ``` - // - // A document's source is not available if it is disabled in the mapping. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - ExistsSource core_exists_source.NewExistsSource - // Explain a document match result. - // Get information about why a specific document matches, or doesn't match, a - // query. - // It computes a score explanation for a query and a specific document. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html - Explain core_explain.NewExplain - // Get the field capabilities. - // - // Get information about the capabilities of fields among multiple indices. - // - // For data streams, the API returns field capabilities among the stream’s - // backing indices. - // It returns runtime fields like any other field. - // For example, a runtime field with a type of keyword is returned the same as - // any other field that belongs to the `keyword` family. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html - FieldCaps core_field_caps.NewFieldCaps - // Get a document by its ID. - // - // Get a document and its source or stored fields from an index. - // - // By default, this API is realtime and is not affected by the refresh rate of - // the index (when data will become visible for search). - // In the case where stored fields are requested with the `stored_fields` - // parameter and the document has been updated but is not yet refreshed, the API - // will have to parse and analyze the source to extract the stored fields. - // To turn off realtime behavior, set the `realtime` parameter to false. - // - // **Source filtering** - // - // By default, the API returns the contents of the `_source` field unless you - // have used the `stored_fields` parameter or the `_source` field is turned off. - // You can turn off `_source` retrieval by using the `_source` parameter: - // - // ``` - // GET my-index-000001/_doc/0?_source=false - // ``` - // - // If you only need one or two fields from the `_source`, use the - // `_source_includes` or `_source_excludes` parameters to include or filter out - // particular fields. - // This can be helpful with large documents where partial retrieval can save on - // network overhead - // Both parameters take a comma separated list of fields or wildcard - // expressions. - // For example: - // - // ``` - // GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities - // ``` - // - // If you only want to specify includes, you can use a shorter notation: - // - // ``` - // GET my-index-000001/_doc/0?_source=*.id - // ``` - // - // **Routing** - // - // If routing is used during indexing, the routing value also needs to be - // specified to retrieve a document. - // For example: - // - // ``` - // GET my-index-000001/_doc/2?routing=user1 - // ``` - // - // This request gets the document with ID 2, but it is routed based on the user. - // The document is not fetched if the correct routing is not specified. - // - // **Distributed** - // - // The GET operation is hashed into a specific shard ID. - // It is then redirected to one of the replicas within that shard ID and returns - // the result. - // The replicas are the primary shard and its replicas within that shard ID - // group. - // This means that the more replicas you have, the better your GET scaling will - // be. - // - // **Versioning support** - // - // You can use the `version` parameter to retrieve the document only if its - // current version is equal to the specified one. - // - // Internally, Elasticsearch has marked the old document as deleted and added an - // entirely new document. - // The old version of the document doesn't disappear immediately, although you - // won't be able to access it. - // Elasticsearch cleans up deleted documents in the background as you continue - // to index more data. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - Get core_get.NewGet - // Get a script or search template. - // Retrieves a stored script or search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-stored-script-api.html - GetScript core_get_script.NewGetScript - // Get script contexts. - // - // Get a list of supported script contexts and their methods. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-script-contexts-api.html - GetScriptContext core_get_script_context.NewGetScriptContext - // Get script languages. - // - // Get a list of available script types, languages, and contexts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-script-languages-api.html - GetScriptLanguages core_get_script_languages.NewGetScriptLanguages - // Get a document's source. - // - // Get the source of a document. - // For example: - // - // ``` - // GET my-index-000001/_source/1 - // ``` - // - // You can use the source filtering parameters to control which parts of the - // `_source` are returned: - // - // ``` - // GET - // my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities - // ``` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - GetSource core_get_source.NewGetSource - // Get the cluster health. - // Get a report with the health status of an Elasticsearch cluster. - // The report contains a list of indicators that compose Elasticsearch - // functionality. - // - // Each indicator has a health status of: green, unknown, yellow or red. - // The indicator will provide an explanation and metadata describing the reason - // for its current health status. - // - // The cluster’s status is controlled by the worst indicator status. - // - // In the event that an indicator’s status is non-green, a list of impacts may - // be present in the indicator result which detail the functionalities that are - // negatively affected by the health issue. - // Each impact carries with it a severity level, an area of the system that is - // affected, and a simple description of the impact on the system. - // - // Some health indicators can determine the root cause of a health problem and - // prescribe a set of steps that can be performed in order to improve the health - // of the system. - // The root cause and remediation steps are encapsulated in a diagnosis. - // A diagnosis contains a cause detailing a root cause analysis, an action - // containing a brief description of the steps to take to fix the problem, the - // list of affected resources (if applicable), and a detailed step-by-step - // troubleshooting guide to fix the diagnosed problem. - // - // NOTE: The health indicators perform root cause analysis of non-green health - // statuses. This can be computationally expensive when called frequently. - // When setting up automated polling of the API for health status, set verbose - // to false to disable the more expensive analysis logic. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html - HealthReport core_health_report.NewHealthReport - // Create or update a document in an index. - // - // Add a JSON document to the specified data stream or index and make it - // searchable. - // If the target is an index and the document already exists, the request - // updates the document and increments its version. - // - // NOTE: You cannot use this API to send update requests for existing documents - // in a data stream. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or index alias: - // - // * To add or overwrite a document using the `PUT //_doc/<_id>` request - // format, you must have the `create`, `index`, or `write` index privilege. - // * To add a document using the `POST //_doc/` request format, you must - // have the `create_doc`, `create`, `index`, or `write` index privilege. - // * To automatically create a data stream or index with this API request, you - // must have the `auto_configure`, `create_index`, or `manage` index privilege. - // - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // NOTE: Replica shards might not all be started when an indexing operation - // returns successfully. - // By default, only the primary is required. Set `wait_for_active_shards` to - // change this default behavior. - // - // **Automatically create data streams and indices** - // - // If the request's target doesn't exist and matches an index template with a - // `data_stream` definition, the index operation automatically creates the data - // stream. - // - // If the target doesn't exist and doesn't match a data stream template, the - // operation automatically creates the index and applies any matching index - // templates. - // - // NOTE: Elasticsearch includes several built-in index templates. To avoid - // naming collisions with these templates, refer to index pattern documentation. - // - // If no mapping exists, the index operation creates a dynamic mapping. - // By default, new fields and objects are automatically added to the mapping if - // needed. - // - // Automatic index creation is controlled by the `action.auto_create_index` - // setting. - // If it is `true`, any index can be created automatically. - // You can modify this setting to explicitly allow or block automatic creation - // of indices that match specified patterns or set it to `false` to turn off - // automatic index creation entirely. - // Specify a comma-separated list of patterns you want to allow or prefix each - // pattern with `+` or `-` to indicate whether it should be allowed or blocked. - // When a list is specified, the default behaviour is to disallow. - // - // NOTE: The `action.auto_create_index` setting affects the automatic creation - // of indices only. - // It does not affect the creation of data streams. - // - // **Optimistic concurrency control** - // - // Index operations can be made conditional and only be performed if the last - // modification to the document was assigned the sequence number and primary - // term specified by the `if_seq_no` and `if_primary_term` parameters. - // If a mismatch is detected, the operation will result in a - // `VersionConflictException` and a status code of `409`. - // - // **Routing** - // - // By default, shard placement — or routing — is controlled by using a hash of - // the document's ID value. - // For more explicit control, the value fed into the hash function used by the - // router can be directly specified on a per-operation basis using the `routing` - // parameter. - // - // When setting up explicit mapping, you can also use the `_routing` field to - // direct the index operation to extract the routing value from the document - // itself. - // This does come at the (very minimal) cost of an additional document parsing - // pass. - // If the `_routing` mapping is defined and set to be required, the index - // operation will fail if no routing value is provided or extracted. - // - // NOTE: Data streams do not support custom routing unless they were created - // with the `allow_custom_routing` setting enabled in the template. - // - // **Distributed** - // - // The index operation is directed to the primary shard based on its route and - // performed on the actual node containing this shard. - // After the primary shard completes the operation, if needed, the update is - // distributed to applicable replicas. - // - // **Active shards** - // - // To improve the resiliency of writes to the system, indexing operations can be - // configured to wait for a certain number of active shard copies before - // proceeding with the operation. - // If the requisite number of active shard copies are not available, then the - // write operation must wait and retry, until either the requisite shard copies - // have started or a timeout occurs. - // By default, write operations only wait for the primary shards to be active - // before proceeding (that is to say `wait_for_active_shards` is `1`). - // This default can be overridden in the index settings dynamically by setting - // `index.write.wait_for_active_shards`. - // To alter this behavior per operation, use the `wait_for_active_shards - // request` parameter. - // - // Valid values are all or any positive integer up to the total number of - // configured copies per shard in the index (which is `number_of_replicas`+1). - // Specifying a negative value or a number greater than the number of shard - // copies will throw an error. - // - // For example, suppose you have a cluster of three nodes, A, B, and C and you - // create an index index with the number of replicas set to 3 (resulting in 4 - // shard copies, one more copy than there are nodes). - // If you attempt an indexing operation, by default the operation will only - // ensure the primary copy of each shard is available before proceeding. - // This means that even if B and C went down and A hosted the primary shard - // copies, the indexing operation would still proceed with only one copy of the - // data. - // If `wait_for_active_shards` is set on the request to `3` (and all three nodes - // are up), the indexing operation will require 3 active shard copies before - // proceeding. - // This requirement should be met because there are 3 active nodes in the - // cluster, each one holding a copy of the shard. - // However, if you set `wait_for_active_shards` to `all` (or to `4`, which is - // the same in this situation), the indexing operation will not proceed as you - // do not have all 4 copies of each shard active in the index. - // The operation will timeout unless a new node is brought up in the cluster to - // host the fourth copy of the shard. - // - // It is important to note that this setting greatly reduces the chances of the - // write operation not writing to the requisite number of shard copies, but it - // does not completely eliminate the possibility, because this check occurs - // before the write operation starts. - // After the write operation is underway, it is still possible for replication - // to fail on any number of shard copies but still succeed on the primary. - // The `_shards` section of the API response reveals the number of shard copies - // on which replication succeeded and failed. - // - // **No operation (noop) updates** - // - // When updating a document by using this API, a new version of the document is - // always created even if the document hasn't changed. - // If this isn't acceptable use the `_update` API with `detect_noop` set to - // `true`. - // The `detect_noop` option isn't available on this API because it doesn’t fetch - // the old source and isn't able to compare it against the new source. - // - // There isn't a definitive rule for when noop updates aren't acceptable. - // It's a combination of lots of factors like how frequently your data source - // sends updates that are actually noops and how many queries per second - // Elasticsearch runs on the shard receiving the updates. - // - // **Versioning** - // - // Each indexed document is given a version number. - // By default, internal versioning is used that starts at 1 and increments with - // each update, deletes included. - // Optionally, the version number can be set to an external value (for example, - // if maintained in a database). - // To enable this functionality, `version_type` should be set to `external`. - // The value provided must be a numeric, long value greater than or equal to 0, - // and less than around `9.2e+18`. - // - // NOTE: Versioning is completely real time, and is not affected by the near - // real time aspects of search operations. - // If no version is provided, the operation runs without any version checks. - // - // When using the external version type, the system checks to see if the version - // number passed to the index request is greater than the version of the - // currently stored document. - // If true, the document will be indexed and the new version number used. - // If the value provided is less than or equal to the stored document's version - // number, a version conflict will occur and the index operation will fail. For - // example: - // - // ``` - // PUT my-index-000001/_doc/1?version=2&version_type=external - // { - // "user": { - // "id": "elkbee" - // } - // } - // - // In this example, the operation will succeed since the supplied version of 2 - // is higher than the current document version of 1. - // If the document was already updated and its version was set to 2 or higher, - // the indexing command will fail and result in a conflict (409 HTTP status - // code). - // - // A nice side effect is that there is no need to maintain strict ordering of - // async indexing operations run as a result of changes to a source database, as - // long as version numbers from the source database are used. - // Even the simple case of updating the Elasticsearch index using data from a - // database is simplified if external versioning is used, as only the latest - // version will be used if the index operations arrive out of order. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html - Index core_index.NewIndex - // Get cluster info. - // Get basic build, version, and cluster information. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-api-root.html - Info core_info.NewInfo - // Run a knn search. - // - // NOTE: The kNN search API has been replaced by the `knn` option in the search - // API. - // - // Perform a k-nearest neighbor (kNN) search on a dense_vector field and return - // the matching documents. - // Given a query vector, the API finds the k closest vectors and returns those - // documents as search hits. - // - // Elasticsearch uses the HNSW algorithm to support efficient kNN search. - // Like most kNN algorithms, HNSW is an approximate method that sacrifices - // result accuracy for improved search speed. - // This means the results returned are not always the true k closest neighbors. - // - // The kNN search API supports restricting the search using a filter. - // The search will return the top k documents that also match the filter query. - // - // A kNN search response has the exact same structure as a search API response. - // However, certain sections have a meaning specific to kNN search: - // - // * The document `_score` is determined by the similarity between the query and - // document vector. - // * The `hits.total` object contains the total number of nearest neighbor - // candidates considered, which is `num_candidates * num_shards`. The - // `hits.total.relation` will always be `eq`, indicating an exact value. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search-api.html - KnnSearch core_knn_search.NewKnnSearch - // Get multiple documents. - // - // Get multiple JSON documents by ID from one or more indices. - // If you specify an index in the request URI, you only need to specify the - // document IDs in the request body. - // To ensure fast responses, this multi get (mget) API responds with partial - // results if one or more shards fail. - // - // **Filter source fields** - // - // By default, the `_source` field is returned for every document (if stored). - // Use the `_source` and `_source_include` or `source_exclude` attributes to - // filter what fields are returned for a particular document. - // You can include the `_source`, `_source_includes`, and `_source_excludes` - // query parameters in the request URI to specify the defaults to use when there - // are no per-document instructions. - // - // **Get stored fields** - // - // Use the `stored_fields` attribute to specify the set of stored fields you - // want to retrieve. - // Any requested fields that are not stored are ignored. - // You can include the `stored_fields` query parameter in the request URI to - // specify the defaults to use when there are no per-document instructions. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html - Mget core_mget.NewMget - // Run multiple searches. - // - // The format of the request is similar to the bulk API format and makes use of - // the newline delimited JSON (NDJSON) format. - // The structure is as follows: - // - // ``` - // header\n - // body\n - // header\n - // body\n - // ``` - // - // This structure is specifically optimized to reduce parsing if a specific - // search ends up redirected to another node. - // - // IMPORTANT: The final line of data must end with a newline character `\n`. - // Each newline character may be preceded by a carriage return `\r`. - // When sending requests to this endpoint the `Content-Type` header should be - // set to `application/x-ndjson`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html - Msearch core_msearch.NewMsearch - // Run multiple templated searches. - // - // Run multiple templated searches with a single request. - // If you are providing a text file or text input to `curl`, use the - // `--data-binary` flag instead of `-d` to preserve newlines. - // For example: - // - // ``` - // $ cat requests - // { "index": "my-index" } - // { "id": "my-search-template", "params": { "query_string": "hello world", - // "from": 0, "size": 10 }} - // { "index": "my-other-index" } - // { "id": "my-other-search-template", "params": { "query_type": "match_all" }} - // - // $ curl -H "Content-Type: application/x-ndjson" -XGET - // localhost:9200/_msearch/template --data-binary "@requests"; echo - // ``` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-search-template.html - MsearchTemplate core_msearch_template.NewMsearchTemplate - // Get multiple term vectors. - // - // Get multiple term vectors with a single request. - // You can specify existing documents by index and ID or provide artificial - // documents in the body of the request. - // You can specify the index in the request body or request URI. - // The response contains a `docs` array with all the fetched termvectors. - // Each element has the structure provided by the termvectors API. - // - // **Artificial documents** - // - // You can also use `mtermvectors` to generate term vectors for artificial - // documents provided in the body of the request. - // The mapping used is determined by the specified `_index`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html - Mtermvectors core_mtermvectors.NewMtermvectors - // Open a point in time. - // - // A search request by default runs against the most recent visible data of the - // target indices, - // which is called point in time. Elasticsearch pit (point in time) is a - // lightweight view into the - // state of the data as it existed when initiated. In some cases, it’s preferred - // to perform multiple - // search requests using the same point in time. For example, if refreshes - // happen between - // `search_after` requests, then the results of those requests might not be - // consistent as changes happening - // between searches are only visible to the more recent point in time. - // - // A point in time must be opened explicitly before being used in search - // requests. - // - // A subsequent search request with the `pit` parameter must not specify - // `index`, `routing`, or `preference` values as these parameters are copied - // from the point in time. - // - // Just like regular searches, you can use `from` and `size` to page through - // point in time search results, up to the first 10,000 hits. - // If you want to retrieve more hits, use PIT with `search_after`. - // - // IMPORTANT: The open point in time request and each subsequent search request - // can return different identifiers; always use the most recently received ID - // for the next search request. - // - // When a PIT that contains shard failures is used in a search request, the - // missing are always reported in the search response as a - // `NoShardAvailableActionException` exception. - // To get rid of these exceptions, a new PIT needs to be created so that shards - // missing from the previous PIT can be handled, assuming they become available - // in the meantime. - // - // **Keeping point in time alive** - // - // The `keep_alive` parameter, which is passed to a open point in time request - // and search request, extends the time to live of the corresponding point in - // time. - // The value does not need to be long enough to process all data — it just needs - // to be long enough for the next request. - // - // Normally, the background merge process optimizes the index by merging - // together smaller segments to create new, bigger segments. - // Once the smaller segments are no longer needed they are deleted. - // However, open point-in-times prevent the old segments from being deleted - // since they are still in use. - // - // TIP: Keeping older segments alive means that more disk space and file handles - // are needed. - // Ensure that you have configured your nodes to have ample free file handles. - // - // Additionally, if a segment contains deleted or updated documents then the - // point in time must keep track of whether each document in the segment was - // live at the time of the initial search request. - // Ensure that your nodes have sufficient heap space if you have many open - // point-in-times on an index that is subject to ongoing deletes or updates. - // Note that a point-in-time doesn't prevent its associated indices from being - // deleted. - // You can check how many point-in-times (that is, search contexts) are open - // with the nodes stats API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html - OpenPointInTime core_open_point_in_time.NewOpenPointInTime - // Ping the cluster. - // Get information about whether the cluster is running. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html - Ping core_ping.NewPing - // Create or update a script or search template. - // Creates or updates a stored script or search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-stored-script-api.html - PutScript core_put_script.NewPutScript - // Evaluate ranked search results. - // - // Evaluate the quality of ranked search results over a set of typical search - // queries. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html - RankEval core_rank_eval.NewRankEval - // Reindex documents. - // - // Copy documents from a source to a destination. - // You can copy all documents to the destination index or reindex a subset of - // the documents. - // The source can be any existing index, alias, or data stream. - // The destination must differ from the source. - // For example, you cannot reindex a data stream into itself. - // - // IMPORTANT: Reindex requires `_source` to be enabled for all documents in the - // source. - // The destination should be configured as wanted before calling the reindex - // API. - // Reindex does not copy the settings from the source or its associated - // template. - // Mappings, shard counts, and replicas, for example, must be configured ahead - // of time. - // - // If the Elasticsearch security features are enabled, you must have the - // following security privileges: - // - // * The `read` index privilege for the source data stream, index, or alias. - // * The `write` index privilege for the destination data stream, index, or - // index alias. - // * To automatically create a data stream or index with a reindex API request, - // you must have the `auto_configure`, `create_index`, or `manage` index - // privilege for the destination data stream, index, or alias. - // * If reindexing from a remote cluster, the `source.remote.user` must have the - // `monitor` cluster privilege and the `read` index privilege for the source - // data stream, index, or alias. - // - // If reindexing from a remote cluster, you must explicitly allow the remote - // host in the `reindex.remote.whitelist` setting. - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // The `dest` element can be configured like the index API to control optimistic - // concurrency control. - // Omitting `version_type` or setting it to `internal` causes Elasticsearch to - // blindly dump documents into the destination, overwriting any that happen to - // have the same ID. - // - // Setting `version_type` to `external` causes Elasticsearch to preserve the - // `version` from the source, create any documents that are missing, and update - // any documents that have an older version in the destination than they do in - // the source. - // - // Setting `op_type` to `create` causes the reindex API to create only missing - // documents in the destination. - // All existing documents will cause a version conflict. - // - // IMPORTANT: Because data streams are append-only, any reindex request to a - // destination data stream must have an `op_type` of `create`. - // A reindex can only add new documents to a destination data stream. - // It cannot update existing documents in a destination data stream. - // - // By default, version conflicts abort the reindex process. - // To continue reindexing if there are conflicts, set the `conflicts` request - // body property to `proceed`. - // In this case, the response includes a count of the version conflicts that - // were encountered. - // Note that the handling of other error types is unaffected by the `conflicts` - // property. - // Additionally, if you opt to count version conflicts, the operation could - // attempt to reindex more documents from the source than `max_docs` until it - // has successfully indexed `max_docs` documents into the target or it has gone - // through every document in the source query. - // - // NOTE: The reindex API makes no effort to handle ID collisions. - // The last document written will "win" but the order isn't usually predictable - // so it is not a good idea to rely on this behavior. - // Instead, make sure that IDs are unique by using a script. - // - // **Running reindex asynchronously** - // - // If the request contains `wait_for_completion=false`, Elasticsearch performs - // some preflight checks, launches the request, and returns a task you can use - // to cancel or get the status of the task. - // Elasticsearch creates a record of this task as a document at - // `_tasks/`. - // - // **Reindex from multiple sources** - // - // If you have many sources to reindex it is generally better to reindex them - // one at a time rather than using a glob pattern to pick up multiple sources. - // That way you can resume the process if there are any errors by removing the - // partially completed source and starting over. - // It also makes parallelizing the process fairly simple: split the list of - // sources to reindex and run each list in parallel. - // - // For example, you can use a bash script like this: - // - // ``` - // for index in i1 i2 i3 i4 i5; do - // curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty - // -d'{ - // "source": { - // "index": "'$index'" - // }, - // "dest": { - // "index": "'$index'-reindexed" - // } - // }' - // done - // ``` - // - // **Throttling** - // - // Set `requests_per_second` to any positive decimal number (`1.4`, `6`, `1000`, - // for example) to throttle the rate at which reindex issues batches of index - // operations. - // Requests are throttled by padding each batch with a wait time. - // To turn off throttling, set `requests_per_second` to `-1`. - // - // The throttling is done by waiting between batches so that the scroll that - // reindex uses internally can be given a timeout that takes into account the - // padding. - // The padding time is the difference between the batch size divided by the - // `requests_per_second` and the time spent writing. - // By default the batch size is `1000`, so if `requests_per_second` is set to - // `500`: - // - // ``` - // target_time = 1000 / 500 per second = 2 seconds - // wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds - // ``` - // - // Since the batch is issued as a single bulk request, large batch sizes cause - // Elasticsearch to create many requests and then wait for a while before - // starting the next set. - // This is "bursty" instead of "smooth". - // - // **Slicing** - // - // Reindex supports sliced scroll to parallelize the reindexing process. - // This parallelization can improve efficiency and provide a convenient way to - // break the request down into smaller parts. - // - // NOTE: Reindexing from remote clusters does not support manual or automatic - // slicing. - // - // You can slice a reindex request manually by providing a slice ID and total - // number of slices to each request. - // You can also let reindex automatically parallelize by using sliced scroll to - // slice on `_id`. - // The `slices` parameter specifies the number of slices to use. - // - // Adding `slices` to the reindex request just automates the manual process, - // creating sub-requests which means it has some quirks: - // - // * You can see these requests in the tasks API. These sub-requests are "child" - // tasks of the task for the request with slices. - // * Fetching the status of the task for the request with `slices` only contains - // the status of completed slices. - // * These sub-requests are individually addressable for things like - // cancellation and rethrottling. - // * Rethrottling the request with `slices` will rethrottle the unfinished - // sub-request proportionally. - // * Canceling the request with `slices` will cancel each sub-request. - // * Due to the nature of `slices`, each sub-request won't get a perfectly even - // portion of the documents. All documents will be addressed, but some slices - // may be larger than others. Expect larger slices to have a more even - // distribution. - // * Parameters like `requests_per_second` and `max_docs` on a request with - // `slices` are distributed proportionally to each sub-request. Combine that - // with the previous point about distribution being uneven and you should - // conclude that using `max_docs` with `slices` might not result in exactly - // `max_docs` documents being reindexed. - // * Each sub-request gets a slightly different snapshot of the source, though - // these are all taken at approximately the same time. - // - // If slicing automatically, setting `slices` to `auto` will choose a reasonable - // number for most indices. - // If slicing manually or otherwise tuning automatic slicing, use the following - // guidelines. - // - // Query performance is most efficient when the number of slices is equal to the - // number of shards in the index. - // If that number is large (for example, `500`), choose a lower number as too - // many slices will hurt performance. - // Setting slices higher than the number of shards generally does not improve - // efficiency and adds overhead. - // - // Indexing performance scales linearly across available resources with the - // number of slices. - // - // Whether query or indexing performance dominates the runtime depends on the - // documents being reindexed and cluster resources. - // - // **Modify documents during reindexing** - // - // Like `_update_by_query`, reindex operations support a script that modifies - // the document. - // Unlike `_update_by_query`, the script is allowed to modify the document's - // metadata. - // - // Just as in `_update_by_query`, you can set `ctx.op` to change the operation - // that is run on the destination. - // For example, set `ctx.op` to `noop` if your script decides that the document - // doesn’t have to be indexed in the destination. This "no operation" will be - // reported in the `noop` counter in the response body. - // Set `ctx.op` to `delete` if your script decides that the document must be - // deleted from the destination. - // The deletion will be reported in the `deleted` counter in the response body. - // Setting `ctx.op` to anything else will return an error, as will setting any - // other field in `ctx`. - // - // Think of the possibilities! Just be careful; you are able to change: - // - // * `_id` - // * `_index` - // * `_version` - // * `_routing` - // - // Setting `_version` to `null` or clearing it from the `ctx` map is just like - // not sending the version in an indexing request. - // It will cause the document to be overwritten in the destination regardless of - // the version on the target or the version type you use in the reindex API. - // - // **Reindex from remote** - // - // Reindex supports reindexing from a remote Elasticsearch cluster. - // The `host` parameter must contain a scheme, host, port, and optional path. - // The `username` and `password` parameters are optional and when they are - // present the reindex operation will connect to the remote Elasticsearch node - // using basic authentication. - // Be sure to use HTTPS when using basic authentication or the password will be - // sent in plain text. - // There are a range of settings available to configure the behavior of the - // HTTPS connection. - // - // When using Elastic Cloud, it is also possible to authenticate against the - // remote cluster through the use of a valid API key. - // Remote hosts must be explicitly allowed with the `reindex.remote.whitelist` - // setting. - // It can be set to a comma delimited list of allowed remote host and port - // combinations. - // Scheme is ignored; only the host and port are used. - // For example: - // - // ``` - // reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, - // localhost:*"] - // ``` - // - // The list of allowed hosts must be configured on any nodes that will - // coordinate the reindex. - // This feature should work with remote clusters of any version of - // Elasticsearch. - // This should enable you to upgrade from any version of Elasticsearch to the - // current version by reindexing from a cluster of the old version. - // - // WARNING: Elasticsearch does not support forward compatibility across major - // versions. - // For example, you cannot reindex from a 7.x cluster into a 6.x cluster. - // - // To enable queries sent to older versions of Elasticsearch, the `query` - // parameter is sent directly to the remote host without validation or - // modification. - // - // NOTE: Reindexing from remote clusters does not support manual or automatic - // slicing. - // - // Reindexing from a remote server uses an on-heap buffer that defaults to a - // maximum size of 100mb. - // If the remote index includes very large documents you'll need to use a - // smaller batch size. - // It is also possible to set the socket read timeout on the remote connection - // with the `socket_timeout` field and the connection timeout with the - // `connect_timeout` field. - // Both default to 30 seconds. - // - // **Configuring SSL parameters** - // - // Reindex from remote supports configurable SSL settings. - // These must be specified in the `elasticsearch.yml` file, with the exception - // of the secure settings, which you add in the Elasticsearch keystore. - // It is not possible to configure SSL in the body of the reindex request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html - Reindex core_reindex.NewReindex - // Throttle a reindex operation. - // - // Change the number of requests per second for a particular reindex operation. - // For example: - // - // ``` - // POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 - // ``` - // - // Rethrottling that speeds up the query takes effect immediately. - // Rethrottling that slows down the query will take effect after completing the - // current batch. - // This behavior prevents scroll timeouts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html - ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle - // Render a search template. - // - // Render a search template as a search request body. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html - RenderSearchTemplate core_render_search_template.NewRenderSearchTemplate - // Run a script. - // - // Runs a script and returns a result. - // Use this API to build and test scripts, such as when defining a script for a - // runtime field. - // This API requires very few dependencies and is especially useful if you don't - // have permissions to write documents on a cluster. - // - // The API uses several _contexts_, which control how scripts are run, what - // variables are available at runtime, and what the return type is. - // - // Each context requires a script, but additional parameters depend on the - // context you're using for that script. - // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html - ScriptsPainlessExecute core_scripts_painless_execute.NewScriptsPainlessExecute - // Run a scrolling search. - // - // IMPORTANT: The scroll API is no longer recommend for deep pagination. If you - // need to preserve the index state while paging through more than 10,000 hits, - // use the `search_after` parameter with a point in time (PIT). - // - // The scroll API gets large sets of results from a single scrolling search - // request. - // To get the necessary scroll ID, submit a search API request that includes an - // argument for the `scroll` query parameter. - // The `scroll` parameter indicates how long Elasticsearch should retain the - // search context for the request. - // The search response returns a scroll ID in the `_scroll_id` response body - // parameter. - // You can then use the scroll ID with the scroll API to retrieve the next batch - // of results for the request. - // If the Elasticsearch security features are enabled, the access to the results - // of a specific scroll ID is restricted to the user or API key that submitted - // the search. - // - // You can also use the scroll API to specify a new scroll parameter that - // extends or shortens the retention period for the search context. - // - // IMPORTANT: Results from a scrolling search reflect the state of the index at - // the time of the initial search request. Subsequent indexing or document - // changes only affect later search and scroll requests. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/scroll-api.html - Scroll core_scroll.NewScroll - // Run a search. - // - // Get search hits that match the query defined in the request. - // You can provide search queries using the `q` query string parameter or the - // request body. - // If both are specified, only the query parameter is used. - // - // If the Elasticsearch security features are enabled, you must have the read - // index privilege for the target data stream, index, or alias. For - // cross-cluster search, refer to the documentation about configuring CCS - // privileges. - // To search a point in time (PIT) for an alias, you must have the `read` index - // privilege for the alias's data streams or indices. - // - // **Search slicing** - // - // When paging through a large number of documents, it can be helpful to split - // the search into multiple slices to consume them independently with the - // `slice` and `pit` properties. - // By default the splitting is done first on the shards, then locally on each - // shard. - // The local splitting partitions the shard into contiguous ranges based on - // Lucene document IDs. - // - // For instance if the number of shards is equal to 2 and you request 4 slices, - // the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are - // assigned to the second shard. - // - // IMPORTANT: The same point-in-time ID should be used for all slices. - // If different PIT IDs are used, slices can overlap and miss documents. - // This situation can occur because the splitting criterion is based on Lucene - // document IDs, which are not stable across changes to the index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html - Search core_search.NewSearch - // Search a vector tile. - // - // Search a vector tile for geospatial values. - // Before using this API, you should be familiar with the Mapbox vector tile - // specification. - // The API returns results as a binary mapbox vector tile. - // - // Internally, Elasticsearch translates a vector tile search API request into a - // search containing: - // - // * A `geo_bounding_box` query on the ``. The query uses the - // `//` tile as a bounding box. - // * A `geotile_grid` or `geohex_grid` aggregation on the ``. The - // `grid_agg` parameter determines the aggregation type. The aggregation uses - // the `//` tile as a bounding box. - // * Optionally, a `geo_bounds` aggregation on the ``. The search only - // includes this aggregation if the `exact_bounds` parameter is `true`. - // * If the optional parameter `with_labels` is `true`, the internal search will - // include a dynamic runtime field that calls the `getLabelPosition` function of - // the geometry doc value. This enables the generation of new point features - // containing suggested geometry labels, so that, for example, multi-polygons - // will have only one label. - // - // For example, Elasticsearch may translate a vector tile search API request - // with a `grid_agg` argument of `geotile` and an `exact_bounds` argument of - // `true` into the following search - // - // ``` - // GET my-index/_search - // { - // "size": 10000, - // "query": { - // "geo_bounding_box": { - // "my-geo-field": { - // "top_left": { - // "lat": -40.979898069620134, - // "lon": -45 - // }, - // "bottom_right": { - // "lat": -66.51326044311186, - // "lon": 0 - // } - // } - // } - // }, - // "aggregations": { - // "grid": { - // "geotile_grid": { - // "field": "my-geo-field", - // "precision": 11, - // "size": 65536, - // "bounds": { - // "top_left": { - // "lat": -40.979898069620134, - // "lon": -45 - // }, - // "bottom_right": { - // "lat": -66.51326044311186, - // "lon": 0 - // } - // } - // } - // }, - // "bounds": { - // "geo_bounds": { - // "field": "my-geo-field", - // "wrap_longitude": false - // } - // } - // } - // } - // ``` - // - // The API returns results as a binary Mapbox vector tile. - // Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the - // tile contains three layers: - // - // * A `hits` layer containing a feature for each `` value matching the - // `geo_bounding_box` query. - // * An `aggs` layer containing a feature for each cell of the `geotile_grid` or - // `geohex_grid`. The layer only contains features for cells with matching data. - // * A meta layer containing: - // * A feature containing a bounding box. By default, this is the bounding box - // of the tile. - // * Value ranges for any sub-aggregations on the `geotile_grid` or - // `geohex_grid`. - // * Metadata for the search. - // - // The API only returns features that can display at its zoom level. - // For example, if a polygon feature has no area at its zoom level, the API - // omits it. - // The API returns errors as UTF-8 encoded JSON. - // - // IMPORTANT: You can specify several options for this API as either a query - // parameter or request body parameter. - // If you specify both parameters, the query parameter takes precedence. - // - // **Grid precision for geotile** - // - // For a `grid_agg` of `geotile`, you can use cells in the `aggs` layer as tiles - // for lower zoom levels. - // `grid_precision` represents the additional zoom levels available through - // these cells. The final precision is computed by as follows: ` + - // grid_precision`. - // For example, if `` is 7 and `grid_precision` is 8, then the - // `geotile_grid` aggregation will use a precision of 15. - // The maximum final precision is 29. - // The `grid_precision` also determines the number of cells for the grid as - // follows: `(2^grid_precision) x (2^grid_precision)`. - // For example, a value of 8 divides the tile into a grid of 256 x 256 cells. - // The `aggs` layer only contains features for cells with matching data. - // - // **Grid precision for geohex** - // - // For a `grid_agg` of `geohex`, Elasticsearch uses `` and - // `grid_precision` to calculate a final precision as follows: ` + - // grid_precision`. - // - // This precision determines the H3 resolution of the hexagonal cells produced - // by the `geohex` aggregation. - // The following table maps the H3 resolution for each precision. - // For example, if `` is 3 and `grid_precision` is 3, the precision is 6. - // At a precision of 6, hexagonal cells have an H3 resolution of 2. - // If `` is 3 and `grid_precision` is 4, the precision is 7. - // At a precision of 7, hexagonal cells have an H3 resolution of 3. - // - // | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | - // | --------- | ---------------- | ------------- | ----------------| ----- | - // | 1 | 4 | 0 | 122 | 30.5 | - // | 2 | 16 | 0 | 122 | 7.625 | - // | 3 | 64 | 1 | 842 | 13.15625 | - // | 4 | 256 | 1 | 842 | 3.2890625 | - // | 5 | 1024 | 2 | 5882 | 5.744140625 | - // | 6 | 4096 | 2 | 5882 | 1.436035156 | - // | 7 | 16384 | 3 | 41162 | 2.512329102 | - // | 8 | 65536 | 3 | 41162 | 0.6280822754 | - // | 9 | 262144 | 4 | 288122 | 1.099098206 | - // | 10 | 1048576 | 4 | 288122 | 0.2747745514 | - // | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | - // | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | - // | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | - // | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | - // | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | - // | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | - // | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | - // | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | - // | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | - // | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | - // | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | - // | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | - // | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | - // | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | - // | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | - // | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | - // | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | - // | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | - // | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | - // - // Hexagonal cells don't align perfectly on a vector tile. - // Some cells may intersect more than one vector tile. - // To compute the H3 resolution for each precision, Elasticsearch compares the - // average density of hexagonal bins at each resolution with the average density - // of tile bins at each zoom level. - // Elasticsearch uses the H3 resolution that is closest to the corresponding - // geotile density. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html - SearchMvt core_search_mvt.NewSearchMvt - // Get the search shards. - // - // Get the indices and shards that a search request would be run against. - // This information can be useful for working out issues or planning - // optimizations with routing and shard preferences. - // When filtered aliases are used, the filter is returned as part of the - // `indices` section. - // - // If the Elasticsearch security features are enabled, you must have the - // `view_index_metadata` or `manage` index privilege for the target data stream, - // index, or alias. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html - SearchShards core_search_shards.NewSearchShards - // Run a search with a search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template-api.html - SearchTemplate core_search_template.NewSearchTemplate - // Get terms in an index. - // - // Discover terms that match a partial string in an index. - // This API is designed for low-latency look-ups used in auto-complete - // scenarios. - // - // > info - // > The terms enum API may return terms from deleted documents. Deleted - // documents are initially only marked as deleted. It is not until their - // segments are merged that documents are actually deleted. Until that happens, - // the terms enum API will return terms from these documents. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html - TermsEnum core_terms_enum.NewTermsEnum - // Get term vector information. - // - // Get information and statistics about terms in the fields of a particular - // document. - // - // You can retrieve term vectors for documents stored in the index or for - // artificial documents passed in the body of the request. - // You can specify the fields you are interested in through the `fields` - // parameter or by adding the fields to the request body. - // For example: - // - // ``` - // GET /my-index-000001/_termvectors/1?fields=message - // ``` - // - // Fields can be specified using wildcards, similar to the multi match query. - // - // Term vectors are real-time by default, not near real-time. - // This can be changed by setting `realtime` parameter to `false`. - // - // You can request three types of values: _term information_, _term statistics_, - // and _field statistics_. - // By default, all term information and field statistics are returned for all - // fields but term statistics are excluded. - // - // **Term information** - // - // * term frequency in the field (always returned) - // * term positions (`positions: true`) - // * start and end offsets (`offsets: true`) - // * term payloads (`payloads: true`), as base64 encoded bytes - // - // If the requested information wasn't stored in the index, it will be computed - // on the fly if possible. - // Additionally, term vectors could be computed for documents not even existing - // in the index, but instead provided by the user. - // - // > warn - // > Start and end offsets assume UTF-16 encoding is being used. If you want to - // use these offsets in order to get the original text that produced this token, - // you should make sure that the string you are taking a sub-string of is also - // encoded using UTF-16. - // - // **Behaviour** - // - // The term and field statistics are not accurate. - // Deleted documents are not taken into account. - // The information is only retrieved for the shard the requested document - // resides in. - // The term and field statistics are therefore only useful as relative measures - // whereas the absolute numbers have no meaning in this context. - // By default, when requesting term vectors of artificial documents, a shard to - // get the statistics from is randomly selected. - // Use `routing` only to hit a particular shard. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html - Termvectors core_termvectors.NewTermvectors - // Update a document. - // - // Update a document by running a script or passing a partial document. - // - // If the Elasticsearch security features are enabled, you must have the `index` - // or `write` index privilege for the target index or index alias. - // - // The script can update, delete, or skip modifying the document. - // The API also supports passing a partial document, which is merged into the - // existing document. - // To fully replace an existing document, use the index API. - // This operation: - // - // * Gets the document (collocated with the shard) from the index. - // * Runs the specified script. - // * Indexes the result. - // - // The document must still be reindexed, but using this API removes some network - // roundtrips and reduces chances of version conflicts between the GET and the - // index operation. - // - // The `_source` field must be enabled to use this API. - // In addition to `_source`, you can access the following variables through the - // `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the - // current timestamp). - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html - Update core_update.NewUpdate - // Update documents. - // Updates documents that match the specified query. - // If no query is specified, performs an update on every document in the data - // stream or index without modifying the source, which is useful for picking up - // mapping changes. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or alias: - // - // * `read` - // * `index` or `write` - // - // You can specify the query criteria in the request URI or the request body - // using the same syntax as the search API. - // - // When you submit an update by query request, Elasticsearch gets a snapshot of - // the data stream or index when it begins processing the request and updates - // matching documents using internal versioning. - // When the versions match, the document is updated and the version number is - // incremented. - // If a document changes between the time that the snapshot is taken and the - // update operation is processed, it results in a version conflict and the - // operation fails. - // You can opt to count version conflicts instead of halting and returning by - // setting `conflicts` to `proceed`. - // Note that if you opt to count version conflicts, the operation could attempt - // to update more documents from the source than `max_docs` until it has - // successfully updated `max_docs` documents or it has gone through every - // document in the source query. - // - // NOTE: Documents with a version equal to 0 cannot be updated using update by - // query because internal versioning does not support 0 as a valid version - // number. - // - // While processing an update by query request, Elasticsearch performs multiple - // search requests sequentially to find all of the matching documents. - // A bulk update request is performed for each batch of matching documents. - // Any query or update failures cause the update by query request to fail and - // the failures are shown in the response. - // Any update requests that completed successfully still stick, they are not - // rolled back. - // - // **Throttling update requests** - // - // To control the rate at which update by query issues batches of update - // operations, you can set `requests_per_second` to any positive decimal number. - // This pads each batch with a wait time to throttle the rate. - // Set `requests_per_second` to `-1` to turn off throttling. - // - // Throttling uses a wait time between batches so that the internal scroll - // requests can be given a timeout that takes the request padding into account. - // The padding time is the difference between the batch size divided by the - // `requests_per_second` and the time spent writing. - // By default the batch size is 1000, so if `requests_per_second` is set to - // `500`: - // - // ``` - // target_time = 1000 / 500 per second = 2 seconds - // wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds - // ``` - // - // Since the batch is issued as a single _bulk request, large batch sizes cause - // Elasticsearch to create many requests and wait before starting the next set. - // This is "bursty" instead of "smooth". - // - // **Slicing** - // - // Update by query supports sliced scroll to parallelize the update process. - // This can improve efficiency and provide a convenient way to break the request - // down into smaller parts. - // - // Setting `slices` to `auto` chooses a reasonable number for most data streams - // and indices. - // This setting will use one slice per shard, up to a certain limit. - // If there are multiple source data streams or indices, it will choose the - // number of slices based on the index or backing index with the smallest number - // of shards. - // - // Adding `slices` to `_update_by_query` just automates the manual process of - // creating sub-requests, which means it has some quirks: - // - // * You can see these requests in the tasks APIs. These sub-requests are - // "child" tasks of the task for the request with slices. - // * Fetching the status of the task for the request with `slices` only contains - // the status of completed slices. - // * These sub-requests are individually addressable for things like - // cancellation and rethrottling. - // * Rethrottling the request with `slices` will rethrottle the unfinished - // sub-request proportionally. - // * Canceling the request with slices will cancel each sub-request. - // * Due to the nature of slices each sub-request won't get a perfectly even - // portion of the documents. All documents will be addressed, but some slices - // may be larger than others. Expect larger slices to have a more even - // distribution. - // * Parameters like `requests_per_second` and `max_docs` on a request with - // slices are distributed proportionally to each sub-request. Combine that with - // the point above about distribution being uneven and you should conclude that - // using `max_docs` with `slices` might not result in exactly `max_docs` - // documents being updated. - // * Each sub-request gets a slightly different snapshot of the source data - // stream or index though these are all taken at approximately the same time. - // - // If you're slicing manually or otherwise tuning automatic slicing, keep in - // mind that: - // - // * Query performance is most efficient when the number of slices is equal to - // the number of shards in the index or backing index. If that number is large - // (for example, 500), choose a lower number as too many slices hurts - // performance. Setting slices higher than the number of shards generally does - // not improve efficiency and adds overhead. - // * Update performance scales linearly across available resources with the - // number of slices. - // - // Whether query or update performance dominates the runtime depends on the - // documents being reindexed and cluster resources. - // - // **Update the document source** - // - // Update by query supports scripts to update the document source. - // As with the update API, you can set `ctx.op` to change the operation that is - // performed. - // - // Set `ctx.op = "noop"` if your script decides that it doesn't have to make any - // changes. - // The update by query operation skips updating the document and increments the - // `noop` counter. - // - // Set `ctx.op = "delete"` if your script decides that the document should be - // deleted. - // The update by query operation deletes the document and increments the - // `deleted` counter. - // - // Update by query supports only `index`, `noop`, and `delete`. - // Setting `ctx.op` to anything else is an error. - // Setting any other field in `ctx` is an error. - // This API enables you to only modify the source of matching documents; you - // cannot move them. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html - UpdateByQuery core_update_by_query.NewUpdateByQuery - // Throttle an update by query operation. - // - // Change the number of requests per second for a particular update by query - // operation. - // Rethrottling that speeds up the query takes effect immediately but - // rethrotting that slows down the query takes effect after completing the - // current batch to prevent scroll timeouts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html#docs-update-by-query-rethrottle + DeleteScript core_delete_script.NewDeleteScript + Exists core_exists.NewExists + ExistsSource core_exists_source.NewExistsSource + Explain core_explain.NewExplain + FieldCaps core_field_caps.NewFieldCaps + Get core_get.NewGet + GetScript core_get_script.NewGetScript + GetScriptContext core_get_script_context.NewGetScriptContext + GetScriptLanguages core_get_script_languages.NewGetScriptLanguages + GetSource core_get_source.NewGetSource + HealthReport core_health_report.NewHealthReport + Index core_index.NewIndex + Info core_info.NewInfo + KnnSearch core_knn_search.NewKnnSearch + Mget core_mget.NewMget + Msearch core_msearch.NewMsearch + MsearchTemplate core_msearch_template.NewMsearchTemplate + Mtermvectors core_mtermvectors.NewMtermvectors + OpenPointInTime core_open_point_in_time.NewOpenPointInTime + Ping core_ping.NewPing + PutScript core_put_script.NewPutScript + RankEval core_rank_eval.NewRankEval + Reindex core_reindex.NewReindex + ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle + RenderSearchTemplate core_render_search_template.NewRenderSearchTemplate + ScriptsPainlessExecute core_scripts_painless_execute.NewScriptsPainlessExecute + Scroll core_scroll.NewScroll + Search core_search.NewSearch + SearchMvt core_search_mvt.NewSearchMvt + SearchShards core_search_shards.NewSearchShards + SearchTemplate core_search_template.NewSearchTemplate + TermsEnum core_terms_enum.NewTermsEnum + Termvectors core_termvectors.NewTermvectors + Update core_update.NewUpdate + UpdateByQuery core_update_by_query.NewUpdateByQuery UpdateByQueryRethrottle core_update_by_query_rethrottle.NewUpdateByQueryRethrottle } type DanglingIndices struct { - // Delete a dangling index. - // If Elasticsearch encounters index data that is absent from the current - // cluster state, those indices are considered to be dangling. - // For example, this can happen if you delete more than - // `cluster.indices.tombstones.size` indices while an Elasticsearch node is - // offline. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/dangling-index-delete.html DeleteDanglingIndex dangling_indices_delete_dangling_index.NewDeleteDanglingIndex - // Import a dangling index. - // - // If Elasticsearch encounters index data that is absent from the current - // cluster state, those indices are considered to be dangling. - // For example, this can happen if you delete more than - // `cluster.indices.tombstones.size` indices while an Elasticsearch node is - // offline. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/dangling-index-import.html ImportDanglingIndex dangling_indices_import_dangling_index.NewImportDanglingIndex - // Get the dangling indices. - // - // If Elasticsearch encounters index data that is absent from the current - // cluster state, those indices are considered to be dangling. - // For example, this can happen if you delete more than - // `cluster.indices.tombstones.size` indices while an Elasticsearch node is - // offline. - // - // Use this API to list dangling indices, which you can then import or delete. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/dangling-indices-list.html ListDanglingIndices dangling_indices_list_dangling_indices.NewListDanglingIndices } type Enrich struct { - // Delete an enrich policy. - // Deletes an existing enrich policy and its enrich index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html - DeletePolicy enrich_delete_policy.NewDeletePolicy - // Run an enrich policy. - // Create the enrich index for an existing enrich policy. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html + DeletePolicy enrich_delete_policy.NewDeletePolicy ExecutePolicy enrich_execute_policy.NewExecutePolicy - // Get an enrich policy. - // Returns information about an enrich policy. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html - GetPolicy enrich_get_policy.NewGetPolicy - // Create an enrich policy. - // Creates an enrich policy. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html - PutPolicy enrich_put_policy.NewPutPolicy - // Get enrich stats. - // Returns enrich coordinator statistics and information about enrich policies - // that are currently executing. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html - Stats enrich_stats.NewStats + GetPolicy enrich_get_policy.NewGetPolicy + PutPolicy enrich_put_policy.NewPutPolicy + Stats enrich_stats.NewStats } type Eql struct { - // Delete an async EQL search. - // Delete an async EQL search or a stored synchronous EQL search. - // The API also deletes results for the search. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-eql-delete - Delete eql_delete.NewDelete - // Get async EQL search results. - // Get the current status and available results for an async EQL search or a - // stored synchronous EQL search. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-search-api.html - Get eql_get.NewGet - // Get the async EQL status. - // Get the current status for an async EQL search or a stored synchronous EQL - // search without returning results. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-eql-status-api.html + Delete eql_delete.NewDelete + Get eql_get.NewGet GetStatus eql_get_status.NewGetStatus - // Get EQL search results. - // Returns search results for an Event Query Language (EQL) query. - // EQL assumes each document in a data stream or index corresponds to an event. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html - Search eql_search.NewSearch + Search eql_search.NewSearch } type Esql struct { - // Run an async ES|QL query. - // Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its - // progress, and retrieve results when they become available. - // - // The API accepts the same parameters and request body as the synchronous query - // API, along with additional async related properties. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-api.html - AsyncQuery esql_async_query.NewAsyncQuery - // Delete an async ES|QL query. - // If the query is still running, it is cancelled. - // Otherwise, the stored results are deleted. - // - // If the Elasticsearch security features are enabled, only the following users - // can use this API to delete a query: - // - // * The authenticated user that submitted the original query request - // * Users with the `cancel_task` cluster privilege - // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-delete-api.html + AsyncQuery esql_async_query.NewAsyncQuery AsyncQueryDelete esql_async_query_delete.NewAsyncQueryDelete - // Get async ES|QL query results. - // Get the current status and available results or stored results for an ES|QL - // asynchronous query. - // If the Elasticsearch security features are enabled, only the user who first - // submitted the ES|QL query can retrieve the results using this API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-get-api.html - AsyncQueryGet esql_async_query_get.NewAsyncQueryGet - // Stop async ES|QL query. - // - // This API interrupts the query execution and returns the results so far. - // If the Elasticsearch security features are enabled, only the user who first - // submitted the ES|QL query can stop it. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html - AsyncQueryStop esql_async_query_stop.NewAsyncQueryStop - // Run an ES|QL query. - // Get search results for an ES|QL (Elasticsearch query language) query. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html - Query esql_query.NewQuery + AsyncQueryGet esql_async_query_get.NewAsyncQueryGet + AsyncQueryStop esql_async_query_stop.NewAsyncQueryStop + Query esql_query.NewQuery } type Features struct { - // Get the features. - // Get a list of features that can be included in snapshots using the - // `feature_states` field when creating a snapshot. - // You can use this API to determine which feature states to include when taking - // a snapshot. - // By default, all feature states are included in a snapshot if that snapshot - // includes the global state, or none if it does not. - // - // A feature state includes one or more system indices necessary for a given - // feature to function. - // In order to ensure data integrity, all system indices that comprise a feature - // state are snapshotted and restored together. - // - // The features listed by this API are a combination of built-in features and - // features defined by plugins. - // In order for a feature state to be listed in this API and recognized as a - // valid feature state by the create snapshot API, the plugin that defines that - // feature must be installed on the master node. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html - GetFeatures features_get_features.NewGetFeatures - // Reset the features. - // Clear all of the state information stored in system indices by Elasticsearch - // features, including the security and machine learning indices. - // - // WARNING: Intended for development and testing use only. Do not reset features - // on a production cluster. - // - // Return a cluster to the same state as a new installation by resetting the - // feature state for all Elasticsearch features. - // This deletes all state information stored in system indices. - // - // The response code is HTTP 200 if the state is successfully reset for all - // features. - // It is HTTP 500 if the reset operation failed for any feature. - // - // Note that select features might provide a way to reset particular system - // indices. - // Using this API resets all features, both those that are built-in and - // implemented as plugins. - // - // To list the features that will be affected, use the get features API. - // - // IMPORTANT: The features installed on the node you submit this request to are - // the features that will be reset. Run on the master node if you have any - // doubts about which plugins are installed on individual nodes. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-features-api.html + GetFeatures features_get_features.NewGetFeatures ResetFeatures features_reset_features.NewResetFeatures } type Fleet struct { - // Get global checkpoints. - // - // Get the current global checkpoints for an index. - // This API is designed for internal use by the Fleet server project. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html GlobalCheckpoints fleet_global_checkpoints.NewGlobalCheckpoints - // Executes several [fleet - // searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) - // with a single API request. - // The API follows the same structure as the [multi - // search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) - // API. However, similar to the fleet search API, it - // supports the wait_for_checkpoints parameter. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-multi-search.html - Msearch fleet_msearch.NewMsearch - // Creates a secret stored by Fleet. - // - PostSecret fleet_post_secret.NewPostSecret - // The purpose of the fleet search api is to provide a search api where the - // search will only be executed - // after provided checkpoint has been processed and is visible for searches - // inside of Elasticsearch. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html - Search fleet_search.NewSearch + Msearch fleet_msearch.NewMsearch + PostSecret fleet_post_secret.NewPostSecret + Search fleet_search.NewSearch } type Graph struct { - // Explore graph analytics. - // Extract and summarize information about the documents and terms in an - // Elasticsearch data stream or index. - // The easiest way to understand the behavior of this API is to use the Graph UI - // to explore connections. - // An initial request to the `_explore` API contains a seed query that - // identifies the documents of interest and specifies the fields that define the - // vertices and connections you want to include in the graph. - // Subsequent requests enable you to spider out from one more vertices of - // interest. - // You can exclude vertices that have already been returned. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html Explore graph_explore.NewExplore } type Ilm struct { - // Delete a lifecycle policy. - // You cannot delete policies that are currently in use. If the policy is being - // used to manage any indices, the request fails and returns an error. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html - DeleteLifecycle ilm_delete_lifecycle.NewDeleteLifecycle - // Explain the lifecycle state. - // Get the current lifecycle status for one or more indices. - // For data streams, the API retrieves the current lifecycle status for the - // stream's backing indices. - // - // The response indicates when the index entered each lifecycle state, provides - // the definition of the running phase, and information about any failures. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html - ExplainLifecycle ilm_explain_lifecycle.NewExplainLifecycle - // Get lifecycle policies. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html - GetLifecycle ilm_get_lifecycle.NewGetLifecycle - // Get the ILM status. - // - // Get the current index lifecycle management status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html - GetStatus ilm_get_status.NewGetStatus - // Migrate to data tiers routing. - // Switch the indices, ILM policies, and legacy, composable, and component - // templates from using custom node attributes and attribute-based allocation - // filters to using data tiers. - // Optionally, delete one legacy index template. - // Using node roles enables ILM to automatically move the indices between data - // tiers. - // - // Migrating away from custom node attributes routing can be manually performed. - // This API provides an automated way of performing three out of the four manual - // steps listed in the migration guide: - // - // 1. Stop setting the custom hot attribute on new indices. - // 1. Remove custom allocation settings from existing ILM policies. - // 1. Replace custom allocation settings from existing indices with the - // corresponding tier preference. - // - // ILM must be stopped before performing the migration. - // Use the stop ILM and get ILM status APIs to wait until the reported operation - // mode is `STOPPED`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html + DeleteLifecycle ilm_delete_lifecycle.NewDeleteLifecycle + ExplainLifecycle ilm_explain_lifecycle.NewExplainLifecycle + GetLifecycle ilm_get_lifecycle.NewGetLifecycle + GetStatus ilm_get_status.NewGetStatus MigrateToDataTiers ilm_migrate_to_data_tiers.NewMigrateToDataTiers - // Move to a lifecycle step. - // Manually move an index into a specific step in the lifecycle policy and run - // that step. - // - // WARNING: This operation can result in the loss of data. Manually moving an - // index into a specific step runs that step even if it has already been - // performed. This is a potentially destructive action and this should be - // considered an expert level API. - // - // You must specify both the current step and the step to be executed in the - // body of the request. - // The request will fail if the current step does not match the step currently - // running for the index - // This is to prevent the index from being moved from an unexpected step into - // the next step. - // - // When specifying the target (`next_step`) to which the index will be moved, - // either the name or both the action and name fields are optional. - // If only the phase is specified, the index will move to the first step of the - // first action in the target phase. - // If the phase and action are specified, the index will move to the first step - // of the specified action in the specified phase. - // Only actions specified in the ILM policy are considered valid. - // An index cannot move to a step that is not part of its policy. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html - MoveToStep ilm_move_to_step.NewMoveToStep - // Create or update a lifecycle policy. - // If the specified policy exists, it is replaced and the policy version is - // incremented. - // - // NOTE: Only the latest version of the policy is stored, you cannot revert to - // previous versions. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html - PutLifecycle ilm_put_lifecycle.NewPutLifecycle - // Remove policies from an index. - // Remove the assigned lifecycle policies from an index or a data stream's - // backing indices. - // It also stops managing the indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html - RemovePolicy ilm_remove_policy.NewRemovePolicy - // Retry a policy. - // Retry running the lifecycle policy for an index that is in the ERROR step. - // The API sets the policy back to the step where the error occurred and runs - // the step. - // Use the explain lifecycle state API to determine whether an index is in the - // ERROR step. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html - Retry ilm_retry.NewRetry - // Start the ILM plugin. - // Start the index lifecycle management plugin if it is currently stopped. - // ILM is started automatically when the cluster is formed. - // Restarting ILM is necessary only when it has been stopped using the stop ILM - // API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html - Start ilm_start.NewStart - // Stop the ILM plugin. - // Halt all lifecycle management operations and stop the index lifecycle - // management plugin. - // This is useful when you are performing maintenance on the cluster and need to - // prevent ILM from performing any actions on your indices. - // - // The API returns as soon as the stop request has been acknowledged, but the - // plugin might continue to run until in-progress operations complete and the - // plugin can be safely stopped. - // Use the get ILM status API to check whether ILM is running. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html - Stop ilm_stop.NewStop + MoveToStep ilm_move_to_step.NewMoveToStep + PutLifecycle ilm_put_lifecycle.NewPutLifecycle + RemovePolicy ilm_remove_policy.NewRemovePolicy + Retry ilm_retry.NewRetry + Start ilm_start.NewStart + Stop ilm_stop.NewStop } type Indices struct { - // Add an index block. - // - // Add an index block to an index. - // Index blocks limit the operations allowed on an index by blocking specific - // operation types. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html#add-index-block - AddBlock indices_add_block.NewAddBlock - // Get tokens from text analysis. - // The analyze API performs analysis on a text string and returns the resulting - // tokens. - // - // Generating excessive amount of tokens may cause a node to run out of memory. - // The `index.analyze.max_token_count` setting enables you to limit the number - // of tokens that can be produced. - // If more than this limit of tokens gets generated, an error occurs. - // The `_analyze` endpoint without a specified index will always use `10000` as - // its limit. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html - Analyze indices_analyze.NewAnalyze - // Cancel a migration reindex operation. - // - // Cancel a migration reindex attempt for a data stream or index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html - CancelMigrateReindex indices_cancel_migrate_reindex.NewCancelMigrateReindex - // Clear the cache. - // Clear the cache of one or more indices. - // For data streams, the API clears the caches of the stream's backing indices. - // - // By default, the clear cache API clears all caches. - // To clear only specific caches, use the `fielddata`, `query`, or `request` - // parameters. - // To clear the cache only of specific fields, use the `fields` parameter. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html - ClearCache indices_clear_cache.NewClearCache - // Clone an index. - // Clone an existing index into a new index. - // Each original primary shard is cloned into a new primary shard in the new - // index. - // - // IMPORTANT: Elasticsearch does not apply index templates to the resulting - // index. - // The API also does not copy index metadata from the original index. - // Index metadata includes aliases, index lifecycle management phase - // definitions, and cross-cluster replication (CCR) follower information. - // For example, if you clone a CCR follower index, the resulting clone will not - // be a follower index. - // - // The clone API copies most index settings from the source index to the - // resulting index, with the exception of `index.number_of_replicas` and - // `index.auto_expand_replicas`. - // To set the number of replicas in the resulting index, configure these - // settings in the clone request. - // - // Cloning works as follows: - // - // * First, it creates a new target index with the same definition as the source - // index. - // * Then it hard-links segments from the source index into the target index. If - // the file system does not support hard-linking, all segments are copied into - // the new index, which is a much more time consuming process. - // * Finally, it recovers the target index as though it were a closed index - // which had just been re-opened. - // - // IMPORTANT: Indices can only be cloned if they meet the following - // requirements: - // - // * The index must be marked as read-only and have a cluster health status of - // green. - // * The target index must not exist. - // * The source index must have the same number of primary shards as the target - // index. - // * The node handling the clone process must have sufficient free disk space to - // accommodate a second copy of the existing index. - // - // The current write index on a data stream cannot be cloned. - // In order to clone the current write index, the data stream must first be - // rolled over so that a new write index is created and then the previous write - // index can be cloned. - // - // NOTE: Mappings cannot be specified in the `_clone` request. The mappings of - // the source index will be used for the target index. - // - // **Monitor the cloning process** - // - // The cloning process can be monitored with the cat recovery API or the cluster - // health API can be used to wait until all primary shards have been allocated - // by setting the `wait_for_status` parameter to `yellow`. - // - // The `_clone` API returns as soon as the target index has been added to the - // cluster state, before any shards have been allocated. - // At this point, all shards are in the state unassigned. - // If, for any reason, the target index can't be allocated, its primary shard - // will remain unassigned until it can be allocated on that node. - // - // Once the primary shard is allocated, it moves to state initializing, and the - // clone process begins. - // When the clone operation completes, the shard will become active. - // At that point, Elasticsearch will try to allocate any replicas and may decide - // to relocate the primary shard to another node. - // - // **Wait for active shards** - // - // Because the clone operation creates a new index to clone the shards to, the - // wait for active shards setting on index creation applies to the clone index - // action as well. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html - Clone indices_clone.NewClone - // Close an index. - // A closed index is blocked for read or write operations and does not allow all - // operations that opened indices allow. - // It is not possible to index documents or to search for documents in a closed - // index. - // Closed indices do not have to maintain internal data structures for indexing - // or searching documents, which results in a smaller overhead on the cluster. - // - // When opening or closing an index, the master node is responsible for - // restarting the index shards to reflect the new state of the index. - // The shards will then go through the normal recovery process. - // The data of opened and closed indices is automatically replicated by the - // cluster to ensure that enough shard copies are safely kept around at all - // times. - // - // You can open and close multiple indices. - // An error is thrown if the request explicitly refers to a missing index. - // This behaviour can be turned off using the `ignore_unavailable=true` - // parameter. - // - // By default, you must explicitly name the indices you are opening or closing. - // To open or close indices with `_all`, `*`, or other wildcard expressions, - // change the` action.destructive_requires_name` setting to `false`. This - // setting can also be changed with the cluster update settings API. - // - // Closed indices consume a significant amount of disk-space which can cause - // problems in managed environments. - // Closing indices can be turned off with the cluster settings API by setting - // `cluster.indices.close.enable` to `false`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-close.html - Close indices_close.NewClose - // Create an index. - // You can use the create index API to add a new index to an Elasticsearch - // cluster. - // When creating an index, you can specify the following: - // - // * Settings for the index. - // * Mappings for fields in the index. - // * Index aliases - // - // **Wait for active shards** - // - // By default, index creation will only return a response to the client when the - // primary copies of each shard have been started, or the request times out. - // The index creation response will indicate what happened. - // For example, `acknowledged` indicates whether the index was successfully - // created in the cluster, `while shards_acknowledged` indicates whether the - // requisite number of shard copies were started for each shard in the index - // before timing out. - // Note that it is still possible for either `acknowledged` or - // `shards_acknowledged` to be `false`, but for the index creation to be - // successful. - // These values simply indicate whether the operation completed before the - // timeout. - // If `acknowledged` is false, the request timed out before the cluster state - // was updated with the newly created index, but it probably will be created - // sometime soon. - // If `shards_acknowledged` is false, then the request timed out before the - // requisite number of shards were started (by default just the primaries), even - // if the cluster state was successfully updated to reflect the newly created - // index (that is to say, `acknowledged` is `true`). - // - // You can change the default of only waiting for the primary shards to start - // through the index setting `index.write.wait_for_active_shards`. - // Note that changing this setting will also affect the `wait_for_active_shards` - // value on all subsequent write operations. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html - Create indices_create.NewCreate - // Create a data stream. - // - // You must have a matching index template with data stream enabled. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-data-stream.html - CreateDataStream indices_create_data_stream.NewCreateDataStream - // Create an index from a source index. - // - // Copy the mappings and settings from the source index to a destination index - // while allowing request settings and mappings to override the source values. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html - CreateFrom indices_create_from.NewCreateFrom - // Get data stream stats. - // - // Get statistics for one or more data streams. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-stats-api.html - DataStreamsStats indices_data_streams_stats.NewDataStreamsStats - // Delete indices. - // Deleting an index deletes its documents, shards, and metadata. - // It does not delete related Kibana components, such as data views, - // visualizations, or dashboards. - // - // You cannot delete the current write index of a data stream. - // To delete the index, you must roll over the data stream so a new write index - // is created. - // You can then use the delete index API to delete the previous write index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html - Delete indices_delete.NewDelete - // Delete an alias. - // Removes a data stream or index from an alias. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-alias.html - DeleteAlias indices_delete_alias.NewDeleteAlias - // Delete data stream lifecycles. - // Removes the data stream lifecycle from a data stream, rendering it not - // managed by the data stream lifecycle. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-delete-lifecycle.html - DeleteDataLifecycle indices_delete_data_lifecycle.NewDeleteDataLifecycle - // Delete data streams. - // Deletes one or more data streams and their backing indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-data-stream.html - DeleteDataStream indices_delete_data_stream.NewDeleteDataStream - // Delete an index template. - // The provided may contain multiple template names separated - // by a comma. If multiple template - // names are specified then there is no wildcard support and the provided names - // should match completely with - // existing templates. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template.html - DeleteIndexTemplate indices_delete_index_template.NewDeleteIndexTemplate - // Delete a legacy index template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html - DeleteTemplate indices_delete_template.NewDeleteTemplate - // Analyze the index disk usage. - // Analyze the disk usage of each field of an index or data stream. - // This API might not support indices created in previous Elasticsearch - // versions. - // The result of a small index can be inaccurate as some parts of an index might - // not be analyzed by the API. - // - // NOTE: The total size of fields of the analyzed shards of the index in the - // response is usually smaller than the index `store_size` value because some - // small metadata files are ignored and some parts of data files might not be - // scanned by the API. - // Since stored fields are stored together in a compressed format, the sizes of - // stored fields are also estimates and can be inaccurate. - // The stored size of the `_id` field is likely underestimated while the - // `_source` field is overestimated. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html - DiskUsage indices_disk_usage.NewDiskUsage - // Downsample an index. - // Aggregate a time series (TSDS) index and store pre-computed statistical - // summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric - // field grouped by a configured time interval. - // For example, a TSDS index that contains metrics sampled every 10 seconds can - // be downsampled to an hourly index. - // All documents within an hour interval are summarized and stored as a single - // document in the downsample index. - // - // NOTE: Only indices in a time series data stream are supported. - // Neither field nor document level security can be defined on the source index. - // The source index must be read only (`index.blocks.write: true`). - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-downsample-data-stream.html - Downsample indices_downsample.NewDownsample - // Check indices. - // Check if one or more indices, index aliases, or data streams exist. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html - Exists indices_exists.NewExists - // Check aliases. - // - // Check if one or more data stream or index aliases exist. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-exists-alias - ExistsAlias indices_exists_alias.NewExistsAlias - // Check index templates. - // - // Check whether index templates exist. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-exists-index-template - ExistsIndexTemplate indices_exists_index_template.NewExistsIndexTemplate - // Check existence of index templates. - // Get information about whether index templates exist. - // Index templates define settings, mappings, and aliases that can be applied - // automatically to new indices. - // - // IMPORTANT: This documentation is about legacy index templates, which are - // deprecated and will be replaced by the composable templates introduced in - // Elasticsearch 7.8. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-template-exists-v1.html - ExistsTemplate indices_exists_template.NewExistsTemplate - // Get the status for a data stream lifecycle. - // Get information about an index or data stream's current data stream lifecycle - // status, such as time since index creation, time since rollover, the lifecycle - // configuration managing the index, or any errors encountered during lifecycle - // execution. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html - ExplainDataLifecycle indices_explain_data_lifecycle.NewExplainDataLifecycle - // Get field usage stats. - // Get field usage information for each shard and field of an index. - // Field usage statistics are automatically captured when queries are running on - // a cluster. - // A shard-level search request that accesses a given field, even if multiple - // times during that request, is counted as a single use. - // - // The response body reports the per-shard usage count of the data structures - // that back the fields in the index. - // A given request will increment each count by a maximum value of 1, even if - // the request accesses the same field multiple times. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html - FieldUsageStats indices_field_usage_stats.NewFieldUsageStats - // Flush data streams or indices. - // Flushing a data stream or index is the process of making sure that any data - // that is currently only stored in the transaction log is also permanently - // stored in the Lucene index. - // When restarting, Elasticsearch replays any unflushed operations from the - // transaction log into the Lucene index to bring it back into the state that it - // was in before the restart. - // Elasticsearch automatically triggers flushes as needed, using heuristics that - // trade off the size of the unflushed transaction log against the cost of - // performing each flush. - // - // After each operation has been flushed it is permanently stored in the Lucene - // index. - // This may mean that there is no need to maintain an additional copy of it in - // the transaction log. - // The transaction log is made up of multiple files, called generations, and - // Elasticsearch will delete any generation files when they are no longer - // needed, freeing up disk space. - // - // It is also possible to trigger a flush on one or more indices using the flush - // API, although it is rare for users to need to call this API directly. - // If you call the flush API after indexing some documents then a successful - // response indicates that Elasticsearch has flushed all the documents that were - // indexed before the flush API was called. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html - Flush indices_flush.NewFlush - // Force a merge. - // Perform the force merge operation on the shards of one or more indices. - // For data streams, the API forces a merge on the shards of the stream's - // backing indices. - // - // Merging reduces the number of segments in each shard by merging some of them - // together and also frees up the space used by deleted documents. - // Merging normally happens automatically, but sometimes it is useful to trigger - // a merge manually. - // - // WARNING: We recommend force merging only a read-only index (meaning the index - // is no longer receiving writes). - // When documents are updated or deleted, the old version is not immediately - // removed but instead soft-deleted and marked with a "tombstone". - // These soft-deleted documents are automatically cleaned up during regular - // segment merges. - // But force merge can cause very large (greater than 5 GB) segments to be - // produced, which are not eligible for regular merges. - // So the number of soft-deleted documents can then grow rapidly, resulting in - // higher disk usage and worse search performance. - // If you regularly force merge an index receiving writes, this can also make - // snapshots more expensive, since the new documents can't be backed up - // incrementally. - // - // **Blocks during a force merge** - // - // Calls to this API block until the merge is complete (unless request contains - // `wait_for_completion=false`). - // If the client connection is lost before completion then the force merge - // process will continue in the background. - // Any new requests to force merge the same indices will also block until the - // ongoing force merge is complete. - // - // **Running force merge asynchronously** - // - // If the request contains `wait_for_completion=false`, Elasticsearch performs - // some preflight checks, launches the request, and returns a task you can use - // to get the status of the task. - // However, you can not cancel this task as the force merge task is not - // cancelable. - // Elasticsearch creates a record of this task as a document at - // `_tasks/`. - // When you are done with a task, you should delete the task document so - // Elasticsearch can reclaim the space. - // - // **Force merging multiple indices** - // - // You can force merge multiple indices with a single request by targeting: - // - // * One or more data streams that contain multiple backing indices - // * Multiple indices - // * One or more aliases - // * All data streams and indices in a cluster - // - // Each targeted shard is force-merged separately using the force_merge - // threadpool. - // By default each node only has a single `force_merge` thread which means that - // the shards on that node are force-merged one at a time. - // If you expand the `force_merge` threadpool on a node then it will force merge - // its shards in parallel - // - // Force merge makes the storage for the shard being merged temporarily - // increase, as it may require free space up to triple its size in case - // `max_num_segments parameter` is set to `1`, to rewrite all segments into a - // new one. - // - // **Data streams and time-based indices** - // - // Force-merging is useful for managing a data stream's older backing indices - // and other time-based indices, particularly after a rollover. - // In these cases, each index only receives indexing traffic for a certain - // period of time. - // Once an index receive no more writes, its shards can be force-merged to a - // single segment. - // This can be a good idea because single-segment shards can sometimes use - // simpler and more efficient data structures to perform searches. - // For example: - // - // ``` - // POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1 - // ``` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html - Forcemerge indices_forcemerge.NewForcemerge - // Get index information. - // Get information about one or more indices. For data streams, the API returns - // information about the - // stream’s backing indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html - Get indices_get.NewGet - // Get aliases. - // Retrieves information for one or more data stream or index aliases. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-alias.html - GetAlias indices_get_alias.NewGetAlias - // Get data stream lifecycles. - // - // Get the data stream lifecycle configuration of one or more data streams. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle.html - GetDataLifecycle indices_get_data_lifecycle.NewGetDataLifecycle - // Get data stream lifecycle stats. - // Get statistics about the data streams that are managed by a data stream - // lifecycle. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-get-lifecycle-stats.html - GetDataLifecycleStats indices_get_data_lifecycle_stats.NewGetDataLifecycleStats - // Get data streams. - // - // Get information about one or more data streams. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-data-stream.html - GetDataStream indices_get_data_stream.NewGetDataStream - // Get mapping definitions. - // Retrieves mapping definitions for one or more fields. - // For data streams, the API retrieves field mappings for the stream’s backing - // indices. - // - // This API is useful if you don't need a complete mapping or if an index - // mapping contains a large number of fields. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html - GetFieldMapping indices_get_field_mapping.NewGetFieldMapping - // Get index templates. - // Get information about one or more index templates. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html - GetIndexTemplate indices_get_index_template.NewGetIndexTemplate - // Get mapping definitions. - // For data streams, the API retrieves mappings for the stream’s backing - // indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html - GetMapping indices_get_mapping.NewGetMapping - // Get the migration reindexing status. - // - // Get the status of a migration reindex attempt for a data stream or index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html + AddBlock indices_add_block.NewAddBlock + Analyze indices_analyze.NewAnalyze + CancelMigrateReindex indices_cancel_migrate_reindex.NewCancelMigrateReindex + ClearCache indices_clear_cache.NewClearCache + Clone indices_clone.NewClone + Close indices_close.NewClose + Create indices_create.NewCreate + CreateDataStream indices_create_data_stream.NewCreateDataStream + CreateFrom indices_create_from.NewCreateFrom + DataStreamsStats indices_data_streams_stats.NewDataStreamsStats + Delete indices_delete.NewDelete + DeleteAlias indices_delete_alias.NewDeleteAlias + DeleteDataLifecycle indices_delete_data_lifecycle.NewDeleteDataLifecycle + DeleteDataStream indices_delete_data_stream.NewDeleteDataStream + DeleteIndexTemplate indices_delete_index_template.NewDeleteIndexTemplate + DeleteTemplate indices_delete_template.NewDeleteTemplate + DiskUsage indices_disk_usage.NewDiskUsage + Downsample indices_downsample.NewDownsample + Exists indices_exists.NewExists + ExistsAlias indices_exists_alias.NewExistsAlias + ExistsIndexTemplate indices_exists_index_template.NewExistsIndexTemplate + ExistsTemplate indices_exists_template.NewExistsTemplate + ExplainDataLifecycle indices_explain_data_lifecycle.NewExplainDataLifecycle + FieldUsageStats indices_field_usage_stats.NewFieldUsageStats + Flush indices_flush.NewFlush + Forcemerge indices_forcemerge.NewForcemerge + Get indices_get.NewGet + GetAlias indices_get_alias.NewGetAlias + GetDataLifecycle indices_get_data_lifecycle.NewGetDataLifecycle + GetDataLifecycleStats indices_get_data_lifecycle_stats.NewGetDataLifecycleStats + GetDataStream indices_get_data_stream.NewGetDataStream + GetFieldMapping indices_get_field_mapping.NewGetFieldMapping + GetIndexTemplate indices_get_index_template.NewGetIndexTemplate + GetMapping indices_get_mapping.NewGetMapping GetMigrateReindexStatus indices_get_migrate_reindex_status.NewGetMigrateReindexStatus - // Get index settings. - // Get setting information for one or more indices. - // For data streams, it returns setting information for the stream's backing - // indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html - GetSettings indices_get_settings.NewGetSettings - // Get index templates. - // Get information about one or more index templates. - // - // IMPORTANT: This documentation is about legacy index templates, which are - // deprecated and will be replaced by the composable templates introduced in - // Elasticsearch 7.8. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template-v1.html - GetTemplate indices_get_template.NewGetTemplate - // Reindex legacy backing indices. - // - // Reindex all legacy backing indices for a data stream. - // This operation occurs in a persistent task. - // The persistent task ID is returned immediately and the reindexing work is - // completed in that task. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html - MigrateReindex indices_migrate_reindex.NewMigrateReindex - // Convert an index alias to a data stream. - // Converts an index alias to a data stream. - // You must have a matching index template that is data stream enabled. - // The alias must meet the following criteria: - // The alias must have a write index; - // All indices for the alias must have a `@timestamp` field mapping of a `date` - // or `date_nanos` field type; - // The alias must not have any filters; - // The alias must not use custom routing. - // If successful, the request removes the alias and creates a data stream with - // the same name. - // The indices for the alias become hidden backing indices for the stream. - // The write index for the alias becomes the write index for the stream. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-migrate-to-data-stream - MigrateToDataStream indices_migrate_to_data_stream.NewMigrateToDataStream - // Update data streams. - // Performs one or more data stream modification actions in a single atomic - // operation. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-modify-data-stream - ModifyDataStream indices_modify_data_stream.NewModifyDataStream - // Open a closed index. - // For data streams, the API opens any closed backing indices. - // - // A closed index is blocked for read/write operations and does not allow all - // operations that opened indices allow. - // It is not possible to index documents or to search for documents in a closed - // index. - // This allows closed indices to not have to maintain internal data structures - // for indexing or searching documents, resulting in a smaller overhead on the - // cluster. - // - // When opening or closing an index, the master is responsible for restarting - // the index shards to reflect the new state of the index. - // The shards will then go through the normal recovery process. - // The data of opened or closed indices is automatically replicated by the - // cluster to ensure that enough shard copies are safely kept around at all - // times. - // - // You can open and close multiple indices. - // An error is thrown if the request explicitly refers to a missing index. - // This behavior can be turned off by using the `ignore_unavailable=true` - // parameter. - // - // By default, you must explicitly name the indices you are opening or closing. - // To open or close indices with `_all`, `*`, or other wildcard expressions, - // change the `action.destructive_requires_name` setting to `false`. - // This setting can also be changed with the cluster update settings API. - // - // Closed indices consume a significant amount of disk-space which can cause - // problems in managed environments. - // Closing indices can be turned off with the cluster settings API by setting - // `cluster.indices.close.enable` to `false`. - // - // Because opening or closing an index allocates its shards, the - // `wait_for_active_shards` setting on index creation applies to the `_open` and - // `_close` index actions as well. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html - Open indices_open.NewOpen - // Promote a data stream. - // Promote a data stream from a replicated data stream managed by cross-cluster - // replication (CCR) to a regular data stream. - // - // With CCR auto following, a data stream from a remote cluster can be - // replicated to the local cluster. - // These data streams can't be rolled over in the local cluster. - // These replicated data streams roll over only if the upstream data stream - // rolls over. - // In the event that the remote cluster is no longer available, the data stream - // in the local cluster can be promoted to a regular data stream, which allows - // these data streams to be rolled over in the local cluster. - // - // NOTE: When promoting a data stream, ensure the local cluster has a data - // stream enabled index template that matches the data stream. - // If this is missing, the data stream will not be able to roll over until a - // matching index template is created. - // This will affect the lifecycle management of the data stream and interfere - // with the data stream size and retention. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-promote-data-stream - PromoteDataStream indices_promote_data_stream.NewPromoteDataStream - // Create or update an alias. - // Adds a data stream or index to an alias. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-alias - PutAlias indices_put_alias.NewPutAlias - // Update data stream lifecycles. - // Update the data stream lifecycle of the specified data streams. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-data-lifecycle - PutDataLifecycle indices_put_data_lifecycle.NewPutDataLifecycle - // Create or update an index template. - // Index templates define settings, mappings, and aliases that can be applied - // automatically to new indices. - // - // Elasticsearch applies templates to new indices based on an wildcard pattern - // that matches the index name. - // Index templates are applied during data stream or index creation. - // For data streams, these settings and mappings are applied when the stream's - // backing indices are created. - // Settings and mappings specified in a create index API request override any - // settings or mappings specified in an index template. - // Changes to index templates do not affect existing indices, including the - // existing backing indices of a data stream. - // - // You can use C-style `/* *\/` block comments in index templates. - // You can include comments anywhere in the request body, except before the - // opening curly bracket. - // - // **Multiple matching templates** - // - // If multiple index templates match the name of a new index or data stream, the - // template with the highest priority is used. - // - // Multiple templates with overlapping index patterns at the same priority are - // not allowed and an error will be thrown when attempting to create a template - // matching an existing index template at identical priorities. - // - // **Composing aliases, mappings, and settings** - // - // When multiple component templates are specified in the `composed_of` field - // for an index template, they are merged in the order specified, meaning that - // later component templates override earlier component templates. - // Any mappings, settings, or aliases from the parent index template are merged - // in next. - // Finally, any configuration on the index request itself is merged. - // Mapping definitions are merged recursively, which means that later mapping - // components can introduce new field mappings and update the mapping - // configuration. - // If a field mapping is already contained in an earlier component, its - // definition will be completely overwritten by the later one. - // This recursive merging strategy applies not only to field mappings, but also - // root options like `dynamic_templates` and `meta`. - // If an earlier component contains a `dynamic_templates` block, then by default - // new `dynamic_templates` entries are appended onto the end. - // If an entry already exists with the same key, then it is overwritten by the - // new definition. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-index-template - PutIndexTemplate indices_put_index_template.NewPutIndexTemplate - // Update field mappings. - // Add new fields to an existing data stream or index. - // You can also use this API to change the search settings of existing fields - // and add new properties to existing object fields. - // For data streams, these changes are applied to all backing indices by - // default. - // - // **Add multi-fields to an existing field** - // - // Multi-fields let you index the same field in different ways. - // You can use this API to update the fields mapping parameter and enable - // multi-fields for an existing field. - // WARNING: If an index (or data stream) contains documents when you add a - // multi-field, those documents will not have values for the new multi-field. - // You can populate the new multi-field with the update by query API. - // - // **Change supported mapping parameters for an existing field** - // - // The documentation for each mapping parameter indicates whether you can update - // it for an existing field using this API. - // For example, you can use the update mapping API to update the `ignore_above` - // parameter. - // - // **Change the mapping of an existing field** - // - // Except for supported mapping parameters, you can't change the mapping or - // field type of an existing field. - // Changing an existing field could invalidate data that's already indexed. - // - // If you need to change the mapping of a field in a data stream's backing - // indices, refer to documentation about modifying data streams. - // If you need to change the mapping of a field in other indices, create a new - // index with the correct mapping and reindex your data into that index. - // - // **Rename a field** - // - // Renaming a field would invalidate data already indexed under the old field - // name. - // Instead, add an alias field to create an alternate field name. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html - PutMapping indices_put_mapping.NewPutMapping - // Update index settings. - // Changes dynamic index settings in real time. - // For data streams, index setting changes are applied to all backing indices by - // default. - // - // To revert a setting to the default value, use a null value. - // The list of per-index settings that can be updated dynamically on live - // indices can be found in index module documentation. - // To preserve existing settings from being updated, set the `preserve_existing` - // parameter to `true`. - // - // NOTE: You can only define new analyzers on closed indices. - // To add an analyzer, you must close the index, define the analyzer, and reopen - // the index. - // You cannot close the write index of a data stream. - // To update the analyzer for a data stream's write index and future backing - // indices, update the analyzer in the index template used by the stream. - // Then roll over the data stream to apply the new analyzer to the stream's - // write index and future backing indices. - // This affects searches and any new data added to the stream after the - // rollover. - // However, it does not affect the data stream's backing indices or their - // existing data. - // To change the analyzer for existing backing indices, you must create a new - // data stream and reindex your data into it. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html - PutSettings indices_put_settings.NewPutSettings - // Create or update an index template. - // Index templates define settings, mappings, and aliases that can be applied - // automatically to new indices. - // Elasticsearch applies templates to new indices based on an index pattern that - // matches the index name. - // - // IMPORTANT: This documentation is about legacy index templates, which are - // deprecated and will be replaced by the composable templates introduced in - // Elasticsearch 7.8. - // - // Composable templates always take precedence over legacy templates. - // If no composable template matches a new index, matching legacy templates are - // applied according to their order. - // - // Index templates are only applied during index creation. - // Changes to index templates do not affect existing indices. - // Settings and mappings specified in create index API requests override any - // settings or mappings specified in an index template. - // - // You can use C-style `/* *\/` block comments in index templates. - // You can include comments anywhere in the request body, except before the - // opening curly bracket. - // - // **Indices matching multiple templates** - // - // Multiple index templates can potentially match an index, in this case, both - // the settings and mappings are merged into the final configuration of the - // index. - // The order of the merging can be controlled using the order parameter, with - // lower order being applied first, and higher orders overriding them. - // NOTE: Multiple matching templates with the same order value will result in a - // non-deterministic merging order. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html - PutTemplate indices_put_template.NewPutTemplate - // Get index recovery information. - // Get information about ongoing and completed shard recoveries for one or more - // indices. - // For data streams, the API returns information for the stream's backing - // indices. - // - // All recoveries, whether ongoing or complete, are kept in the cluster state - // and may be reported on at any time. - // - // Shard recovery is the process of initializing a shard copy, such as restoring - // a primary shard from a snapshot or creating a replica shard from a primary - // shard. - // When a shard recovery completes, the recovered shard is available for search - // and indexing. - // - // Recovery automatically occurs during the following processes: - // - // * When creating an index for the first time. - // * When a node rejoins the cluster and starts up any missing primary shard - // copies using the data that it holds in its data path. - // * Creation of new replica shard copies from the primary. - // * Relocation of a shard copy to a different node in the same cluster. - // * A snapshot restore operation. - // * A clone, shrink, or split operation. - // - // You can determine the cause of a shard recovery using the recovery or cat - // recovery APIs. - // - // The index recovery API reports information about completed recoveries only - // for shard copies that currently exist in the cluster. - // It only reports the last recovery for each shard copy and does not report - // historical information about earlier recoveries, nor does it report - // information about the recoveries of shard copies that no longer exist. - // This means that if a shard copy completes a recovery and then Elasticsearch - // relocates it onto a different node then the information about the original - // recovery will not be shown in the recovery API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html - Recovery indices_recovery.NewRecovery - // Refresh an index. - // A refresh makes recent operations performed on one or more indices available - // for search. - // For data streams, the API runs the refresh operation on the stream’s backing - // indices. - // - // By default, Elasticsearch periodically refreshes indices every second, but - // only on indices that have received one search request or more in the last 30 - // seconds. - // You can change this default interval with the `index.refresh_interval` - // setting. - // - // Refresh requests are synchronous and do not return a response until the - // refresh operation completes. - // - // Refreshes are resource-intensive. - // To ensure good cluster performance, it's recommended to wait for - // Elasticsearch's periodic refresh rather than performing an explicit refresh - // when possible. - // - // If your application workflow indexes documents and then runs a search to - // retrieve the indexed document, it's recommended to use the index API's - // `refresh=wait_for` query parameter option. - // This option ensures the indexing operation waits for a periodic refresh - // before running the search. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html - Refresh indices_refresh.NewRefresh - // Reload search analyzers. - // Reload an index's search analyzers and their resources. - // For data streams, the API reloads search analyzers and resources for the - // stream's backing indices. - // - // IMPORTANT: After reloading the search analyzers you should clear the request - // cache to make sure it doesn't contain responses derived from the previous - // versions of the analyzer. - // - // You can use the reload search analyzers API to pick up changes to synonym - // files used in the `synonym_graph` or `synonym` token filter of a search - // analyzer. - // To be eligible, the token filter must have an `updateable` flag of `true` and - // only be used in search analyzers. - // - // NOTE: This API does not perform a reload for each shard of an index. - // Instead, it performs a reload for each node containing index shards. - // As a result, the total shard count returned by the API can differ from the - // number of index shards. - // Because reloading affects every node with an index shard, it is important to - // update the synonym file on every data node in the cluster--including nodes - // that don't contain a shard replica--before using this API. - // This ensures the synonym file is updated everywhere in the cluster in case - // shards are relocated in the future. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html - ReloadSearchAnalyzers indices_reload_search_analyzers.NewReloadSearchAnalyzers - // Resolve the cluster. - // - // Resolve the specified index expressions to return information about each - // cluster, including the local "querying" cluster, if included. - // If no index expression is provided, the API will return information about all - // the remote clusters that are configured on the querying cluster. - // - // This endpoint is useful before doing a cross-cluster search in order to - // determine which remote clusters should be included in a search. - // - // You use the same index expression with this endpoint as you would for - // cross-cluster search. - // Index and cluster exclusions are also supported with this endpoint. - // - // For each cluster in the index expression, information is returned about: - // - // * Whether the querying ("local") cluster is currently connected to each - // remote cluster specified in the index expression. Note that this endpoint - // actively attempts to contact the remote clusters, unlike the `remote/info` - // endpoint. - // * Whether each remote cluster is configured with `skip_unavailable` as `true` - // or `false`. - // * Whether there are any indices, aliases, or data streams on that cluster - // that match the index expression. - // * Whether the search is likely to have errors returned when you do the - // cross-cluster search (including any authorization errors if you do not have - // permission to query the index). - // * Cluster version information, including the Elasticsearch server version. - // - // For example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns - // information about the local cluster and all remotely configured clusters that - // start with the alias `cluster*`. - // Each cluster returns information about whether it has any indices, aliases or - // data streams that match `my-index-*`. - // - // ## Note on backwards compatibility - // The ability to query without an index expression was added in version 8.18, - // so when - // querying remote clusters older than that, the local cluster will send the - // index - // expression `dummy*` to those remote clusters. Thus, if an errors occur, you - // may see a reference - // to that index expression even though you didn't request it. If it causes a - // problem, you can - // instead include an index expression like `*:*` to bypass the issue. - // - // ## Advantages of using this endpoint before a cross-cluster search - // - // You may want to exclude a cluster or index from a search when: - // - // * A remote cluster is not currently connected and is configured with - // `skip_unavailable=false`. Running a cross-cluster search under those - // conditions will cause the entire search to fail. - // * A cluster has no matching indices, aliases or data streams for the index - // expression (or your user does not have permissions to search them). For - // example, suppose your index expression is `logs*,remote1:logs*` and the - // remote1 cluster has no indices, aliases or data streams that match `logs*`. - // In that case, that cluster will return no results from that cluster if you - // include it in a cross-cluster search. - // * The index expression (combined with any query parameters you specify) will - // likely cause an exception to be thrown when you do the search. In these - // cases, the "error" field in the `_resolve/cluster` response will be present. - // (This is also where security/permission errors will be shown.) - // * A remote cluster is an older version that does not support the feature you - // want to use in your search. - // - // ## Test availability of remote clusters - // - // The `remote/info` endpoint is commonly used to test whether the "local" - // cluster (the cluster being queried) is connected to its remote clusters, but - // it does not necessarily reflect whether the remote cluster is available or - // not. - // The remote cluster may be available, while the local cluster is not currently - // connected to it. - // - // You can use the `_resolve/cluster` API to attempt to reconnect to remote - // clusters. - // For example with `GET _resolve/cluster` or `GET _resolve/cluster/*:*`. - // The `connected` field in the response will indicate whether it was - // successful. - // If a connection was (re-)established, this will also cause the `remote/info` - // endpoint to now indicate a connected status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-cluster-api.html - ResolveCluster indices_resolve_cluster.NewResolveCluster - // Resolve indices. - // Resolve the names and/or index patterns for indices, aliases, and data - // streams. - // Multiple patterns and remote clusters are supported. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html - ResolveIndex indices_resolve_index.NewResolveIndex - // Roll over to a new index. - // TIP: It is recommended to use the index lifecycle rollover action to automate - // rollovers. - // - // The rollover API creates a new index for a data stream or index alias. - // The API behavior depends on the rollover target. - // - // **Roll over a data stream** - // - // If you roll over a data stream, the API creates a new write index for the - // stream. - // The stream's previous write index becomes a regular backing index. - // A rollover also increments the data stream's generation. - // - // **Roll over an index alias with a write index** - // - // TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a - // write index to manage time series data. - // Data streams replace this functionality, require less maintenance, and - // automatically integrate with data tiers. - // - // If an index alias points to multiple indices, one of the indices must be a - // write index. - // The rollover API creates a new write index for the alias with - // `is_write_index` set to `true`. - // The API also `sets is_write_index` to `false` for the previous write index. - // - // **Roll over an index alias with one index** - // - // If you roll over an index alias that points to only one index, the API - // creates a new index for the alias and removes the original index from the - // alias. - // - // NOTE: A rollover creates a new index and is subject to the - // `wait_for_active_shards` setting. - // - // **Increment index names for an alias** - // - // When you roll over an index alias, you can specify a name for the new index. - // If you don't specify a name and the current index ends with `-` and a number, - // such as `my-index-000001` or `my-index-3`, the new index name increments that - // number. - // For example, if you roll over an alias with a current index of - // `my-index-000001`, the rollover creates a new index named `my-index-000002`. - // This number is always six characters and zero-padded, regardless of the - // previous index's name. - // - // If you use an index alias for time series data, you can use date math in the - // index name to track the rollover date. - // For example, you can create an alias that points to an index named - // ``. - // If you create the index on May 6, 2099, the index's name is - // `my-index-2099.05.06-000001`. - // If you roll over the alias on May 7, 2099, the new index's name is - // `my-index-2099.05.07-000002`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html - Rollover indices_rollover.NewRollover - // Get index segments. - // Get low-level information about the Lucene segments in index shards. - // For data streams, the API returns information about the stream's backing - // indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html - Segments indices_segments.NewSegments - // Get index shard stores. - // Get store information about replica shards in one or more indices. - // For data streams, the API retrieves store information for the stream's - // backing indices. - // - // The index shard stores API returns the following information: - // - // * The node on which each replica shard exists. - // * The allocation ID for each replica shard. - // * A unique ID for each replica shard. - // * Any errors encountered while opening the shard index or from an earlier - // failure. - // - // By default, the API returns store information only for primary shards that - // are unassigned or have one or more unassigned replica shards. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html - ShardStores indices_shard_stores.NewShardStores - // Shrink an index. - // Shrink an index into a new index with fewer primary shards. - // - // Before you can shrink an index: - // - // * The index must be read-only. - // * A copy of every shard in the index must reside on the same node. - // * The index must have a green health status. - // - // To make shard allocation easier, we recommend you also remove the index's - // replica shards. - // You can later re-add replica shards as part of the shrink operation. - // - // The requested number of primary shards in the target index must be a factor - // of the number of shards in the source index. - // For example an index with 8 primary shards can be shrunk into 4, 2 or 1 - // primary shards or an index with 15 primary shards can be shrunk into 5, 3 or - // 1. - // If the number of shards in the index is a prime number it can only be shrunk - // into a single primary shard - // Before shrinking, a (primary or replica) copy of every shard in the index - // must be present on the same node. - // - // The current write index on a data stream cannot be shrunk. In order to shrink - // the current write index, the data stream must first be rolled over so that a - // new write index is created and then the previous write index can be shrunk. - // - // A shrink operation: - // - // * Creates a new target index with the same definition as the source index, - // but with a smaller number of primary shards. - // * Hard-links segments from the source index into the target index. If the - // file system does not support hard-linking, then all segments are copied into - // the new index, which is a much more time consuming process. Also if using - // multiple data paths, shards on different data paths require a full copy of - // segment files if they are not on the same disk since hardlinks do not work - // across disks. - // * Recovers the target index as though it were a closed index which had just - // been re-opened. Recovers shards to the - // `.routing.allocation.initial_recovery._id` index setting. - // - // IMPORTANT: Indices can only be shrunk if they satisfy the following - // requirements: - // - // * The target index must not exist. - // * The source index must have more primary shards than the target index. - // * The number of primary shards in the target index must be a factor of the - // number of primary shards in the source index. The source index must have more - // primary shards than the target index. - // * The index must not contain more than 2,147,483,519 documents in total - // across all shards that will be shrunk into a single shard on the target index - // as this is the maximum number of docs that can fit into a single shard. - // * The node handling the shrink process must have sufficient free disk space - // to accommodate a second copy of the existing index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html - Shrink indices_shrink.NewShrink - // Simulate an index. - // Get the index configuration that would be applied to the specified index from - // an existing index template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-index.html - SimulateIndexTemplate indices_simulate_index_template.NewSimulateIndexTemplate - // Simulate an index template. - // Get the index configuration that would be applied by a particular index - // template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-simulate-template.html - SimulateTemplate indices_simulate_template.NewSimulateTemplate - // Split an index. - // Split an index into a new index with more primary shards. - // * Before you can split an index: - // - // * The index must be read-only. - // * The cluster health status must be green. - // - // You can do make an index read-only with the following request using the add - // index block API: - // - // ``` - // PUT /my_source_index/_block/write - // ``` - // - // The current write index on a data stream cannot be split. - // In order to split the current write index, the data stream must first be - // rolled over so that a new write index is created and then the previous write - // index can be split. - // - // The number of times the index can be split (and the number of shards that - // each original shard can be split into) is determined by the - // `index.number_of_routing_shards` setting. - // The number of routing shards specifies the hashing space that is used - // internally to distribute documents across shards with consistent hashing. - // For instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x - // 2 x 3) could be split by a factor of 2 or 3. - // - // A split operation: - // - // * Creates a new target index with the same definition as the source index, - // but with a larger number of primary shards. - // * Hard-links segments from the source index into the target index. If the - // file system doesn't support hard-linking, all segments are copied into the - // new index, which is a much more time consuming process. - // * Hashes all documents again, after low level files are created, to delete - // documents that belong to a different shard. - // * Recovers the target index as though it were a closed index which had just - // been re-opened. - // - // IMPORTANT: Indices can only be split if they satisfy the following - // requirements: - // - // * The target index must not exist. - // * The source index must have fewer primary shards than the target index. - // * The number of primary shards in the target index must be a multiple of the - // number of primary shards in the source index. - // * The node handling the split process must have sufficient free disk space to - // accommodate a second copy of the existing index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html - Split indices_split.NewSplit - // Get index statistics. - // For data streams, the API retrieves statistics for the stream's backing - // indices. - // - // By default, the returned statistics are index-level with `primaries` and - // `total` aggregations. - // `primaries` are the values for only the primary shards. - // `total` are the accumulated values for both primary and replica shards. - // - // To get shard-level statistics, set the `level` parameter to `shards`. - // - // NOTE: When moving to another node, the shard-level statistics for a shard are - // cleared. - // Although the shard is no longer part of the node, that node retains any - // node-level statistics to which the shard contributed. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html - Stats indices_stats.NewStats - // Unfreeze an index. - // When a frozen index is unfrozen, the index goes through the normal recovery - // process and becomes writeable again. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html - Unfreeze indices_unfreeze.NewUnfreeze - // Create or update an alias. - // Adds a data stream or index to an alias. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-update-aliases - UpdateAliases indices_update_aliases.NewUpdateAliases - // Validate a query. - // Validates a query without running it. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html - ValidateQuery indices_validate_query.NewValidateQuery + GetSettings indices_get_settings.NewGetSettings + GetTemplate indices_get_template.NewGetTemplate + MigrateReindex indices_migrate_reindex.NewMigrateReindex + MigrateToDataStream indices_migrate_to_data_stream.NewMigrateToDataStream + ModifyDataStream indices_modify_data_stream.NewModifyDataStream + Open indices_open.NewOpen + PromoteDataStream indices_promote_data_stream.NewPromoteDataStream + PutAlias indices_put_alias.NewPutAlias + PutDataLifecycle indices_put_data_lifecycle.NewPutDataLifecycle + PutIndexTemplate indices_put_index_template.NewPutIndexTemplate + PutMapping indices_put_mapping.NewPutMapping + PutSettings indices_put_settings.NewPutSettings + PutTemplate indices_put_template.NewPutTemplate + Recovery indices_recovery.NewRecovery + Refresh indices_refresh.NewRefresh + ReloadSearchAnalyzers indices_reload_search_analyzers.NewReloadSearchAnalyzers + ResolveCluster indices_resolve_cluster.NewResolveCluster + ResolveIndex indices_resolve_index.NewResolveIndex + Rollover indices_rollover.NewRollover + Segments indices_segments.NewSegments + ShardStores indices_shard_stores.NewShardStores + Shrink indices_shrink.NewShrink + SimulateIndexTemplate indices_simulate_index_template.NewSimulateIndexTemplate + SimulateTemplate indices_simulate_template.NewSimulateTemplate + Split indices_split.NewSplit + Stats indices_stats.NewStats + Unfreeze indices_unfreeze.NewUnfreeze + UpdateAliases indices_update_aliases.NewUpdateAliases + ValidateQuery indices_validate_query.NewValidateQuery } type Inference struct { - // Perform chat completion inference - // https://www.elastic.co/guide/en/elasticsearch/reference/current/chat-completion-inference-api.html ChatCompletionUnified inference_chat_completion_unified.NewChatCompletionUnified - // Perform completion inference on the service - // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html - Completion inference_completion.NewCompletion - // Delete an inference endpoint - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html - Delete inference_delete.NewDelete - // Get an inference endpoint - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html - Get inference_get.NewGet - // Perform inference on the service. - // - // This API enables you to use machine learning models to perform specific tasks - // on data that you provide as an input. - // It returns a response with the results of the tasks. - // The inference endpoint you use can perform one specific task that has been - // defined when the endpoint was created with the create inference API. - // - // For details about using this API with a service, such as Amazon Bedrock, - // Anthropic, or HuggingFace, refer to the service-specific documentation. - // - // > info - // > The inference APIs enable you to use certain services, such as built-in - // machine learning models (ELSER, E5), models uploaded through Eland, Cohere, - // OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or - // Hugging Face. For built-in models and models uploaded through Eland, the - // inference APIs offer an alternative way to use and manage trained models. - // However, if you do not plan to use the inference APIs to use these models or - // if you want to use non-NLP models, use the machine learning trained model - // APIs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html - Inference inference_inference.NewInference - // Create an inference endpoint. - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // - // IMPORTANT: The inference APIs enable you to use certain services, such as - // built-in machine learning models (ELSER, E5), models uploaded through Eland, - // Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, - // Anthropic, Watsonx.ai, or Hugging Face. - // For built-in models and models uploaded through Eland, the inference APIs - // offer an alternative way to use and manage trained models. - // However, if you do not plan to use the inference APIs to use these models or - // if you want to use non-NLP models, use the machine learning trained model - // APIs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html - Put inference_put.NewPut - // Create an AlibabaCloud AI Search inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `alibabacloud-ai-search` service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-alibabacloud-ai-search.html - PutAlibabacloud inference_put_alibabacloud.NewPutAlibabacloud - // Create an Amazon Bedrock inference endpoint. - // - // Creates an inference endpoint to perform an inference task with the - // `amazonbedrock` service. - // - // >info - // > You need to provide the access and secret keys only once, during the - // inference model creation. The get inference API does not retrieve your access - // or secret keys. After creating the inference model, you cannot change the - // associated key pairs. If you want to use a different access and secret key - // pair, delete the inference model and recreate it with the same name and the - // updated keys. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-bedrock.html - PutAmazonbedrock inference_put_amazonbedrock.NewPutAmazonbedrock - // Create an Anthropic inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `anthropic` service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-anthropic.html - PutAnthropic inference_put_anthropic.NewPutAnthropic - // Create an Azure AI studio inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `azureaistudio` service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-ai-studio.html - PutAzureaistudio inference_put_azureaistudio.NewPutAzureaistudio - // Create an Azure OpenAI inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `azureopenai` service. - // - // The list of chat completion models that you can choose from in your Azure - // OpenAI deployment include: - // - // * [GPT-4 and GPT-4 Turbo - // models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-4-and-gpt-4-turbo-models) - // * - // [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35) - // - // The list of embeddings models that you can choose from in your deployment can - // be found in the [Azure models - // documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings). - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-openai.html - PutAzureopenai inference_put_azureopenai.NewPutAzureopenai - // Create a Cohere inference endpoint. - // - // Create an inference endpoint to perform an inference task with the `cohere` - // service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-cohere.html - PutCohere inference_put_cohere.NewPutCohere - // Create an Elasticsearch inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `elasticsearch` service. - // - // > info - // > Your Elasticsearch deployment contains preconfigured ELSER and E5 inference - // endpoints, you only need to create the enpoints using the API if you want to - // customize the settings. - // - // If you use the ELSER or the E5 model through the `elasticsearch` service, the - // API request will automatically download and deploy the model if it isn't - // downloaded yet. - // - // > info - // > You might see a 502 bad gateway error in the response when using the Kibana - // Console. This error usually just reflects a timeout, while the model - // downloads in the background. You can check the download progress in the - // Machine Learning UI. If using the Python client, you can set the timeout - // parameter to a higher value. - // - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html - PutElasticsearch inference_put_elasticsearch.NewPutElasticsearch - // Create an ELSER inference endpoint. - // - // Create an inference endpoint to perform an inference task with the `elser` - // service. - // You can also deploy ELSER by using the Elasticsearch inference integration. - // - // > info - // > Your Elasticsearch deployment contains a preconfigured ELSER inference - // endpoint, you only need to create the enpoint using the API if you want to - // customize the settings. - // - // The API request will automatically download and deploy the ELSER model if it - // isn't already downloaded. - // - // > info - // > You might see a 502 bad gateway error in the response when using the Kibana - // Console. This error usually just reflects a timeout, while the model - // downloads in the background. You can check the download progress in the - // Machine Learning UI. If using the Python client, you can set the timeout - // parameter to a higher value. - // - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elser.html - PutElser inference_put_elser.NewPutElser - // Create an Google AI Studio inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `googleaistudio` service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-ai-studio.html - PutGoogleaistudio inference_put_googleaistudio.NewPutGoogleaistudio - // Create a Google Vertex AI inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `googlevertexai` service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-vertex-ai.html - PutGooglevertexai inference_put_googlevertexai.NewPutGooglevertexai - // Create a Hugging Face inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `hugging_face` service. - // - // You must first create an inference endpoint on the Hugging Face endpoint page - // to get an endpoint URL. - // Select the model you want to use on the new endpoint creation page (for - // example `intfloat/e5-small-v2`), then select the sentence embeddings task - // under the advanced configuration section. - // Create the endpoint and copy the URL after the endpoint initialization has - // been finished. - // - // The following models are recommended for the Hugging Face service: - // - // * `all-MiniLM-L6-v2` - // * `all-MiniLM-L12-v2` - // * `all-mpnet-base-v2` - // * `e5-base-v2` - // * `e5-small-v2` - // * `multilingual-e5-base` - // * `multilingual-e5-small` - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-hugging-face.html - PutHuggingFace inference_put_hugging_face.NewPutHuggingFace - // Create an JinaAI inference endpoint. - // - // Create an inference endpoint to perform an inference task with the `jinaai` - // service. - // - // To review the available `rerank` models, refer to . - // To review the available `text_embedding` models, refer to the - // . - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-jinaai.html - PutJinaai inference_put_jinaai.NewPutJinaai - // Create a Mistral inference endpoint. - // - // Creates an inference endpoint to perform an inference task with the `mistral` - // service. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-mistral.html - PutMistral inference_put_mistral.NewPutMistral - // Create an OpenAI inference endpoint. - // - // Create an inference endpoint to perform an inference task with the `openai` - // service or `openai` compatible APIs. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-openai.html - PutOpenai inference_put_openai.NewPutOpenai - // Create a VoyageAI inference endpoint. - // - // Create an inference endpoint to perform an inference task with the `voyageai` - // service. - // - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-voyageai.html - PutVoyageai inference_put_voyageai.NewPutVoyageai - // Create a Watsonx inference endpoint. - // - // Create an inference endpoint to perform an inference task with the - // `watsonxai` service. - // You need an IBM Cloud Databases for Elasticsearch deployment to use the - // `watsonxai` inference service. - // You can provision one through the IBM catalog, the Cloud Databases CLI - // plug-in, the Cloud Databases API, or Terraform. - // - // When you create an inference endpoint, the associated machine learning model - // is automatically deployed if it is not already running. - // After creating the endpoint, wait for the model deployment to complete before - // using it. - // To verify the deployment status, use the get trained model statistics API. - // Look for `"state": "fully_allocated"` in the response and ensure that the - // `"allocation_count"` matches the `"target_allocation_count"`. - // Avoid creating multiple endpoints for the same model unless required, as each - // endpoint consumes significant resources. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html - PutWatsonx inference_put_watsonx.NewPutWatsonx - // Perform rereanking inference on the service - // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html - Rerank inference_rerank.NewRerank - // Perform sparse embedding inference on the service - // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html - SparseEmbedding inference_sparse_embedding.NewSparseEmbedding - // Perform streaming inference. - // Get real-time responses for completion tasks by delivering answers - // incrementally, reducing response times during computation. - // This API works only with the completion task type. - // - // IMPORTANT: The inference APIs enable you to use certain services, such as - // built-in machine learning models (ELSER, E5), models uploaded through Eland, - // Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, - // Watsonx.ai, or Hugging Face. For built-in models and models uploaded through - // Eland, the inference APIs offer an alternative way to use and manage trained - // models. However, if you do not plan to use the inference APIs to use these - // models or if you want to use non-NLP models, use the machine learning trained - // model APIs. - // - // This API requires the `monitor_inference` cluster privilege (the built-in - // `inference_admin` and `inference_user` roles grant this privilege). You must - // use a client that supports streaming. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/stream-inference-api.html - StreamCompletion inference_stream_completion.NewStreamCompletion - // Perform text embedding inference on the service - // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html - TextEmbedding inference_text_embedding.NewTextEmbedding - // Update an inference endpoint. - // - // Modify `task_settings`, secrets (within `service_settings`), or - // `num_allocations` for an inference endpoint, depending on the specific - // endpoint service and `task_type`. - // - // IMPORTANT: The inference APIs enable you to use certain services, such as - // built-in machine learning models (ELSER, E5), models uploaded through Eland, - // Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, - // Watsonx.ai, or Hugging Face. - // For built-in models and models uploaded through Eland, the inference APIs - // offer an alternative way to use and manage trained models. - // However, if you do not plan to use the inference APIs to use these models or - // if you want to use non-NLP models, use the machine learning trained model - // APIs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/update-inference-api.html - Update inference_update.NewUpdate + Completion inference_completion.NewCompletion + Delete inference_delete.NewDelete + Get inference_get.NewGet + Inference inference_inference.NewInference + Put inference_put.NewPut + PutAlibabacloud inference_put_alibabacloud.NewPutAlibabacloud + PutAmazonbedrock inference_put_amazonbedrock.NewPutAmazonbedrock + PutAmazonsagemaker inference_put_amazonsagemaker.NewPutAmazonsagemaker + PutAnthropic inference_put_anthropic.NewPutAnthropic + PutAzureaistudio inference_put_azureaistudio.NewPutAzureaistudio + PutAzureopenai inference_put_azureopenai.NewPutAzureopenai + PutCohere inference_put_cohere.NewPutCohere + PutCustom inference_put_custom.NewPutCustom + PutDeepseek inference_put_deepseek.NewPutDeepseek + PutElasticsearch inference_put_elasticsearch.NewPutElasticsearch + PutElser inference_put_elser.NewPutElser + PutGoogleaistudio inference_put_googleaistudio.NewPutGoogleaistudio + PutGooglevertexai inference_put_googlevertexai.NewPutGooglevertexai + PutHuggingFace inference_put_hugging_face.NewPutHuggingFace + PutJinaai inference_put_jinaai.NewPutJinaai + PutMistral inference_put_mistral.NewPutMistral + PutOpenai inference_put_openai.NewPutOpenai + PutVoyageai inference_put_voyageai.NewPutVoyageai + PutWatsonx inference_put_watsonx.NewPutWatsonx + Rerank inference_rerank.NewRerank + SparseEmbedding inference_sparse_embedding.NewSparseEmbedding + StreamCompletion inference_stream_completion.NewStreamCompletion + TextEmbedding inference_text_embedding.NewTextEmbedding + Update inference_update.NewUpdate } type Ingest struct { - // Delete GeoIP database configurations. - // - // Delete one or more IP geolocation database configurations. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-delete-geoip-database - DeleteGeoipDatabase ingest_delete_geoip_database.NewDeleteGeoipDatabase - // Delete IP geolocation database configurations. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-ip-location-database-api.html + DeleteGeoipDatabase ingest_delete_geoip_database.NewDeleteGeoipDatabase DeleteIpLocationDatabase ingest_delete_ip_location_database.NewDeleteIpLocationDatabase - // Delete pipelines. - // Delete one or more ingest pipelines. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html - DeletePipeline ingest_delete_pipeline.NewDeletePipeline - // Get GeoIP statistics. - // Get download statistics for GeoIP2 databases that are used with the GeoIP - // processor. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html - GeoIpStats ingest_geo_ip_stats.NewGeoIpStats - // Get GeoIP database configurations. - // - // Get information about one or more IP geolocation database configurations. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-get-geoip-database - GetGeoipDatabase ingest_get_geoip_database.NewGetGeoipDatabase - // Get IP geolocation database configurations. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ip-location-database-api.html - GetIpLocationDatabase ingest_get_ip_location_database.NewGetIpLocationDatabase - // Get pipelines. - // - // Get information about one or more ingest pipelines. - // This API returns a local reference of the pipeline. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html - GetPipeline ingest_get_pipeline.NewGetPipeline - // Run a grok processor. - // Extract structured fields out of a single text field within a document. - // You must choose which field to extract matched fields from, as well as the - // grok pattern you expect will match. - // A grok pattern is like a regular expression that supports aliased expressions - // that can be reused. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html - ProcessorGrok ingest_processor_grok.NewProcessorGrok - // Create or update a GeoIP database configuration. - // - // Refer to the create or update IP geolocation database configuration API. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-put-geoip-database - PutGeoipDatabase ingest_put_geoip_database.NewPutGeoipDatabase - // Create or update an IP geolocation database configuration. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-ip-location-database-api.html - PutIpLocationDatabase ingest_put_ip_location_database.NewPutIpLocationDatabase - // Create or update a pipeline. - // Changes made using this API take effect immediately. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html - PutPipeline ingest_put_pipeline.NewPutPipeline - // Simulate a pipeline. - // - // Run an ingest pipeline against a set of provided documents. - // You can either specify an existing pipeline to use with the provided - // documents or supply a pipeline definition in the body of the request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html - Simulate ingest_simulate.NewSimulate + DeletePipeline ingest_delete_pipeline.NewDeletePipeline + GeoIpStats ingest_geo_ip_stats.NewGeoIpStats + GetGeoipDatabase ingest_get_geoip_database.NewGetGeoipDatabase + GetIpLocationDatabase ingest_get_ip_location_database.NewGetIpLocationDatabase + GetPipeline ingest_get_pipeline.NewGetPipeline + ProcessorGrok ingest_processor_grok.NewProcessorGrok + PutGeoipDatabase ingest_put_geoip_database.NewPutGeoipDatabase + PutIpLocationDatabase ingest_put_ip_location_database.NewPutIpLocationDatabase + PutPipeline ingest_put_pipeline.NewPutPipeline + Simulate ingest_simulate.NewSimulate } type License struct { - // Delete the license. - // - // When the license expires, your subscription level reverts to Basic. - // - // If the operator privileges feature is enabled, only operator users can use - // this API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html - Delete license_delete.NewDelete - // Get license information. - // - // Get information about your Elastic license including its type, its status, - // when it was issued, and when it expires. - // - // >info - // > If the master node is generating a new cluster state, the get license API - // may return a `404 Not Found` response. - // > If you receive an unexpected 404 response after cluster startup, wait a - // short period and retry the request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html - Get license_get.NewGet - // Get the basic license status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html + Delete license_delete.NewDelete + Get license_get.NewGet GetBasicStatus license_get_basic_status.NewGetBasicStatus - // Get the trial status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html GetTrialStatus license_get_trial_status.NewGetTrialStatus - // Update the license. - // - // You can update your license at runtime without shutting down your nodes. - // License updates take effect immediately. - // If the license you are installing does not support all of the features that - // were available with your previous license, however, you are notified in the - // response. - // You must then re-submit the API request with the acknowledge parameter set to - // true. - // - // NOTE: If Elasticsearch security features are enabled and you are installing a - // gold or higher license, you must enable TLS on the transport networking layer - // before you install the license. - // If the operator privileges feature is enabled, only operator users can use - // this API. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-license-post - Post license_post.NewPost - // Start a basic license. - // - // Start an indefinite basic license, which gives access to all the basic - // features. - // - // NOTE: In order to start a basic license, you must not currently have a basic - // license. - // - // If the basic license does not support all of the features that are available - // with your current license, however, you are notified in the response. - // You must then re-submit the API request with the `acknowledge` parameter set - // to `true`. - // - // To check the status of your basic license, use the get basic license API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html + Post license_post.NewPost PostStartBasic license_post_start_basic.NewPostStartBasic - // Start a trial. - // Start a 30-day trial, which gives access to all subscription features. - // - // NOTE: You are allowed to start a trial only if your cluster has not already - // activated a trial for the current major product version. - // For example, if you have already activated a trial for v8.0, you cannot start - // a new trial until v9.0. You can, however, request an extended trial at - // https://www.elastic.co/trialextension. - // - // To check the status of your trial, use the get trial status API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html PostStartTrial license_post_start_trial.NewPostStartTrial } type Logstash struct { - // Delete a Logstash pipeline. - // Delete a pipeline that is used for Logstash Central Management. - // If the request succeeds, you receive an empty response with an appropriate - // status code. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html DeletePipeline logstash_delete_pipeline.NewDeletePipeline - // Get Logstash pipelines. - // Get pipelines that are used for Logstash Central Management. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html - GetPipeline logstash_get_pipeline.NewGetPipeline - // Create or update a Logstash pipeline. - // - // Create a pipeline that is used for Logstash Central Management. - // If the specified pipeline exists, it is replaced. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html - PutPipeline logstash_put_pipeline.NewPutPipeline + GetPipeline logstash_get_pipeline.NewGetPipeline + PutPipeline logstash_put_pipeline.NewPutPipeline } type Migration struct { - // Get deprecation information. - // Get information about different cluster, node, and index level settings that - // use deprecated features that will be removed or changed in the next major - // version. - // - // TIP: This APIs is designed for indirect use by the Upgrade Assistant. - // You are strongly recommended to use the Upgrade Assistant. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html - Deprecations migration_deprecations.NewDeprecations - // Get feature migration information. - // Version upgrades sometimes require changes to how features store - // configuration information and data in system indices. - // Check which features need to be migrated and the status of any migrations - // that are in progress. - // - // TIP: This API is designed for indirect use by the Upgrade Assistant. - // You are strongly recommended to use the Upgrade Assistant. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/feature-migration-api.html + Deprecations migration_deprecations.NewDeprecations GetFeatureUpgradeStatus migration_get_feature_upgrade_status.NewGetFeatureUpgradeStatus - // Start the feature migration. - // Version upgrades sometimes require changes to how features store - // configuration information and data in system indices. - // This API starts the automatic migration process. - // - // Some functionality might be temporarily unavailable during the migration - // process. - // - // TIP: The API is designed for indirect use by the Upgrade Assistant. We - // strongly recommend you use the Upgrade Assistant. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/feature-migration-api.html - PostFeatureUpgrade migration_post_feature_upgrade.NewPostFeatureUpgrade + PostFeatureUpgrade migration_post_feature_upgrade.NewPostFeatureUpgrade } type Ml struct { - // Clear trained model deployment cache. - // - // Cache will be cleared on all nodes where the trained model is assigned. - // A trained model deployment may have an inference cache enabled. - // As requests are handled by each allocated node, their responses may be cached - // on that individual node. - // Calling this API clears the caches without restarting the deployment. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-trained-model-deployment-cache.html ClearTrainedModelDeploymentCache ml_clear_trained_model_deployment_cache.NewClearTrainedModelDeploymentCache - // Close anomaly detection jobs. - // - // A job can be opened and closed multiple times throughout its lifecycle. A - // closed job cannot receive data or perform analysis operations, but you can - // still explore and navigate results. - // When you close a job, it runs housekeeping tasks such as pruning the model - // history, flushing buffers, calculating final results and persisting the model - // snapshots. Depending upon the size of the job, it could take several minutes - // to close and the equivalent time to re-open. After it is closed, the job has - // a minimal overhead on the cluster except for maintaining its meta data. - // Therefore it is a best practice to close jobs that are no longer required to - // process data. - // If you close an anomaly detection job whose datafeed is running, the request - // first tries to stop the datafeed. This behavior is equivalent to calling stop - // datafeed API with the same timeout and force parameters as the close job - // request. - // When a datafeed that has a specified end date stops, it automatically closes - // its associated job. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html - CloseJob ml_close_job.NewCloseJob - // Delete a calendar. - // - // Remove all scheduled events from a calendar, then delete it. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html - DeleteCalendar ml_delete_calendar.NewDeleteCalendar - // Delete events from a calendar. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html - DeleteCalendarEvent ml_delete_calendar_event.NewDeleteCalendarEvent - // Delete anomaly jobs from a calendar. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html - DeleteCalendarJob ml_delete_calendar_job.NewDeleteCalendarJob - // Delete a data frame analytics job. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html - DeleteDataFrameAnalytics ml_delete_data_frame_analytics.NewDeleteDataFrameAnalytics - // Delete a datafeed. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html - DeleteDatafeed ml_delete_datafeed.NewDeleteDatafeed - // Delete expired ML data. - // - // Delete all job results, model snapshots and forecast data that have exceeded - // their retention days period. Machine learning state documents that are not - // associated with any job are also deleted. - // You can limit the request to a single or set of anomaly detection jobs by - // using a job identifier, a group name, a comma-separated list of jobs, or a - // wildcard expression. You can delete expired data for all anomaly detection - // jobs by using `_all`, by specifying `*` as the ``, or by omitting the - // ``. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html - DeleteExpiredData ml_delete_expired_data.NewDeleteExpiredData - // Delete a filter. - // - // If an anomaly detection job references the filter, you cannot delete the - // filter. You must update or delete the job before you can delete the filter. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html - DeleteFilter ml_delete_filter.NewDeleteFilter - // Delete forecasts from a job. - // - // By default, forecasts are retained for 14 days. You can specify a - // different retention period with the `expires_in` parameter in the forecast - // jobs API. The delete forecast API enables you to delete one or more - // forecasts before they expire. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html - DeleteForecast ml_delete_forecast.NewDeleteForecast - // Delete an anomaly detection job. - // - // All job configuration, model state and results are deleted. - // It is not currently possible to delete multiple jobs using wildcards or a - // comma separated list. If you delete a job that has a datafeed, the request - // first tries to delete the datafeed. This behavior is equivalent to calling - // the delete datafeed API with the same timeout and force parameters as the - // delete job request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html - DeleteJob ml_delete_job.NewDeleteJob - // Delete a model snapshot. - // - // You cannot delete the active model snapshot. To delete that snapshot, first - // revert to a different one. To identify the active model snapshot, refer to - // the `model_snapshot_id` in the results from the get jobs API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html - DeleteModelSnapshot ml_delete_model_snapshot.NewDeleteModelSnapshot - // Delete an unreferenced trained model. - // - // The request deletes a trained inference model that is not referenced by an - // ingest pipeline. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html - DeleteTrainedModel ml_delete_trained_model.NewDeleteTrainedModel - // Delete a trained model alias. - // - // This API deletes an existing model alias that refers to a trained model. If - // the model alias is missing or refers to a model other than the one identified - // by the `model_id`, this API returns an error. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html - DeleteTrainedModelAlias ml_delete_trained_model_alias.NewDeleteTrainedModelAlias - // Estimate job model memory usage. - // - // Make an estimation of the memory usage for an anomaly detection job model. - // The estimate is based on analysis configuration details for the job and - // cardinality - // estimates for the fields it references. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-estimate-model-memory.html - EstimateModelMemory ml_estimate_model_memory.NewEstimateModelMemory - // Evaluate data frame analytics. - // - // The API packages together commonly used evaluation metrics for various types - // of machine learning features. This has been designed for use on indexes - // created by data frame analytics. Evaluation requires both a ground truth - // field and an analytics result field to be present. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html - EvaluateDataFrame ml_evaluate_data_frame.NewEvaluateDataFrame - // Explain data frame analytics config. - // - // This API provides explanations for a data frame analytics config that either - // exists already or one that has not been created yet. The following - // explanations are provided: - // * which fields are included or not in the analysis and why, - // * how much memory is estimated to be required. The estimate can be used when - // deciding the appropriate value for model_memory_limit setting later on. - // If you have object fields or fields that are excluded via source filtering, - // they are not included in the explanation. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html - ExplainDataFrameAnalytics ml_explain_data_frame_analytics.NewExplainDataFrameAnalytics - // Force buffered data to be processed. - // The flush jobs API is only applicable when sending data for analysis using - // the post data API. Depending on the content of the buffer, then it might - // additionally calculate new results. Both flush and close operations are - // similar, however the flush is more efficient if you are expecting to send - // more data for analysis. When flushing, the job remains open and is available - // to continue analyzing data. A close operation additionally prunes and - // persists the model state to disk and the job must be opened again before - // analyzing further data. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html - FlushJob ml_flush_job.NewFlushJob - // Predict future behavior of a time series. - // - // Forecasts are not supported for jobs that perform population analysis; an - // error occurs if you try to create a forecast for a job that has an - // `over_field_name` in its configuration. Forcasts predict future behavior - // based on historical data. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html - Forecast ml_forecast.NewForecast - // Get anomaly detection job results for buckets. - // The API presents a chronological view of the records, grouped by bucket. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html - GetBuckets ml_get_buckets.NewGetBuckets - // Get info about events in calendars. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html - GetCalendarEvents ml_get_calendar_events.NewGetCalendarEvents - // Get calendar configuration info. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html - GetCalendars ml_get_calendars.NewGetCalendars - // Get anomaly detection job results for categories. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html - GetCategories ml_get_categories.NewGetCategories - // Get data frame analytics job configuration info. - // You can get information for multiple data frame analytics jobs in a single - // API request by using a comma-separated list of data frame analytics jobs or a - // wildcard expression. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html - GetDataFrameAnalytics ml_get_data_frame_analytics.NewGetDataFrameAnalytics - // Get data frame analytics jobs usage info. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html - GetDataFrameAnalyticsStats ml_get_data_frame_analytics_stats.NewGetDataFrameAnalyticsStats - // Get datafeeds usage info. - // You can get statistics for multiple datafeeds in a single API request by - // using a comma-separated list of datafeeds or a wildcard expression. You can - // get statistics for all datafeeds by using `_all`, by specifying `*` as the - // ``, or by omitting the ``. If the datafeed is stopped, the - // only information you receive is the `datafeed_id` and the `state`. - // This API returns a maximum of 10,000 datafeeds. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html - GetDatafeedStats ml_get_datafeed_stats.NewGetDatafeedStats - // Get datafeeds configuration info. - // You can get information for multiple datafeeds in a single API request by - // using a comma-separated list of datafeeds or a wildcard expression. You can - // get information for all datafeeds by using `_all`, by specifying `*` as the - // ``, or by omitting the ``. - // This API returns a maximum of 10,000 datafeeds. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html - GetDatafeeds ml_get_datafeeds.NewGetDatafeeds - // Get filters. - // You can get a single filter or all filters. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html - GetFilters ml_get_filters.NewGetFilters - // Get anomaly detection job results for influencers. - // Influencers are the entities that have contributed to, or are to blame for, - // the anomalies. Influencer results are available only if an - // `influencer_field_name` is specified in the job configuration. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html - GetInfluencers ml_get_influencers.NewGetInfluencers - // Get anomaly detection jobs usage info. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html - GetJobStats ml_get_job_stats.NewGetJobStats - // Get anomaly detection jobs configuration info. - // You can get information for multiple anomaly detection jobs in a single API - // request by using a group name, a comma-separated list of jobs, or a wildcard - // expression. You can get information for all anomaly detection jobs by using - // `_all`, by specifying `*` as the ``, or by omitting the ``. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html - GetJobs ml_get_jobs.NewGetJobs - // Get machine learning memory usage info. - // Get information about how machine learning jobs and trained models are using - // memory, - // on each node, both within the JVM heap, and natively, outside of the JVM. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html - GetMemoryStats ml_get_memory_stats.NewGetMemoryStats - // Get anomaly detection job model snapshot upgrade usage info. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html - GetModelSnapshotUpgradeStats ml_get_model_snapshot_upgrade_stats.NewGetModelSnapshotUpgradeStats - // Get model snapshots info. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html - GetModelSnapshots ml_get_model_snapshots.NewGetModelSnapshots - // Get overall bucket results. - // - // Retrievs overall bucket results that summarize the bucket results of - // multiple anomaly detection jobs. - // - // The `overall_score` is calculated by combining the scores of all the - // buckets within the overall bucket span. First, the maximum - // `anomaly_score` per anomaly detection job in the overall bucket is - // calculated. Then the `top_n` of those scores are averaged to result in - // the `overall_score`. This means that you can fine-tune the - // `overall_score` so that it is more or less sensitive to the number of - // jobs that detect an anomaly at the same time. For example, if you set - // `top_n` to `1`, the `overall_score` is the maximum bucket score in the - // overall bucket. Alternatively, if you set `top_n` to the number of jobs, - // the `overall_score` is high only when all jobs detect anomalies in that - // overall bucket. If you set the `bucket_span` parameter (to a value - // greater than its default), the `overall_score` is the maximum - // `overall_score` of the overall buckets that have a span equal to the - // jobs' largest bucket span. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html - GetOverallBuckets ml_get_overall_buckets.NewGetOverallBuckets - // Get anomaly records for an anomaly detection job. - // Records contain the detailed analytical results. They describe the anomalous - // activity that has been identified in the input data based on the detector - // configuration. - // There can be many anomaly records depending on the characteristics and size - // of the input data. In practice, there are often too many to be able to - // manually process them. The machine learning features therefore perform a - // sophisticated aggregation of the anomaly records into buckets. - // The number of record results depends on the number of anomalies found in each - // bucket, which relates to the number of time series being modeled and the - // number of detectors. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html - GetRecords ml_get_records.NewGetRecords - // Get trained model configuration info. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html - GetTrainedModels ml_get_trained_models.NewGetTrainedModels - // Get trained models usage info. - // You can get usage information for multiple trained - // models in a single API request by using a comma-separated list of model IDs - // or a wildcard expression. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html - GetTrainedModelsStats ml_get_trained_models_stats.NewGetTrainedModelsStats - // Evaluate a trained model. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html - InferTrainedModel ml_infer_trained_model.NewInferTrainedModel - // Get machine learning information. - // Get defaults and limits used by machine learning. - // This endpoint is designed to be used by a user interface that needs to fully - // understand machine learning configurations where some options are not - // specified, meaning that the defaults should be used. This endpoint may be - // used to find out what those defaults are. It also provides information about - // the maximum size of machine learning jobs that could run in the current - // cluster configuration. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html - Info ml_info.NewInfo - // Open anomaly detection jobs. - // - // An anomaly detection job must be opened to be ready to receive and analyze - // data. It can be opened and closed multiple times throughout its lifecycle. - // When you open a new job, it starts with an empty model. - // When you open an existing job, the most recent model state is automatically - // loaded. The job is ready to resume its analysis from where it left off, once - // new data is received. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html - OpenJob ml_open_job.NewOpenJob - // Add scheduled events to the calendar. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html - PostCalendarEvents ml_post_calendar_events.NewPostCalendarEvents - // Send data to an anomaly detection job for analysis. - // - // IMPORTANT: For each job, data can be accepted from only a single connection - // at a time. - // It is not currently possible to post data to multiple jobs using wildcards or - // a comma-separated list. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html - PostData ml_post_data.NewPostData - // Preview features used by data frame analytics. - // Preview the extracted features used by a data frame analytics config. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html - PreviewDataFrameAnalytics ml_preview_data_frame_analytics.NewPreviewDataFrameAnalytics - // Preview a datafeed. - // This API returns the first "page" of search results from a datafeed. - // You can preview an existing datafeed or provide configuration details for a - // datafeed - // and anomaly detection job in the API. The preview shows the structure of the - // data - // that will be passed to the anomaly detection engine. - // IMPORTANT: When Elasticsearch security features are enabled, the preview uses - // the credentials of the user that - // called the API. However, when the datafeed starts it uses the roles of the - // last user that created or updated the - // datafeed. To get a preview that accurately reflects the behavior of the - // datafeed, use the appropriate credentials. - // You can also use secondary authorization headers to supply the credentials. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html - PreviewDatafeed ml_preview_datafeed.NewPreviewDatafeed - // Create a calendar. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html - PutCalendar ml_put_calendar.NewPutCalendar - // Add anomaly detection job to calendar. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html - PutCalendarJob ml_put_calendar_job.NewPutCalendarJob - // Create a data frame analytics job. - // This API creates a data frame analytics job that performs an analysis on the - // source indices and stores the outcome in a destination index. - // By default, the query used in the source configuration is `{"match_all": - // {}}`. - // - // If the destination index does not exist, it is created automatically when you - // start the job. - // - // If you supply only a subset of the regression or classification parameters, - // hyperparameter optimization occurs. It determines a value for each of the - // undefined parameters. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html - PutDataFrameAnalytics ml_put_data_frame_analytics.NewPutDataFrameAnalytics - // Create a datafeed. - // Datafeeds retrieve data from Elasticsearch for analysis by an anomaly - // detection job. - // You can associate only one datafeed with each anomaly detection job. - // The datafeed contains a query that runs at a defined interval (`frequency`). - // If you are concerned about delayed data, you can add a delay (`query_delay') - // at each interval. - // By default, the datafeed uses the following query: `{"match_all": {"boost": - // 1}}`. - // - // When Elasticsearch security features are enabled, your datafeed remembers - // which roles the user who created it had - // at the time of creation and runs the query using those same roles. If you - // provide secondary authorization headers, - // those credentials are used instead. - // You must use Kibana, this API, or the create anomaly detection jobs API to - // create a datafeed. Do not add a datafeed - // directly to the `.ml-config` index. Do not give users `write` privileges on - // the `.ml-config` index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html - PutDatafeed ml_put_datafeed.NewPutDatafeed - // Create a filter. - // A filter contains a list of strings. It can be used by one or more anomaly - // detection jobs. - // Specifically, filters are referenced in the `custom_rules` property of - // detector configuration objects. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html - PutFilter ml_put_filter.NewPutFilter - // Create an anomaly detection job. - // - // If you include a `datafeed_config`, you must have read index privileges on - // the source index. - // If you include a `datafeed_config` but do not provide a query, the datafeed - // uses `{"match_all": {"boost": 1}}`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html - PutJob ml_put_job.NewPutJob - // Create a trained model. - // Enable you to supply a trained model that is not created by data frame - // analytics. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html - PutTrainedModel ml_put_trained_model.NewPutTrainedModel - // Create or update a trained model alias. - // A trained model alias is a logical name used to reference a single trained - // model. - // You can use aliases instead of trained model identifiers to make it easier to - // reference your models. For example, you can use aliases in inference - // aggregations and processors. - // An alias must be unique and refer to only a single trained model. However, - // you can have multiple aliases for each trained model. - // If you use this API to update an alias such that it references a different - // trained model ID and the model uses a different type of data frame analytics, - // an error occurs. For example, this situation occurs if you have a trained - // model for regression analysis and a trained model for classification - // analysis; you cannot reassign an alias from one type of trained model to - // another. - // If you use this API to update an alias and there are very few input fields in - // common between the old and new trained models for the model alias, the API - // returns a warning. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html - PutTrainedModelAlias ml_put_trained_model_alias.NewPutTrainedModelAlias - // Create part of a trained model definition. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html - PutTrainedModelDefinitionPart ml_put_trained_model_definition_part.NewPutTrainedModelDefinitionPart - // Create a trained model vocabulary. - // This API is supported only for natural language processing (NLP) models. - // The vocabulary is stored in the index as described in - // `inference_config.*.vocabulary` of the trained model definition. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html - PutTrainedModelVocabulary ml_put_trained_model_vocabulary.NewPutTrainedModelVocabulary - // Reset an anomaly detection job. - // All model state and results are deleted. The job is ready to start over as if - // it had just been created. - // It is not currently possible to reset multiple jobs using wildcards or a - // comma separated list. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html - ResetJob ml_reset_job.NewResetJob - // Revert to a snapshot. - // The machine learning features react quickly to anomalous input, learning new - // behaviors in data. Highly anomalous input increases the variance in the - // models whilst the system learns whether this is a new step-change in behavior - // or a one-off event. In the case where this anomalous input is known to be a - // one-off, then it might be appropriate to reset the model state to a time - // before this event. For example, you might consider reverting to a saved - // snapshot after Black Friday or a critical system failure. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html - RevertModelSnapshot ml_revert_model_snapshot.NewRevertModelSnapshot - // Set upgrade_mode for ML indices. - // Sets a cluster wide upgrade_mode setting that prepares machine learning - // indices for an upgrade. - // When upgrading your cluster, in some circumstances you must restart your - // nodes and reindex your machine learning indices. In those circumstances, - // there must be no machine learning jobs running. You can close the machine - // learning jobs, do the upgrade, then open all the jobs again. Alternatively, - // you can use this API to temporarily halt tasks associated with the jobs and - // datafeeds and prevent new jobs from opening. You can also use this API - // during upgrades that do not require you to reindex your machine learning - // indices, though stopping jobs is not a requirement in that case. - // You can see the current value for the upgrade_mode setting by using the get - // machine learning info API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html - SetUpgradeMode ml_set_upgrade_mode.NewSetUpgradeMode - // Start a data frame analytics job. - // A data frame analytics job can be started and stopped multiple times - // throughout its lifecycle. - // If the destination index does not exist, it is created automatically the - // first time you start the data frame analytics job. The - // `index.number_of_shards` and `index.number_of_replicas` settings for the - // destination index are copied from the source index. If there are multiple - // source indices, the destination index copies the highest setting values. The - // mappings for the destination index are also copied from the source indices. - // If there are any mapping conflicts, the job fails to start. - // If the destination index exists, it is used as is. You can therefore set up - // the destination index in advance with custom settings and mappings. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html - StartDataFrameAnalytics ml_start_data_frame_analytics.NewStartDataFrameAnalytics - // Start datafeeds. - // - // A datafeed must be started in order to retrieve data from Elasticsearch. A - // datafeed can be started and stopped - // multiple times throughout its lifecycle. - // - // Before you can start a datafeed, the anomaly detection job must be open. - // Otherwise, an error occurs. - // - // If you restart a stopped datafeed, it continues processing input data from - // the next millisecond after it was stopped. - // If new data was indexed for that exact millisecond between stopping and - // starting, it will be ignored. - // - // When Elasticsearch security features are enabled, your datafeed remembers - // which roles the last user to create or - // update it had at the time of creation or update and runs the query using - // those same roles. If you provided secondary - // authorization headers when you created or updated the datafeed, those - // credentials are used instead. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html - StartDatafeed ml_start_datafeed.NewStartDatafeed - // Start a trained model deployment. - // It allocates the model to every machine learning node. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html - StartTrainedModelDeployment ml_start_trained_model_deployment.NewStartTrainedModelDeployment - // Stop data frame analytics jobs. - // A data frame analytics job can be started and stopped multiple times - // throughout its lifecycle. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html - StopDataFrameAnalytics ml_stop_data_frame_analytics.NewStopDataFrameAnalytics - // Stop datafeeds. - // A datafeed that is stopped ceases to retrieve data from Elasticsearch. A - // datafeed can be started and stopped - // multiple times throughout its lifecycle. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html - StopDatafeed ml_stop_datafeed.NewStopDatafeed - // Stop a trained model deployment. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html - StopTrainedModelDeployment ml_stop_trained_model_deployment.NewStopTrainedModelDeployment - // Update a data frame analytics job. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-data-frame-analytics - UpdateDataFrameAnalytics ml_update_data_frame_analytics.NewUpdateDataFrameAnalytics - // Update a datafeed. - // You must stop and start the datafeed for the changes to be applied. - // When Elasticsearch security features are enabled, your datafeed remembers - // which roles the user who updated it had at - // the time of the update and runs the query using those same roles. If you - // provide secondary authorization headers, - // those credentials are used instead. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html - UpdateDatafeed ml_update_datafeed.NewUpdateDatafeed - // Update a filter. - // Updates the description of a filter, adds items, or removes items from the - // list. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html - UpdateFilter ml_update_filter.NewUpdateFilter - // Update an anomaly detection job. - // Updates certain properties of an anomaly detection job. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html - UpdateJob ml_update_job.NewUpdateJob - // Update a snapshot. - // Updates certain properties of a snapshot. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html - UpdateModelSnapshot ml_update_model_snapshot.NewUpdateModelSnapshot - // Update a trained model deployment. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-trained-model-deployment - UpdateTrainedModelDeployment ml_update_trained_model_deployment.NewUpdateTrainedModelDeployment - // Upgrade a snapshot. - // Upgrade an anomaly detection model snapshot to the latest major version. - // Over time, older snapshot formats are deprecated and removed. Anomaly - // detection jobs support only snapshots that are from the current or previous - // major version. - // This API provides a means to upgrade a snapshot to the current major version. - // This aids in preparing the cluster for an upgrade to the next major version. - // Only one snapshot per anomaly detection job can be upgraded at a time and the - // upgraded snapshot cannot be the current snapshot of the anomaly detection - // job. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html - UpgradeJobSnapshot ml_upgrade_job_snapshot.NewUpgradeJobSnapshot - // Validate an anomaly detection job. - // https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html - Validate ml_validate.NewValidate - // Validate an anomaly detection job. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8 - ValidateDetector ml_validate_detector.NewValidateDetector + CloseJob ml_close_job.NewCloseJob + DeleteCalendar ml_delete_calendar.NewDeleteCalendar + DeleteCalendarEvent ml_delete_calendar_event.NewDeleteCalendarEvent + DeleteCalendarJob ml_delete_calendar_job.NewDeleteCalendarJob + DeleteDataFrameAnalytics ml_delete_data_frame_analytics.NewDeleteDataFrameAnalytics + DeleteDatafeed ml_delete_datafeed.NewDeleteDatafeed + DeleteExpiredData ml_delete_expired_data.NewDeleteExpiredData + DeleteFilter ml_delete_filter.NewDeleteFilter + DeleteForecast ml_delete_forecast.NewDeleteForecast + DeleteJob ml_delete_job.NewDeleteJob + DeleteModelSnapshot ml_delete_model_snapshot.NewDeleteModelSnapshot + DeleteTrainedModel ml_delete_trained_model.NewDeleteTrainedModel + DeleteTrainedModelAlias ml_delete_trained_model_alias.NewDeleteTrainedModelAlias + EstimateModelMemory ml_estimate_model_memory.NewEstimateModelMemory + EvaluateDataFrame ml_evaluate_data_frame.NewEvaluateDataFrame + ExplainDataFrameAnalytics ml_explain_data_frame_analytics.NewExplainDataFrameAnalytics + FlushJob ml_flush_job.NewFlushJob + Forecast ml_forecast.NewForecast + GetBuckets ml_get_buckets.NewGetBuckets + GetCalendarEvents ml_get_calendar_events.NewGetCalendarEvents + GetCalendars ml_get_calendars.NewGetCalendars + GetCategories ml_get_categories.NewGetCategories + GetDataFrameAnalytics ml_get_data_frame_analytics.NewGetDataFrameAnalytics + GetDataFrameAnalyticsStats ml_get_data_frame_analytics_stats.NewGetDataFrameAnalyticsStats + GetDatafeedStats ml_get_datafeed_stats.NewGetDatafeedStats + GetDatafeeds ml_get_datafeeds.NewGetDatafeeds + GetFilters ml_get_filters.NewGetFilters + GetInfluencers ml_get_influencers.NewGetInfluencers + GetJobStats ml_get_job_stats.NewGetJobStats + GetJobs ml_get_jobs.NewGetJobs + GetMemoryStats ml_get_memory_stats.NewGetMemoryStats + GetModelSnapshotUpgradeStats ml_get_model_snapshot_upgrade_stats.NewGetModelSnapshotUpgradeStats + GetModelSnapshots ml_get_model_snapshots.NewGetModelSnapshots + GetOverallBuckets ml_get_overall_buckets.NewGetOverallBuckets + GetRecords ml_get_records.NewGetRecords + GetTrainedModels ml_get_trained_models.NewGetTrainedModels + GetTrainedModelsStats ml_get_trained_models_stats.NewGetTrainedModelsStats + InferTrainedModel ml_infer_trained_model.NewInferTrainedModel + Info ml_info.NewInfo + OpenJob ml_open_job.NewOpenJob + PostCalendarEvents ml_post_calendar_events.NewPostCalendarEvents + PostData ml_post_data.NewPostData + PreviewDataFrameAnalytics ml_preview_data_frame_analytics.NewPreviewDataFrameAnalytics + PreviewDatafeed ml_preview_datafeed.NewPreviewDatafeed + PutCalendar ml_put_calendar.NewPutCalendar + PutCalendarJob ml_put_calendar_job.NewPutCalendarJob + PutDataFrameAnalytics ml_put_data_frame_analytics.NewPutDataFrameAnalytics + PutDatafeed ml_put_datafeed.NewPutDatafeed + PutFilter ml_put_filter.NewPutFilter + PutJob ml_put_job.NewPutJob + PutTrainedModel ml_put_trained_model.NewPutTrainedModel + PutTrainedModelAlias ml_put_trained_model_alias.NewPutTrainedModelAlias + PutTrainedModelDefinitionPart ml_put_trained_model_definition_part.NewPutTrainedModelDefinitionPart + PutTrainedModelVocabulary ml_put_trained_model_vocabulary.NewPutTrainedModelVocabulary + ResetJob ml_reset_job.NewResetJob + RevertModelSnapshot ml_revert_model_snapshot.NewRevertModelSnapshot + SetUpgradeMode ml_set_upgrade_mode.NewSetUpgradeMode + StartDataFrameAnalytics ml_start_data_frame_analytics.NewStartDataFrameAnalytics + StartDatafeed ml_start_datafeed.NewStartDatafeed + StartTrainedModelDeployment ml_start_trained_model_deployment.NewStartTrainedModelDeployment + StopDataFrameAnalytics ml_stop_data_frame_analytics.NewStopDataFrameAnalytics + StopDatafeed ml_stop_datafeed.NewStopDatafeed + StopTrainedModelDeployment ml_stop_trained_model_deployment.NewStopTrainedModelDeployment + UpdateDataFrameAnalytics ml_update_data_frame_analytics.NewUpdateDataFrameAnalytics + UpdateDatafeed ml_update_datafeed.NewUpdateDatafeed + UpdateFilter ml_update_filter.NewUpdateFilter + UpdateJob ml_update_job.NewUpdateJob + UpdateModelSnapshot ml_update_model_snapshot.NewUpdateModelSnapshot + UpdateTrainedModelDeployment ml_update_trained_model_deployment.NewUpdateTrainedModelDeployment + UpgradeJobSnapshot ml_upgrade_job_snapshot.NewUpgradeJobSnapshot + Validate ml_validate.NewValidate + ValidateDetector ml_validate_detector.NewValidateDetector } type Monitoring struct { - // Send monitoring data. - // This API is used by the monitoring features to send monitoring data. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8 Bulk monitoring_bulk.NewBulk } type Nodes struct { - // Clear the archived repositories metering. - // Clear the archived repositories metering information in the cluster. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html ClearRepositoriesMeteringArchive nodes_clear_repositories_metering_archive.NewClearRepositoriesMeteringArchive - // Get cluster repositories metering. - // Get repositories metering information for a cluster. - // This API exposes monotonically non-decreasing counters and it is expected - // that clients would durably store the information needed to compute - // aggregations over a period of time. - // Additionally, the information exposed by this API is volatile, meaning that - // it will not be present after node restarts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html - GetRepositoriesMeteringInfo nodes_get_repositories_metering_info.NewGetRepositoriesMeteringInfo - // Get the hot threads for nodes. - // Get a breakdown of the hot threads on each selected node in the cluster. - // The output is plain text with a breakdown of the top hot threads for each - // node. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html - HotThreads nodes_hot_threads.NewHotThreads - // Get node information. - // - // By default, the API returns all attributes and core settings for cluster - // nodes. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html - Info nodes_info.NewInfo - // Reload the keystore on nodes in the cluster. - // - // Secure settings are stored in an on-disk keystore. Certain of these settings - // are reloadable. - // That is, you can change them on disk and reload them without restarting any - // nodes in the cluster. - // When you have updated reloadable secure settings in your keystore, you can - // use this API to reload those settings on each node. - // - // When the Elasticsearch keystore is password protected and not simply - // obfuscated, you must provide the password for the keystore when you reload - // the secure settings. - // Reloading the settings for the whole cluster assumes that the keystores for - // all nodes are protected with the same password; this method is allowed only - // when inter-node communications are encrypted. - // Alternatively, you can reload the secure settings on each node by locally - // accessing the API and passing the node-specific Elasticsearch keystore - // password. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-reload-secure-settings.html - ReloadSecureSettings nodes_reload_secure_settings.NewReloadSecureSettings - // Get node statistics. - // Get statistics for nodes in a cluster. - // By default, all stats are returned. You can limit the returned information by - // using metrics. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html - Stats nodes_stats.NewStats - // Get feature usage information. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html - Usage nodes_usage.NewUsage + GetRepositoriesMeteringInfo nodes_get_repositories_metering_info.NewGetRepositoriesMeteringInfo + HotThreads nodes_hot_threads.NewHotThreads + Info nodes_info.NewInfo + ReloadSecureSettings nodes_reload_secure_settings.NewReloadSecureSettings + Stats nodes_stats.NewStats + Usage nodes_usage.NewUsage } type Profiling struct { - // Extracts a UI-optimized structure to render flamegraphs from Universal - // Profiling. - // https://www.elastic.co/guide/en/observability/current/universal-profiling.html - Flamegraph profiling_flamegraph.NewFlamegraph - // Extracts raw stacktrace information from Universal Profiling. - // https://www.elastic.co/guide/en/observability/current/universal-profiling.html - Stacktraces profiling_stacktraces.NewStacktraces - // Returns basic information about the status of Universal Profiling. - // https://www.elastic.co/guide/en/observability/current/universal-profiling.html - Status profiling_status.NewStatus - // Extracts a list of topN functions from Universal Profiling. - // https://www.elastic.co/guide/en/observability/current/universal-profiling.html + Flamegraph profiling_flamegraph.NewFlamegraph + Stacktraces profiling_stacktraces.NewStacktraces + Status profiling_status.NewStatus TopnFunctions profiling_topn_functions.NewTopnFunctions } type QueryRules struct { - // Delete a query rule. - // Delete a query rule within a query ruleset. - // This is a destructive action that is only recoverable by re-adding the same - // rule with the create or update query rule API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-rule.html - DeleteRule query_rules_delete_rule.NewDeleteRule - // Delete a query ruleset. - // Remove a query ruleset and its associated data. - // This is a destructive action that is not recoverable. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html + DeleteRule query_rules_delete_rule.NewDeleteRule DeleteRuleset query_rules_delete_ruleset.NewDeleteRuleset - // Get a query rule. - // Get details about a query rule within a query ruleset. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-rule.html - GetRule query_rules_get_rule.NewGetRule - // Get a query ruleset. - // Get details about a query ruleset. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html - GetRuleset query_rules_get_ruleset.NewGetRuleset - // Get all query rulesets. - // Get summarized information about the query rulesets. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html - ListRulesets query_rules_list_rulesets.NewListRulesets - // Create or update a query rule. - // Create or update a query rule within a query ruleset. - // - // IMPORTANT: Due to limitations within pinned queries, you can only pin - // documents using ids or docs, but cannot use both in single rule. - // It is advised to use one or the other in query rulesets, to avoid errors. - // Additionally, pinned queries have a maximum limit of 100 pinned hits. - // If multiple matching rules pin more than 100 documents, only the first 100 - // documents are pinned in the order they are specified in the ruleset. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-rule.html - PutRule query_rules_put_rule.NewPutRule - // Create or update a query ruleset. - // There is a limit of 100 rules per ruleset. - // This limit can be increased by using the - // `xpack.applications.rules.max_rules_per_ruleset` cluster setting. - // - // IMPORTANT: Due to limitations within pinned queries, you can only select - // documents using `ids` or `docs`, but cannot use both in single rule. - // It is advised to use one or the other in query rulesets, to avoid errors. - // Additionally, pinned queries have a maximum limit of 100 pinned hits. - // If multiple matching rules pin more than 100 documents, only the first 100 - // documents are pinned in the order they are specified in the ruleset. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html - PutRuleset query_rules_put_ruleset.NewPutRuleset - // Test a query ruleset. - // Evaluate match criteria against a query ruleset to identify the rules that - // would match that criteria. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/test-query-ruleset.html - Test query_rules_test.NewTest + GetRule query_rules_get_rule.NewGetRule + GetRuleset query_rules_get_ruleset.NewGetRuleset + ListRulesets query_rules_list_rulesets.NewListRulesets + PutRule query_rules_put_rule.NewPutRule + PutRuleset query_rules_put_ruleset.NewPutRuleset + Test query_rules_test.NewTest } type Rollup struct { - // Delete a rollup job. - // - // A job must be stopped before it can be deleted. - // If you attempt to delete a started job, an error occurs. - // Similarly, if you attempt to delete a nonexistent job, an exception occurs. - // - // IMPORTANT: When you delete a job, you remove only the process that is - // actively monitoring and rolling up data. - // The API does not delete any previously rolled up data. - // This is by design; a user may wish to roll up a static data set. - // Because the data set is static, after it has been fully rolled up there is no - // need to keep the indexing rollup job around (as there will be no new data). - // Thus the job can be deleted, leaving behind the rolled up data for analysis. - // If you wish to also remove the rollup data and the rollup index contains the - // data for only a single job, you can delete the whole rollup index. - // If the rollup index stores data from several jobs, you must issue a - // delete-by-query that targets the rollup job's identifier in the rollup index. - // For example: - // - // ``` - // POST my_rollup_index/_delete_by_query - // { - // "query": { - // "term": { - // "_rollup.id": "the_rollup_job_id" - // } - // } - // } - // ``` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html - DeleteJob rollup_delete_job.NewDeleteJob - // Get rollup job information. - // Get the configuration, stats, and status of rollup jobs. - // - // NOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs. - // If a job was created, ran for a while, then was deleted, the API does not - // return any details about it. - // For details about a historical rollup job, the rollup capabilities API may be - // more useful. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html - GetJobs rollup_get_jobs.NewGetJobs - // Get the rollup job capabilities. - // Get the capabilities of any rollup jobs that have been configured for a - // specific index or index pattern. - // - // This API is useful because a rollup job is often configured to rollup only a - // subset of fields from the source index. - // Furthermore, only certain aggregations can be configured for various fields, - // leading to a limited subset of functionality depending on that configuration. - // This API enables you to inspect an index and determine: - // - // 1. Does this index have associated rollup data somewhere in the cluster? - // 2. If yes to the first question, what fields were rolled up, what - // aggregations can be performed, and where does the data live? - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html - GetRollupCaps rollup_get_rollup_caps.NewGetRollupCaps - // Get the rollup index capabilities. - // Get the rollup capabilities of all jobs inside of a rollup index. - // A single rollup index may store the data for multiple rollup jobs and may - // have a variety of capabilities depending on those jobs. This API enables you - // to determine: - // - // * What jobs are stored in an index (or indices specified via a pattern)? - // * What target indices were rolled up, what fields were used in those rollups, - // and what aggregations can be performed on each job? - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html + DeleteJob rollup_delete_job.NewDeleteJob + GetJobs rollup_get_jobs.NewGetJobs + GetRollupCaps rollup_get_rollup_caps.NewGetRollupCaps GetRollupIndexCaps rollup_get_rollup_index_caps.NewGetRollupIndexCaps - // Create a rollup job. - // - // WARNING: From 8.15.0, calling this API in a cluster with no rollup usage will - // fail with a message about the deprecation and planned removal of rollup - // features. A cluster needs to contain either a rollup job or a rollup index in - // order for this API to be allowed to run. - // - // The rollup job configuration contains all the details about how the job - // should run, when it indexes documents, and what future queries will be able - // to run against the rollup index. - // - // There are three main sections to the job configuration: the logistical - // details about the job (for example, the cron schedule), the fields that are - // used for grouping, and what metrics to collect for each group. - // - // Jobs are created in a `STOPPED` state. You can start them with the start - // rollup jobs API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html - PutJob rollup_put_job.NewPutJob - // Search rolled-up data. - // The rollup search endpoint is needed because, internally, rolled-up documents - // utilize a different document structure than the original data. - // It rewrites standard Query DSL into a format that matches the rollup - // documents then takes the response and rewrites it back to what a client would - // expect given the original query. - // - // The request body supports a subset of features from the regular search API. - // The following functionality is not available: - // - // `size`: Because rollups work on pre-aggregated data, no search hits can be - // returned and so size must be set to zero or omitted entirely. - // `highlighter`, `suggestors`, `post_filter`, `profile`, `explain`: These are - // similarly disallowed. - // - // **Searching both historical rollup and non-rollup data** - // - // The rollup search API has the capability to search across both "live" - // non-rollup data and the aggregated rollup data. - // This is done by simply adding the live indices to the URI. For example: - // - // ``` - // GET sensor-1,sensor_rollup/_rollup_search - // { - // "size": 0, - // "aggregations": { - // "max_temperature": { - // "max": { - // "field": "temperature" - // } - // } - // } - // } - // ``` - // - // The rollup search endpoint does two things when the search runs: - // - // * The original request is sent to the non-rollup index unaltered. - // * A rewritten version of the original request is sent to the rollup index. - // - // When the two responses are received, the endpoint rewrites the rollup - // response and merges the two together. - // During the merging process, if there is any overlap in buckets between the - // two responses, the buckets from the non-rollup index are used. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html - RollupSearch rollup_rollup_search.NewRollupSearch - // Start rollup jobs. - // If you try to start a job that does not exist, an exception occurs. - // If you try to start a job that is already started, nothing happens. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html - StartJob rollup_start_job.NewStartJob - // Stop rollup jobs. - // If you try to stop a job that does not exist, an exception occurs. - // If you try to stop a job that is already stopped, nothing happens. - // - // Since only a stopped job can be deleted, it can be useful to block the API - // until the indexer has fully stopped. - // This is accomplished with the `wait_for_completion` query parameter, and - // optionally a timeout. For example: - // - // ``` - // POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s - // ``` - // The parameter blocks the API call from returning until either the job has - // moved to STOPPED or the specified time has elapsed. - // If the specified time elapses without the job moving to STOPPED, a timeout - // exception occurs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html - StopJob rollup_stop_job.NewStopJob + PutJob rollup_put_job.NewPutJob + RollupSearch rollup_rollup_search.NewRollupSearch + StartJob rollup_start_job.NewStartJob + StopJob rollup_stop_job.NewStopJob } type SearchApplication struct { - // Delete a search application. - // - // Remove a search application and its associated alias. Indices attached to the - // search application are not removed. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html - Delete search_application_delete.NewDelete - // Delete a behavioral analytics collection. - // The associated data stream is also deleted. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html - DeleteBehavioralAnalytics search_application_delete_behavioral_analytics.NewDeleteBehavioralAnalytics - // Get search application details. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html - Get search_application_get.NewGet - // Get behavioral analytics collections. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html - GetBehavioralAnalytics search_application_get_behavioral_analytics.NewGetBehavioralAnalytics - // Get search applications. - // Get information about search applications. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html - List search_application_list.NewList - // Create a behavioral analytics collection event. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-analytics-collection-event.html + Delete search_application_delete.NewDelete + DeleteBehavioralAnalytics search_application_delete_behavioral_analytics.NewDeleteBehavioralAnalytics + Get search_application_get.NewGet + GetBehavioralAnalytics search_application_get_behavioral_analytics.NewGetBehavioralAnalytics + List search_application_list.NewList PostBehavioralAnalyticsEvent search_application_post_behavioral_analytics_event.NewPostBehavioralAnalyticsEvent - // Create or update a search application. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html - Put search_application_put.NewPut - // Create a behavioral analytics collection. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html - PutBehavioralAnalytics search_application_put_behavioral_analytics.NewPutBehavioralAnalytics - // Render a search application query. - // Generate an Elasticsearch query using the specified query parameters and the - // search template associated with the search application or a default template - // if none is specified. - // If a parameter used in the search template is not specified in `params`, the - // parameter's default value will be used. - // The API returns the specific Elasticsearch query that would be generated and - // run by calling the search application search API. - // - // You must have `read` privileges on the backing alias of the search - // application. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-render-query.html - RenderQuery search_application_render_query.NewRenderQuery - // Run a search application search. - // Generate and run an Elasticsearch query that uses the specified query - // parameteter and the search template associated with the search application or - // default template. - // Unspecified template parameters are assigned their default values if - // applicable. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html - Search search_application_search.NewSearch + Put search_application_put.NewPut + PutBehavioralAnalytics search_application_put_behavioral_analytics.NewPutBehavioralAnalytics + RenderQuery search_application_render_query.NewRenderQuery + Search search_application_search.NewSearch } type SearchableSnapshots struct { - // Get cache statistics. - // Get statistics about the shared cache for partially mounted indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-cache-stats.html CacheStats searchable_snapshots_cache_stats.NewCacheStats - // Clear the cache. - // Clear indices and data streams from the shared cache for partially mounted - // indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-clear-cache.html ClearCache searchable_snapshots_clear_cache.NewClearCache - // Mount a snapshot. - // Mount a snapshot as a searchable snapshot index. - // Do not use this API for snapshots managed by index lifecycle management - // (ILM). - // Manually mounting ILM-managed snapshots can interfere with ILM processes. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html - Mount searchable_snapshots_mount.NewMount - // Get searchable snapshot statistics. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-stats.html - Stats searchable_snapshots_stats.NewStats + Mount searchable_snapshots_mount.NewMount + Stats searchable_snapshots_stats.NewStats } type Security struct { - // Activate a user profile. - // - // Create or update a user profile on behalf of another user. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // The calling application must have either an `access_token` or a combination - // of `username` and `password` for the user that the profile document is - // intended for. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // - // This API creates or updates a profile document for end users with information - // that is extracted from the user's authentication object including `username`, - // `full_name,` `roles`, and the authentication realm. - // For example, in the JWT `access_token` case, the profile user's `username` is - // extracted from the JWT token claim pointed to by the `claims.principal` - // setting of the JWT realm that authenticated the token. - // - // When updating a profile document, the API enables the document if it was - // disabled. - // Any updates do not change existing content for either the `labels` or `data` - // fields. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html - ActivateUserProfile security_activate_user_profile.NewActivateUserProfile - // Authenticate a user. - // - // Authenticates a user and returns information about the authenticated user. - // Include the user information in a [basic auth - // header](https://en.wikipedia.org/wiki/Basic_access_authentication). - // A successful call returns a JSON structure that shows user information such - // as their username, the roles that are assigned to the user, any assigned - // metadata, and information about the realms that authenticated and authorized - // the user. - // If the user cannot be authenticated, this API returns a 401 status code. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html - Authenticate security_authenticate.NewAuthenticate - // Bulk delete roles. - // - // The role management APIs are generally the preferred way to manage roles, - // rather than using file-based role management. - // The bulk delete roles API cannot delete roles that are defined in roles - // files. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html - BulkDeleteRole security_bulk_delete_role.NewBulkDeleteRole - // Bulk create or update roles. - // - // The role management APIs are generally the preferred way to manage roles, - // rather than using file-based role management. - // The bulk create or update roles API cannot update roles that are defined in - // roles files. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-put-role.html - BulkPutRole security_bulk_put_role.NewBulkPutRole - // Bulk update API keys. - // Update the attributes for multiple API keys. - // - // IMPORTANT: It is not possible to use an API key as the authentication - // credential for this API. To update API keys, the owner user's credentials are - // required. - // - // This API is similar to the update API key API but enables you to apply the - // same update to multiple API keys in one API call. This operation can greatly - // improve performance over making individual updates. - // - // It is not possible to update expired or invalidated API keys. - // - // This API supports updates to API key access scope, metadata and expiration. - // The access scope of each API key is derived from the `role_descriptors` you - // specify in the request and a snapshot of the owner user's permissions at the - // time of the request. - // The snapshot of the owner's permissions is updated automatically on every - // call. - // - // IMPORTANT: If you don't specify `role_descriptors` in the request, a call to - // this API might still change an API key's access scope. This change can occur - // if the owner user's permissions have changed since the API key was created or - // last modified. - // - // A successful request returns a JSON structure that contains the IDs of all - // updated API keys, the IDs of API keys that already had the requested changes - // and did not require an update, and error details for any failed update. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html - BulkUpdateApiKeys security_bulk_update_api_keys.NewBulkUpdateApiKeys - // Change passwords. - // - // Change the passwords of users in the native realm and built-in users. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html - ChangePassword security_change_password.NewChangePassword - // Clear the API key cache. - // - // Evict a subset of all entries from the API key cache. - // The cache is also automatically cleared on state changes of the security - // index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html - ClearApiKeyCache security_clear_api_key_cache.NewClearApiKeyCache - // Clear the privileges cache. - // - // Evict privileges from the native application privilege cache. - // The cache is also automatically cleared for applications that have their - // privileges updated. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html - ClearCachedPrivileges security_clear_cached_privileges.NewClearCachedPrivileges - // Clear the user cache. - // - // Evict users from the user cache. - // You can completely clear the cache or evict specific users. - // - // User credentials are cached in memory on each node to avoid connecting to a - // remote authentication service or hitting the disk for every incoming request. - // There are realm settings that you can use to configure the user cache. - // For more information, refer to the documentation about controlling the user - // cache. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html - ClearCachedRealms security_clear_cached_realms.NewClearCachedRealms - // Clear the roles cache. - // - // Evict roles from the native role cache. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html - ClearCachedRoles security_clear_cached_roles.NewClearCachedRoles - // Clear service account token caches. - // - // Evict a subset of all entries from the service account token caches. - // Two separate caches exist for service account tokens: one cache for tokens - // backed by the `service_tokens` file, and another for tokens backed by the - // `.security` index. - // This API clears matching entries from both caches. - // - // The cache for service account tokens backed by the `.security` index is - // cleared automatically on state changes of the security index. - // The cache for tokens backed by the `service_tokens` file is cleared - // automatically on file changes. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html - ClearCachedServiceTokens security_clear_cached_service_tokens.NewClearCachedServiceTokens - // Create an API key. - // - // Create an API key for access without requiring basic authentication. - // - // IMPORTANT: If the credential that is used to authenticate this request is an - // API key, the derived API key cannot have any privileges. - // If you specify privileges, the API returns an error. - // - // A successful request returns a JSON structure that contains the API key, its - // unique id, and its name. - // If applicable, it also returns expiration information for the API key in - // milliseconds. - // - // NOTE: By default, API keys never expire. You can specify expiration - // information when you create the API keys. - // - // The API keys are created by the Elasticsearch API key service, which is - // automatically enabled. - // To configure or turn off the API key service, refer to API key service - // setting documentation. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html - CreateApiKey security_create_api_key.NewCreateApiKey - // Create a cross-cluster API key. - // - // Create an API key of the `cross_cluster` type for the API key based remote - // cluster access. - // A `cross_cluster` API key cannot be used to authenticate through the REST - // interface. - // - // IMPORTANT: To authenticate this request you must use a credential that is not - // an API key. Even if you use an API key that has the required privilege, the - // API returns an error. - // - // Cross-cluster API keys are created by the Elasticsearch API key service, - // which is automatically enabled. - // - // NOTE: Unlike REST API keys, a cross-cluster API key does not capture - // permissions of the authenticated user. The API key’s effective permission is - // exactly as specified with the `access` property. - // - // A successful request returns a JSON structure that contains the API key, its - // unique ID, and its name. If applicable, it also returns expiration - // information for the API key in milliseconds. - // - // By default, API keys never expire. You can specify expiration information - // when you create the API keys. - // - // Cross-cluster API keys can only be updated with the update cross-cluster API - // key API. - // Attempting to update them with the update REST API key API or the bulk update - // REST API keys API will result in an error. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html - CreateCrossClusterApiKey security_create_cross_cluster_api_key.NewCreateCrossClusterApiKey - // Create a service account token. - // - // Create a service accounts token for access without requiring basic - // authentication. - // - // NOTE: Service account tokens never expire. - // You must actively delete them if they are no longer needed. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html - CreateServiceToken security_create_service_token.NewCreateServiceToken - // Delegate PKI authentication. - // - // This API implements the exchange of an X509Certificate chain for an - // Elasticsearch access token. - // The certificate chain is validated, according to RFC 5280, by sequentially - // considering the trust configuration of every installed PKI realm that has - // `delegation.enabled` set to `true`. - // A successfully trusted client certificate is also subject to the validation - // of the subject distinguished name according to thw `username_pattern` of the - // respective realm. - // - // This API is called by smart and trusted proxies, such as Kibana, which - // terminate the user's TLS session but still want to authenticate the user by - // using a PKI realm—-​as if the user connected directly to Elasticsearch. - // - // IMPORTANT: The association between the subject public key in the target - // certificate and the corresponding private key is not validated. - // This is part of the TLS authentication process and it is delegated to the - // proxy that calls this API. - // The proxy is trusted to have performed the TLS authentication and this API - // translates that authentication into an Elasticsearch access token. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delegate-pki-authentication.html - DelegatePki security_delegate_pki.NewDelegatePki - // Delete application privileges. - // - // To use this API, you must have one of the following privileges: - // - // * The `manage_security` cluster privilege (or a greater privilege such as - // `all`). - // * The "Manage Application Privileges" global privilege for the application - // being referenced in the request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html - DeletePrivileges security_delete_privileges.NewDeletePrivileges - // Delete roles. - // - // Delete roles in the native realm. - // The role management APIs are generally the preferred way to manage roles, - // rather than using file-based role management. - // The delete roles API cannot remove roles that are defined in roles files. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html - DeleteRole security_delete_role.NewDeleteRole - // Delete role mappings. - // - // Role mappings define which roles are assigned to each user. - // The role mapping APIs are generally the preferred way to manage role mappings - // rather than using role mapping files. - // The delete role mappings API cannot remove role mappings that are defined in - // role mapping files. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html - DeleteRoleMapping security_delete_role_mapping.NewDeleteRoleMapping - // Delete service account tokens. - // - // Delete service account tokens for a service in a specified namespace. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html - DeleteServiceToken security_delete_service_token.NewDeleteServiceToken - // Delete users. - // - // Delete users from the native realm. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html - DeleteUser security_delete_user.NewDeleteUser - // Disable users. - // - // Disable users in the native realm. - // By default, when you create users, they are enabled. - // You can use this API to revoke a user's access to Elasticsearch. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html - DisableUser security_disable_user.NewDisableUser - // Disable a user profile. - // - // Disable user profiles so that they are not visible in user profile searches. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // - // When you activate a user profile, its automatically enabled and visible in - // user profile searches. You can use the disable user profile API to disable a - // user profile so it’s not visible in these searches. - // To re-enable a disabled user profile, use the enable user profile API . - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html - DisableUserProfile security_disable_user_profile.NewDisableUserProfile - // Enable users. - // - // Enable users in the native realm. - // By default, when you create users, they are enabled. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html - EnableUser security_enable_user.NewEnableUser - // Enable a user profile. - // - // Enable user profiles to make them visible in user profile searches. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // - // When you activate a user profile, it's automatically enabled and visible in - // user profile searches. - // If you later disable the user profile, you can use the enable user profile - // API to make the profile visible in these searches again. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html - EnableUserProfile security_enable_user_profile.NewEnableUserProfile - // Enroll Kibana. - // - // Enable a Kibana instance to configure itself for communication with a secured - // Elasticsearch cluster. - // - // NOTE: This API is currently intended for internal use only by Kibana. - // Kibana uses this API internally to configure itself for communications with - // an Elasticsearch cluster that already has security features enabled. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html - EnrollKibana security_enroll_kibana.NewEnrollKibana - // Enroll a node. - // - // Enroll a new node to allow it to join an existing cluster with security - // features enabled. - // - // The response contains all the necessary information for the joining node to - // bootstrap discovery and security related settings so that it can successfully - // join the cluster. - // The response contains key and certificate material that allows the caller to - // generate valid signed certificates for the HTTP layer of all nodes in the - // cluster. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html - EnrollNode security_enroll_node.NewEnrollNode - // Get API key information. - // - // Retrieves information for one or more API keys. - // NOTE: If you have only the `manage_own_api_key` privilege, this API returns - // only the API keys that you own. - // If you have `read_security`, `manage_api_key` or greater privileges - // (including `manage_security`), this API returns all API keys regardless of - // ownership. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html - GetApiKey security_get_api_key.NewGetApiKey - // Get builtin privileges. - // - // Get the list of cluster privileges and index privileges that are available in - // this version of Elasticsearch. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html - GetBuiltinPrivileges security_get_builtin_privileges.NewGetBuiltinPrivileges - // Get application privileges. - // - // To use this API, you must have one of the following privileges: - // - // * The `read_security` cluster privilege (or a greater privilege such as - // `manage_security` or `all`). - // * The "Manage Application Privileges" global privilege for the application - // being referenced in the request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html - GetPrivileges security_get_privileges.NewGetPrivileges - // Get roles. - // - // Get roles in the native realm. - // The role management APIs are generally the preferred way to manage roles, - // rather than using file-based role management. - // The get roles API cannot retrieve roles that are defined in roles files. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html - GetRole security_get_role.NewGetRole - // Get role mappings. - // - // Role mappings define which roles are assigned to each user. - // The role mapping APIs are generally the preferred way to manage role mappings - // rather than using role mapping files. - // The get role mappings API cannot retrieve role mappings that are defined in - // role mapping files. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html - GetRoleMapping security_get_role_mapping.NewGetRoleMapping - // Get service accounts. - // - // Get a list of service accounts that match the provided path parameters. - // - // NOTE: Currently, only the `elastic/fleet-server` service account is - // available. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html - GetServiceAccounts security_get_service_accounts.NewGetServiceAccounts - // Get service account credentials. - // - // To use this API, you must have at least the `read_security` cluster privilege - // (or a greater privilege such as `manage_service_account` or - // `manage_security`). - // - // The response includes service account tokens that were created with the - // create service account tokens API as well as file-backed tokens from all - // nodes of the cluster. - // - // NOTE: For tokens backed by the `service_tokens` file, the API collects them - // from all nodes of the cluster. - // Tokens with the same name from different nodes are assumed to be the same - // token and are only counted once towards the total number of service tokens. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html - GetServiceCredentials security_get_service_credentials.NewGetServiceCredentials - // Get security index settings. - // - // Get the user-configurable settings for the security internal index - // (`.security` and associated indices). - // Only a subset of the index settings — those that are user-configurable—will - // be shown. - // This includes: - // - // * `index.auto_expand_replicas` - // * `index.number_of_replicas` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html - GetSettings security_get_settings.NewGetSettings - // Get a token. - // - // Create a bearer token for access without requiring basic authentication. - // The tokens are created by the Elasticsearch Token Service, which is - // automatically enabled when you configure TLS on the HTTP interface. - // Alternatively, you can explicitly enable the - // `xpack.security.authc.token.enabled` setting. - // When you are running in production mode, a bootstrap check prevents you from - // enabling the token service unless you also enable TLS on the HTTP interface. - // - // The get token API takes the same parameters as a typical OAuth 2.0 token API - // except for the use of a JSON request body. - // - // A successful get token API call returns a JSON structure that contains the - // access token, the amount of time (seconds) that the token expires in, the - // type, and the scope if available. - // - // The tokens returned by the get token API have a finite period of time for - // which they are valid and after that time period, they can no longer be used. - // That time period is defined by the `xpack.security.authc.token.timeout` - // setting. - // If you want to invalidate a token immediately, you can do so by using the - // invalidate token API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html - GetToken security_get_token.NewGetToken - // Get users. - // - // Get information about users in the native realm and built-in users. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html - GetUser security_get_user.NewGetUser - // Get user privileges. - // - // Get the security privileges for the logged in user. - // All users can use this API, but only to determine their own privileges. - // To check the privileges of other users, you must use the run as feature. - // To check whether a user has a specific list of privileges, use the has - // privileges API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html - GetUserPrivileges security_get_user_privileges.NewGetUserPrivileges - // Get a user profile. - // - // Get a user's profile using the unique profile ID. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html - GetUserProfile security_get_user_profile.NewGetUserProfile - // Grant an API key. - // - // Create an API key on behalf of another user. - // This API is similar to the create API keys API, however it creates the API - // key for a user that is different than the user that runs the API. - // The caller must have authentication credentials for the user on whose behalf - // the API key will be created. - // It is not possible to use this API to create an API key without that user's - // credentials. - // The supported user authentication credential types are: - // - // * username and password - // * Elasticsearch access tokens - // * JWTs - // - // The user, for whom the authentication credentials is provided, can optionally - // "run as" (impersonate) another user. - // In this case, the API key will be created on behalf of the impersonated user. - // - // This API is intended be used by applications that need to create and manage - // API keys for end users, but cannot guarantee that those users have permission - // to create API keys on their own behalf. - // The API keys are created by the Elasticsearch API key service, which is - // automatically enabled. - // - // A successful grant API key API call returns a JSON structure that contains - // the API key, its unique id, and its name. - // If applicable, it also returns expiration information for the API key in - // milliseconds. - // - // By default, API keys never expire. You can specify expiration information - // when you create the API keys. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html - GrantApiKey security_grant_api_key.NewGrantApiKey - // Check user privileges. - // - // Determine whether the specified user has a specified list of privileges. - // All users can use this API, but only to determine their own privileges. - // To check the privileges of other users, you must use the run as feature. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html - HasPrivileges security_has_privileges.NewHasPrivileges - // Check user profile privileges. - // - // Determine whether the users associated with the specified user profile IDs - // have all the requested privileges. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html - HasPrivilegesUserProfile security_has_privileges_user_profile.NewHasPrivilegesUserProfile - // Invalidate API keys. - // - // This API invalidates API keys created by the create API key or grant API key - // APIs. - // Invalidated API keys fail authentication, but they can still be viewed using - // the get API key information and query API key information APIs, for at least - // the configured retention period, until they are automatically deleted. - // - // To use this API, you must have at least the `manage_security`, - // `manage_api_key`, or `manage_own_api_key` cluster privileges. - // The `manage_security` privilege allows deleting any API key, including both - // REST and cross cluster API keys. - // The `manage_api_key` privilege allows deleting any REST API key, but not - // cross cluster API keys. - // The `manage_own_api_key` only allows deleting REST API keys that are owned by - // the user. - // In addition, with the `manage_own_api_key` privilege, an invalidation request - // must be issued in one of the three formats: - // - // - Set the parameter `owner=true`. - // - Or, set both `username` and `realm_name` to match the user's identity. - // - Or, if the request is issued by an API key, that is to say an API key - // invalidates itself, specify its ID in the `ids` field. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html - InvalidateApiKey security_invalidate_api_key.NewInvalidateApiKey - // Invalidate a token. - // - // The access tokens returned by the get token API have a finite period of time - // for which they are valid. - // After that time period, they can no longer be used. - // The time period is defined by the `xpack.security.authc.token.timeout` - // setting. - // - // The refresh tokens returned by the get token API are only valid for 24 hours. - // They can also be used exactly once. - // If you want to invalidate one or more access or refresh tokens immediately, - // use this invalidate token API. - // - // NOTE: While all parameters are optional, at least one of them is required. - // More specifically, either one of `token` or `refresh_token` parameters is - // required. - // If none of these two are specified, then `realm_name` and/or `username` need - // to be specified. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html - InvalidateToken security_invalidate_token.NewInvalidateToken - // Authenticate OpenID Connect. - // - // Exchange an OpenID Connect authentication response message for an - // Elasticsearch internal access token and refresh token that can be - // subsequently used for authentication. - // - // Elasticsearch exposes all the necessary OpenID Connect related functionality - // with the OpenID Connect APIs. - // These APIs are used internally by Kibana in order to provide OpenID Connect - // based authentication, but can also be used by other, custom web applications - // or other clients. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html - OidcAuthenticate security_oidc_authenticate.NewOidcAuthenticate - // Logout of OpenID Connect. - // - // Invalidate an access token and a refresh token that were generated as a - // response to the `/_security/oidc/authenticate` API. - // - // If the OpenID Connect authentication realm in Elasticsearch is accordingly - // configured, the response to this call will contain a URI pointing to the end - // session endpoint of the OpenID Connect Provider in order to perform single - // logout. - // - // Elasticsearch exposes all the necessary OpenID Connect related functionality - // with the OpenID Connect APIs. - // These APIs are used internally by Kibana in order to provide OpenID Connect - // based authentication, but can also be used by other, custom web applications - // or other clients. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html - OidcLogout security_oidc_logout.NewOidcLogout - // Prepare OpenID connect authentication. - // - // Create an oAuth 2.0 authentication request as a URL string based on the - // configuration of the OpenID Connect authentication realm in Elasticsearch. - // - // The response of this API is a URL pointing to the Authorization Endpoint of - // the configured OpenID Connect Provider, which can be used to redirect the - // browser of the user in order to continue the authentication process. - // - // Elasticsearch exposes all the necessary OpenID Connect related functionality - // with the OpenID Connect APIs. - // These APIs are used internally by Kibana in order to provide OpenID Connect - // based authentication, but can also be used by other, custom web applications - // or other clients. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html - OidcPrepareAuthentication security_oidc_prepare_authentication.NewOidcPrepareAuthentication - // Create or update application privileges. - // - // To use this API, you must have one of the following privileges: - // - // * The `manage_security` cluster privilege (or a greater privilege such as - // `all`). - // * The "Manage Application Privileges" global privilege for the application - // being referenced in the request. - // - // Application names are formed from a prefix, with an optional suffix that - // conform to the following rules: - // - // * The prefix must begin with a lowercase ASCII letter. - // * The prefix must contain only ASCII letters or digits. - // * The prefix must be at least 3 characters long. - // * If the suffix exists, it must begin with either a dash `-` or `_`. - // * The suffix cannot contain any of the following characters: `\`, `/`, `*`, - // `?`, `"`, `<`, `>`, `|`, `,`, `*`. - // * No part of the name can contain whitespace. - // - // Privilege names must begin with a lowercase ASCII letter and must contain - // only ASCII letters and digits along with the characters `_`, `-`, and `.`. - // - // Action names can contain any number of printable ASCII characters and must - // contain at least one of the following characters: `/`, `*`, `:`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html - PutPrivileges security_put_privileges.NewPutPrivileges - // Create or update roles. - // - // The role management APIs are generally the preferred way to manage roles in - // the native realm, rather than using file-based role management. - // The create or update roles API cannot update roles that are defined in roles - // files. - // File-based role management is not available in Elastic Serverless. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html - PutRole security_put_role.NewPutRole - // Create or update role mappings. - // - // Role mappings define which roles are assigned to each user. - // Each mapping has rules that identify users and a list of roles that are - // granted to those users. - // The role mapping APIs are generally the preferred way to manage role mappings - // rather than using role mapping files. The create or update role mappings API - // cannot update role mappings that are defined in role mapping files. - // - // NOTE: This API does not create roles. Rather, it maps users to existing - // roles. - // Roles can be created by using the create or update roles API or roles files. - // - // **Role templates** - // - // The most common use for role mappings is to create a mapping from a known - // value on the user to a fixed role name. - // For example, all users in the `cn=admin,dc=example,dc=com` LDAP group should - // be given the superuser role in Elasticsearch. - // The `roles` field is used for this purpose. - // - // For more complex needs, it is possible to use Mustache templates to - // dynamically determine the names of the roles that should be granted to the - // user. - // The `role_templates` field is used for this purpose. - // - // NOTE: To use role templates successfully, the relevant scripting feature must - // be enabled. - // Otherwise, all attempts to create a role mapping with role templates fail. - // - // All of the user fields that are available in the role mapping rules are also - // available in the role templates. - // Thus it is possible to assign a user to a role that reflects their username, - // their groups, or the name of the realm to which they authenticated. - // - // By default a template is evaluated to produce a single string that is the - // name of the role which should be assigned to the user. - // If the format of the template is set to "json" then the template is expected - // to produce a JSON string or an array of JSON strings for the role names. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html - PutRoleMapping security_put_role_mapping.NewPutRoleMapping - // Create or update users. - // - // Add and update users in the native realm. - // A password is required for adding a new user but is optional when updating an - // existing user. - // To change a user's password without updating any other fields, use the change - // password API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html - PutUser security_put_user.NewPutUser - // Find API keys with a query. - // - // Get a paginated list of API keys and their information. - // You can optionally filter the results with a query. - // - // To use this API, you must have at least the `manage_own_api_key` or the - // `read_security` cluster privileges. - // If you have only the `manage_own_api_key` privilege, this API returns only - // the API keys that you own. - // If you have the `read_security`, `manage_api_key`, or greater privileges - // (including `manage_security`), this API returns all API keys regardless of - // ownership. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html - QueryApiKeys security_query_api_keys.NewQueryApiKeys - // Find roles with a query. - // - // Get roles in a paginated manner. - // The role management APIs are generally the preferred way to manage roles, - // rather than using file-based role management. - // The query roles API does not retrieve roles that are defined in roles files, - // nor built-in ones. - // You can optionally filter the results with a query. - // Also, the results can be paginated and sorted. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html - QueryRole security_query_role.NewQueryRole - // Find users with a query. - // - // Get information for users in a paginated manner. - // You can optionally filter the results with a query. - // - // NOTE: As opposed to the get user API, built-in users are excluded from the - // result. - // This API is only for native users. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html - QueryUser security_query_user.NewQueryUser - // Authenticate SAML. - // - // Submit a SAML response message to Elasticsearch for consumption. - // - // NOTE: This API is intended for use by custom web applications other than - // Kibana. - // If you are using Kibana, refer to the documentation for configuring SAML - // single-sign-on on the Elastic Stack. - // - // The SAML message that is submitted can be: - // - // * A response to a SAML authentication request that was previously created - // using the SAML prepare authentication API. - // * An unsolicited SAML message in the case of an IdP-initiated single sign-on - // (SSO) flow. - // - // In either case, the SAML message needs to be a base64 encoded XML document - // with a root element of ``. - // - // After successful validation, Elasticsearch responds with an Elasticsearch - // internal access token and refresh token that can be subsequently used for - // authentication. - // This API endpoint essentially exchanges SAML responses that indicate - // successful authentication in the IdP for Elasticsearch access and refresh - // tokens, which can be used for authentication against Elasticsearch. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html - SamlAuthenticate security_saml_authenticate.NewSamlAuthenticate - // Logout of SAML completely. - // - // Verifies the logout response sent from the SAML IdP. - // - // NOTE: This API is intended for use by custom web applications other than - // Kibana. - // If you are using Kibana, refer to the documentation for configuring SAML - // single-sign-on on the Elastic Stack. - // - // The SAML IdP may send a logout response back to the SP after handling the - // SP-initiated SAML Single Logout. - // This API verifies the response by ensuring the content is relevant and - // validating its signature. - // An empty response is returned if the verification process is successful. - // The response can be sent by the IdP with either the HTTP-Redirect or the - // HTTP-Post binding. - // The caller of this API must prepare the request accordingly so that this API - // can handle either of them. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html - SamlCompleteLogout security_saml_complete_logout.NewSamlCompleteLogout - // Invalidate SAML. - // - // Submit a SAML LogoutRequest message to Elasticsearch for consumption. - // - // NOTE: This API is intended for use by custom web applications other than - // Kibana. - // If you are using Kibana, refer to the documentation for configuring SAML - // single-sign-on on the Elastic Stack. - // - // The logout request comes from the SAML IdP during an IdP initiated Single - // Logout. - // The custom web application can use this API to have Elasticsearch process the - // `LogoutRequest`. - // After successful validation of the request, Elasticsearch invalidates the - // access token and refresh token that corresponds to that specific SAML - // principal and provides a URL that contains a SAML LogoutResponse message. - // Thus the user can be redirected back to their IdP. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html - SamlInvalidate security_saml_invalidate.NewSamlInvalidate - // Logout of SAML. - // - // Submits a request to invalidate an access token and refresh token. - // - // NOTE: This API is intended for use by custom web applications other than - // Kibana. - // If you are using Kibana, refer to the documentation for configuring SAML - // single-sign-on on the Elastic Stack. - // - // This API invalidates the tokens that were generated for a user by the SAML - // authenticate API. - // If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP - // supports this, the Elasticsearch response contains a URL to redirect the user - // to the IdP that contains a SAML logout request (starting an SP-initiated SAML - // Single Logout). - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html - SamlLogout security_saml_logout.NewSamlLogout - // Prepare SAML authentication. - // - // Create a SAML authentication request (``) as a URL string based - // on the configuration of the respective SAML realm in Elasticsearch. - // - // NOTE: This API is intended for use by custom web applications other than - // Kibana. - // If you are using Kibana, refer to the documentation for configuring SAML - // single-sign-on on the Elastic Stack. - // - // This API returns a URL pointing to the SAML Identity Provider. - // You can use the URL to redirect the browser of the user in order to continue - // the authentication process. - // The URL includes a single parameter named `SAMLRequest`, which contains a - // SAML Authentication request that is deflated and Base64 encoded. - // If the configuration dictates that SAML authentication requests should be - // signed, the URL has two extra parameters named `SigAlg` and `Signature`. - // These parameters contain the algorithm used for the signature and the - // signature value itself. - // It also returns a random string that uniquely identifies this SAML - // Authentication request. - // The caller of this API needs to store this identifier as it needs to be used - // in a following step of the authentication process. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html - SamlPrepareAuthentication security_saml_prepare_authentication.NewSamlPrepareAuthentication - // Create SAML service provider metadata. - // - // Generate SAML metadata for a SAML 2.0 Service Provider. - // - // The SAML 2.0 specification provides a mechanism for Service Providers to - // describe their capabilities and configuration using a metadata file. - // This API generates Service Provider metadata based on the configuration of a - // SAML realm in Elasticsearch. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html + ActivateUserProfile security_activate_user_profile.NewActivateUserProfile + Authenticate security_authenticate.NewAuthenticate + BulkDeleteRole security_bulk_delete_role.NewBulkDeleteRole + BulkPutRole security_bulk_put_role.NewBulkPutRole + BulkUpdateApiKeys security_bulk_update_api_keys.NewBulkUpdateApiKeys + ChangePassword security_change_password.NewChangePassword + ClearApiKeyCache security_clear_api_key_cache.NewClearApiKeyCache + ClearCachedPrivileges security_clear_cached_privileges.NewClearCachedPrivileges + ClearCachedRealms security_clear_cached_realms.NewClearCachedRealms + ClearCachedRoles security_clear_cached_roles.NewClearCachedRoles + ClearCachedServiceTokens security_clear_cached_service_tokens.NewClearCachedServiceTokens + CreateApiKey security_create_api_key.NewCreateApiKey + CreateCrossClusterApiKey security_create_cross_cluster_api_key.NewCreateCrossClusterApiKey + CreateServiceToken security_create_service_token.NewCreateServiceToken + DelegatePki security_delegate_pki.NewDelegatePki + DeletePrivileges security_delete_privileges.NewDeletePrivileges + DeleteRole security_delete_role.NewDeleteRole + DeleteRoleMapping security_delete_role_mapping.NewDeleteRoleMapping + DeleteServiceToken security_delete_service_token.NewDeleteServiceToken + DeleteUser security_delete_user.NewDeleteUser + DisableUser security_disable_user.NewDisableUser + DisableUserProfile security_disable_user_profile.NewDisableUserProfile + EnableUser security_enable_user.NewEnableUser + EnableUserProfile security_enable_user_profile.NewEnableUserProfile + EnrollKibana security_enroll_kibana.NewEnrollKibana + EnrollNode security_enroll_node.NewEnrollNode + GetApiKey security_get_api_key.NewGetApiKey + GetBuiltinPrivileges security_get_builtin_privileges.NewGetBuiltinPrivileges + GetPrivileges security_get_privileges.NewGetPrivileges + GetRole security_get_role.NewGetRole + GetRoleMapping security_get_role_mapping.NewGetRoleMapping + GetServiceAccounts security_get_service_accounts.NewGetServiceAccounts + GetServiceCredentials security_get_service_credentials.NewGetServiceCredentials + GetSettings security_get_settings.NewGetSettings + GetToken security_get_token.NewGetToken + GetUser security_get_user.NewGetUser + GetUserPrivileges security_get_user_privileges.NewGetUserPrivileges + GetUserProfile security_get_user_profile.NewGetUserProfile + GrantApiKey security_grant_api_key.NewGrantApiKey + HasPrivileges security_has_privileges.NewHasPrivileges + HasPrivilegesUserProfile security_has_privileges_user_profile.NewHasPrivilegesUserProfile + InvalidateApiKey security_invalidate_api_key.NewInvalidateApiKey + InvalidateToken security_invalidate_token.NewInvalidateToken + OidcAuthenticate security_oidc_authenticate.NewOidcAuthenticate + OidcLogout security_oidc_logout.NewOidcLogout + OidcPrepareAuthentication security_oidc_prepare_authentication.NewOidcPrepareAuthentication + PutPrivileges security_put_privileges.NewPutPrivileges + PutRole security_put_role.NewPutRole + PutRoleMapping security_put_role_mapping.NewPutRoleMapping + PutUser security_put_user.NewPutUser + QueryApiKeys security_query_api_keys.NewQueryApiKeys + QueryRole security_query_role.NewQueryRole + QueryUser security_query_user.NewQueryUser + SamlAuthenticate security_saml_authenticate.NewSamlAuthenticate + SamlCompleteLogout security_saml_complete_logout.NewSamlCompleteLogout + SamlInvalidate security_saml_invalidate.NewSamlInvalidate + SamlLogout security_saml_logout.NewSamlLogout + SamlPrepareAuthentication security_saml_prepare_authentication.NewSamlPrepareAuthentication SamlServiceProviderMetadata security_saml_service_provider_metadata.NewSamlServiceProviderMetadata - // Suggest a user profile. - // - // Get suggestions for user profiles that match specified search criteria. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html - SuggestUserProfiles security_suggest_user_profiles.NewSuggestUserProfiles - // Update an API key. - // - // Update attributes of an existing API key. - // This API supports updates to an API key's access scope, expiration, and - // metadata. - // - // To use this API, you must have at least the `manage_own_api_key` cluster - // privilege. - // Users can only update API keys that they created or that were granted to - // them. - // To update another user’s API key, use the `run_as` feature to submit a - // request on behalf of another user. - // - // IMPORTANT: It's not possible to use an API key as the authentication - // credential for this API. The owner user’s credentials are required. - // - // Use this API to update API keys created by the create API key or grant API - // Key APIs. - // If you need to apply the same update to many API keys, you can use the bulk - // update API keys API to reduce overhead. - // It's not possible to update expired API keys or API keys that have been - // invalidated by the invalidate API key API. - // - // The access scope of an API key is derived from the `role_descriptors` you - // specify in the request and a snapshot of the owner user's permissions at the - // time of the request. - // The snapshot of the owner's permissions is updated automatically on every - // call. - // - // IMPORTANT: If you don't specify `role_descriptors` in the request, a call to - // this API might still change the API key's access scope. - // This change can occur if the owner user's permissions have changed since the - // API key was created or last modified. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html - UpdateApiKey security_update_api_key.NewUpdateApiKey - // Update a cross-cluster API key. - // - // Update the attributes of an existing cross-cluster API key, which is used for - // API key based remote cluster access. - // - // To use this API, you must have at least the `manage_security` cluster - // privilege. - // Users can only update API keys that they created. - // To update another user's API key, use the `run_as` feature to submit a - // request on behalf of another user. - // - // IMPORTANT: It's not possible to use an API key as the authentication - // credential for this API. - // To update an API key, the owner user's credentials are required. - // - // It's not possible to update expired API keys, or API keys that have been - // invalidated by the invalidate API key API. - // - // This API supports updates to an API key's access scope, metadata, and - // expiration. - // The owner user's information, such as the `username` and `realm`, is also - // updated automatically on every call. - // - // NOTE: This API cannot update REST API keys, which should be updated by either - // the update API key or bulk update API keys API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html - UpdateCrossClusterApiKey security_update_cross_cluster_api_key.NewUpdateCrossClusterApiKey - // Update security index settings. - // - // Update the user-configurable settings for the security internal index - // (`.security` and associated indices). Only a subset of settings are allowed - // to be modified. This includes `index.auto_expand_replicas` and - // `index.number_of_replicas`. - // - // NOTE: If `index.auto_expand_replicas` is set, `index.number_of_replicas` will - // be ignored during updates. - // - // If a specific index is not in use on the system and settings are provided for - // it, the request will be rejected. - // This API does not yet support configuring the settings for indices before - // they are in use. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html - UpdateSettings security_update_settings.NewUpdateSettings - // Update user profile data. - // - // Update specific data for the user profile that is associated with a unique - // ID. - // - // NOTE: The user profile feature is designed only for use by Kibana and - // Elastic's Observability, Enterprise Search, and Elastic Security solutions. - // Individual users and external applications should not call this API directly. - // Elastic reserves the right to change or remove this feature in future - // releases without prior notice. - // - // To use this API, you must have one of the following privileges: - // - // * The `manage_user_profile` cluster privilege. - // * The `update_profile_data` global privilege for the namespaces that are - // referenced in the request. - // - // This API updates the `labels` and `data` fields of an existing user profile - // document with JSON objects. - // New keys and their values are added to the profile document and conflicting - // keys are replaced by data that's included in the request. - // - // For both labels and data, content is namespaced by the top-level fields. - // The `update_profile_data` global privilege grants privileges for updating - // only the allowed namespaces. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html - UpdateUserProfileData security_update_user_profile_data.NewUpdateUserProfileData + SuggestUserProfiles security_suggest_user_profiles.NewSuggestUserProfiles + UpdateApiKey security_update_api_key.NewUpdateApiKey + UpdateCrossClusterApiKey security_update_cross_cluster_api_key.NewUpdateCrossClusterApiKey + UpdateSettings security_update_settings.NewUpdateSettings + UpdateUserProfileData security_update_user_profile_data.NewUpdateUserProfileData } type Shutdown struct { - // Cancel node shutdown preparations. - // Remove a node from the shutdown list so it can resume normal operations. - // You must explicitly clear the shutdown request when a node rejoins the - // cluster or when a node has permanently left the cluster. - // Shutdown requests are never removed automatically by Elasticsearch. - // - // NOTE: This feature is designed for indirect use by Elastic Cloud, Elastic - // Cloud Enterprise, and Elastic Cloud on Kubernetes. - // Direct use is not supported. - // - // If the operator privileges feature is enabled, you must be an operator to use - // this API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-shutdown.html DeleteNode shutdown_delete_node.NewDeleteNode - // Get the shutdown status. - // - // Get information about nodes that are ready to be shut down, have shut down - // preparations still in progress, or have stalled. - // The API returns status information for each part of the shut down process. - // - // NOTE: This feature is designed for indirect use by Elasticsearch Service, - // Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not - // supported. - // - // If the operator privileges feature is enabled, you must be an operator to use - // this API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-shutdown.html - GetNode shutdown_get_node.NewGetNode - // Prepare a node to be shut down. - // - // NOTE: This feature is designed for indirect use by Elastic Cloud, Elastic - // Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not - // supported. - // - // If you specify a node that is offline, it will be prepared for shut down when - // it rejoins the cluster. - // - // If the operator privileges feature is enabled, you must be an operator to use - // this API. - // - // The API migrates ongoing tasks and index shards to other nodes as needed to - // prepare a node to be restarted or shut down and removed from the cluster. - // This ensures that Elasticsearch can be stopped safely with minimal disruption - // to the cluster. - // - // You must specify the type of shutdown: `restart`, `remove`, or `replace`. - // If a node is already being prepared for shutdown, you can use this API to - // change the shutdown type. - // - // IMPORTANT: This API does NOT terminate the Elasticsearch process. - // Monitor the node shutdown status to determine when it is safe to stop - // Elasticsearch. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-shutdown.html - PutNode shutdown_put_node.NewPutNode + GetNode shutdown_get_node.NewGetNode + PutNode shutdown_put_node.NewPutNode } type Simulate struct { - // Simulate data ingestion. - // Run ingest pipelines against a set of provided documents, optionally with - // substitute pipeline definitions, to simulate ingesting data into an index. - // - // This API is meant to be used for troubleshooting or pipeline development, as - // it does not actually index any data into Elasticsearch. - // - // The API runs the default and final pipeline for that index against a set of - // documents provided in the body of the request. - // If a pipeline contains a reroute processor, it follows that reroute processor - // to the new index, running that index's pipelines as well the same way that a - // non-simulated ingest would. - // No data is indexed into Elasticsearch. - // Instead, the transformed document is returned, along with the list of - // pipelines that have been run and the name of the index where the document - // would have been indexed if this were not a simulation. - // The transformed document is validated against the mappings that would apply - // to this index, and any validation error is reported in the result. - // - // This API differs from the simulate pipeline API in that you specify a single - // pipeline for that API, and it runs only that one pipeline. - // The simulate pipeline API is more useful for developing a single pipeline, - // while the simulate ingest API is more useful for troubleshooting the - // interaction of the various pipelines that get applied when ingesting into an - // index. - // - // By default, the pipeline definitions that are currently in the system are - // used. - // However, you can supply substitute pipeline definitions in the body of the - // request. - // These will be used in place of the pipeline definitions that are already in - // the system. This can be used to replace existing pipeline definitions or to - // create new ones. The pipeline substitutions are used only within this - // request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-ingest-api.html Ingest simulate_ingest.NewIngest } type Slm struct { - // Delete a policy. - // Delete a snapshot lifecycle policy definition. - // This operation prevents any future snapshots from being taken but does not - // cancel in-progress snapshots or remove previously-taken snapshots. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html - DeleteLifecycle slm_delete_lifecycle.NewDeleteLifecycle - // Run a policy. - // Immediately create a snapshot according to the snapshot lifecycle policy - // without waiting for the scheduled time. - // The snapshot policy is normally applied according to its schedule, but you - // might want to manually run a policy before performing an upgrade or other - // maintenance. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html + DeleteLifecycle slm_delete_lifecycle.NewDeleteLifecycle ExecuteLifecycle slm_execute_lifecycle.NewExecuteLifecycle - // Run a retention policy. - // Manually apply the retention policy to force immediate removal of snapshots - // that are expired according to the snapshot lifecycle policy retention rules. - // The retention policy is normally applied according to its schedule. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html ExecuteRetention slm_execute_retention.NewExecuteRetention - // Get policy information. - // Get snapshot lifecycle policy definitions and information about the latest - // snapshot attempts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html - GetLifecycle slm_get_lifecycle.NewGetLifecycle - // Get snapshot lifecycle management statistics. - // Get global and policy-level statistics about actions taken by snapshot - // lifecycle management. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html - GetStats slm_get_stats.NewGetStats - // Get the snapshot lifecycle management status. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html - GetStatus slm_get_status.NewGetStatus - // Create or update a policy. - // Create or update a snapshot lifecycle policy. - // If the policy already exists, this request increments the policy version. - // Only the latest version of a policy is stored. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html - PutLifecycle slm_put_lifecycle.NewPutLifecycle - // Start snapshot lifecycle management. - // Snapshot lifecycle management (SLM) starts automatically when a cluster is - // formed. - // Manually starting SLM is necessary only if it has been stopped using the stop - // SLM API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html - Start slm_start.NewStart - // Stop snapshot lifecycle management. - // Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. - // This API is useful when you are performing maintenance on a cluster and need - // to prevent SLM from performing any actions on your data streams or indices. - // Stopping SLM does not stop any snapshots that are in progress. - // You can manually trigger snapshots with the run snapshot lifecycle policy API - // even if SLM is stopped. - // - // The API returns a response as soon as the request is acknowledged, but the - // plugin might continue to run until in-progress operations complete and it can - // be safely stopped. - // Use the get snapshot lifecycle management status API to see if SLM is - // running. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html - Stop slm_stop.NewStop + GetLifecycle slm_get_lifecycle.NewGetLifecycle + GetStats slm_get_stats.NewGetStats + GetStatus slm_get_status.NewGetStatus + PutLifecycle slm_put_lifecycle.NewPutLifecycle + Start slm_start.NewStart + Stop slm_stop.NewStop } type Snapshot struct { - // Clean up the snapshot repository. - // Trigger the review of the contents of a snapshot repository and delete any - // stale data not referenced by existing snapshots. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html - CleanupRepository snapshot_cleanup_repository.NewCleanupRepository - // Clone a snapshot. - // Clone part of all of a snapshot into another snapshot in the same repository. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clone-snapshot-api.html - Clone snapshot_clone.NewClone - // Create a snapshot. - // Take a snapshot of a cluster or of data streams and indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-snapshot-api.html - Create snapshot_create.NewCreate - // Create or update a snapshot repository. - // IMPORTANT: If you are migrating searchable snapshots, the repository name - // must be identical in the source and destination clusters. - // To register a snapshot repository, the cluster's global metadata must be - // writeable. - // Ensure there are no cluster blocks (for example, `cluster.blocks.read_only` - // and `clsuter.blocks.read_only_allow_delete` settings) that prevent write - // access. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html - CreateRepository snapshot_create_repository.NewCreateRepository - // Delete snapshots. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-snapshot-api.html - Delete snapshot_delete.NewDelete - // Delete snapshot repositories. - // When a repository is unregistered, Elasticsearch removes only the reference - // to the location where the repository is storing the snapshots. - // The snapshots themselves are left untouched and in place. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-snapshot-repo-api.html - DeleteRepository snapshot_delete_repository.NewDeleteRepository - // Get snapshot information. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-snapshot-api.html - Get snapshot_get.NewGet - // Get snapshot repository information. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-snapshot-repo-api.html - GetRepository snapshot_get_repository.NewGetRepository - // Analyze a snapshot repository. - // Analyze the performance characteristics and any incorrect behaviour found in - // a repository. - // - // The response exposes implementation details of the analysis which may change - // from version to version. - // The response body format is therefore not considered stable and may be - // different in newer versions. - // - // There are a large number of third-party storage systems available, not all of - // which are suitable for use as a snapshot repository by Elasticsearch. - // Some storage systems behave incorrectly, or perform poorly, especially when - // accessed concurrently by multiple clients as the nodes of an Elasticsearch - // cluster do. This API performs a collection of read and write operations on - // your repository which are designed to detect incorrect behaviour and to - // measure the performance characteristics of your storage system. - // - // The default values for the parameters are deliberately low to reduce the - // impact of running an analysis inadvertently and to provide a sensible - // starting point for your investigations. - // Run your first analysis with the default parameter values to check for simple - // problems. - // If successful, run a sequence of increasingly large analyses until you - // encounter a failure or you reach a `blob_count` of at least `2000`, a - // `max_blob_size` of at least `2gb`, a `max_total_data_size` of at least `1tb`, - // and a `register_operation_count` of at least `100`. - // Always specify a generous timeout, possibly `1h` or longer, to allow time for - // each analysis to run to completion. - // Perform the analyses using a multi-node cluster of a similar size to your - // production cluster so that it can detect any problems that only arise when - // the repository is accessed by many nodes at once. - // - // If the analysis fails, Elasticsearch detected that your repository behaved - // unexpectedly. - // This usually means you are using a third-party storage system with an - // incorrect or incompatible implementation of the API it claims to support. - // If so, this storage system is not suitable for use as a snapshot repository. - // You will need to work with the supplier of your storage system to address the - // incompatibilities that Elasticsearch detects. - // - // If the analysis is successful, the API returns details of the testing - // process, optionally including how long each operation took. - // You can use this information to determine the performance of your storage - // system. - // If any operation fails or returns an incorrect result, the API returns an - // error. - // If the API returns an error, it may not have removed all the data it wrote to - // the repository. - // The error will indicate the location of any leftover data and this path is - // also recorded in the Elasticsearch logs. - // You should verify that this location has been cleaned up correctly. - // If there is still leftover data at the specified location, you should - // manually remove it. - // - // If the connection from your client to Elasticsearch is closed while the - // client is waiting for the result of the analysis, the test is cancelled. - // Some clients are configured to close their connection if no response is - // received within a certain timeout. - // An analysis takes a long time to complete so you might need to relax any such - // client-side timeouts. - // On cancellation the analysis attempts to clean up the data it was writing, - // but it may not be able to remove it all. - // The path to the leftover data is recorded in the Elasticsearch logs. - // You should verify that this location has been cleaned up correctly. - // If there is still leftover data at the specified location, you should - // manually remove it. - // - // If the analysis is successful then it detected no incorrect behaviour, but - // this does not mean that correct behaviour is guaranteed. - // The analysis attempts to detect common bugs but it does not offer 100% - // coverage. - // Additionally, it does not test the following: - // - // * Your repository must perform durable writes. Once a blob has been written - // it must remain in place until it is deleted, even after a power loss or - // similar disaster. - // * Your repository must not suffer from silent data corruption. Once a blob - // has been written, its contents must remain unchanged until it is deliberately - // modified or deleted. - // * Your repository must behave correctly even if connectivity from the cluster - // is disrupted. Reads and writes may fail in this case, but they must not - // return incorrect results. - // - // IMPORTANT: An analysis writes a substantial amount of data to your repository - // and then reads it back again. - // This consumes bandwidth on the network between the cluster and the - // repository, and storage space and I/O bandwidth on the repository itself. - // You must ensure this load does not affect other users of these systems. - // Analyses respect the repository settings `max_snapshot_bytes_per_sec` and - // `max_restore_bytes_per_sec` if available and the cluster setting - // `indices.recovery.max_bytes_per_sec` which you can use to limit the bandwidth - // they consume. - // - // NOTE: This API is intended for exploratory use by humans. You should expect - // the request parameters and the response format to vary in future versions. - // - // NOTE: Different versions of Elasticsearch may perform different checks for - // repository compatibility, with newer versions typically being stricter than - // older ones. - // A storage system that passes repository analysis with one version of - // Elasticsearch may fail with a different version. - // This indicates it behaves incorrectly in ways that the former version did not - // detect. - // You must work with the supplier of your storage system to address the - // incompatibilities detected by the repository analysis API in any version of - // Elasticsearch. - // - // NOTE: This API may not work correctly in a mixed-version cluster. - // - // *Implementation details* - // - // NOTE: This section of documentation describes how the repository analysis API - // works in this version of Elasticsearch, but you should expect the - // implementation to vary between versions. The request parameters and response - // format depend on details of the implementation so may also be different in - // newer versions. - // - // The analysis comprises a number of blob-level tasks, as set by the - // `blob_count` parameter and a number of compare-and-exchange operations on - // linearizable registers, as set by the `register_operation_count` parameter. - // These tasks are distributed over the data and master-eligible nodes in the - // cluster for execution. - // - // For most blob-level tasks, the executing node first writes a blob to the - // repository and then instructs some of the other nodes in the cluster to - // attempt to read the data it just wrote. - // The size of the blob is chosen randomly, according to the `max_blob_size` and - // `max_total_data_size` parameters. - // If any of these reads fails then the repository does not implement the - // necessary read-after-write semantics that Elasticsearch requires. - // - // For some blob-level tasks, the executing node will instruct some of its peers - // to attempt to read the data before the writing process completes. - // These reads are permitted to fail, but must not return partial data. - // If any read returns partial data then the repository does not implement the - // necessary atomicity semantics that Elasticsearch requires. - // - // For some blob-level tasks, the executing node will overwrite the blob while - // its peers are reading it. - // In this case the data read may come from either the original or the - // overwritten blob, but the read operation must not return partial data or a - // mix of data from the two blobs. - // If any of these reads returns partial data or a mix of the two blobs then the - // repository does not implement the necessary atomicity semantics that - // Elasticsearch requires for overwrites. - // - // The executing node will use a variety of different methods to write the blob. - // For instance, where applicable, it will use both single-part and multi-part - // uploads. - // Similarly, the reading nodes will use a variety of different methods to read - // the data back again. - // For instance they may read the entire blob from start to end or may read only - // a subset of the data. - // - // For some blob-level tasks, the executing node will cancel the write before it - // is complete. - // In this case, it still instructs some of the other nodes in the cluster to - // attempt to read the blob but all of these reads must fail to find the blob. - // - // Linearizable registers are special blobs that Elasticsearch manipulates using - // an atomic compare-and-exchange operation. - // This operation ensures correct and strongly-consistent behavior even when the - // blob is accessed by multiple nodes at the same time. - // The detailed implementation of the compare-and-exchange operation on - // linearizable registers varies by repository type. - // Repository analysis verifies that that uncontended compare-and-exchange - // operations on a linearizable register blob always succeed. - // Repository analysis also verifies that contended operations either succeed or - // report the contention but do not return incorrect results. - // If an operation fails due to contention, Elasticsearch retries the operation - // until it succeeds. - // Most of the compare-and-exchange operations performed by repository analysis - // atomically increment a counter which is represented as an 8-byte blob. - // Some operations also verify the behavior on small blobs with sizes other than - // 8 bytes. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/repo-analysis-api.html - RepositoryAnalyze snapshot_repository_analyze.NewRepositoryAnalyze - // Verify the repository integrity. - // Verify the integrity of the contents of a snapshot repository. - // - // This API enables you to perform a comprehensive check of the contents of a - // repository, looking for any anomalies in its data or metadata which might - // prevent you from restoring snapshots from the repository or which might cause - // future snapshot create or delete operations to fail. - // - // If you suspect the integrity of the contents of one of your snapshot - // repositories, cease all write activity to this repository immediately, set - // its `read_only` option to `true`, and use this API to verify its integrity. - // Until you do so: - // - // * It may not be possible to restore some snapshots from this repository. - // * Searchable snapshots may report errors when searched or may have unassigned - // shards. - // * Taking snapshots into this repository may fail or may appear to succeed but - // have created a snapshot which cannot be restored. - // * Deleting snapshots from this repository may fail or may appear to succeed - // but leave the underlying data on disk. - // * Continuing to write to the repository while it is in an invalid state may - // causing additional damage to its contents. - // - // If the API finds any problems with the integrity of the contents of your - // repository, Elasticsearch will not be able to repair the damage. - // The only way to bring the repository back into a fully working state after - // its contents have been damaged is by restoring its contents from a repository - // backup which was taken before the damage occurred. - // You must also identify what caused the damage and take action to prevent it - // from happening again. - // - // If you cannot restore a repository backup, register a new repository and use - // this for all future snapshot operations. - // In some cases it may be possible to recover some of the contents of a damaged - // repository, either by restoring as many of its snapshots as needed and taking - // new snapshots of the restored data, or by using the reindex API to copy data - // from any searchable snapshots mounted from the damaged repository. - // - // Avoid all operations which write to the repository while the verify - // repository integrity API is running. - // If something changes the repository contents while an integrity verification - // is running then Elasticsearch may incorrectly report having detected some - // anomalies in its contents due to the concurrent writes. - // It may also incorrectly fail to report some anomalies that the concurrent - // writes prevented it from detecting. - // - // NOTE: This API is intended for exploratory use by humans. You should expect - // the request parameters and the response format to vary in future versions. - // - // NOTE: This API may not work correctly in a mixed-version cluster. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/verify-repo-integrity-api.html + CleanupRepository snapshot_cleanup_repository.NewCleanupRepository + Clone snapshot_clone.NewClone + Create snapshot_create.NewCreate + CreateRepository snapshot_create_repository.NewCreateRepository + Delete snapshot_delete.NewDelete + DeleteRepository snapshot_delete_repository.NewDeleteRepository + Get snapshot_get.NewGet + GetRepository snapshot_get_repository.NewGetRepository + RepositoryAnalyze snapshot_repository_analyze.NewRepositoryAnalyze RepositoryVerifyIntegrity snapshot_repository_verify_integrity.NewRepositoryVerifyIntegrity - // Restore a snapshot. - // Restore a snapshot of a cluster or data streams and indices. - // - // You can restore a snapshot only to a running cluster with an elected master - // node. - // The snapshot repository must be registered and available to the cluster. - // The snapshot and cluster versions must be compatible. - // - // To restore a snapshot, the cluster's global metadata must be writable. Ensure - // there are't any cluster blocks that prevent writes. The restore operation - // ignores index blocks. - // - // Before you restore a data stream, ensure the cluster contains a matching - // index template with data streams enabled. To check, use the index management - // feature in Kibana or the get index template API: - // - // ``` - // GET - // _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream - // ``` - // - // If no such template exists, you can create one or restore a cluster state - // that contains one. Without a matching index template, a data stream can't - // roll over or create backing indices. - // - // If your snapshot contains data from App Search or Workplace Search, you must - // restore the Enterprise Search encryption key before you restore the snapshot. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/restore-snapshot-api.html - Restore snapshot_restore.NewRestore - // Get the snapshot status. - // Get a detailed description of the current state for each shard participating - // in the snapshot. - // Note that this API should be used only to obtain detailed shard-level - // information for ongoing snapshots. - // If this detail is not needed or you want to obtain information about one or - // more existing snapshots, use the get snapshot API. - // - // WARNING: Using the API to return the status of any snapshots other than - // currently running snapshots can be expensive. - // The API requires a read from the repository for each shard in each snapshot. - // For example, if you have 100 snapshots with 1,000 shards each, an API request - // that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 - // shards). - // - // Depending on the latency of your storage, such requests can take an extremely - // long time to return results. - // These requests can also tax machine resources and, when using cloud storage, - // incur high processing costs. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-snapshot-status-api.html - Status snapshot_status.NewStatus - // Verify a snapshot repository. - // Check for common misconfigurations in a snapshot repository. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/verify-snapshot-repo-api.html - VerifyRepository snapshot_verify_repository.NewVerifyRepository + Restore snapshot_restore.NewRestore + Status snapshot_status.NewStatus + VerifyRepository snapshot_verify_repository.NewVerifyRepository } type Sql struct { - // Clear an SQL search cursor. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html - ClearCursor sql_clear_cursor.NewClearCursor - // Delete an async SQL search. - // Delete an async SQL search or a stored synchronous SQL search. - // If the search is still running, the API cancels it. - // - // If the Elasticsearch security features are enabled, only the following users - // can use this API to delete a search: - // - // * Users with the `cancel_task` cluster privilege. - // * The user who first submitted the search. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html - DeleteAsync sql_delete_async.NewDeleteAsync - // Get async SQL search results. - // Get the current status and available results for an async SQL search or - // stored synchronous SQL search. - // - // If the Elasticsearch security features are enabled, only the user who first - // submitted the SQL search can retrieve the search using this API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html - GetAsync sql_get_async.NewGetAsync - // Get the async SQL search status. - // Get the current status of an async SQL search or a stored synchronous SQL - // search. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html + ClearCursor sql_clear_cursor.NewClearCursor + DeleteAsync sql_delete_async.NewDeleteAsync + GetAsync sql_get_async.NewGetAsync GetAsyncStatus sql_get_async_status.NewGetAsyncStatus - // Get SQL search results. - // Run an SQL request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html - Query sql_query.NewQuery - // Translate SQL into Elasticsearch queries. - // Translate an SQL search into a search API request containing Query DSL. - // It accepts the same request body parameters as the SQL search API, excluding - // `cursor`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html - Translate sql_translate.NewTranslate + Query sql_query.NewQuery + Translate sql_translate.NewTranslate } type Ssl struct { - // Get SSL certificates. - // - // Get information about the X.509 certificates that are used to encrypt - // communications in the cluster. - // The API returns a list that includes certificates from all TLS contexts - // including: - // - // - Settings for transport and HTTP interfaces - // - TLS settings that are used within authentication realms - // - TLS settings for remote monitoring exporters - // - // The list includes certificates that are used for configuring trust, such as - // those configured in the `xpack.security.transport.ssl.truststore` and - // `xpack.security.transport.ssl.certificate_authorities` settings. - // It also includes certificates that are used for configuring server identity, - // such as `xpack.security.http.ssl.keystore` and - // `xpack.security.http.ssl.certificate settings`. - // - // The list does not include certificates that are sourced from the default SSL - // context of the Java Runtime Environment (JRE), even if those certificates are - // in use within Elasticsearch. - // - // NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the - // API returns all the certificates that are included in the PKCS#11 token - // irrespective of whether these are used in the Elasticsearch TLS - // configuration. - // - // If Elasticsearch is configured to use a keystore or truststore, the API - // output includes all certificates in that store, even though some of the - // certificates might not be in active use within the cluster. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html Certificates ssl_certificates.NewCertificates } +type Streams struct { + LogsDisable streams_logs_disable.NewLogsDisable + LogsEnable streams_logs_enable.NewLogsEnable + Status streams_status.NewStatus +} + type Synonyms struct { - // Delete a synonym set. - // - // You can only delete a synonyms set that is not in use by any index analyzer. - // - // Synonyms sets can be used in synonym graph token filters and synonym token - // filters. - // These synonym filters can be used as part of search analyzers. - // - // Analyzers need to be loaded when an index is restored (such as when a node - // starts, or the index becomes open). - // Even if the analyzer is not used on any field mapping, it still needs to be - // loaded on the index recovery phase. - // - // If any analyzers cannot be loaded, the index becomes unavailable and the - // cluster status becomes red or yellow as index shards are not available. - // To prevent that, synonyms sets that are used in analyzers can't be deleted. - // A delete request in this case will return a 400 response code. - // - // To remove a synonyms set, you must first remove all indices that contain - // analyzers using it. - // You can migrate an index by creating a new index that does not contain the - // token filter with the synonyms set, and use the reindex API in order to copy - // over the index data. - // Once finished, you can delete the index. - // When the synonyms set is not used in analyzers, you will be able to delete - // it. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms-set.html - DeleteSynonym synonyms_delete_synonym.NewDeleteSynonym - // Delete a synonym rule. - // Delete a synonym rule from a synonym set. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonym-rule.html + DeleteSynonym synonyms_delete_synonym.NewDeleteSynonym DeleteSynonymRule synonyms_delete_synonym_rule.NewDeleteSynonymRule - // Get a synonym set. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html - GetSynonym synonyms_get_synonym.NewGetSynonym - // Get a synonym rule. - // Get a synonym rule from a synonym set. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html - GetSynonymRule synonyms_get_synonym_rule.NewGetSynonymRule - // Get all synonym sets. - // Get a summary of all defined synonym sets. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms-set.html - GetSynonymsSets synonyms_get_synonyms_sets.NewGetSynonymsSets - // Create or update a synonym set. - // Synonyms sets are limited to a maximum of 10,000 synonym rules per set. - // If you need to manage more synonym rules, you can create multiple synonym - // sets. - // - // When an existing synonyms set is updated, the search analyzers that use the - // synonyms set are reloaded automatically for all indices. - // This is equivalent to invoking the reload search analyzers API for all - // indices that use the synonyms set. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms-set.html - PutSynonym synonyms_put_synonym.NewPutSynonym - // Create or update a synonym rule. - // Create or update a synonym rule in a synonym set. - // - // If any of the synonym rules included is invalid, the API returns an error. - // - // When you update a synonym rule, all analyzers using the synonyms set will be - // reloaded automatically to reflect the new rule. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html - PutSynonymRule synonyms_put_synonym_rule.NewPutSynonymRule + GetSynonym synonyms_get_synonym.NewGetSynonym + GetSynonymRule synonyms_get_synonym_rule.NewGetSynonymRule + GetSynonymsSets synonyms_get_synonyms_sets.NewGetSynonymsSets + PutSynonym synonyms_put_synonym.NewPutSynonym + PutSynonymRule synonyms_put_synonym_rule.NewPutSynonymRule } type Tasks struct { - // Cancel a task. - // - // WARNING: The task management API is new and should still be considered a beta - // feature. - // The API may change in ways that are not backwards compatible. - // - // A task may continue to run for some time after it has been cancelled because - // it may not be able to safely stop its current activity straight away. - // It is also possible that Elasticsearch must complete its work on other tasks - // before it can process the cancellation. - // The get task information API will continue to list these cancelled tasks - // until they complete. - // The cancelled flag in the response indicates that the cancellation command - // has been processed and the task will stop as soon as possible. - // - // To troubleshoot why a cancelled task does not complete promptly, use the get - // task information API with the `?detailed` parameter to identify the other - // tasks the system is running. - // You can also use the node hot threads API to obtain detailed information - // about the work the system is doing instead of completing the cancelled task. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html Cancel tasks_cancel.NewCancel - // Get task information. - // Get information about a task currently running in the cluster. - // - // WARNING: The task management API is new and should still be considered a beta - // feature. - // The API may change in ways that are not backwards compatible. - // - // If the task identifier is not found, a 404 response code indicates that there - // are no resources that match the request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html - Get tasks_get.NewGet - // Get all tasks. - // Get information about the tasks currently running on one or more nodes in the - // cluster. - // - // WARNING: The task management API is new and should still be considered a beta - // feature. - // The API may change in ways that are not backwards compatible. - // - // **Identifying running tasks** - // - // The `X-Opaque-Id header`, when provided on the HTTP request header, is going - // to be returned as a header in the response as well as in the headers field - // for in the task information. - // This enables you to track certain calls or associate certain tasks with the - // client that started them. - // For example: - // - // ``` - // curl -i -H "X-Opaque-Id: 123456" - // "http://localhost:9200/_tasks?group_by=parents" - // ``` - // - // The API returns the following result: - // - // ``` - // HTTP/1.1 200 OK - // X-Opaque-Id: 123456 - // content-type: application/json; charset=UTF-8 - // content-length: 831 - // - // { - // "tasks" : { - // "u5lcZHqcQhu-rUoFaqDphA:45" : { - // "node" : "u5lcZHqcQhu-rUoFaqDphA", - // "id" : 45, - // "type" : "transport", - // "action" : "cluster:monitor/tasks/lists", - // "start_time_in_millis" : 1513823752749, - // "running_time_in_nanos" : 293139, - // "cancellable" : false, - // "headers" : { - // "X-Opaque-Id" : "123456" - // }, - // "children" : [ - // { - // "node" : "u5lcZHqcQhu-rUoFaqDphA", - // "id" : 46, - // "type" : "direct", - // "action" : "cluster:monitor/tasks/lists[n]", - // "start_time_in_millis" : 1513823752750, - // "running_time_in_nanos" : 92133, - // "cancellable" : false, - // "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", - // "headers" : { - // "X-Opaque-Id" : "123456" - // } - // } - // ] - // } - // } - // } - // ``` - // In this example, `X-Opaque-Id: 123456` is the ID as a part of the response - // header. - // The `X-Opaque-Id` in the task `headers` is the ID for the task that was - // initiated by the REST request. - // The `X-Opaque-Id` in the children `headers` is the child task of the task - // that was initiated by the REST request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html - List tasks_list.NewList + Get tasks_get.NewGet + List tasks_list.NewList } type TextStructure struct { - // Find the structure of a text field. - // Find the structure of a text field in an Elasticsearch index. - // - // This API provides a starting point for extracting further information from - // log messages already ingested into Elasticsearch. - // For example, if you have ingested data into a very simple index that has just - // `@timestamp` and message fields, you can use this API to see what common - // structure exists in the message field. - // - // The response from the API contains: - // - // * Sample messages. - // * Statistics that reveal the most common values for all fields detected - // within the text and basic numeric statistics for numeric fields. - // * Information about the structure of the text, which is useful when you write - // ingest configurations to index it or similarly formatted text. - // * Appropriate mappings for an Elasticsearch index, which you could use to - // ingest the text. - // - // All this information can be calculated by the structure finder with no - // guidance. - // However, you can optionally override some of the decisions about the text - // structure by specifying one or more query parameters. - // - // If the structure finder produces unexpected results, specify the `explain` - // query parameter and an explanation will appear in the response. - // It helps determine why the returned structure was chosen. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html - FindFieldStructure text_structure_find_field_structure.NewFindFieldStructure - // Find the structure of text messages. - // Find the structure of a list of text messages. - // The messages must contain data that is suitable to be ingested into - // Elasticsearch. - // - // This API provides a starting point for ingesting data into Elasticsearch in a - // format that is suitable for subsequent use with other Elastic Stack - // functionality. - // Use this API rather than the find text structure API if your input text has - // already been split up into separate messages by some other process. - // - // The response from the API contains: - // - // * Sample messages. - // * Statistics that reveal the most common values for all fields detected - // within the text and basic numeric statistics for numeric fields. - // * Information about the structure of the text, which is useful when you write - // ingest configurations to index it or similarly formatted text. - // Appropriate mappings for an Elasticsearch index, which you could use to - // ingest the text. - // - // All this information can be calculated by the structure finder with no - // guidance. - // However, you can optionally override some of the decisions about the text - // structure by specifying one or more query parameters. - // - // If the structure finder produces unexpected results, specify the `explain` - // query parameter and an explanation will appear in the response. - // It helps determine why the returned structure was chosen. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html + FindFieldStructure text_structure_find_field_structure.NewFindFieldStructure FindMessageStructure text_structure_find_message_structure.NewFindMessageStructure - // Find the structure of a text file. - // The text file must contain data that is suitable to be ingested into - // Elasticsearch. - // - // This API provides a starting point for ingesting data into Elasticsearch in a - // format that is suitable for subsequent use with other Elastic Stack - // functionality. - // Unlike other Elasticsearch endpoints, the data that is posted to this - // endpoint does not need to be UTF-8 encoded and in JSON format. - // It must, however, be text; binary text formats are not currently supported. - // The size is limited to the Elasticsearch HTTP receive buffer size, which - // defaults to 100 Mb. - // - // The response from the API contains: - // - // * A couple of messages from the beginning of the text. - // * Statistics that reveal the most common values for all fields detected - // within the text and basic numeric statistics for numeric fields. - // * Information about the structure of the text, which is useful when you write - // ingest configurations to index it or similarly formatted text. - // * Appropriate mappings for an Elasticsearch index, which you could use to - // ingest the text. - // - // All this information can be calculated by the structure finder with no - // guidance. - // However, you can optionally override some of the decisions about the text - // structure by specifying one or more query parameters. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html - FindStructure text_structure_find_structure.NewFindStructure - // Test a Grok pattern. - // Test a Grok pattern on one or more lines of text. - // The API indicates whether the lines match the pattern together with the - // offsets and lengths of the matched substrings. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/test-grok-pattern.html - TestGrokPattern text_structure_test_grok_pattern.NewTestGrokPattern + FindStructure text_structure_find_structure.NewFindStructure + TestGrokPattern text_structure_test_grok_pattern.NewTestGrokPattern } type Transform struct { - // Delete a transform. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html - DeleteTransform transform_delete_transform.NewDeleteTransform - // Retrieves transform usage information for transform nodes. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html - GetNodeStats transform_get_node_stats.NewGetNodeStats - // Get transforms. - // Get configuration information for transforms. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html - GetTransform transform_get_transform.NewGetTransform - // Get transform stats. - // - // Get usage information for transforms. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html - GetTransformStats transform_get_transform_stats.NewGetTransformStats - // Preview a transform. - // Generates a preview of the results that you will get when you create a - // transform with the same configuration. - // - // It returns a maximum of 100 results. The calculations are based on all the - // current data in the source index. It also - // generates a list of mappings and settings for the destination index. These - // values are determined based on the field - // types of the source index and the transform aggregations. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html - PreviewTransform transform_preview_transform.NewPreviewTransform - // Create a transform. - // Creates a transform. - // - // A transform copies data from source indices, transforms it, and persists it - // into an entity-centric destination index. You can also think of the - // destination index as a two-dimensional tabular data structure (known as - // a data frame). The ID for each document in the data frame is generated from a - // hash of the entity, so there is a - // unique row per entity. - // - // You must choose either the latest or pivot method for your transform; you - // cannot use both in a single transform. If - // you choose to use the pivot method for your transform, the entities are - // defined by the set of `group_by` fields in - // the pivot object. If you choose to use the latest method, the entities are - // defined by the `unique_key` field values - // in the latest object. - // - // You must have `create_index`, `index`, and `read` privileges on the - // destination index and `read` and - // `view_index_metadata` privileges on the source indices. When Elasticsearch - // security features are enabled, the - // transform remembers which roles the user that created it had at the time of - // creation and uses those same roles. If - // those roles do not have the required privileges on the source and destination - // indices, the transform fails when it - // attempts unauthorized operations. - // - // NOTE: You must use Kibana or this API to create a transform. Do not add a - // transform directly into any - // `.transform-internal*` indices using the Elasticsearch index API. If - // Elasticsearch security features are enabled, do - // not give users any privileges on `.transform-internal*` indices. If you used - // transforms prior to 7.5, also do not - // give users any privileges on `.data-frame-internal*` indices. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html - PutTransform transform_put_transform.NewPutTransform - // Reset a transform. - // - // Before you can reset it, you must stop it; alternatively, use the `force` - // query parameter. - // If the destination index was created by the transform, it is deleted. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html - ResetTransform transform_reset_transform.NewResetTransform - // Schedule a transform to start now. - // - // Instantly run a transform to process data. - // If you run this API, the transform will process the new data instantly, - // without waiting for the configured frequency interval. After the API is - // called, - // the transform will be processed again at `now + frequency` unless the API - // is called again in the meantime. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html + DeleteTransform transform_delete_transform.NewDeleteTransform + GetNodeStats transform_get_node_stats.NewGetNodeStats + GetTransform transform_get_transform.NewGetTransform + GetTransformStats transform_get_transform_stats.NewGetTransformStats + PreviewTransform transform_preview_transform.NewPreviewTransform + PutTransform transform_put_transform.NewPutTransform + ResetTransform transform_reset_transform.NewResetTransform ScheduleNowTransform transform_schedule_now_transform.NewScheduleNowTransform - // Start a transform. - // - // When you start a transform, it creates the destination index if it does not - // already exist. The `number_of_shards` is - // set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot - // transform, it deduces the mapping - // definitions for the destination index from the source indices and the - // transform aggregations. If fields in the - // destination index are derived from scripts (as in the case of - // `scripted_metric` or `bucket_script` aggregations), - // the transform uses dynamic mappings unless an index template exists. If it is - // a latest transform, it does not deduce - // mapping definitions; it uses dynamic mappings. To use explicit mappings, - // create the destination index before you - // start the transform. Alternatively, you can create an index template, though - // it does not affect the deduced mappings - // in a pivot transform. - // - // When the transform starts, a series of validations occur to ensure its - // success. If you deferred validation when you - // created the transform, they occur when you start the transform—​with the - // exception of privilege checks. When - // Elasticsearch security features are enabled, the transform remembers which - // roles the user that created it had at the - // time of creation and uses those same roles. If those roles do not have the - // required privileges on the source and - // destination indices, the transform fails when it attempts unauthorized - // operations. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html - StartTransform transform_start_transform.NewStartTransform - // Stop transforms. - // Stops one or more transforms. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html - StopTransform transform_stop_transform.NewStopTransform - // Update a transform. - // Updates certain properties of a transform. - // - // All updated properties except `description` do not take effect until after - // the transform starts the next checkpoint, - // thus there is data consistency in each checkpoint. To use this API, you must - // have `read` and `view_index_metadata` - // privileges for the source indices. You must also have `index` and `read` - // privileges for the destination index. When - // Elasticsearch security features are enabled, the transform remembers which - // roles the user who updated it had at the - // time of update and runs with those privileges. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-transform-update-transform - UpdateTransform transform_update_transform.NewUpdateTransform - // Upgrade all transforms. - // - // Transforms are compatible across minor versions and between supported major - // versions. - // However, over time, the format of transform configuration information may - // change. - // This API identifies transforms that have a legacy configuration format and - // upgrades them to the latest version. - // It also cleans up the internal data structures that store the transform state - // and checkpoints. - // The upgrade does not affect the source and destination indices. - // The upgrade also does not affect the roles that transforms use when - // Elasticsearch security features are enabled; the role used to read source - // data and write to the destination index remains unchanged. - // - // If a transform upgrade step fails, the upgrade stops and an error is returned - // about the underlying issue. - // Resolve the issue then re-run the process again. - // A summary is returned when the upgrade is finished. - // - // To ensure continuous transforms remain running during a major version upgrade - // of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade - // transforms before upgrading the cluster. - // You may want to perform a recent cluster backup prior to the upgrade. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-transform-upgrade-transforms - UpgradeTransforms transform_upgrade_transforms.NewUpgradeTransforms + StartTransform transform_start_transform.NewStartTransform + StopTransform transform_stop_transform.NewStopTransform + UpdateTransform transform_update_transform.NewUpdateTransform + UpgradeTransforms transform_upgrade_transforms.NewUpgradeTransforms } type Watcher struct { - // Acknowledge a watch. - // Acknowledging a watch enables you to manually throttle the execution of the - // watch's actions. - // - // The acknowledgement state of an action is stored in the - // `status.actions..ack.state` structure. - // - // IMPORTANT: If the specified watch is currently being executed, this API will - // return an error - // The reason for this behavior is to prevent overwriting the watch status from - // a watch execution. - // - // Acknowledging an action throttles further executions of that action until its - // `ack.state` is reset to `awaits_successful_execution`. - // This happens when the condition of the watch is not met (the condition - // evaluates to false). - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-ack-watch - AckWatch watcher_ack_watch.NewAckWatch - // Activate a watch. - // A watch can be either active or inactive. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-activate-watch - ActivateWatch watcher_activate_watch.NewActivateWatch - // Deactivate a watch. - // A watch can be either active or inactive. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-deactivate-watch + AckWatch watcher_ack_watch.NewAckWatch + ActivateWatch watcher_activate_watch.NewActivateWatch DeactivateWatch watcher_deactivate_watch.NewDeactivateWatch - // Delete a watch. - // When the watch is removed, the document representing the watch in the - // `.watches` index is gone and it will never be run again. - // - // Deleting a watch does not delete any watch execution records related to this - // watch from the watch history. - // - // IMPORTANT: Deleting a watch must be done by using only this API. - // Do not delete the watch directly from the `.watches` index using the - // Elasticsearch delete document API - // When Elasticsearch security features are enabled, make sure no write - // privileges are granted to anyone for the `.watches` index. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-delete-watch - DeleteWatch watcher_delete_watch.NewDeleteWatch - // Run a watch. - // This API can be used to force execution of the watch outside of its - // triggering logic or to simulate the watch execution for debugging purposes. - // - // For testing and debugging purposes, you also have fine-grained control on how - // the watch runs. - // You can run the watch without running all of its actions or alternatively by - // simulating them. - // You can also force execution by ignoring the watch condition and control - // whether a watch record would be written to the watch history after it runs. - // - // You can use the run watch API to run watches that are not yet registered by - // specifying the watch definition inline. - // This serves as great tool for testing and debugging your watches prior to - // adding them to Watcher. - // - // When Elasticsearch security features are enabled on your cluster, watches are - // run with the privileges of the user that stored the watches. - // If your user is allowed to read index `a`, but not index `b`, then the exact - // same set of rules will apply during execution of a watch. - // - // When using the run watch API, the authorization data of the user that called - // the API will be used as a base, instead of the information who stored the - // watch. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-execute-watch - ExecuteWatch watcher_execute_watch.NewExecuteWatch - // Get Watcher index settings. - // Get settings for the Watcher internal index (`.watches`). - // Only a subset of settings are shown, for example `index.auto_expand_replicas` - // and `index.number_of_replicas`. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-get-settings - GetSettings watcher_get_settings.NewGetSettings - // Get a watch. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-get-watch - GetWatch watcher_get_watch.NewGetWatch - // Create or update a watch. - // When a watch is registered, a new document that represents the watch is added - // to the `.watches` index and its trigger is immediately registered with the - // relevant trigger engine. - // Typically for the `schedule` trigger, the scheduler is the trigger engine. - // - // IMPORTANT: You must use Kibana or this API to create a watch. - // Do not add a watch directly to the `.watches` index by using the - // Elasticsearch index API. - // If Elasticsearch security features are enabled, do not give users write - // privileges on the `.watches` index. - // - // When you add a watch you can also define its initial active state by setting - // the *active* parameter. - // - // When Elasticsearch security features are enabled, your watch can index or - // search only on indices for which the user that stored the watch has - // privileges. - // If the user is able to read index `a`, but not index `b`, the same will apply - // when the watch runs. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-put-watch - PutWatch watcher_put_watch.NewPutWatch - // Query watches. - // Get all registered watches in a paginated manner and optionally filter - // watches by a query. - // - // Note that only the `_id` and `metadata.*` fields are queryable or sortable. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-query-watches - QueryWatches watcher_query_watches.NewQueryWatches - // Start the watch service. - // Start the Watcher service if it is not already running. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-start - Start watcher_start.NewStart - // Get Watcher statistics. - // This API always returns basic metrics. - // You retrieve more metrics by using the metric parameter. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-stats - Stats watcher_stats.NewStats - // Stop the watch service. - // Stop the Watcher service if it is running. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-stop - Stop watcher_stop.NewStop - // Update Watcher index settings. - // Update settings for the Watcher internal index (`.watches`). - // Only a subset of settings can be modified. - // This includes `index.auto_expand_replicas`, `index.number_of_replicas`, - // `index.routing.allocation.exclude.*`, - // `index.routing.allocation.include.*` and - // `index.routing.allocation.require.*`. - // Modification of `index.routing.allocation.include._tier_preference` is an - // exception and is not allowed as the - // Watcher shards must always be in the `data_content` tier. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-update-settings - UpdateSettings watcher_update_settings.NewUpdateSettings + DeleteWatch watcher_delete_watch.NewDeleteWatch + ExecuteWatch watcher_execute_watch.NewExecuteWatch + GetSettings watcher_get_settings.NewGetSettings + GetWatch watcher_get_watch.NewGetWatch + PutWatch watcher_put_watch.NewPutWatch + QueryWatches watcher_query_watches.NewQueryWatches + Start watcher_start.NewStart + Stats watcher_stats.NewStats + Stop watcher_stop.NewStop + UpdateSettings watcher_update_settings.NewUpdateSettings } type Xpack struct { - // Get information. - // The information provided by the API includes: - // - // * Build information including the build number and timestamp. - // * License information about the currently installed license. - // * Feature information for the features that are currently enabled and - // available under the current license. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html - Info xpack_info.NewInfo - // Get usage information. - // Get information about the features that are currently enabled and available - // under the current license. - // The API also provides some usage statistics. - // https://www.elastic.co/docs/api/doc/elasticsearch/v8/group/endpoint-xpack + Info xpack_info.NewInfo Usage xpack_usage.NewUsage } @@ -8587,6 +1292,7 @@ type API struct { Snapshot Snapshot Sql Sql Ssl Ssl + Streams Streams Synonyms Synonyms Tasks Tasks TextStructure TextStructure @@ -8594,1919 +1300,54 @@ type API struct { Watcher Watcher Xpack Xpack - // Bulk index or delete documents. - // Perform multiple `index`, `create`, `delete`, and `update` actions in a - // single request. - // This reduces overhead and can greatly increase indexing speed. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or index alias: - // - // * To use the `create` action, you must have the `create_doc`, `create`, - // `index`, or `write` index privilege. Data streams support only the `create` - // action. - // * To use the `index` action, you must have the `create`, `index`, or `write` - // index privilege. - // * To use the `delete` action, you must have the `delete` or `write` index - // privilege. - // * To use the `update` action, you must have the `index` or `write` index - // privilege. - // * To automatically create a data stream or index with a bulk API request, you - // must have the `auto_configure`, `create_index`, or `manage` index privilege. - // * To make the result of a bulk operation visible to search using the - // `refresh` parameter, you must have the `maintenance` or `manage` index - // privilege. - // - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // The actions are specified in the request body using a newline delimited JSON - // (NDJSON) structure: - // - // ``` - // action_and_meta_data\n - // optional_source\n - // action_and_meta_data\n - // optional_source\n - // .... - // action_and_meta_data\n - // optional_source\n - // ``` - // - // The `index` and `create` actions expect a source on the next line and have - // the same semantics as the `op_type` parameter in the standard index API. - // A `create` action fails if a document with the same ID already exists in the - // target - // An `index` action adds or replaces a document as necessary. - // - // NOTE: Data streams support only the `create` action. - // To update or delete a document in a data stream, you must target the backing - // index containing the document. - // - // An `update` action expects that the partial doc, upsert, and script and its - // options are specified on the next line. - // - // A `delete` action does not expect a source on the next line and has the same - // semantics as the standard delete API. - // - // NOTE: The final line of data must end with a newline character (`\n`). - // Each newline character may be preceded by a carriage return (`\r`). - // When sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header - // of `application/json` or `application/x-ndjson`. - // Because this format uses literal newline characters (`\n`) as delimiters, - // make sure that the JSON actions and sources are not pretty printed. - // - // If you provide a target in the request path, it is used for any actions that - // don't explicitly specify an `_index` argument. - // - // A note on the format: the idea here is to make processing as fast as - // possible. - // As some of the actions are redirected to other shards on other nodes, only - // `action_meta_data` is parsed on the receiving node side. - // - // Client libraries using this protocol should try and strive to do something - // similar on the client side, and reduce buffering as much as possible. - // - // There is no "correct" number of actions to perform in a single bulk request. - // Experiment with different settings to find the optimal size for your - // particular workload. - // Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by - // default so clients must ensure that no request exceeds this size. - // It is not possible to index a single document that exceeds the size limit, so - // you must pre-process any such documents into smaller pieces before sending - // them to Elasticsearch. - // For instance, split documents into pages or chapters before indexing them, or - // store raw binary data in a system outside Elasticsearch and replace the raw - // data with a link to the external system in the documents that you send to - // Elasticsearch. - // - // **Client suppport for bulk requests** - // - // Some of the officially supported clients provide helpers to assist with bulk - // requests and reindexing: - // - // * Go: Check out `esutil.BulkIndexer` - // * Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and - // `Search::Elasticsearch::Client::5_0::Scroll` - // * Python: Check out `elasticsearch.helpers.*` - // * JavaScript: Check out `client.helpers.*` - // * .NET: Check out `BulkAllObservable` - // * PHP: Check out bulk indexing. - // - // **Submitting bulk requests with cURL** - // - // If you're providing text file input to `curl`, you must use the - // `--data-binary` flag instead of plain `-d`. - // The latter doesn't preserve newlines. For example: - // - // ``` - // $ cat requests - // { "index" : { "_index" : "test", "_id" : "1" } } - // { "field1" : "value1" } - // $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk - // --data-binary "@requests"; echo - // {"took":7, "errors": false, - // "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]} - // ``` - // - // **Optimistic concurrency control** - // - // Each `index` and `delete` action within a bulk API call may include the - // `if_seq_no` and `if_primary_term` parameters in their respective action and - // meta data lines. - // The `if_seq_no` and `if_primary_term` parameters control how operations are - // run, based on the last modification to existing documents. See Optimistic - // concurrency control for more details. - // - // **Versioning** - // - // Each bulk item can include the version value using the `version` field. - // It automatically follows the behavior of the index or delete operation based - // on the `_version` mapping. - // It also support the `version_type`. - // - // **Routing** - // - // Each bulk item can include the routing value using the `routing` field. - // It automatically follows the behavior of the index or delete operation based - // on the `_routing` mapping. - // - // NOTE: Data streams do not support custom routing unless they were created - // with the `allow_custom_routing` setting enabled in the template. - // - // **Wait for active shards** - // - // When making bulk calls, you can set the `wait_for_active_shards` parameter to - // require a minimum number of shard copies to be active before starting to - // process the bulk request. - // - // **Refresh** - // - // Control when the changes made by this request are visible to search. - // - // NOTE: Only the shards that receive the bulk request will be affected by - // refresh. - // Imagine a `_bulk?refresh=wait_for` request with three documents in it that - // happen to be routed to different shards in an index with five shards. - // The request will only wait for those three shards to refresh. - // The other two shards that make up the index do not participate in the `_bulk` - // request at all. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html - Bulk core_bulk.NewBulk - // Clear a scrolling search. - // Clear the search context and results for a scrolling search. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html - ClearScroll core_clear_scroll.NewClearScroll - // Close a point in time. - // A point in time must be opened explicitly before being used in search - // requests. - // The `keep_alive` parameter tells Elasticsearch how long it should persist. - // A point in time is automatically closed when the `keep_alive` period has - // elapsed. - // However, keeping points in time has a cost; close them as soon as they are no - // longer required for search requests. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html - ClosePointInTime core_close_point_in_time.NewClosePointInTime - // Count search results. - // Get the number of documents matching a query. - // - // The query can be provided either by using a simple query string as a - // parameter, or by defining Query DSL within the request body. - // The query is optional. When no query is provided, the API uses `match_all` to - // count all the documents. - // - // The count API supports multi-target syntax. You can run a single count API - // search across multiple data streams and indices. - // - // The operation is broadcast across all shards. - // For each shard ID group, a replica is chosen and the search is run against - // it. - // This means that replicas increase the scalability of the count. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html - Count core_count.NewCount - // Create a new document in the index. - // - // You can index a new JSON document with the `//_doc/` or - // `//_create/<_id>` APIs - // Using `_create` guarantees that the document is indexed only if it does not - // already exist. - // It returns a 409 response when a document with a same ID already exists in - // the index. - // To update an existing document, you must use the `//_doc/` API. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or index alias: - // - // * To add a document using the `PUT //_create/<_id>` or `POST - // //_create/<_id>` request formats, you must have the `create_doc`, - // `create`, `index`, or `write` index privilege. - // * To automatically create a data stream or index with this API request, you - // must have the `auto_configure`, `create_index`, or `manage` index privilege. - // - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // **Automatically create data streams and indices** - // - // If the request's target doesn't exist and matches an index template with a - // `data_stream` definition, the index operation automatically creates the data - // stream. - // - // If the target doesn't exist and doesn't match a data stream template, the - // operation automatically creates the index and applies any matching index - // templates. - // - // NOTE: Elasticsearch includes several built-in index templates. To avoid - // naming collisions with these templates, refer to index pattern documentation. - // - // If no mapping exists, the index operation creates a dynamic mapping. - // By default, new fields and objects are automatically added to the mapping if - // needed. - // - // Automatic index creation is controlled by the `action.auto_create_index` - // setting. - // If it is `true`, any index can be created automatically. - // You can modify this setting to explicitly allow or block automatic creation - // of indices that match specified patterns or set it to `false` to turn off - // automatic index creation entirely. - // Specify a comma-separated list of patterns you want to allow or prefix each - // pattern with `+` or `-` to indicate whether it should be allowed or blocked. - // When a list is specified, the default behaviour is to disallow. - // - // NOTE: The `action.auto_create_index` setting affects the automatic creation - // of indices only. - // It does not affect the creation of data streams. - // - // **Routing** - // - // By default, shard placement — or routing — is controlled by using a hash of - // the document's ID value. - // For more explicit control, the value fed into the hash function used by the - // router can be directly specified on a per-operation basis using the `routing` - // parameter. - // - // When setting up explicit mapping, you can also use the `_routing` field to - // direct the index operation to extract the routing value from the document - // itself. - // This does come at the (very minimal) cost of an additional document parsing - // pass. - // If the `_routing` mapping is defined and set to be required, the index - // operation will fail if no routing value is provided or extracted. - // - // NOTE: Data streams do not support custom routing unless they were created - // with the `allow_custom_routing` setting enabled in the template. - // - // **Distributed** - // - // The index operation is directed to the primary shard based on its route and - // performed on the actual node containing this shard. - // After the primary shard completes the operation, if needed, the update is - // distributed to applicable replicas. - // - // **Active shards** - // - // To improve the resiliency of writes to the system, indexing operations can be - // configured to wait for a certain number of active shard copies before - // proceeding with the operation. - // If the requisite number of active shard copies are not available, then the - // write operation must wait and retry, until either the requisite shard copies - // have started or a timeout occurs. - // By default, write operations only wait for the primary shards to be active - // before proceeding (that is to say `wait_for_active_shards` is `1`). - // This default can be overridden in the index settings dynamically by setting - // `index.write.wait_for_active_shards`. - // To alter this behavior per operation, use the `wait_for_active_shards - // request` parameter. - // - // Valid values are all or any positive integer up to the total number of - // configured copies per shard in the index (which is `number_of_replicas`+1). - // Specifying a negative value or a number greater than the number of shard - // copies will throw an error. - // - // For example, suppose you have a cluster of three nodes, A, B, and C and you - // create an index index with the number of replicas set to 3 (resulting in 4 - // shard copies, one more copy than there are nodes). - // If you attempt an indexing operation, by default the operation will only - // ensure the primary copy of each shard is available before proceeding. - // This means that even if B and C went down and A hosted the primary shard - // copies, the indexing operation would still proceed with only one copy of the - // data. - // If `wait_for_active_shards` is set on the request to `3` (and all three nodes - // are up), the indexing operation will require 3 active shard copies before - // proceeding. - // This requirement should be met because there are 3 active nodes in the - // cluster, each one holding a copy of the shard. - // However, if you set `wait_for_active_shards` to `all` (or to `4`, which is - // the same in this situation), the indexing operation will not proceed as you - // do not have all 4 copies of each shard active in the index. - // The operation will timeout unless a new node is brought up in the cluster to - // host the fourth copy of the shard. - // - // It is important to note that this setting greatly reduces the chances of the - // write operation not writing to the requisite number of shard copies, but it - // does not completely eliminate the possibility, because this check occurs - // before the write operation starts. - // After the write operation is underway, it is still possible for replication - // to fail on any number of shard copies but still succeed on the primary. - // The `_shards` section of the API response reveals the number of shard copies - // on which replication succeeded and failed. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html - Create core_create.NewCreate - // Delete a document. - // - // Remove a JSON document from the specified index. - // - // NOTE: You cannot send deletion requests directly to a data stream. - // To delete a document in a data stream, you must target the backing index - // containing the document. - // - // **Optimistic concurrency control** - // - // Delete operations can be made conditional and only be performed if the last - // modification to the document was assigned the sequence number and primary - // term specified by the `if_seq_no` and `if_primary_term` parameters. - // If a mismatch is detected, the operation will result in a - // `VersionConflictException` and a status code of `409`. - // - // **Versioning** - // - // Each document indexed is versioned. - // When deleting a document, the version can be specified to make sure the - // relevant document you are trying to delete is actually being deleted and it - // has not changed in the meantime. - // Every write operation run on a document, deletes included, causes its version - // to be incremented. - // The version number of a deleted document remains available for a short time - // after deletion to allow for control of concurrent operations. - // The length of time for which a deleted document's version remains available - // is determined by the `index.gc_deletes` index setting. - // - // **Routing** - // - // If routing is used during indexing, the routing value also needs to be - // specified to delete a document. - // - // If the `_routing` mapping is set to `required` and no routing value is - // specified, the delete API throws a `RoutingMissingException` and rejects the - // request. - // - // For example: - // - // ``` - // DELETE /my-index-000001/_doc/1?routing=shard-1 - // ``` - // - // This request deletes the document with ID 1, but it is routed based on the - // user. - // The document is not deleted if the correct routing is not specified. - // - // **Distributed** - // - // The delete operation gets hashed into a specific shard ID. - // It then gets redirected into the primary shard within that ID group and - // replicated (if needed) to shard replicas within that ID group. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html - Delete core_delete.NewDelete - // Delete documents. - // - // Deletes documents that match the specified query. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or alias: - // - // * `read` - // * `delete` or `write` - // - // You can specify the query criteria in the request URI or the request body - // using the same syntax as the search API. - // When you submit a delete by query request, Elasticsearch gets a snapshot of - // the data stream or index when it begins processing the request and deletes - // matching documents using internal versioning. - // If a document changes between the time that the snapshot is taken and the - // delete operation is processed, it results in a version conflict and the - // delete operation fails. - // - // NOTE: Documents with a version equal to 0 cannot be deleted using delete by - // query because internal versioning does not support 0 as a valid version - // number. - // - // While processing a delete by query request, Elasticsearch performs multiple - // search requests sequentially to find all of the matching documents to delete. - // A bulk delete request is performed for each batch of matching documents. - // If a search or bulk request is rejected, the requests are retried up to 10 - // times, with exponential back off. - // If the maximum retry limit is reached, processing halts and all failed - // requests are returned in the response. - // Any delete requests that completed successfully still stick, they are not - // rolled back. - // - // You can opt to count version conflicts instead of halting and returning by - // setting `conflicts` to `proceed`. - // Note that if you opt to count version conflicts the operation could attempt - // to delete more documents from the source than `max_docs` until it has - // successfully deleted `max_docs documents`, or it has gone through every - // document in the source query. - // - // **Throttling delete requests** - // - // To control the rate at which delete by query issues batches of delete - // operations, you can set `requests_per_second` to any positive decimal number. - // This pads each batch with a wait time to throttle the rate. - // Set `requests_per_second` to `-1` to disable throttling. - // - // Throttling uses a wait time between batches so that the internal scroll - // requests can be given a timeout that takes the request padding into account. - // The padding time is the difference between the batch size divided by the - // `requests_per_second` and the time spent writing. - // By default the batch size is `1000`, so if `requests_per_second` is set to - // `500`: - // - // ``` - // target_time = 1000 / 500 per second = 2 seconds - // wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds - // ``` - // - // Since the batch is issued as a single `_bulk` request, large batch sizes - // cause Elasticsearch to create many requests and wait before starting the next - // set. - // This is "bursty" instead of "smooth". - // - // **Slicing** - // - // Delete by query supports sliced scroll to parallelize the delete process. - // This can improve efficiency and provide a convenient way to break the request - // down into smaller parts. - // - // Setting `slices` to `auto` lets Elasticsearch choose the number of slices to - // use. - // This setting will use one slice per shard, up to a certain limit. - // If there are multiple source data streams or indices, it will choose the - // number of slices based on the index or backing index with the smallest number - // of shards. - // Adding slices to the delete by query operation creates sub-requests which - // means it has some quirks: - // - // * You can see these requests in the tasks APIs. These sub-requests are - // "child" tasks of the task for the request with slices. - // * Fetching the status of the task for the request with slices only contains - // the status of completed slices. - // * These sub-requests are individually addressable for things like - // cancellation and rethrottling. - // * Rethrottling the request with `slices` will rethrottle the unfinished - // sub-request proportionally. - // * Canceling the request with `slices` will cancel each sub-request. - // * Due to the nature of `slices` each sub-request won't get a perfectly even - // portion of the documents. All documents will be addressed, but some slices - // may be larger than others. Expect larger slices to have a more even - // distribution. - // * Parameters like `requests_per_second` and `max_docs` on a request with - // `slices` are distributed proportionally to each sub-request. Combine that - // with the earlier point about distribution being uneven and you should - // conclude that using `max_docs` with `slices` might not result in exactly - // `max_docs` documents being deleted. - // * Each sub-request gets a slightly different snapshot of the source data - // stream or index though these are all taken at approximately the same time. - // - // If you're slicing manually or otherwise tuning automatic slicing, keep in - // mind that: - // - // * Query performance is most efficient when the number of slices is equal to - // the number of shards in the index or backing index. If that number is large - // (for example, 500), choose a lower number as too many `slices` hurts - // performance. Setting `slices` higher than the number of shards generally does - // not improve efficiency and adds overhead. - // * Delete performance scales linearly across available resources with the - // number of slices. - // - // Whether query or delete performance dominates the runtime depends on the - // documents being reindexed and cluster resources. - // - // **Cancel a delete by query operation** - // - // Any delete by query can be canceled using the task cancel API. For example: - // - // ``` - // POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel - // ``` - // - // The task ID can be found by using the get tasks API. - // - // Cancellation should happen quickly but might take a few seconds. - // The get task status API will continue to list the delete by query task until - // this task checks that it has been cancelled and terminates itself. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html - DeleteByQuery core_delete_by_query.NewDeleteByQuery - // Throttle a delete by query operation. - // - // Change the number of requests per second for a particular delete by query - // operation. - // Rethrottling that speeds up the query takes effect immediately but - // rethrotting that slows down the query takes effect after completing the - // current batch to prevent scroll timeouts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query-rethrottle + Bulk core_bulk.NewBulk + ClearScroll core_clear_scroll.NewClearScroll + ClosePointInTime core_close_point_in_time.NewClosePointInTime + Count core_count.NewCount + Create core_create.NewCreate + Delete core_delete.NewDelete + DeleteByQuery core_delete_by_query.NewDeleteByQuery DeleteByQueryRethrottle core_delete_by_query_rethrottle.NewDeleteByQueryRethrottle - // Delete a script or search template. - // Deletes a stored script or search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-stored-script-api.html - DeleteScript core_delete_script.NewDeleteScript - // Check a document. - // - // Verify that a document exists. - // For example, check to see if a document with the `_id` 0 exists: - // - // ``` - // HEAD my-index-000001/_doc/0 - // ``` - // - // If the document exists, the API returns a status code of `200 - OK`. - // If the document doesn’t exist, the API returns `404 - Not Found`. - // - // **Versioning support** - // - // You can use the `version` parameter to check the document only if its current - // version is equal to the specified one. - // - // Internally, Elasticsearch has marked the old document as deleted and added an - // entirely new document. - // The old version of the document doesn't disappear immediately, although you - // won't be able to access it. - // Elasticsearch cleans up deleted documents in the background as you continue - // to index more data. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - Exists core_exists.NewExists - // Check for a document source. - // - // Check whether a document source exists in an index. - // For example: - // - // ``` - // HEAD my-index-000001/_source/1 - // ``` - // - // A document's source is not available if it is disabled in the mapping. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - ExistsSource core_exists_source.NewExistsSource - // Explain a document match result. - // Get information about why a specific document matches, or doesn't match, a - // query. - // It computes a score explanation for a query and a specific document. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html - Explain core_explain.NewExplain - // Get the field capabilities. - // - // Get information about the capabilities of fields among multiple indices. - // - // For data streams, the API returns field capabilities among the stream’s - // backing indices. - // It returns runtime fields like any other field. - // For example, a runtime field with a type of keyword is returned the same as - // any other field that belongs to the `keyword` family. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html - FieldCaps core_field_caps.NewFieldCaps - // Get a document by its ID. - // - // Get a document and its source or stored fields from an index. - // - // By default, this API is realtime and is not affected by the refresh rate of - // the index (when data will become visible for search). - // In the case where stored fields are requested with the `stored_fields` - // parameter and the document has been updated but is not yet refreshed, the API - // will have to parse and analyze the source to extract the stored fields. - // To turn off realtime behavior, set the `realtime` parameter to false. - // - // **Source filtering** - // - // By default, the API returns the contents of the `_source` field unless you - // have used the `stored_fields` parameter or the `_source` field is turned off. - // You can turn off `_source` retrieval by using the `_source` parameter: - // - // ``` - // GET my-index-000001/_doc/0?_source=false - // ``` - // - // If you only need one or two fields from the `_source`, use the - // `_source_includes` or `_source_excludes` parameters to include or filter out - // particular fields. - // This can be helpful with large documents where partial retrieval can save on - // network overhead - // Both parameters take a comma separated list of fields or wildcard - // expressions. - // For example: - // - // ``` - // GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities - // ``` - // - // If you only want to specify includes, you can use a shorter notation: - // - // ``` - // GET my-index-000001/_doc/0?_source=*.id - // ``` - // - // **Routing** - // - // If routing is used during indexing, the routing value also needs to be - // specified to retrieve a document. - // For example: - // - // ``` - // GET my-index-000001/_doc/2?routing=user1 - // ``` - // - // This request gets the document with ID 2, but it is routed based on the user. - // The document is not fetched if the correct routing is not specified. - // - // **Distributed** - // - // The GET operation is hashed into a specific shard ID. - // It is then redirected to one of the replicas within that shard ID and returns - // the result. - // The replicas are the primary shard and its replicas within that shard ID - // group. - // This means that the more replicas you have, the better your GET scaling will - // be. - // - // **Versioning support** - // - // You can use the `version` parameter to retrieve the document only if its - // current version is equal to the specified one. - // - // Internally, Elasticsearch has marked the old document as deleted and added an - // entirely new document. - // The old version of the document doesn't disappear immediately, although you - // won't be able to access it. - // Elasticsearch cleans up deleted documents in the background as you continue - // to index more data. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - Get core_get.NewGet - // Get a script or search template. - // Retrieves a stored script or search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-stored-script-api.html - GetScript core_get_script.NewGetScript - // Get script contexts. - // - // Get a list of supported script contexts and their methods. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-script-contexts-api.html - GetScriptContext core_get_script_context.NewGetScriptContext - // Get script languages. - // - // Get a list of available script types, languages, and contexts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-script-languages-api.html - GetScriptLanguages core_get_script_languages.NewGetScriptLanguages - // Get a document's source. - // - // Get the source of a document. - // For example: - // - // ``` - // GET my-index-000001/_source/1 - // ``` - // - // You can use the source filtering parameters to control which parts of the - // `_source` are returned: - // - // ``` - // GET - // my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities - // ``` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html - GetSource core_get_source.NewGetSource - // Get the cluster health. - // Get a report with the health status of an Elasticsearch cluster. - // The report contains a list of indicators that compose Elasticsearch - // functionality. - // - // Each indicator has a health status of: green, unknown, yellow or red. - // The indicator will provide an explanation and metadata describing the reason - // for its current health status. - // - // The cluster’s status is controlled by the worst indicator status. - // - // In the event that an indicator’s status is non-green, a list of impacts may - // be present in the indicator result which detail the functionalities that are - // negatively affected by the health issue. - // Each impact carries with it a severity level, an area of the system that is - // affected, and a simple description of the impact on the system. - // - // Some health indicators can determine the root cause of a health problem and - // prescribe a set of steps that can be performed in order to improve the health - // of the system. - // The root cause and remediation steps are encapsulated in a diagnosis. - // A diagnosis contains a cause detailing a root cause analysis, an action - // containing a brief description of the steps to take to fix the problem, the - // list of affected resources (if applicable), and a detailed step-by-step - // troubleshooting guide to fix the diagnosed problem. - // - // NOTE: The health indicators perform root cause analysis of non-green health - // statuses. This can be computationally expensive when called frequently. - // When setting up automated polling of the API for health status, set verbose - // to false to disable the more expensive analysis logic. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html - HealthReport core_health_report.NewHealthReport - // Create or update a document in an index. - // - // Add a JSON document to the specified data stream or index and make it - // searchable. - // If the target is an index and the document already exists, the request - // updates the document and increments its version. - // - // NOTE: You cannot use this API to send update requests for existing documents - // in a data stream. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or index alias: - // - // * To add or overwrite a document using the `PUT //_doc/<_id>` request - // format, you must have the `create`, `index`, or `write` index privilege. - // * To add a document using the `POST //_doc/` request format, you must - // have the `create_doc`, `create`, `index`, or `write` index privilege. - // * To automatically create a data stream or index with this API request, you - // must have the `auto_configure`, `create_index`, or `manage` index privilege. - // - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // NOTE: Replica shards might not all be started when an indexing operation - // returns successfully. - // By default, only the primary is required. Set `wait_for_active_shards` to - // change this default behavior. - // - // **Automatically create data streams and indices** - // - // If the request's target doesn't exist and matches an index template with a - // `data_stream` definition, the index operation automatically creates the data - // stream. - // - // If the target doesn't exist and doesn't match a data stream template, the - // operation automatically creates the index and applies any matching index - // templates. - // - // NOTE: Elasticsearch includes several built-in index templates. To avoid - // naming collisions with these templates, refer to index pattern documentation. - // - // If no mapping exists, the index operation creates a dynamic mapping. - // By default, new fields and objects are automatically added to the mapping if - // needed. - // - // Automatic index creation is controlled by the `action.auto_create_index` - // setting. - // If it is `true`, any index can be created automatically. - // You can modify this setting to explicitly allow or block automatic creation - // of indices that match specified patterns or set it to `false` to turn off - // automatic index creation entirely. - // Specify a comma-separated list of patterns you want to allow or prefix each - // pattern with `+` or `-` to indicate whether it should be allowed or blocked. - // When a list is specified, the default behaviour is to disallow. - // - // NOTE: The `action.auto_create_index` setting affects the automatic creation - // of indices only. - // It does not affect the creation of data streams. - // - // **Optimistic concurrency control** - // - // Index operations can be made conditional and only be performed if the last - // modification to the document was assigned the sequence number and primary - // term specified by the `if_seq_no` and `if_primary_term` parameters. - // If a mismatch is detected, the operation will result in a - // `VersionConflictException` and a status code of `409`. - // - // **Routing** - // - // By default, shard placement — or routing — is controlled by using a hash of - // the document's ID value. - // For more explicit control, the value fed into the hash function used by the - // router can be directly specified on a per-operation basis using the `routing` - // parameter. - // - // When setting up explicit mapping, you can also use the `_routing` field to - // direct the index operation to extract the routing value from the document - // itself. - // This does come at the (very minimal) cost of an additional document parsing - // pass. - // If the `_routing` mapping is defined and set to be required, the index - // operation will fail if no routing value is provided or extracted. - // - // NOTE: Data streams do not support custom routing unless they were created - // with the `allow_custom_routing` setting enabled in the template. - // - // **Distributed** - // - // The index operation is directed to the primary shard based on its route and - // performed on the actual node containing this shard. - // After the primary shard completes the operation, if needed, the update is - // distributed to applicable replicas. - // - // **Active shards** - // - // To improve the resiliency of writes to the system, indexing operations can be - // configured to wait for a certain number of active shard copies before - // proceeding with the operation. - // If the requisite number of active shard copies are not available, then the - // write operation must wait and retry, until either the requisite shard copies - // have started or a timeout occurs. - // By default, write operations only wait for the primary shards to be active - // before proceeding (that is to say `wait_for_active_shards` is `1`). - // This default can be overridden in the index settings dynamically by setting - // `index.write.wait_for_active_shards`. - // To alter this behavior per operation, use the `wait_for_active_shards - // request` parameter. - // - // Valid values are all or any positive integer up to the total number of - // configured copies per shard in the index (which is `number_of_replicas`+1). - // Specifying a negative value or a number greater than the number of shard - // copies will throw an error. - // - // For example, suppose you have a cluster of three nodes, A, B, and C and you - // create an index index with the number of replicas set to 3 (resulting in 4 - // shard copies, one more copy than there are nodes). - // If you attempt an indexing operation, by default the operation will only - // ensure the primary copy of each shard is available before proceeding. - // This means that even if B and C went down and A hosted the primary shard - // copies, the indexing operation would still proceed with only one copy of the - // data. - // If `wait_for_active_shards` is set on the request to `3` (and all three nodes - // are up), the indexing operation will require 3 active shard copies before - // proceeding. - // This requirement should be met because there are 3 active nodes in the - // cluster, each one holding a copy of the shard. - // However, if you set `wait_for_active_shards` to `all` (or to `4`, which is - // the same in this situation), the indexing operation will not proceed as you - // do not have all 4 copies of each shard active in the index. - // The operation will timeout unless a new node is brought up in the cluster to - // host the fourth copy of the shard. - // - // It is important to note that this setting greatly reduces the chances of the - // write operation not writing to the requisite number of shard copies, but it - // does not completely eliminate the possibility, because this check occurs - // before the write operation starts. - // After the write operation is underway, it is still possible for replication - // to fail on any number of shard copies but still succeed on the primary. - // The `_shards` section of the API response reveals the number of shard copies - // on which replication succeeded and failed. - // - // **No operation (noop) updates** - // - // When updating a document by using this API, a new version of the document is - // always created even if the document hasn't changed. - // If this isn't acceptable use the `_update` API with `detect_noop` set to - // `true`. - // The `detect_noop` option isn't available on this API because it doesn’t fetch - // the old source and isn't able to compare it against the new source. - // - // There isn't a definitive rule for when noop updates aren't acceptable. - // It's a combination of lots of factors like how frequently your data source - // sends updates that are actually noops and how many queries per second - // Elasticsearch runs on the shard receiving the updates. - // - // **Versioning** - // - // Each indexed document is given a version number. - // By default, internal versioning is used that starts at 1 and increments with - // each update, deletes included. - // Optionally, the version number can be set to an external value (for example, - // if maintained in a database). - // To enable this functionality, `version_type` should be set to `external`. - // The value provided must be a numeric, long value greater than or equal to 0, - // and less than around `9.2e+18`. - // - // NOTE: Versioning is completely real time, and is not affected by the near - // real time aspects of search operations. - // If no version is provided, the operation runs without any version checks. - // - // When using the external version type, the system checks to see if the version - // number passed to the index request is greater than the version of the - // currently stored document. - // If true, the document will be indexed and the new version number used. - // If the value provided is less than or equal to the stored document's version - // number, a version conflict will occur and the index operation will fail. For - // example: - // - // ``` - // PUT my-index-000001/_doc/1?version=2&version_type=external - // { - // "user": { - // "id": "elkbee" - // } - // } - // - // In this example, the operation will succeed since the supplied version of 2 - // is higher than the current document version of 1. - // If the document was already updated and its version was set to 2 or higher, - // the indexing command will fail and result in a conflict (409 HTTP status - // code). - // - // A nice side effect is that there is no need to maintain strict ordering of - // async indexing operations run as a result of changes to a source database, as - // long as version numbers from the source database are used. - // Even the simple case of updating the Elasticsearch index using data from a - // database is simplified if external versioning is used, as only the latest - // version will be used if the index operations arrive out of order. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html - Index core_index.NewIndex - // Get cluster info. - // Get basic build, version, and cluster information. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-api-root.html - Info core_info.NewInfo - // Run a knn search. - // - // NOTE: The kNN search API has been replaced by the `knn` option in the search - // API. - // - // Perform a k-nearest neighbor (kNN) search on a dense_vector field and return - // the matching documents. - // Given a query vector, the API finds the k closest vectors and returns those - // documents as search hits. - // - // Elasticsearch uses the HNSW algorithm to support efficient kNN search. - // Like most kNN algorithms, HNSW is an approximate method that sacrifices - // result accuracy for improved search speed. - // This means the results returned are not always the true k closest neighbors. - // - // The kNN search API supports restricting the search using a filter. - // The search will return the top k documents that also match the filter query. - // - // A kNN search response has the exact same structure as a search API response. - // However, certain sections have a meaning specific to kNN search: - // - // * The document `_score` is determined by the similarity between the query and - // document vector. - // * The `hits.total` object contains the total number of nearest neighbor - // candidates considered, which is `num_candidates * num_shards`. The - // `hits.total.relation` will always be `eq`, indicating an exact value. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search-api.html - KnnSearch core_knn_search.NewKnnSearch - // Get multiple documents. - // - // Get multiple JSON documents by ID from one or more indices. - // If you specify an index in the request URI, you only need to specify the - // document IDs in the request body. - // To ensure fast responses, this multi get (mget) API responds with partial - // results if one or more shards fail. - // - // **Filter source fields** - // - // By default, the `_source` field is returned for every document (if stored). - // Use the `_source` and `_source_include` or `source_exclude` attributes to - // filter what fields are returned for a particular document. - // You can include the `_source`, `_source_includes`, and `_source_excludes` - // query parameters in the request URI to specify the defaults to use when there - // are no per-document instructions. - // - // **Get stored fields** - // - // Use the `stored_fields` attribute to specify the set of stored fields you - // want to retrieve. - // Any requested fields that are not stored are ignored. - // You can include the `stored_fields` query parameter in the request URI to - // specify the defaults to use when there are no per-document instructions. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html - Mget core_mget.NewMget - // Run multiple searches. - // - // The format of the request is similar to the bulk API format and makes use of - // the newline delimited JSON (NDJSON) format. - // The structure is as follows: - // - // ``` - // header\n - // body\n - // header\n - // body\n - // ``` - // - // This structure is specifically optimized to reduce parsing if a specific - // search ends up redirected to another node. - // - // IMPORTANT: The final line of data must end with a newline character `\n`. - // Each newline character may be preceded by a carriage return `\r`. - // When sending requests to this endpoint the `Content-Type` header should be - // set to `application/x-ndjson`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html - Msearch core_msearch.NewMsearch - // Run multiple templated searches. - // - // Run multiple templated searches with a single request. - // If you are providing a text file or text input to `curl`, use the - // `--data-binary` flag instead of `-d` to preserve newlines. - // For example: - // - // ``` - // $ cat requests - // { "index": "my-index" } - // { "id": "my-search-template", "params": { "query_string": "hello world", - // "from": 0, "size": 10 }} - // { "index": "my-other-index" } - // { "id": "my-other-search-template", "params": { "query_type": "match_all" }} - // - // $ curl -H "Content-Type: application/x-ndjson" -XGET - // localhost:9200/_msearch/template --data-binary "@requests"; echo - // ``` - // https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-search-template.html - MsearchTemplate core_msearch_template.NewMsearchTemplate - // Get multiple term vectors. - // - // Get multiple term vectors with a single request. - // You can specify existing documents by index and ID or provide artificial - // documents in the body of the request. - // You can specify the index in the request body or request URI. - // The response contains a `docs` array with all the fetched termvectors. - // Each element has the structure provided by the termvectors API. - // - // **Artificial documents** - // - // You can also use `mtermvectors` to generate term vectors for artificial - // documents provided in the body of the request. - // The mapping used is determined by the specified `_index`. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html - Mtermvectors core_mtermvectors.NewMtermvectors - // Open a point in time. - // - // A search request by default runs against the most recent visible data of the - // target indices, - // which is called point in time. Elasticsearch pit (point in time) is a - // lightweight view into the - // state of the data as it existed when initiated. In some cases, it’s preferred - // to perform multiple - // search requests using the same point in time. For example, if refreshes - // happen between - // `search_after` requests, then the results of those requests might not be - // consistent as changes happening - // between searches are only visible to the more recent point in time. - // - // A point in time must be opened explicitly before being used in search - // requests. - // - // A subsequent search request with the `pit` parameter must not specify - // `index`, `routing`, or `preference` values as these parameters are copied - // from the point in time. - // - // Just like regular searches, you can use `from` and `size` to page through - // point in time search results, up to the first 10,000 hits. - // If you want to retrieve more hits, use PIT with `search_after`. - // - // IMPORTANT: The open point in time request and each subsequent search request - // can return different identifiers; always use the most recently received ID - // for the next search request. - // - // When a PIT that contains shard failures is used in a search request, the - // missing are always reported in the search response as a - // `NoShardAvailableActionException` exception. - // To get rid of these exceptions, a new PIT needs to be created so that shards - // missing from the previous PIT can be handled, assuming they become available - // in the meantime. - // - // **Keeping point in time alive** - // - // The `keep_alive` parameter, which is passed to a open point in time request - // and search request, extends the time to live of the corresponding point in - // time. - // The value does not need to be long enough to process all data — it just needs - // to be long enough for the next request. - // - // Normally, the background merge process optimizes the index by merging - // together smaller segments to create new, bigger segments. - // Once the smaller segments are no longer needed they are deleted. - // However, open point-in-times prevent the old segments from being deleted - // since they are still in use. - // - // TIP: Keeping older segments alive means that more disk space and file handles - // are needed. - // Ensure that you have configured your nodes to have ample free file handles. - // - // Additionally, if a segment contains deleted or updated documents then the - // point in time must keep track of whether each document in the segment was - // live at the time of the initial search request. - // Ensure that your nodes have sufficient heap space if you have many open - // point-in-times on an index that is subject to ongoing deletes or updates. - // Note that a point-in-time doesn't prevent its associated indices from being - // deleted. - // You can check how many point-in-times (that is, search contexts) are open - // with the nodes stats API. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html - OpenPointInTime core_open_point_in_time.NewOpenPointInTime - // Ping the cluster. - // Get information about whether the cluster is running. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html - Ping core_ping.NewPing - // Create or update a script or search template. - // Creates or updates a stored script or search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/create-stored-script-api.html - PutScript core_put_script.NewPutScript - // Evaluate ranked search results. - // - // Evaluate the quality of ranked search results over a set of typical search - // queries. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html - RankEval core_rank_eval.NewRankEval - // Reindex documents. - // - // Copy documents from a source to a destination. - // You can copy all documents to the destination index or reindex a subset of - // the documents. - // The source can be any existing index, alias, or data stream. - // The destination must differ from the source. - // For example, you cannot reindex a data stream into itself. - // - // IMPORTANT: Reindex requires `_source` to be enabled for all documents in the - // source. - // The destination should be configured as wanted before calling the reindex - // API. - // Reindex does not copy the settings from the source or its associated - // template. - // Mappings, shard counts, and replicas, for example, must be configured ahead - // of time. - // - // If the Elasticsearch security features are enabled, you must have the - // following security privileges: - // - // * The `read` index privilege for the source data stream, index, or alias. - // * The `write` index privilege for the destination data stream, index, or - // index alias. - // * To automatically create a data stream or index with a reindex API request, - // you must have the `auto_configure`, `create_index`, or `manage` index - // privilege for the destination data stream, index, or alias. - // * If reindexing from a remote cluster, the `source.remote.user` must have the - // `monitor` cluster privilege and the `read` index privilege for the source - // data stream, index, or alias. - // - // If reindexing from a remote cluster, you must explicitly allow the remote - // host in the `reindex.remote.whitelist` setting. - // Automatic data stream creation requires a matching index template with data - // stream enabled. - // - // The `dest` element can be configured like the index API to control optimistic - // concurrency control. - // Omitting `version_type` or setting it to `internal` causes Elasticsearch to - // blindly dump documents into the destination, overwriting any that happen to - // have the same ID. - // - // Setting `version_type` to `external` causes Elasticsearch to preserve the - // `version` from the source, create any documents that are missing, and update - // any documents that have an older version in the destination than they do in - // the source. - // - // Setting `op_type` to `create` causes the reindex API to create only missing - // documents in the destination. - // All existing documents will cause a version conflict. - // - // IMPORTANT: Because data streams are append-only, any reindex request to a - // destination data stream must have an `op_type` of `create`. - // A reindex can only add new documents to a destination data stream. - // It cannot update existing documents in a destination data stream. - // - // By default, version conflicts abort the reindex process. - // To continue reindexing if there are conflicts, set the `conflicts` request - // body property to `proceed`. - // In this case, the response includes a count of the version conflicts that - // were encountered. - // Note that the handling of other error types is unaffected by the `conflicts` - // property. - // Additionally, if you opt to count version conflicts, the operation could - // attempt to reindex more documents from the source than `max_docs` until it - // has successfully indexed `max_docs` documents into the target or it has gone - // through every document in the source query. - // - // NOTE: The reindex API makes no effort to handle ID collisions. - // The last document written will "win" but the order isn't usually predictable - // so it is not a good idea to rely on this behavior. - // Instead, make sure that IDs are unique by using a script. - // - // **Running reindex asynchronously** - // - // If the request contains `wait_for_completion=false`, Elasticsearch performs - // some preflight checks, launches the request, and returns a task you can use - // to cancel or get the status of the task. - // Elasticsearch creates a record of this task as a document at - // `_tasks/`. - // - // **Reindex from multiple sources** - // - // If you have many sources to reindex it is generally better to reindex them - // one at a time rather than using a glob pattern to pick up multiple sources. - // That way you can resume the process if there are any errors by removing the - // partially completed source and starting over. - // It also makes parallelizing the process fairly simple: split the list of - // sources to reindex and run each list in parallel. - // - // For example, you can use a bash script like this: - // - // ``` - // for index in i1 i2 i3 i4 i5; do - // curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty - // -d'{ - // "source": { - // "index": "'$index'" - // }, - // "dest": { - // "index": "'$index'-reindexed" - // } - // }' - // done - // ``` - // - // **Throttling** - // - // Set `requests_per_second` to any positive decimal number (`1.4`, `6`, `1000`, - // for example) to throttle the rate at which reindex issues batches of index - // operations. - // Requests are throttled by padding each batch with a wait time. - // To turn off throttling, set `requests_per_second` to `-1`. - // - // The throttling is done by waiting between batches so that the scroll that - // reindex uses internally can be given a timeout that takes into account the - // padding. - // The padding time is the difference between the batch size divided by the - // `requests_per_second` and the time spent writing. - // By default the batch size is `1000`, so if `requests_per_second` is set to - // `500`: - // - // ``` - // target_time = 1000 / 500 per second = 2 seconds - // wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds - // ``` - // - // Since the batch is issued as a single bulk request, large batch sizes cause - // Elasticsearch to create many requests and then wait for a while before - // starting the next set. - // This is "bursty" instead of "smooth". - // - // **Slicing** - // - // Reindex supports sliced scroll to parallelize the reindexing process. - // This parallelization can improve efficiency and provide a convenient way to - // break the request down into smaller parts. - // - // NOTE: Reindexing from remote clusters does not support manual or automatic - // slicing. - // - // You can slice a reindex request manually by providing a slice ID and total - // number of slices to each request. - // You can also let reindex automatically parallelize by using sliced scroll to - // slice on `_id`. - // The `slices` parameter specifies the number of slices to use. - // - // Adding `slices` to the reindex request just automates the manual process, - // creating sub-requests which means it has some quirks: - // - // * You can see these requests in the tasks API. These sub-requests are "child" - // tasks of the task for the request with slices. - // * Fetching the status of the task for the request with `slices` only contains - // the status of completed slices. - // * These sub-requests are individually addressable for things like - // cancellation and rethrottling. - // * Rethrottling the request with `slices` will rethrottle the unfinished - // sub-request proportionally. - // * Canceling the request with `slices` will cancel each sub-request. - // * Due to the nature of `slices`, each sub-request won't get a perfectly even - // portion of the documents. All documents will be addressed, but some slices - // may be larger than others. Expect larger slices to have a more even - // distribution. - // * Parameters like `requests_per_second` and `max_docs` on a request with - // `slices` are distributed proportionally to each sub-request. Combine that - // with the previous point about distribution being uneven and you should - // conclude that using `max_docs` with `slices` might not result in exactly - // `max_docs` documents being reindexed. - // * Each sub-request gets a slightly different snapshot of the source, though - // these are all taken at approximately the same time. - // - // If slicing automatically, setting `slices` to `auto` will choose a reasonable - // number for most indices. - // If slicing manually or otherwise tuning automatic slicing, use the following - // guidelines. - // - // Query performance is most efficient when the number of slices is equal to the - // number of shards in the index. - // If that number is large (for example, `500`), choose a lower number as too - // many slices will hurt performance. - // Setting slices higher than the number of shards generally does not improve - // efficiency and adds overhead. - // - // Indexing performance scales linearly across available resources with the - // number of slices. - // - // Whether query or indexing performance dominates the runtime depends on the - // documents being reindexed and cluster resources. - // - // **Modify documents during reindexing** - // - // Like `_update_by_query`, reindex operations support a script that modifies - // the document. - // Unlike `_update_by_query`, the script is allowed to modify the document's - // metadata. - // - // Just as in `_update_by_query`, you can set `ctx.op` to change the operation - // that is run on the destination. - // For example, set `ctx.op` to `noop` if your script decides that the document - // doesn’t have to be indexed in the destination. This "no operation" will be - // reported in the `noop` counter in the response body. - // Set `ctx.op` to `delete` if your script decides that the document must be - // deleted from the destination. - // The deletion will be reported in the `deleted` counter in the response body. - // Setting `ctx.op` to anything else will return an error, as will setting any - // other field in `ctx`. - // - // Think of the possibilities! Just be careful; you are able to change: - // - // * `_id` - // * `_index` - // * `_version` - // * `_routing` - // - // Setting `_version` to `null` or clearing it from the `ctx` map is just like - // not sending the version in an indexing request. - // It will cause the document to be overwritten in the destination regardless of - // the version on the target or the version type you use in the reindex API. - // - // **Reindex from remote** - // - // Reindex supports reindexing from a remote Elasticsearch cluster. - // The `host` parameter must contain a scheme, host, port, and optional path. - // The `username` and `password` parameters are optional and when they are - // present the reindex operation will connect to the remote Elasticsearch node - // using basic authentication. - // Be sure to use HTTPS when using basic authentication or the password will be - // sent in plain text. - // There are a range of settings available to configure the behavior of the - // HTTPS connection. - // - // When using Elastic Cloud, it is also possible to authenticate against the - // remote cluster through the use of a valid API key. - // Remote hosts must be explicitly allowed with the `reindex.remote.whitelist` - // setting. - // It can be set to a comma delimited list of allowed remote host and port - // combinations. - // Scheme is ignored; only the host and port are used. - // For example: - // - // ``` - // reindex.remote.whitelist: [otherhost:9200, another:9200, 127.0.10.*:9200, - // localhost:*"] - // ``` - // - // The list of allowed hosts must be configured on any nodes that will - // coordinate the reindex. - // This feature should work with remote clusters of any version of - // Elasticsearch. - // This should enable you to upgrade from any version of Elasticsearch to the - // current version by reindexing from a cluster of the old version. - // - // WARNING: Elasticsearch does not support forward compatibility across major - // versions. - // For example, you cannot reindex from a 7.x cluster into a 6.x cluster. - // - // To enable queries sent to older versions of Elasticsearch, the `query` - // parameter is sent directly to the remote host without validation or - // modification. - // - // NOTE: Reindexing from remote clusters does not support manual or automatic - // slicing. - // - // Reindexing from a remote server uses an on-heap buffer that defaults to a - // maximum size of 100mb. - // If the remote index includes very large documents you'll need to use a - // smaller batch size. - // It is also possible to set the socket read timeout on the remote connection - // with the `socket_timeout` field and the connection timeout with the - // `connect_timeout` field. - // Both default to 30 seconds. - // - // **Configuring SSL parameters** - // - // Reindex from remote supports configurable SSL settings. - // These must be specified in the `elasticsearch.yml` file, with the exception - // of the secure settings, which you add in the Elasticsearch keystore. - // It is not possible to configure SSL in the body of the reindex request. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html - Reindex core_reindex.NewReindex - // Throttle a reindex operation. - // - // Change the number of requests per second for a particular reindex operation. - // For example: - // - // ``` - // POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 - // ``` - // - // Rethrottling that speeds up the query takes effect immediately. - // Rethrottling that slows down the query will take effect after completing the - // current batch. - // This behavior prevents scroll timeouts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html - ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle - // Render a search template. - // - // Render a search template as a search request body. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html - RenderSearchTemplate core_render_search_template.NewRenderSearchTemplate - // Run a script. - // - // Runs a script and returns a result. - // Use this API to build and test scripts, such as when defining a script for a - // runtime field. - // This API requires very few dependencies and is especially useful if you don't - // have permissions to write documents on a cluster. - // - // The API uses several _contexts_, which control how scripts are run, what - // variables are available at runtime, and what the return type is. - // - // Each context requires a script, but additional parameters depend on the - // context you're using for that script. - // https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html - ScriptsPainlessExecute core_scripts_painless_execute.NewScriptsPainlessExecute - // Run a scrolling search. - // - // IMPORTANT: The scroll API is no longer recommend for deep pagination. If you - // need to preserve the index state while paging through more than 10,000 hits, - // use the `search_after` parameter with a point in time (PIT). - // - // The scroll API gets large sets of results from a single scrolling search - // request. - // To get the necessary scroll ID, submit a search API request that includes an - // argument for the `scroll` query parameter. - // The `scroll` parameter indicates how long Elasticsearch should retain the - // search context for the request. - // The search response returns a scroll ID in the `_scroll_id` response body - // parameter. - // You can then use the scroll ID with the scroll API to retrieve the next batch - // of results for the request. - // If the Elasticsearch security features are enabled, the access to the results - // of a specific scroll ID is restricted to the user or API key that submitted - // the search. - // - // You can also use the scroll API to specify a new scroll parameter that - // extends or shortens the retention period for the search context. - // - // IMPORTANT: Results from a scrolling search reflect the state of the index at - // the time of the initial search request. Subsequent indexing or document - // changes only affect later search and scroll requests. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/scroll-api.html - Scroll core_scroll.NewScroll - // Run a search. - // - // Get search hits that match the query defined in the request. - // You can provide search queries using the `q` query string parameter or the - // request body. - // If both are specified, only the query parameter is used. - // - // If the Elasticsearch security features are enabled, you must have the read - // index privilege for the target data stream, index, or alias. For - // cross-cluster search, refer to the documentation about configuring CCS - // privileges. - // To search a point in time (PIT) for an alias, you must have the `read` index - // privilege for the alias's data streams or indices. - // - // **Search slicing** - // - // When paging through a large number of documents, it can be helpful to split - // the search into multiple slices to consume them independently with the - // `slice` and `pit` properties. - // By default the splitting is done first on the shards, then locally on each - // shard. - // The local splitting partitions the shard into contiguous ranges based on - // Lucene document IDs. - // - // For instance if the number of shards is equal to 2 and you request 4 slices, - // the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are - // assigned to the second shard. - // - // IMPORTANT: The same point-in-time ID should be used for all slices. - // If different PIT IDs are used, slices can overlap and miss documents. - // This situation can occur because the splitting criterion is based on Lucene - // document IDs, which are not stable across changes to the index. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html - Search core_search.NewSearch - // Search a vector tile. - // - // Search a vector tile for geospatial values. - // Before using this API, you should be familiar with the Mapbox vector tile - // specification. - // The API returns results as a binary mapbox vector tile. - // - // Internally, Elasticsearch translates a vector tile search API request into a - // search containing: - // - // * A `geo_bounding_box` query on the ``. The query uses the - // `//` tile as a bounding box. - // * A `geotile_grid` or `geohex_grid` aggregation on the ``. The - // `grid_agg` parameter determines the aggregation type. The aggregation uses - // the `//` tile as a bounding box. - // * Optionally, a `geo_bounds` aggregation on the ``. The search only - // includes this aggregation if the `exact_bounds` parameter is `true`. - // * If the optional parameter `with_labels` is `true`, the internal search will - // include a dynamic runtime field that calls the `getLabelPosition` function of - // the geometry doc value. This enables the generation of new point features - // containing suggested geometry labels, so that, for example, multi-polygons - // will have only one label. - // - // For example, Elasticsearch may translate a vector tile search API request - // with a `grid_agg` argument of `geotile` and an `exact_bounds` argument of - // `true` into the following search - // - // ``` - // GET my-index/_search - // { - // "size": 10000, - // "query": { - // "geo_bounding_box": { - // "my-geo-field": { - // "top_left": { - // "lat": -40.979898069620134, - // "lon": -45 - // }, - // "bottom_right": { - // "lat": -66.51326044311186, - // "lon": 0 - // } - // } - // } - // }, - // "aggregations": { - // "grid": { - // "geotile_grid": { - // "field": "my-geo-field", - // "precision": 11, - // "size": 65536, - // "bounds": { - // "top_left": { - // "lat": -40.979898069620134, - // "lon": -45 - // }, - // "bottom_right": { - // "lat": -66.51326044311186, - // "lon": 0 - // } - // } - // } - // }, - // "bounds": { - // "geo_bounds": { - // "field": "my-geo-field", - // "wrap_longitude": false - // } - // } - // } - // } - // ``` - // - // The API returns results as a binary Mapbox vector tile. - // Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the - // tile contains three layers: - // - // * A `hits` layer containing a feature for each `` value matching the - // `geo_bounding_box` query. - // * An `aggs` layer containing a feature for each cell of the `geotile_grid` or - // `geohex_grid`. The layer only contains features for cells with matching data. - // * A meta layer containing: - // * A feature containing a bounding box. By default, this is the bounding box - // of the tile. - // * Value ranges for any sub-aggregations on the `geotile_grid` or - // `geohex_grid`. - // * Metadata for the search. - // - // The API only returns features that can display at its zoom level. - // For example, if a polygon feature has no area at its zoom level, the API - // omits it. - // The API returns errors as UTF-8 encoded JSON. - // - // IMPORTANT: You can specify several options for this API as either a query - // parameter or request body parameter. - // If you specify both parameters, the query parameter takes precedence. - // - // **Grid precision for geotile** - // - // For a `grid_agg` of `geotile`, you can use cells in the `aggs` layer as tiles - // for lower zoom levels. - // `grid_precision` represents the additional zoom levels available through - // these cells. The final precision is computed by as follows: ` + - // grid_precision`. - // For example, if `` is 7 and `grid_precision` is 8, then the - // `geotile_grid` aggregation will use a precision of 15. - // The maximum final precision is 29. - // The `grid_precision` also determines the number of cells for the grid as - // follows: `(2^grid_precision) x (2^grid_precision)`. - // For example, a value of 8 divides the tile into a grid of 256 x 256 cells. - // The `aggs` layer only contains features for cells with matching data. - // - // **Grid precision for geohex** - // - // For a `grid_agg` of `geohex`, Elasticsearch uses `` and - // `grid_precision` to calculate a final precision as follows: ` + - // grid_precision`. - // - // This precision determines the H3 resolution of the hexagonal cells produced - // by the `geohex` aggregation. - // The following table maps the H3 resolution for each precision. - // For example, if `` is 3 and `grid_precision` is 3, the precision is 6. - // At a precision of 6, hexagonal cells have an H3 resolution of 2. - // If `` is 3 and `grid_precision` is 4, the precision is 7. - // At a precision of 7, hexagonal cells have an H3 resolution of 3. - // - // | Precision | Unique tile bins | H3 resolution | Unique hex bins | Ratio | - // | --------- | ---------------- | ------------- | ----------------| ----- | - // | 1 | 4 | 0 | 122 | 30.5 | - // | 2 | 16 | 0 | 122 | 7.625 | - // | 3 | 64 | 1 | 842 | 13.15625 | - // | 4 | 256 | 1 | 842 | 3.2890625 | - // | 5 | 1024 | 2 | 5882 | 5.744140625 | - // | 6 | 4096 | 2 | 5882 | 1.436035156 | - // | 7 | 16384 | 3 | 41162 | 2.512329102 | - // | 8 | 65536 | 3 | 41162 | 0.6280822754 | - // | 9 | 262144 | 4 | 288122 | 1.099098206 | - // | 10 | 1048576 | 4 | 288122 | 0.2747745514 | - // | 11 | 4194304 | 5 | 2016842 | 0.4808526039 | - // | 12 | 16777216 | 6 | 14117882 | 0.8414913416 | - // | 13 | 67108864 | 6 | 14117882 | 0.2103728354 | - // | 14 | 268435456 | 7 | 98825162 | 0.3681524172 | - // | 15 | 1073741824 | 8 | 691776122 | 0.644266719 | - // | 16 | 4294967296 | 8 | 691776122 | 0.1610666797 | - // | 17 | 17179869184 | 9 | 4842432842 | 0.2818666889 | - // | 18 | 68719476736 | 10 | 33897029882 | 0.4932667053 | - // | 19 | 274877906944 | 11 | 237279209162 | 0.8632167343 | - // | 20 | 1099511627776 | 11 | 237279209162 | 0.2158041836 | - // | 21 | 4398046511104 | 12 | 1660954464122 | 0.3776573213 | - // | 22 | 17592186044416 | 13 | 11626681248842 | 0.6609003122 | - // | 23 | 70368744177664 | 13 | 11626681248842 | 0.165225078 | - // | 24 | 281474976710656 | 14 | 81386768741882 | 0.2891438866 | - // | 25 | 1125899906842620 | 15 | 569707381193162 | 0.5060018015 | - // | 26 | 4503599627370500 | 15 | 569707381193162 | 0.1265004504 | - // | 27 | 18014398509482000 | 15 | 569707381193162 | 0.03162511259 | - // | 28 | 72057594037927900 | 15 | 569707381193162 | 0.007906278149 | - // | 29 | 288230376151712000 | 15 | 569707381193162 | 0.001976569537 | - // - // Hexagonal cells don't align perfectly on a vector tile. - // Some cells may intersect more than one vector tile. - // To compute the H3 resolution for each precision, Elasticsearch compares the - // average density of hexagonal bins at each resolution with the average density - // of tile bins at each zoom level. - // Elasticsearch uses the H3 resolution that is closest to the corresponding - // geotile density. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html - SearchMvt core_search_mvt.NewSearchMvt - // Get the search shards. - // - // Get the indices and shards that a search request would be run against. - // This information can be useful for working out issues or planning - // optimizations with routing and shard preferences. - // When filtered aliases are used, the filter is returned as part of the - // `indices` section. - // - // If the Elasticsearch security features are enabled, you must have the - // `view_index_metadata` or `manage` index privilege for the target data stream, - // index, or alias. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html - SearchShards core_search_shards.NewSearchShards - // Run a search with a search template. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template-api.html - SearchTemplate core_search_template.NewSearchTemplate - // Get terms in an index. - // - // Discover terms that match a partial string in an index. - // This API is designed for low-latency look-ups used in auto-complete - // scenarios. - // - // > info - // > The terms enum API may return terms from deleted documents. Deleted - // documents are initially only marked as deleted. It is not until their - // segments are merged that documents are actually deleted. Until that happens, - // the terms enum API will return terms from these documents. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html - TermsEnum core_terms_enum.NewTermsEnum - // Get term vector information. - // - // Get information and statistics about terms in the fields of a particular - // document. - // - // You can retrieve term vectors for documents stored in the index or for - // artificial documents passed in the body of the request. - // You can specify the fields you are interested in through the `fields` - // parameter or by adding the fields to the request body. - // For example: - // - // ``` - // GET /my-index-000001/_termvectors/1?fields=message - // ``` - // - // Fields can be specified using wildcards, similar to the multi match query. - // - // Term vectors are real-time by default, not near real-time. - // This can be changed by setting `realtime` parameter to `false`. - // - // You can request three types of values: _term information_, _term statistics_, - // and _field statistics_. - // By default, all term information and field statistics are returned for all - // fields but term statistics are excluded. - // - // **Term information** - // - // * term frequency in the field (always returned) - // * term positions (`positions: true`) - // * start and end offsets (`offsets: true`) - // * term payloads (`payloads: true`), as base64 encoded bytes - // - // If the requested information wasn't stored in the index, it will be computed - // on the fly if possible. - // Additionally, term vectors could be computed for documents not even existing - // in the index, but instead provided by the user. - // - // > warn - // > Start and end offsets assume UTF-16 encoding is being used. If you want to - // use these offsets in order to get the original text that produced this token, - // you should make sure that the string you are taking a sub-string of is also - // encoded using UTF-16. - // - // **Behaviour** - // - // The term and field statistics are not accurate. - // Deleted documents are not taken into account. - // The information is only retrieved for the shard the requested document - // resides in. - // The term and field statistics are therefore only useful as relative measures - // whereas the absolute numbers have no meaning in this context. - // By default, when requesting term vectors of artificial documents, a shard to - // get the statistics from is randomly selected. - // Use `routing` only to hit a particular shard. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html - Termvectors core_termvectors.NewTermvectors - // Update a document. - // - // Update a document by running a script or passing a partial document. - // - // If the Elasticsearch security features are enabled, you must have the `index` - // or `write` index privilege for the target index or index alias. - // - // The script can update, delete, or skip modifying the document. - // The API also supports passing a partial document, which is merged into the - // existing document. - // To fully replace an existing document, use the index API. - // This operation: - // - // * Gets the document (collocated with the shard) from the index. - // * Runs the specified script. - // * Indexes the result. - // - // The document must still be reindexed, but using this API removes some network - // roundtrips and reduces chances of version conflicts between the GET and the - // index operation. - // - // The `_source` field must be enabled to use this API. - // In addition to `_source`, you can access the following variables through the - // `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the - // current timestamp). - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html - Update core_update.NewUpdate - // Update documents. - // Updates documents that match the specified query. - // If no query is specified, performs an update on every document in the data - // stream or index without modifying the source, which is useful for picking up - // mapping changes. - // - // If the Elasticsearch security features are enabled, you must have the - // following index privileges for the target data stream, index, or alias: - // - // * `read` - // * `index` or `write` - // - // You can specify the query criteria in the request URI or the request body - // using the same syntax as the search API. - // - // When you submit an update by query request, Elasticsearch gets a snapshot of - // the data stream or index when it begins processing the request and updates - // matching documents using internal versioning. - // When the versions match, the document is updated and the version number is - // incremented. - // If a document changes between the time that the snapshot is taken and the - // update operation is processed, it results in a version conflict and the - // operation fails. - // You can opt to count version conflicts instead of halting and returning by - // setting `conflicts` to `proceed`. - // Note that if you opt to count version conflicts, the operation could attempt - // to update more documents from the source than `max_docs` until it has - // successfully updated `max_docs` documents or it has gone through every - // document in the source query. - // - // NOTE: Documents with a version equal to 0 cannot be updated using update by - // query because internal versioning does not support 0 as a valid version - // number. - // - // While processing an update by query request, Elasticsearch performs multiple - // search requests sequentially to find all of the matching documents. - // A bulk update request is performed for each batch of matching documents. - // Any query or update failures cause the update by query request to fail and - // the failures are shown in the response. - // Any update requests that completed successfully still stick, they are not - // rolled back. - // - // **Throttling update requests** - // - // To control the rate at which update by query issues batches of update - // operations, you can set `requests_per_second` to any positive decimal number. - // This pads each batch with a wait time to throttle the rate. - // Set `requests_per_second` to `-1` to turn off throttling. - // - // Throttling uses a wait time between batches so that the internal scroll - // requests can be given a timeout that takes the request padding into account. - // The padding time is the difference between the batch size divided by the - // `requests_per_second` and the time spent writing. - // By default the batch size is 1000, so if `requests_per_second` is set to - // `500`: - // - // ``` - // target_time = 1000 / 500 per second = 2 seconds - // wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds - // ``` - // - // Since the batch is issued as a single _bulk request, large batch sizes cause - // Elasticsearch to create many requests and wait before starting the next set. - // This is "bursty" instead of "smooth". - // - // **Slicing** - // - // Update by query supports sliced scroll to parallelize the update process. - // This can improve efficiency and provide a convenient way to break the request - // down into smaller parts. - // - // Setting `slices` to `auto` chooses a reasonable number for most data streams - // and indices. - // This setting will use one slice per shard, up to a certain limit. - // If there are multiple source data streams or indices, it will choose the - // number of slices based on the index or backing index with the smallest number - // of shards. - // - // Adding `slices` to `_update_by_query` just automates the manual process of - // creating sub-requests, which means it has some quirks: - // - // * You can see these requests in the tasks APIs. These sub-requests are - // "child" tasks of the task for the request with slices. - // * Fetching the status of the task for the request with `slices` only contains - // the status of completed slices. - // * These sub-requests are individually addressable for things like - // cancellation and rethrottling. - // * Rethrottling the request with `slices` will rethrottle the unfinished - // sub-request proportionally. - // * Canceling the request with slices will cancel each sub-request. - // * Due to the nature of slices each sub-request won't get a perfectly even - // portion of the documents. All documents will be addressed, but some slices - // may be larger than others. Expect larger slices to have a more even - // distribution. - // * Parameters like `requests_per_second` and `max_docs` on a request with - // slices are distributed proportionally to each sub-request. Combine that with - // the point above about distribution being uneven and you should conclude that - // using `max_docs` with `slices` might not result in exactly `max_docs` - // documents being updated. - // * Each sub-request gets a slightly different snapshot of the source data - // stream or index though these are all taken at approximately the same time. - // - // If you're slicing manually or otherwise tuning automatic slicing, keep in - // mind that: - // - // * Query performance is most efficient when the number of slices is equal to - // the number of shards in the index or backing index. If that number is large - // (for example, 500), choose a lower number as too many slices hurts - // performance. Setting slices higher than the number of shards generally does - // not improve efficiency and adds overhead. - // * Update performance scales linearly across available resources with the - // number of slices. - // - // Whether query or update performance dominates the runtime depends on the - // documents being reindexed and cluster resources. - // - // **Update the document source** - // - // Update by query supports scripts to update the document source. - // As with the update API, you can set `ctx.op` to change the operation that is - // performed. - // - // Set `ctx.op = "noop"` if your script decides that it doesn't have to make any - // changes. - // The update by query operation skips updating the document and increments the - // `noop` counter. - // - // Set `ctx.op = "delete"` if your script decides that the document should be - // deleted. - // The update by query operation deletes the document and increments the - // `deleted` counter. - // - // Update by query supports only `index`, `noop`, and `delete`. - // Setting `ctx.op` to anything else is an error. - // Setting any other field in `ctx` is an error. - // This API enables you to only modify the source of matching documents; you - // cannot move them. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html - UpdateByQuery core_update_by_query.NewUpdateByQuery - // Throttle an update by query operation. - // - // Change the number of requests per second for a particular update by query - // operation. - // Rethrottling that speeds up the query takes effect immediately but - // rethrotting that slows down the query takes effect after completing the - // current batch to prevent scroll timeouts. - // https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html#docs-update-by-query-rethrottle + DeleteScript core_delete_script.NewDeleteScript + Exists core_exists.NewExists + ExistsSource core_exists_source.NewExistsSource + Explain core_explain.NewExplain + FieldCaps core_field_caps.NewFieldCaps + Get core_get.NewGet + GetScript core_get_script.NewGetScript + GetScriptContext core_get_script_context.NewGetScriptContext + GetScriptLanguages core_get_script_languages.NewGetScriptLanguages + GetSource core_get_source.NewGetSource + HealthReport core_health_report.NewHealthReport + Index core_index.NewIndex + Info core_info.NewInfo + KnnSearch core_knn_search.NewKnnSearch + Mget core_mget.NewMget + Msearch core_msearch.NewMsearch + MsearchTemplate core_msearch_template.NewMsearchTemplate + Mtermvectors core_mtermvectors.NewMtermvectors + OpenPointInTime core_open_point_in_time.NewOpenPointInTime + Ping core_ping.NewPing + PutScript core_put_script.NewPutScript + RankEval core_rank_eval.NewRankEval + Reindex core_reindex.NewReindex + ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle + RenderSearchTemplate core_render_search_template.NewRenderSearchTemplate + ScriptsPainlessExecute core_scripts_painless_execute.NewScriptsPainlessExecute + Scroll core_scroll.NewScroll + Search core_search.NewSearch + SearchMvt core_search_mvt.NewSearchMvt + SearchShards core_search_shards.NewSearchShards + SearchTemplate core_search_template.NewSearchTemplate + TermsEnum core_terms_enum.NewTermsEnum + Termvectors core_termvectors.NewTermvectors + Update core_update.NewUpdate + UpdateByQuery core_update_by_query.NewUpdateByQuery UpdateByQueryRethrottle core_update_by_query_rethrottle.NewUpdateByQueryRethrottle } func New(tp elastictransport.Interface) *API { return &API{ - // AsyncSearch AsyncSearch: AsyncSearch{ Delete: async_search_delete.NewDeleteFunc(tp), Get: async_search_get.NewGetFunc(tp), @@ -10514,7 +1355,6 @@ func New(tp elastictransport.Interface) *API { Submit: async_search_submit.NewSubmitFunc(tp), }, - // Autoscaling Autoscaling: Autoscaling{ DeleteAutoscalingPolicy: autoscaling_delete_autoscaling_policy.NewDeleteAutoscalingPolicyFunc(tp), GetAutoscalingCapacity: autoscaling_get_autoscaling_capacity.NewGetAutoscalingCapacityFunc(tp), @@ -10522,12 +1362,10 @@ func New(tp elastictransport.Interface) *API { PutAutoscalingPolicy: autoscaling_put_autoscaling_policy.NewPutAutoscalingPolicyFunc(tp), }, - // Capabilities Capabilities: Capabilities{ Capabilities: capabilities.NewCapabilitiesFunc(tp), }, - // Cat Cat: Cat{ Aliases: cat_aliases.NewAliasesFunc(tp), Allocation: cat_allocation.NewAllocationFunc(tp), @@ -10557,7 +1395,6 @@ func New(tp elastictransport.Interface) *API { Transforms: cat_transforms.NewTransformsFunc(tp), }, - // Ccr Ccr: Ccr{ DeleteAutoFollowPattern: ccr_delete_auto_follow_pattern.NewDeleteAutoFollowPatternFunc(tp), Follow: ccr_follow.NewFollowFunc(tp), @@ -10574,7 +1411,6 @@ func New(tp elastictransport.Interface) *API { Unfollow: ccr_unfollow.NewUnfollowFunc(tp), }, - // Cluster Cluster: Cluster{ AllocationExplain: cluster_allocation_explain.NewAllocationExplainFunc(tp), DeleteComponentTemplate: cluster_delete_component_template.NewDeleteComponentTemplateFunc(tp), @@ -10594,7 +1430,6 @@ func New(tp elastictransport.Interface) *API { Stats: cluster_stats.NewStatsFunc(tp), }, - // Connector Connector: Connector{ CheckIn: connector_check_in.NewCheckInFunc(tp), Delete: connector_delete.NewDeleteFunc(tp), @@ -10629,7 +1464,6 @@ func New(tp elastictransport.Interface) *API { UpdateStatus: connector_update_status.NewUpdateStatusFunc(tp), }, - // Core Core: Core{ Bulk: core_bulk.NewBulkFunc(tp), ClearScroll: core_clear_scroll.NewClearScrollFunc(tp), @@ -10677,14 +1511,12 @@ func New(tp elastictransport.Interface) *API { UpdateByQueryRethrottle: core_update_by_query_rethrottle.NewUpdateByQueryRethrottleFunc(tp), }, - // DanglingIndices DanglingIndices: DanglingIndices{ DeleteDanglingIndex: dangling_indices_delete_dangling_index.NewDeleteDanglingIndexFunc(tp), ImportDanglingIndex: dangling_indices_import_dangling_index.NewImportDanglingIndexFunc(tp), ListDanglingIndices: dangling_indices_list_dangling_indices.NewListDanglingIndicesFunc(tp), }, - // Enrich Enrich: Enrich{ DeletePolicy: enrich_delete_policy.NewDeletePolicyFunc(tp), ExecutePolicy: enrich_execute_policy.NewExecutePolicyFunc(tp), @@ -10693,7 +1525,6 @@ func New(tp elastictransport.Interface) *API { Stats: enrich_stats.NewStatsFunc(tp), }, - // Eql Eql: Eql{ Delete: eql_delete.NewDeleteFunc(tp), Get: eql_get.NewGetFunc(tp), @@ -10701,7 +1532,6 @@ func New(tp elastictransport.Interface) *API { Search: eql_search.NewSearchFunc(tp), }, - // Esql Esql: Esql{ AsyncQuery: esql_async_query.NewAsyncQueryFunc(tp), AsyncQueryDelete: esql_async_query_delete.NewAsyncQueryDeleteFunc(tp), @@ -10710,13 +1540,11 @@ func New(tp elastictransport.Interface) *API { Query: esql_query.NewQueryFunc(tp), }, - // Features Features: Features{ GetFeatures: features_get_features.NewGetFeaturesFunc(tp), ResetFeatures: features_reset_features.NewResetFeaturesFunc(tp), }, - // Fleet Fleet: Fleet{ GlobalCheckpoints: fleet_global_checkpoints.NewGlobalCheckpointsFunc(tp), Msearch: fleet_msearch.NewMsearchFunc(tp), @@ -10724,12 +1552,10 @@ func New(tp elastictransport.Interface) *API { Search: fleet_search.NewSearchFunc(tp), }, - // Graph Graph: Graph{ Explore: graph_explore.NewExploreFunc(tp), }, - // Ilm Ilm: Ilm{ DeleteLifecycle: ilm_delete_lifecycle.NewDeleteLifecycleFunc(tp), ExplainLifecycle: ilm_explain_lifecycle.NewExplainLifecycleFunc(tp), @@ -10744,7 +1570,6 @@ func New(tp elastictransport.Interface) *API { Stop: ilm_stop.NewStopFunc(tp), }, - // Indices Indices: Indices{ AddBlock: indices_add_block.NewAddBlockFunc(tp), Analyze: indices_analyze.NewAnalyzeFunc(tp), @@ -10812,7 +1637,6 @@ func New(tp elastictransport.Interface) *API { ValidateQuery: indices_validate_query.NewValidateQueryFunc(tp), }, - // Inference Inference: Inference{ ChatCompletionUnified: inference_chat_completion_unified.NewChatCompletionUnifiedFunc(tp), Completion: inference_completion.NewCompletionFunc(tp), @@ -10822,10 +1646,13 @@ func New(tp elastictransport.Interface) *API { Put: inference_put.NewPutFunc(tp), PutAlibabacloud: inference_put_alibabacloud.NewPutAlibabacloudFunc(tp), PutAmazonbedrock: inference_put_amazonbedrock.NewPutAmazonbedrockFunc(tp), + PutAmazonsagemaker: inference_put_amazonsagemaker.NewPutAmazonsagemakerFunc(tp), PutAnthropic: inference_put_anthropic.NewPutAnthropicFunc(tp), PutAzureaistudio: inference_put_azureaistudio.NewPutAzureaistudioFunc(tp), PutAzureopenai: inference_put_azureopenai.NewPutAzureopenaiFunc(tp), PutCohere: inference_put_cohere.NewPutCohereFunc(tp), + PutCustom: inference_put_custom.NewPutCustomFunc(tp), + PutDeepseek: inference_put_deepseek.NewPutDeepseekFunc(tp), PutElasticsearch: inference_put_elasticsearch.NewPutElasticsearchFunc(tp), PutElser: inference_put_elser.NewPutElserFunc(tp), PutGoogleaistudio: inference_put_googleaistudio.NewPutGoogleaistudioFunc(tp), @@ -10843,7 +1670,6 @@ func New(tp elastictransport.Interface) *API { Update: inference_update.NewUpdateFunc(tp), }, - // Ingest Ingest: Ingest{ DeleteGeoipDatabase: ingest_delete_geoip_database.NewDeleteGeoipDatabaseFunc(tp), DeleteIpLocationDatabase: ingest_delete_ip_location_database.NewDeleteIpLocationDatabaseFunc(tp), @@ -10859,7 +1685,6 @@ func New(tp elastictransport.Interface) *API { Simulate: ingest_simulate.NewSimulateFunc(tp), }, - // License License: License{ Delete: license_delete.NewDeleteFunc(tp), Get: license_get.NewGetFunc(tp), @@ -10870,21 +1695,18 @@ func New(tp elastictransport.Interface) *API { PostStartTrial: license_post_start_trial.NewPostStartTrialFunc(tp), }, - // Logstash Logstash: Logstash{ DeletePipeline: logstash_delete_pipeline.NewDeletePipelineFunc(tp), GetPipeline: logstash_get_pipeline.NewGetPipelineFunc(tp), PutPipeline: logstash_put_pipeline.NewPutPipelineFunc(tp), }, - // Migration Migration: Migration{ Deprecations: migration_deprecations.NewDeprecationsFunc(tp), GetFeatureUpgradeStatus: migration_get_feature_upgrade_status.NewGetFeatureUpgradeStatusFunc(tp), PostFeatureUpgrade: migration_post_feature_upgrade.NewPostFeatureUpgradeFunc(tp), }, - // Ml Ml: Ml{ ClearTrainedModelDeploymentCache: ml_clear_trained_model_deployment_cache.NewClearTrainedModelDeploymentCacheFunc(tp), CloseJob: ml_close_job.NewCloseJobFunc(tp), @@ -10961,12 +1783,10 @@ func New(tp elastictransport.Interface) *API { ValidateDetector: ml_validate_detector.NewValidateDetectorFunc(tp), }, - // Monitoring Monitoring: Monitoring{ Bulk: monitoring_bulk.NewBulkFunc(tp), }, - // Nodes Nodes: Nodes{ ClearRepositoriesMeteringArchive: nodes_clear_repositories_metering_archive.NewClearRepositoriesMeteringArchiveFunc(tp), GetRepositoriesMeteringInfo: nodes_get_repositories_metering_info.NewGetRepositoriesMeteringInfoFunc(tp), @@ -10977,7 +1797,6 @@ func New(tp elastictransport.Interface) *API { Usage: nodes_usage.NewUsageFunc(tp), }, - // Profiling Profiling: Profiling{ Flamegraph: profiling_flamegraph.NewFlamegraphFunc(tp), Stacktraces: profiling_stacktraces.NewStacktracesFunc(tp), @@ -10985,7 +1804,6 @@ func New(tp elastictransport.Interface) *API { TopnFunctions: profiling_topn_functions.NewTopnFunctionsFunc(tp), }, - // QueryRules QueryRules: QueryRules{ DeleteRule: query_rules_delete_rule.NewDeleteRuleFunc(tp), DeleteRuleset: query_rules_delete_ruleset.NewDeleteRulesetFunc(tp), @@ -10997,7 +1815,6 @@ func New(tp elastictransport.Interface) *API { Test: query_rules_test.NewTestFunc(tp), }, - // Rollup Rollup: Rollup{ DeleteJob: rollup_delete_job.NewDeleteJobFunc(tp), GetJobs: rollup_get_jobs.NewGetJobsFunc(tp), @@ -11009,7 +1826,6 @@ func New(tp elastictransport.Interface) *API { StopJob: rollup_stop_job.NewStopJobFunc(tp), }, - // SearchApplication SearchApplication: SearchApplication{ Delete: search_application_delete.NewDeleteFunc(tp), DeleteBehavioralAnalytics: search_application_delete_behavioral_analytics.NewDeleteBehavioralAnalyticsFunc(tp), @@ -11023,7 +1839,6 @@ func New(tp elastictransport.Interface) *API { Search: search_application_search.NewSearchFunc(tp), }, - // SearchableSnapshots SearchableSnapshots: SearchableSnapshots{ CacheStats: searchable_snapshots_cache_stats.NewCacheStatsFunc(tp), ClearCache: searchable_snapshots_clear_cache.NewClearCacheFunc(tp), @@ -11031,7 +1846,6 @@ func New(tp elastictransport.Interface) *API { Stats: searchable_snapshots_stats.NewStatsFunc(tp), }, - // Security Security: Security{ ActivateUserProfile: security_activate_user_profile.NewActivateUserProfileFunc(tp), Authenticate: security_authenticate.NewAuthenticateFunc(tp), @@ -11099,19 +1913,16 @@ func New(tp elastictransport.Interface) *API { UpdateUserProfileData: security_update_user_profile_data.NewUpdateUserProfileDataFunc(tp), }, - // Shutdown Shutdown: Shutdown{ DeleteNode: shutdown_delete_node.NewDeleteNodeFunc(tp), GetNode: shutdown_get_node.NewGetNodeFunc(tp), PutNode: shutdown_put_node.NewPutNodeFunc(tp), }, - // Simulate Simulate: Simulate{ Ingest: simulate_ingest.NewIngestFunc(tp), }, - // Slm Slm: Slm{ DeleteLifecycle: slm_delete_lifecycle.NewDeleteLifecycleFunc(tp), ExecuteLifecycle: slm_execute_lifecycle.NewExecuteLifecycleFunc(tp), @@ -11124,7 +1935,6 @@ func New(tp elastictransport.Interface) *API { Stop: slm_stop.NewStopFunc(tp), }, - // Snapshot Snapshot: Snapshot{ CleanupRepository: snapshot_cleanup_repository.NewCleanupRepositoryFunc(tp), Clone: snapshot_clone.NewCloneFunc(tp), @@ -11141,7 +1951,6 @@ func New(tp elastictransport.Interface) *API { VerifyRepository: snapshot_verify_repository.NewVerifyRepositoryFunc(tp), }, - // Sql Sql: Sql{ ClearCursor: sql_clear_cursor.NewClearCursorFunc(tp), DeleteAsync: sql_delete_async.NewDeleteAsyncFunc(tp), @@ -11151,12 +1960,16 @@ func New(tp elastictransport.Interface) *API { Translate: sql_translate.NewTranslateFunc(tp), }, - // Ssl Ssl: Ssl{ Certificates: ssl_certificates.NewCertificatesFunc(tp), }, - // Synonyms + Streams: Streams{ + LogsDisable: streams_logs_disable.NewLogsDisableFunc(tp), + LogsEnable: streams_logs_enable.NewLogsEnableFunc(tp), + Status: streams_status.NewStatusFunc(tp), + }, + Synonyms: Synonyms{ DeleteSynonym: synonyms_delete_synonym.NewDeleteSynonymFunc(tp), DeleteSynonymRule: synonyms_delete_synonym_rule.NewDeleteSynonymRuleFunc(tp), @@ -11167,14 +1980,12 @@ func New(tp elastictransport.Interface) *API { PutSynonymRule: synonyms_put_synonym_rule.NewPutSynonymRuleFunc(tp), }, - // Tasks Tasks: Tasks{ Cancel: tasks_cancel.NewCancelFunc(tp), Get: tasks_get.NewGetFunc(tp), List: tasks_list.NewListFunc(tp), }, - // TextStructure TextStructure: TextStructure{ FindFieldStructure: text_structure_find_field_structure.NewFindFieldStructureFunc(tp), FindMessageStructure: text_structure_find_message_structure.NewFindMessageStructureFunc(tp), @@ -11182,7 +1993,6 @@ func New(tp elastictransport.Interface) *API { TestGrokPattern: text_structure_test_grok_pattern.NewTestGrokPatternFunc(tp), }, - // Transform Transform: Transform{ DeleteTransform: transform_delete_transform.NewDeleteTransformFunc(tp), GetNodeStats: transform_get_node_stats.NewGetNodeStatsFunc(tp), @@ -11198,7 +2008,6 @@ func New(tp elastictransport.Interface) *API { UpgradeTransforms: transform_upgrade_transforms.NewUpgradeTransformsFunc(tp), }, - // Watcher Watcher: Watcher{ AckWatch: watcher_ack_watch.NewAckWatchFunc(tp), ActivateWatch: watcher_activate_watch.NewActivateWatchFunc(tp), @@ -11215,7 +2024,6 @@ func New(tp elastictransport.Interface) *API { UpdateSettings: watcher_update_settings.NewUpdateSettingsFunc(tp), }, - // Xpack Xpack: Xpack{ Info: xpack_info.NewInfoFunc(tp), Usage: xpack_usage.NewUsageFunc(tp), diff --git a/typedapi/asyncsearch/delete/delete.go b/typedapi/asyncsearch/delete/delete.go index daee1376e3..5ac527b1bc 100644 --- a/typedapi/asyncsearch/delete/delete.go +++ b/typedapi/asyncsearch/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an async search. // diff --git a/typedapi/asyncsearch/delete/response.go b/typedapi/asyncsearch/delete/response.go index 93165603e2..891677d122 100644 --- a/typedapi/asyncsearch/delete/response.go +++ b/typedapi/asyncsearch/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/asyncsearch/get/get.go b/typedapi/asyncsearch/get/get.go index 6f2c534c48..cf4b686012 100644 --- a/typedapi/asyncsearch/get/get.go +++ b/typedapi/asyncsearch/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get async search results. // diff --git a/typedapi/asyncsearch/get/response.go b/typedapi/asyncsearch/get/response.go index 638f531817..769ce0a14a 100644 --- a/typedapi/asyncsearch/get/response.go +++ b/typedapi/asyncsearch/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L24 type Response struct { // CompletionTime Indicates when the async search completed. diff --git a/typedapi/asyncsearch/status/response.go b/typedapi/asyncsearch/status/response.go index 89b9e79f91..0cac956a3f 100644 --- a/typedapi/asyncsearch/status/response.go +++ b/typedapi/asyncsearch/status/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package status @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L41 type Response struct { // Clusters_ Metadata about clusters involved in the cross-cluster search. diff --git a/typedapi/asyncsearch/status/status.go b/typedapi/asyncsearch/status/status.go index 0b45fbe523..9e2838465f 100644 --- a/typedapi/asyncsearch/status/status.go +++ b/typedapi/asyncsearch/status/status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the async search status. // diff --git a/typedapi/asyncsearch/submit/request.go b/typedapi/asyncsearch/submit/request.go index 08eb216468..e3e0f92690 100644 --- a/typedapi/asyncsearch/submit/request.go +++ b/typedapi/asyncsearch/submit/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package submit @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L55-L296 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L54-L294 type Request struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Collapse *types.FieldCollapse `json:"collapse,omitempty"` @@ -396,7 +396,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := types.NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/asyncsearch/submit/response.go b/typedapi/asyncsearch/submit/response.go index 2dcf99622d..32e87e9f81 100644 --- a/typedapi/asyncsearch/submit/response.go +++ b/typedapi/asyncsearch/submit/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package submit @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24 type Response struct { // CompletionTime Indicates when the async search completed. diff --git a/typedapi/asyncsearch/submit/submit.go b/typedapi/asyncsearch/submit/submit.go index f4f19695c2..b8b6993116 100644 --- a/typedapi/asyncsearch/submit/submit.go +++ b/typedapi/asyncsearch/submit/submit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run an async search. // @@ -495,13 +495,6 @@ func (r *Submit) MaxConcurrentShardRequests(maxconcurrentshardrequests string) * return r } -// API name: min_compatible_shard_node -func (r *Submit) MinCompatibleShardNode(versionstring string) *Submit { - r.values.Set("min_compatible_shard_node", versionstring) - - return r -} - // Preference Specify the node or shard the operation should be performed on (default: // random) // API name: preference @@ -656,182 +649,125 @@ func (r *Submit) Pretty(pretty bool) *Submit { // API name: aggregations func (r *Submit) Aggregations(aggregations map[string]types.Aggregations) *Submit { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Aggregations = aggregations - return r -} - -func (r *Submit) AddAggregation(key string, value types.AggregationsVariant) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.Aggregations - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggregations - } - - tmp[key] = *value.AggregationsCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } // API name: collapse -func (r *Submit) Collapse(collapse types.FieldCollapseVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Collapse(collapse *types.FieldCollapse) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Collapse = collapse.FieldCollapseCaster() + r.req.Collapse = collapse return r } -// Array of wildcard (*) patterns. The request returns doc values for field +// DocvalueFields Array of wildcard (*) patterns. The request returns doc values for field // names matching these patterns in the hits.fields property of the response. // API name: docvalue_fields -func (r *Submit) DocvalueFields(docvaluefields ...types.FieldAndFormatVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) DocvalueFields(docvaluefields ...types.FieldAndFormat) *Submit { if r.req == nil { r.req = NewRequest() } - for _, v := range docvaluefields { - - r.req.DocvalueFields = append(r.req.DocvalueFields, *v.FieldAndFormatCaster()) + r.req.DocvalueFields = docvaluefields - } return r } -// If true, returns detailed information about score computation as part of a +// Explain If true, returns detailed information about score computation as part of a // hit. // API name: explain func (r *Submit) Explain(explain bool) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Explain = &explain return r } -// Configuration of search extensions defined by Elasticsearch plugins. +// Ext Configuration of search extensions defined by Elasticsearch plugins. // API name: ext func (r *Submit) Ext(ext map[string]json.RawMessage) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Ext = ext - return r -} -func (r *Submit) AddExt(key string, value json.RawMessage) *Submit { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Ext == nil { - r.req.Ext = make(map[string]json.RawMessage) - } else { - tmp = r.req.Ext - } - - tmp[key] = value + r.req.Ext = ext - r.req.Ext = tmp return r } -// Array of wildcard (*) patterns. The request returns values for field names +// Fields Array of wildcard (*) patterns. The request returns values for field names // matching these patterns in the hits.fields property of the response. // API name: fields -func (r *Submit) Fields(fields ...types.FieldAndFormatVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Fields(fields ...types.FieldAndFormat) *Submit { if r.req == nil { r.req = NewRequest() } - for _, v := range fields { - - r.req.Fields = append(r.req.Fields, *v.FieldAndFormatCaster()) + r.req.Fields = fields - } return r } -// Starting document offset. By default, you cannot page through more than +// From Starting document offset. By default, you cannot page through more than // 10,000 // hits using the from and size parameters. To page through more hits, use the // search_after parameter. // API name: from func (r *Submit) From(from int) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } // API name: highlight -func (r *Submit) Highlight(highlight types.HighlightVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Highlight(highlight *types.Highlight) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Highlight = highlight.HighlightCaster() + r.req.Highlight = highlight return r } -// Boosts the _score of documents from specified indices. +// IndicesBoost Boosts the _score of documents from specified indices. // API name: indices_boost -func (r *Submit) IndicesBoost(indicesboost []map[string]types.Float64) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) IndicesBoost(indicesboosts ...map[string]types.Float64) *Submit { if r.req == nil { r.req = NewRequest() } - - r.req.IndicesBoost = indicesboost + r.req.IndicesBoost = indicesboosts return r } -// Defines the approximate kNN search to run. +// Knn Defines the approximate kNN search to run. // API name: knn -func (r *Submit) Knn(knns ...types.KnnSearchVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Knn(knns ...types.KnnSearch) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Knn = make([]types.KnnSearch, len(knns)) - for i, v := range knns { - r.req.Knn[i] = *v.KnnSearchCaster() - } + r.req.Knn = knns return r } -// Minimum _score for matching documents. Documents with a lower _score are +// MinScore Minimum _score for matching documents. Documents with a lower _score are // not included in search results and results collected by aggregations. // API name: min_score func (r *Submit) MinScore(minscore types.Float64) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -841,216 +777,168 @@ func (r *Submit) MinScore(minscore types.Float64) *Submit { return r } -// Limits the search to a point in time (PIT). If you provide a PIT, you +// Pit Limits the search to a point in time (PIT). If you provide a PIT, you // cannot specify an in the request path. // API name: pit -func (r *Submit) Pit(pit types.PointInTimeReferenceVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Pit(pit *types.PointInTimeReference) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Pit = pit.PointInTimeReferenceCaster() + r.req.Pit = pit return r } // API name: post_filter -func (r *Submit) PostFilter(postfilter types.QueryVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) PostFilter(postfilter *types.Query) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.PostFilter = postfilter.QueryCaster() + r.req.PostFilter = postfilter return r } // API name: profile func (r *Submit) Profile(profile bool) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Profile = &profile return r } -// Defines the search definition using the Query DSL. +// Query Defines the search definition using the Query DSL. // API name: query -func (r *Submit) Query(query types.QueryVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Query(query *types.Query) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } // API name: rescore -func (r *Submit) Rescore(rescores ...types.RescoreVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Rescore(rescores ...types.Rescore) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Rescore = make([]types.Rescore, len(rescores)) - for i, v := range rescores { - r.req.Rescore[i] = *v.RescoreCaster() - } + r.req.Rescore = rescores return r } -// Defines one or more runtime fields in the search request. These fields take +// RuntimeMappings Defines one or more runtime fields in the search request. These fields take // precedence over mapped fields with the same name. // API name: runtime_mappings -func (r *Submit) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) RuntimeMappings(runtimefields types.RuntimeFields) *Submit { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// Retrieve a script evaluation (based on different fields) for each hit. +// ScriptFields Retrieve a script evaluation (based on different fields) for each hit. // API name: script_fields func (r *Submit) ScriptFields(scriptfields map[string]types.ScriptField) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScriptFields = scriptfields - return r -} - -func (r *Submit) AddScriptField(key string, value types.ScriptFieldVariant) *Submit { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.ScriptField - if r.req.ScriptFields == nil { - r.req.ScriptFields = make(map[string]types.ScriptField) - } else { - tmp = r.req.ScriptFields - } - tmp[key] = *value.ScriptFieldCaster() + r.req.ScriptFields = scriptfields - r.req.ScriptFields = tmp return r } // API name: search_after -func (r *Submit) SearchAfter(sortresults ...types.FieldValueVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) SearchAfter(sortresults ...types.FieldValue) *Submit { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// If true, returns sequence number and primary term of the last modification +// SeqNoPrimaryTerm If true, returns sequence number and primary term of the last modification // of each hit. See Optimistic concurrency control. // API name: seq_no_primary_term func (r *Submit) SeqNoPrimaryTerm(seqnoprimaryterm bool) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.SeqNoPrimaryTerm = &seqnoprimaryterm return r } -// The number of hits to return. By default, you cannot page through more +// Size The number of hits to return. By default, you cannot page through more // than 10,000 hits using the from and size parameters. To page through more // hits, use the search_after parameter. // API name: size func (r *Submit) Size(size int) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } // API name: slice -func (r *Submit) Slice(slice types.SlicedScrollVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Slice(slice *types.SlicedScroll) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Slice = slice.SlicedScrollCaster() + r.req.Slice = slice return r } // API name: sort -func (r *Submit) Sort(sorts ...types.SortCombinationsVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Sort(sorts ...types.SortCombinations) *Submit { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } -// Indicates which source fields are returned for matching documents. These +// Source_ Indicates which source fields are returned for matching documents. These // fields are returned in the hits._source property of the search response. // API name: _source -func (r *Submit) Source_(sourceconfig types.SourceConfigVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Source_(sourceconfig types.SourceConfig) *Submit { if r.req == nil { r.req = NewRequest() } - - r.req.Source_ = *sourceconfig.SourceConfigCaster() + r.req.Source_ = sourceconfig return r } -// Stats groups to associate with the search. Each group maintains a statistics +// Stats Stats groups to associate with the search. Each group maintains a statistics // aggregation for its associated searches. You can retrieve these stats using // the indices stats API. // API name: stats func (r *Submit) Stats(stats ...string) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range stats { - - r.req.Stats = append(r.req.Stats, v) + r.req.Stats = stats - } return r } -// List of stored fields to return as part of a hit. If no fields are specified, +// StoredFields List of stored fields to return as part of a hit. If no fields are specified, // no stored fields are included in the response. If this field is specified, // the _source // parameter defaults to false. You can pass _source: true to return both source @@ -1058,29 +946,26 @@ func (r *Submit) Stats(stats ...string) *Submit { // and stored fields in the search response. // API name: stored_fields func (r *Submit) StoredFields(fields ...string) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.StoredFields = fields return r } // API name: suggest -func (r *Submit) Suggest(suggest types.SuggesterVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) Suggest(suggest *types.Suggester) *Submit { if r.req == nil { r.req = NewRequest() } - r.req.Suggest = suggest.SuggesterCaster() + r.req.Suggest = suggest return r } -// Maximum number of documents to collect for each shard. If a query reaches +// TerminateAfter Maximum number of documents to collect for each shard. If a query reaches // this // limit, Elasticsearch terminates the query early. Elasticsearch collects // documents @@ -1088,7 +973,6 @@ func (r *Submit) Suggest(suggest types.SuggesterVariant) *Submit { // early. // API name: terminate_after func (r *Submit) TerminateAfter(terminateafter int64) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1098,14 +982,13 @@ func (r *Submit) TerminateAfter(terminateafter int64) *Submit { return r } -// Specifies the period of time to wait for a response from each shard. If no +// Timeout Specifies the period of time to wait for a response from each shard. If no // response // is received before the timeout expires, the request fails and returns an // error. // Defaults to no timeout. // API name: timeout func (r *Submit) Timeout(timeout string) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1115,44 +998,38 @@ func (r *Submit) Timeout(timeout string) *Submit { return r } -// If true, calculate and return document scores, even if the scores are not +// TrackScores If true, calculate and return document scores, even if the scores are not // used for sorting. // API name: track_scores func (r *Submit) TrackScores(trackscores bool) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TrackScores = &trackscores return r } -// Number of hits matching the query to count accurately. If true, the exact +// TrackTotalHits Number of hits matching the query to count accurately. If true, the exact // number of hits is returned at the cost of some performance. If false, the // response does not include the total number of hits matching the query. // Defaults to 10,000 hits. // API name: track_total_hits -func (r *Submit) TrackTotalHits(trackhits types.TrackHitsVariant) *Submit { - // Initialize the request if it is not already initialized +func (r *Submit) TrackTotalHits(trackhits types.TrackHits) *Submit { if r.req == nil { r.req = NewRequest() } - - r.req.TrackTotalHits = *trackhits.TrackHitsCaster() + r.req.TrackTotalHits = trackhits return r } -// If true, returns document version as part of a hit. +// Version If true, returns document version as part of a hit. // API name: version func (r *Submit) Version(version bool) *Submit { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &version return r diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go index 32493f875a..8a1af1b6a1 100644 --- a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go +++ b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an autoscaling policy. // diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/response.go b/typedapi/autoscaling/deleteautoscalingpolicy/response.go index e5c63e32e1..dda278a975 100644 --- a/typedapi/autoscaling/deleteautoscalingpolicy/response.go +++ b/typedapi/autoscaling/deleteautoscalingpolicy/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteautoscalingpolicy // Response holds the response body struct for the package deleteautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go b/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go index a6f8193230..181c21fabe 100644 --- a/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go +++ b/typedapi/autoscaling/getautoscalingcapacity/get_autoscaling_capacity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the autoscaling capacity. // diff --git a/typedapi/autoscaling/getautoscalingcapacity/response.go b/typedapi/autoscaling/getautoscalingcapacity/response.go index 53026bfa8c..28de2c3db6 100644 --- a/typedapi/autoscaling/getautoscalingcapacity/response.go +++ b/typedapi/autoscaling/getautoscalingcapacity/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getautoscalingcapacity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautoscalingcapacity // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29 type Response struct { Policies map[string]types.AutoscalingDeciders `json:"policies"` } diff --git a/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go b/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go index 08dc6293a2..03e5fe0644 100644 --- a/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go +++ b/typedapi/autoscaling/getautoscalingpolicy/get_autoscaling_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get an autoscaling policy. // diff --git a/typedapi/autoscaling/getautoscalingpolicy/response.go b/typedapi/autoscaling/getautoscalingpolicy/response.go index 19c6a8d5bf..6e7fa17429 100644 --- a/typedapi/autoscaling/getautoscalingpolicy/response.go +++ b/typedapi/autoscaling/getautoscalingpolicy/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getautoscalingpolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L24 type Response struct { // Deciders Decider settings. diff --git a/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go b/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go index fbe0ca0b4e..2ee05a7668 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go +++ b/typedapi/autoscaling/putautoscalingpolicy/put_autoscaling_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update an autoscaling policy. // @@ -384,46 +384,24 @@ func (r *PutAutoscalingPolicy) Pretty(pretty bool) *PutAutoscalingPolicy { return r } -// Decider settings. +// Deciders Decider settings. // API name: deciders func (r *PutAutoscalingPolicy) Deciders(deciders map[string]json.RawMessage) *PutAutoscalingPolicy { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Deciders = deciders - return r -} - -func (r *PutAutoscalingPolicy) AddDecider(key string, value json.RawMessage) *PutAutoscalingPolicy { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Deciders == nil { - r.req.Deciders = make(map[string]json.RawMessage) - } else { - tmp = r.req.Deciders - } - - tmp[key] = value + r.req.Deciders = deciders - r.req.Deciders = tmp return r } // API name: roles func (r *PutAutoscalingPolicy) Roles(roles ...string) *PutAutoscalingPolicy { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range roles { - - r.req.Roles = append(r.req.Roles, v) + r.req.Roles = roles - } return r } diff --git a/typedapi/autoscaling/putautoscalingpolicy/request.go b/typedapi/autoscaling/putautoscalingpolicy/request.go index 91e4b3dd55..a0c06a6b7a 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/request.go +++ b/typedapi/autoscaling/putautoscalingpolicy/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putautoscalingpolicy @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L57 type Request = types.AutoscalingPolicy // NewRequest returns a Request diff --git a/typedapi/autoscaling/putautoscalingpolicy/response.go b/typedapi/autoscaling/putautoscalingpolicy/response.go index 081bcc7bb0..39d7d16160 100644 --- a/typedapi/autoscaling/putautoscalingpolicy/response.go +++ b/typedapi/autoscaling/putautoscalingpolicy/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putautoscalingpolicy // Response holds the response body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/capabilities/capabilities.go b/typedapi/capabilities/capabilities.go index 9d5602df99..519e0799d5 100644 --- a/typedapi/capabilities/capabilities.go +++ b/typedapi/capabilities/capabilities.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Checks if the specified combination of method, API, parameters, and arbitrary // capabilities are supported diff --git a/typedapi/cat/aliases/aliases.go b/typedapi/cat/aliases/aliases.go index f83ec974ec..f4f320582e 100644 --- a/typedapi/cat/aliases/aliases.go +++ b/typedapi/cat/aliases/aliases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get aliases. // @@ -364,17 +364,6 @@ func (r *Aliases) Local(local bool) *Aliases { return r } -// MasterTimeout The period to wait for a connection to the master node. -// If the master node is not available before the timeout expires, the request -// fails and returns an error. -// To indicated that the request should never timeout, you can set it to `-1`. -// API name: master_timeout -func (r *Aliases) MasterTimeout(duration string) *Aliases { - r.values.Set("master_timeout", duration) - - return r -} - // Format Specifies the format to return the columnar data in, can be set to // `text`, `json`, `cbor`, `yaml`, or `smile`. // API name: format diff --git a/typedapi/cat/aliases/response.go b/typedapi/cat/aliases/response.go index 270d2a6014..1e5e802e4c 100644 --- a/typedapi/cat/aliases/response.go +++ b/typedapi/cat/aliases/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package aliases @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package aliases // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/aliases/CatAliasesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/aliases/CatAliasesResponse.ts#L22-L24 type Response []types.AliasesRecord diff --git a/typedapi/cat/allocation/allocation.go b/typedapi/cat/allocation/allocation.go index 45f0275d0f..53c0b8f764 100644 --- a/typedapi/cat/allocation/allocation.go +++ b/typedapi/cat/allocation/allocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get shard allocation information. // diff --git a/typedapi/cat/allocation/response.go b/typedapi/cat/allocation/response.go index 368b33bcb4..b40c0098a1 100644 --- a/typedapi/cat/allocation/response.go +++ b/typedapi/cat/allocation/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package allocation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package allocation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/allocation/CatAllocationResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/allocation/CatAllocationResponse.ts#L22-L24 type Response []types.AllocationRecord diff --git a/typedapi/cat/componenttemplates/component_templates.go b/typedapi/cat/componenttemplates/component_templates.go index bf0ee12810..4c933b44c7 100644 --- a/typedapi/cat/componenttemplates/component_templates.go +++ b/typedapi/cat/componenttemplates/component_templates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get component templates. // diff --git a/typedapi/cat/componenttemplates/response.go b/typedapi/cat/componenttemplates/response.go index 6fdf73cc03..8e62576311 100644 --- a/typedapi/cat/componenttemplates/response.go +++ b/typedapi/cat/componenttemplates/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package componenttemplates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package componenttemplates // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24 type Response []types.CatComponentTemplate diff --git a/typedapi/cat/count/count.go b/typedapi/cat/count/count.go index 7f9340bad8..ee1deaa9e2 100644 --- a/typedapi/cat/count/count.go +++ b/typedapi/cat/count/count.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a document count. // diff --git a/typedapi/cat/count/response.go b/typedapi/cat/count/response.go index bdee2d188d..9b156a538c 100644 --- a/typedapi/cat/count/response.go +++ b/typedapi/cat/count/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/count/CatCountResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/count/CatCountResponse.ts#L22-L24 type Response []types.CountRecord diff --git a/typedapi/cat/fielddata/fielddata.go b/typedapi/cat/fielddata/fielddata.go index 132f3e3fa3..70094787c0 100644 --- a/typedapi/cat/fielddata/fielddata.go +++ b/typedapi/cat/fielddata/fielddata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get field data cache information. // diff --git a/typedapi/cat/fielddata/response.go b/typedapi/cat/fielddata/response.go index 5e8952c877..ad2436453a 100644 --- a/typedapi/cat/fielddata/response.go +++ b/typedapi/cat/fielddata/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package fielddata @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fielddata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/fielddata/CatFielddataResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/fielddata/CatFielddataResponse.ts#L22-L24 type Response []types.FielddataRecord diff --git a/typedapi/cat/health/health.go b/typedapi/cat/health/health.go index 168880cff4..f7ab21682a 100644 --- a/typedapi/cat/health/health.go +++ b/typedapi/cat/health/health.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the cluster health status. // diff --git a/typedapi/cat/health/response.go b/typedapi/cat/health/response.go index a7adaba632..3f1f185d4b 100644 --- a/typedapi/cat/health/response.go +++ b/typedapi/cat/health/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package health @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/health/CatHealthResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/health/CatHealthResponse.ts#L22-L24 type Response []types.HealthRecord diff --git a/typedapi/cat/help/help.go b/typedapi/cat/help/help.go index e849f3b063..1a8dbaa6d7 100644 --- a/typedapi/cat/help/help.go +++ b/typedapi/cat/help/help.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get CAT help. // diff --git a/typedapi/cat/help/response.go b/typedapi/cat/help/response.go index 1e979afbe1..73db7c7941 100644 --- a/typedapi/cat/help/response.go +++ b/typedapi/cat/help/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package help // Response holds the response body struct for the package help // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/help/CatHelpResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/help/CatHelpResponse.ts#L20-L25 type Response struct { } diff --git a/typedapi/cat/indices/indices.go b/typedapi/cat/indices/indices.go index f7b0ccbc70..fc136bee2a 100644 --- a/typedapi/cat/indices/indices.go +++ b/typedapi/cat/indices/indices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index information. // diff --git a/typedapi/cat/indices/response.go b/typedapi/cat/indices/response.go index 67f70a7dc8..b33e2a1c69 100644 --- a/typedapi/cat/indices/response.go +++ b/typedapi/cat/indices/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package indices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package indices // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/indices/CatIndicesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/indices/CatIndicesResponse.ts#L22-L24 type Response []types.IndicesRecord diff --git a/typedapi/cat/master/master.go b/typedapi/cat/master/master.go index 5d47b29dae..9cf9796487 100644 --- a/typedapi/cat/master/master.go +++ b/typedapi/cat/master/master.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get master node information. // diff --git a/typedapi/cat/master/response.go b/typedapi/cat/master/response.go index c2e3949042..8b266f1bbe 100644 --- a/typedapi/cat/master/response.go +++ b/typedapi/cat/master/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package master @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package master // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/master/CatMasterResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/master/CatMasterResponse.ts#L22-L24 type Response []types.MasterRecord diff --git a/typedapi/cat/mldatafeeds/ml_datafeeds.go b/typedapi/cat/mldatafeeds/ml_datafeeds.go index f99c0d7fe6..ff50cc754b 100644 --- a/typedapi/cat/mldatafeeds/ml_datafeeds.go +++ b/typedapi/cat/mldatafeeds/ml_datafeeds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get datafeeds. // diff --git a/typedapi/cat/mldatafeeds/response.go b/typedapi/cat/mldatafeeds/response.go index 350cc9d9ef..b30f9f4f60 100644 --- a/typedapi/cat/mldatafeeds/response.go +++ b/typedapi/cat/mldatafeeds/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mldatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L24 type Response []types.DatafeedsRecord diff --git a/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go b/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go index 07760fb5fe..3180dfe6f9 100644 --- a/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go +++ b/typedapi/cat/mldataframeanalytics/ml_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get data frame analytics jobs. // diff --git a/typedapi/cat/mldataframeanalytics/response.go b/typedapi/cat/mldataframeanalytics/response.go index 9174623077..85531487e0 100644 --- a/typedapi/cat/mldataframeanalytics/response.go +++ b/typedapi/cat/mldataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mldataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L24 type Response []types.DataFrameAnalyticsRecord diff --git a/typedapi/cat/mljobs/ml_jobs.go b/typedapi/cat/mljobs/ml_jobs.go index 76a580fcd9..07da2d09cd 100644 --- a/typedapi/cat/mljobs/ml_jobs.go +++ b/typedapi/cat/mljobs/ml_jobs.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly detection jobs. // diff --git a/typedapi/cat/mljobs/response.go b/typedapi/cat/mljobs/response.go index e9f9e92d7b..5a09d9c238 100644 --- a/typedapi/cat/mljobs/response.go +++ b/typedapi/cat/mljobs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mljobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mljobs // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L24 type Response []types.JobsRecord diff --git a/typedapi/cat/mltrainedmodels/ml_trained_models.go b/typedapi/cat/mltrainedmodels/ml_trained_models.go index 58b0ce6808..b6cfffc239 100644 --- a/typedapi/cat/mltrainedmodels/ml_trained_models.go +++ b/typedapi/cat/mltrainedmodels/ml_trained_models.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get trained models. // diff --git a/typedapi/cat/mltrainedmodels/response.go b/typedapi/cat/mltrainedmodels/response.go index 49f6d2da35..d4b0911727 100644 --- a/typedapi/cat/mltrainedmodels/response.go +++ b/typedapi/cat/mltrainedmodels/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mltrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mltrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24 type Response []types.TrainedModelsRecord diff --git a/typedapi/cat/nodeattrs/nodeattrs.go b/typedapi/cat/nodeattrs/nodeattrs.go index 0787e01696..39f4d31c48 100644 --- a/typedapi/cat/nodeattrs/nodeattrs.go +++ b/typedapi/cat/nodeattrs/nodeattrs.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get node attribute information. // diff --git a/typedapi/cat/nodeattrs/response.go b/typedapi/cat/nodeattrs/response.go index dbc4134746..0f41828a29 100644 --- a/typedapi/cat/nodeattrs/response.go +++ b/typedapi/cat/nodeattrs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package nodeattrs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodeattrs // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L24 type Response []types.NodeAttributesRecord diff --git a/typedapi/cat/nodes/nodes.go b/typedapi/cat/nodes/nodes.go index 7b0a2c4076..c049f072c1 100644 --- a/typedapi/cat/nodes/nodes.go +++ b/typedapi/cat/nodes/nodes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get node information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catnodecolumn" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/timeunit" ) @@ -313,15 +314,21 @@ func (r *Nodes) IncludeUnloadedSegments(includeunloadedsegments bool) *Nodes { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. +// It supports simple wildcards. // API name: h -func (r *Nodes) H(names ...string) *Nodes { - r.values.Set("h", strings.Join(names, ",")) +func (r *Nodes) H(catnodecolumns ...catnodecolumn.CatNodeColumn) *Nodes { + tmp := []string{} + for _, item := range catnodecolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } -// S List of columns that determine how the table should be sorted. +// S A comma-separated list of column names or aliases that determines the sort +// order. // Sorting defaults to ascending and can be changed by setting `:asc` // or `:desc` as a suffix to the column name. // API name: s @@ -331,7 +338,7 @@ func (r *Nodes) S(names ...string) *Nodes { return r } -// MasterTimeout Period to wait for a connection to the master node. +// MasterTimeout The period to wait for a connection to the master node. // API name: master_timeout func (r *Nodes) MasterTimeout(duration string) *Nodes { r.values.Set("master_timeout", duration) @@ -339,7 +346,7 @@ func (r *Nodes) MasterTimeout(duration string) *Nodes { return r } -// Time Unit used to display time values. +// Time The unit used to display time values. // API name: time func (r *Nodes) Time(time timeunit.TimeUnit) *Nodes { r.values.Set("time", time.String()) diff --git a/typedapi/cat/nodes/response.go b/typedapi/cat/nodes/response.go index 8fa2333e6b..954997e166 100644 --- a/typedapi/cat/nodes/response.go +++ b/typedapi/cat/nodes/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package nodes @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodes // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/nodes/CatNodesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/nodes/CatNodesResponse.ts#L22-L24 type Response []types.NodesRecord diff --git a/typedapi/cat/pendingtasks/pending_tasks.go b/typedapi/cat/pendingtasks/pending_tasks.go index 7889c6e21c..57e7b5524c 100644 --- a/typedapi/cat/pendingtasks/pending_tasks.go +++ b/typedapi/cat/pendingtasks/pending_tasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get pending task information. // diff --git a/typedapi/cat/pendingtasks/response.go b/typedapi/cat/pendingtasks/response.go index 404c728a79..3df8aab570 100644 --- a/typedapi/cat/pendingtasks/response.go +++ b/typedapi/cat/pendingtasks/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L24 type Response []types.PendingTasksRecord diff --git a/typedapi/cat/plugins/plugins.go b/typedapi/cat/plugins/plugins.go index 4e2fa07441..d852a48818 100644 --- a/typedapi/cat/plugins/plugins.go +++ b/typedapi/cat/plugins/plugins.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get plugin information. // diff --git a/typedapi/cat/plugins/response.go b/typedapi/cat/plugins/response.go index 8ba133ad54..04d7e76cca 100644 --- a/typedapi/cat/plugins/response.go +++ b/typedapi/cat/plugins/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package plugins @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package plugins // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/plugins/CatPluginsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/plugins/CatPluginsResponse.ts#L22-L24 type Response []types.PluginsRecord diff --git a/typedapi/cat/recovery/recovery.go b/typedapi/cat/recovery/recovery.go index 7ca9e4ddca..1f1eac3f24 100644 --- a/typedapi/cat/recovery/recovery.go +++ b/typedapi/cat/recovery/recovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get shard recovery information. // @@ -46,6 +46,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catrecoverycolumn" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/timeunit" ) @@ -355,15 +356,21 @@ func (r *Recovery) Detailed(detailed bool) *Recovery { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. +// It supports simple wildcards. // API name: h -func (r *Recovery) H(names ...string) *Recovery { - r.values.Set("h", strings.Join(names, ",")) +func (r *Recovery) H(catrecoverycolumns ...catrecoverycolumn.CatRecoveryColumn) *Recovery { + tmp := []string{} + for _, item := range catrecoverycolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } -// S List of columns that determine how the table should be sorted. +// S A comma-separated list of column names or aliases that determines the sort +// order. // Sorting defaults to ascending and can be changed by setting `:asc` // or `:desc` as a suffix to the column name. // API name: s @@ -373,7 +380,7 @@ func (r *Recovery) S(names ...string) *Recovery { return r } -// Time Unit used to display time values. +// Time The unit used to display time values. // API name: time func (r *Recovery) Time(time timeunit.TimeUnit) *Recovery { r.values.Set("time", time.String()) diff --git a/typedapi/cat/recovery/response.go b/typedapi/cat/recovery/response.go index 65c0a915f4..af85e2ba04 100644 --- a/typedapi/cat/recovery/response.go +++ b/typedapi/cat/recovery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/recovery/CatRecoveryResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/recovery/CatRecoveryResponse.ts#L22-L24 type Response []types.RecoveryRecord diff --git a/typedapi/cat/repositories/repositories.go b/typedapi/cat/repositories/repositories.go index d65a810f31..5d59430db1 100644 --- a/typedapi/cat/repositories/repositories.go +++ b/typedapi/cat/repositories/repositories.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get snapshot repository information. // diff --git a/typedapi/cat/repositories/response.go b/typedapi/cat/repositories/response.go index 1c9b051f2c..dc2a403ecc 100644 --- a/typedapi/cat/repositories/response.go +++ b/typedapi/cat/repositories/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package repositories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositories // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L24 type Response []types.RepositoriesRecord diff --git a/typedapi/cat/segments/response.go b/typedapi/cat/segments/response.go index 782516c8b4..72cbde9835 100644 --- a/typedapi/cat/segments/response.go +++ b/typedapi/cat/segments/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/segments/CatSegmentsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/segments/CatSegmentsResponse.ts#L22-L24 type Response []types.SegmentsRecord diff --git a/typedapi/cat/segments/segments.go b/typedapi/cat/segments/segments.go index 4b95c5141f..dd433cea23 100644 --- a/typedapi/cat/segments/segments.go +++ b/typedapi/cat/segments/segments.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get segment information. // @@ -41,6 +41,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catsegmentscolumn" ) const ( @@ -329,15 +330,21 @@ func (r *Segments) Bytes(bytes bytes.Bytes) *Segments { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. +// It supports simple wildcards. // API name: h -func (r *Segments) H(names ...string) *Segments { - r.values.Set("h", strings.Join(names, ",")) +func (r *Segments) H(catsegmentscolumns ...catsegmentscolumn.CatSegmentsColumn) *Segments { + tmp := []string{} + for _, item := range catsegmentscolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } -// S List of columns that determine how the table should be sorted. +// S A comma-separated list of column names or aliases that determines the sort +// order. // Sorting defaults to ascending and can be changed by setting `:asc` // or `:desc` as a suffix to the column name. // API name: s diff --git a/typedapi/cat/shards/response.go b/typedapi/cat/shards/response.go index bc5dde1ff0..329fee84a2 100644 --- a/typedapi/cat/shards/response.go +++ b/typedapi/cat/shards/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package shards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shards // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/shards/CatShardsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/shards/CatShardsResponse.ts#L22-L24 type Response []types.ShardsRecord diff --git a/typedapi/cat/shards/shards.go b/typedapi/cat/shards/shards.go index 2927c66b6e..26a0b7a73f 100644 --- a/typedapi/cat/shards/shards.go +++ b/typedapi/cat/shards/shards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get shard information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catshardcolumn" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/timeunit" ) @@ -330,13 +331,18 @@ func (r *Shards) Bytes(bytes bytes.Bytes) *Shards { // H List of columns to appear in the response. Supports simple wildcards. // API name: h -func (r *Shards) H(names ...string) *Shards { - r.values.Set("h", strings.Join(names, ",")) +func (r *Shards) H(catshardcolumns ...catshardcolumn.CatShardColumn) *Shards { + tmp := []string{} + for _, item := range catshardcolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } -// S List of columns that determine how the table should be sorted. +// S A comma-separated list of column names or aliases that determines the sort +// order. // Sorting defaults to ascending and can be changed by setting `:asc` // or `:desc` as a suffix to the column name. // API name: s @@ -346,7 +352,7 @@ func (r *Shards) S(names ...string) *Shards { return r } -// MasterTimeout Period to wait for a connection to the master node. +// MasterTimeout The period to wait for a connection to the master node. // API name: master_timeout func (r *Shards) MasterTimeout(duration string) *Shards { r.values.Set("master_timeout", duration) @@ -354,7 +360,7 @@ func (r *Shards) MasterTimeout(duration string) *Shards { return r } -// Time Unit used to display time values. +// Time The unit used to display time values. // API name: time func (r *Shards) Time(time timeunit.TimeUnit) *Shards { r.values.Set("time", time.String()) diff --git a/typedapi/cat/snapshots/response.go b/typedapi/cat/snapshots/response.go index 40d9f3a9a5..f970a557d4 100644 --- a/typedapi/cat/snapshots/response.go +++ b/typedapi/cat/snapshots/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package snapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package snapshots // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L24 type Response []types.SnapshotsRecord diff --git a/typedapi/cat/snapshots/snapshots.go b/typedapi/cat/snapshots/snapshots.go index 78883b6224..6629eb2d35 100644 --- a/typedapi/cat/snapshots/snapshots.go +++ b/typedapi/cat/snapshots/snapshots.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get snapshot information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catsnapshotscolumn" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/timeunit" ) @@ -329,10 +330,15 @@ func (r *Snapshots) IgnoreUnavailable(ignoreunavailable bool) *Snapshots { return r } -// H List of columns to appear in the response. Supports simple wildcards. +// H A comma-separated list of columns names to display. +// It supports simple wildcards. // API name: h -func (r *Snapshots) H(names ...string) *Snapshots { - r.values.Set("h", strings.Join(names, ",")) +func (r *Snapshots) H(catsnapshotscolumns ...catsnapshotscolumn.CatSnapshotsColumn) *Snapshots { + tmp := []string{} + for _, item := range catsnapshotscolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } diff --git a/typedapi/cat/tasks/response.go b/typedapi/cat/tasks/response.go index b59e75db69..0b6718b96e 100644 --- a/typedapi/cat/tasks/response.go +++ b/typedapi/cat/tasks/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package tasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package tasks // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/tasks/CatTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/tasks/CatTasksResponse.ts#L22-L24 type Response []types.TasksRecord diff --git a/typedapi/cat/tasks/tasks.go b/typedapi/cat/tasks/tasks.go index 5e1dc50d7e..6c46f17c91 100644 --- a/typedapi/cat/tasks/tasks.go +++ b/typedapi/cat/tasks/tasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get task information. // diff --git a/typedapi/cat/templates/response.go b/typedapi/cat/templates/response.go index a9c6f48490..362c7440db 100644 --- a/typedapi/cat/templates/response.go +++ b/typedapi/cat/templates/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package templates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package templates // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/templates/CatTemplatesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/templates/CatTemplatesResponse.ts#L22-L24 type Response []types.TemplatesRecord diff --git a/typedapi/cat/templates/templates.go b/typedapi/cat/templates/templates.go index e902c9c549..fefce66a4a 100644 --- a/typedapi/cat/templates/templates.go +++ b/typedapi/cat/templates/templates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index template information. // diff --git a/typedapi/cat/threadpool/response.go b/typedapi/cat/threadpool/response.go index 7463655220..642bfbfa2c 100644 --- a/typedapi/cat/threadpool/response.go +++ b/typedapi/cat/threadpool/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package threadpool @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package threadpool // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L24 type Response []types.ThreadPoolRecord diff --git a/typedapi/cat/threadpool/thread_pool.go b/typedapi/cat/threadpool/thread_pool.go index 62c152dfcc..9608a522f9 100644 --- a/typedapi/cat/threadpool/thread_pool.go +++ b/typedapi/cat/threadpool/thread_pool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get thread pool statistics. // @@ -41,6 +41,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catthreadpoolcolumn" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/timeunit" ) @@ -322,13 +323,18 @@ func (r *ThreadPool) ThreadPoolPatterns(threadpoolpatterns string) *ThreadPool { // H List of columns to appear in the response. Supports simple wildcards. // API name: h -func (r *ThreadPool) H(names ...string) *ThreadPool { - r.values.Set("h", strings.Join(names, ",")) +func (r *ThreadPool) H(catthreadpoolcolumns ...catthreadpoolcolumn.CatThreadPoolColumn) *ThreadPool { + tmp := []string{} + for _, item := range catthreadpoolcolumns { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) return r } -// S List of columns that determine how the table should be sorted. +// S A comma-separated list of column names or aliases that determines the sort +// order. // Sorting defaults to ascending and can be changed by setting `:asc` // or `:desc` as a suffix to the column name. // API name: s @@ -357,7 +363,7 @@ func (r *ThreadPool) Local(local bool) *ThreadPool { return r } -// MasterTimeout Period to wait for a connection to the master node. +// MasterTimeout The period to wait for a connection to the master node. // API name: master_timeout func (r *ThreadPool) MasterTimeout(duration string) *ThreadPool { r.values.Set("master_timeout", duration) diff --git a/typedapi/cat/transforms/response.go b/typedapi/cat/transforms/response.go index 524f0251ec..755b3f0e53 100644 --- a/typedapi/cat/transforms/response.go +++ b/typedapi/cat/transforms/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package transforms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package transforms // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/transforms/CatTransformsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/transforms/CatTransformsResponse.ts#L22-L24 type Response []types.TransformsRecord diff --git a/typedapi/cat/transforms/transforms.go b/typedapi/cat/transforms/transforms.go index d40603679c..575be9cfbb 100644 --- a/typedapi/cat/transforms/transforms.go +++ b/typedapi/cat/transforms/transforms.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get transform information. // diff --git a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go index 293adcf8ab..cafef2b836 100644 --- a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go +++ b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete auto-follow patterns. // diff --git a/typedapi/ccr/deleteautofollowpattern/response.go b/typedapi/ccr/deleteautofollowpattern/response.go index 30ab0410aa..e1ceb25fa5 100644 --- a/typedapi/ccr/deleteautofollowpattern/response.go +++ b/typedapi/ccr/deleteautofollowpattern/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteautofollowpattern // Response holds the response body struct for the package deleteautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/follow/follow.go b/typedapi/ccr/follow/follow.go index 2236c164c4..4e74a3ace0 100644 --- a/typedapi/ccr/follow/follow.go +++ b/typedapi/ccr/follow/follow.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a follower. // Create a cross-cluster replication follower index that follows a specific @@ -386,11 +386,10 @@ func (r *Follow) Pretty(pretty bool) *Follow { return r } -// If the leader index is part of a data stream, the name to which the local +// DataStreamName If the leader index is part of a data stream, the name to which the local // data stream for the followed index should be renamed. // API name: data_stream_name func (r *Follow) DataStreamName(datastreamname string) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -400,23 +399,20 @@ func (r *Follow) DataStreamName(datastreamname string) *Follow { return r } -// The name of the index in the leader cluster to follow. +// LeaderIndex The name of the index in the leader cluster to follow. // API name: leader_index func (r *Follow) LeaderIndex(indexname string) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.LeaderIndex = indexname return r } -// The maximum number of outstanding reads requests from the remote cluster. +// MaxOutstandingReadRequests The maximum number of outstanding reads requests from the remote cluster. // API name: max_outstanding_read_requests func (r *Follow) MaxOutstandingReadRequests(maxoutstandingreadrequests int64) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -426,140 +422,121 @@ func (r *Follow) MaxOutstandingReadRequests(maxoutstandingreadrequests int64) *F return r } -// The maximum number of outstanding write requests on the follower. +// MaxOutstandingWriteRequests The maximum number of outstanding write requests on the follower. // API name: max_outstanding_write_requests func (r *Follow) MaxOutstandingWriteRequests(maxoutstandingwriterequests int) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxOutstandingWriteRequests = &maxoutstandingwriterequests return r } -// The maximum number of operations to pull per read from the remote cluster. +// MaxReadRequestOperationCount The maximum number of operations to pull per read from the remote cluster. // API name: max_read_request_operation_count func (r *Follow) MaxReadRequestOperationCount(maxreadrequestoperationcount int) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxReadRequestOperationCount = &maxreadrequestoperationcount return r } -// The maximum size in bytes of per read of a batch of operations pulled from +// MaxReadRequestSize The maximum size in bytes of per read of a batch of operations pulled from // the remote cluster. // API name: max_read_request_size -func (r *Follow) MaxReadRequestSize(bytesize types.ByteSizeVariant) *Follow { - // Initialize the request if it is not already initialized +func (r *Follow) MaxReadRequestSize(bytesize types.ByteSize) *Follow { if r.req == nil { r.req = NewRequest() } - - r.req.MaxReadRequestSize = *bytesize.ByteSizeCaster() + r.req.MaxReadRequestSize = bytesize return r } -// The maximum time to wait before retrying an operation that failed +// MaxRetryDelay The maximum time to wait before retrying an operation that failed // exceptionally. An exponential backoff strategy is employed when // retrying. // API name: max_retry_delay -func (r *Follow) MaxRetryDelay(duration types.DurationVariant) *Follow { - // Initialize the request if it is not already initialized +func (r *Follow) MaxRetryDelay(duration types.Duration) *Follow { if r.req == nil { r.req = NewRequest() } - - r.req.MaxRetryDelay = *duration.DurationCaster() + r.req.MaxRetryDelay = duration return r } -// The maximum number of operations that can be queued for writing. When this +// MaxWriteBufferCount The maximum number of operations that can be queued for writing. When this // limit is reached, reads from the remote cluster will be // deferred until the number of queued operations goes below the limit. // API name: max_write_buffer_count func (r *Follow) MaxWriteBufferCount(maxwritebuffercount int) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxWriteBufferCount = &maxwritebuffercount return r } -// The maximum total bytes of operations that can be queued for writing. When +// MaxWriteBufferSize The maximum total bytes of operations that can be queued for writing. When // this limit is reached, reads from the remote cluster will // be deferred until the total bytes of queued operations goes below the limit. // API name: max_write_buffer_size -func (r *Follow) MaxWriteBufferSize(bytesize types.ByteSizeVariant) *Follow { - // Initialize the request if it is not already initialized +func (r *Follow) MaxWriteBufferSize(bytesize types.ByteSize) *Follow { if r.req == nil { r.req = NewRequest() } - - r.req.MaxWriteBufferSize = *bytesize.ByteSizeCaster() + r.req.MaxWriteBufferSize = bytesize return r } -// The maximum number of operations per bulk write request executed on the +// MaxWriteRequestOperationCount The maximum number of operations per bulk write request executed on the // follower. // API name: max_write_request_operation_count func (r *Follow) MaxWriteRequestOperationCount(maxwriterequestoperationcount int) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxWriteRequestOperationCount = &maxwriterequestoperationcount return r } -// The maximum total bytes of operations per bulk write request executed on the +// MaxWriteRequestSize The maximum total bytes of operations per bulk write request executed on the // follower. // API name: max_write_request_size -func (r *Follow) MaxWriteRequestSize(bytesize types.ByteSizeVariant) *Follow { - // Initialize the request if it is not already initialized +func (r *Follow) MaxWriteRequestSize(bytesize types.ByteSize) *Follow { if r.req == nil { r.req = NewRequest() } - - r.req.MaxWriteRequestSize = *bytesize.ByteSizeCaster() + r.req.MaxWriteRequestSize = bytesize return r } -// The maximum time to wait for new operations on the remote cluster when the +// ReadPollTimeout The maximum time to wait for new operations on the remote cluster when the // follower index is synchronized with the leader index. // When the timeout has elapsed, the poll for operations will return to the // follower so that it can update some statistics. // Then the follower will immediately attempt to read from the leader again. // API name: read_poll_timeout -func (r *Follow) ReadPollTimeout(duration types.DurationVariant) *Follow { - // Initialize the request if it is not already initialized +func (r *Follow) ReadPollTimeout(duration types.Duration) *Follow { if r.req == nil { r.req = NewRequest() } - - r.req.ReadPollTimeout = *duration.DurationCaster() + r.req.ReadPollTimeout = duration return r } -// The remote cluster containing the leader index. +// RemoteCluster The remote cluster containing the leader index. // API name: remote_cluster func (r *Follow) RemoteCluster(remotecluster string) *Follow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -569,15 +546,14 @@ func (r *Follow) RemoteCluster(remotecluster string) *Follow { return r } -// Settings to override from the leader index. +// Settings Settings to override from the leader index. // API name: settings -func (r *Follow) Settings(settings types.IndexSettingsVariant) *Follow { - // Initialize the request if it is not already initialized +func (r *Follow) Settings(settings *types.IndexSettings) *Follow { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.IndexSettingsCaster() + r.req.Settings = settings return r } diff --git a/typedapi/ccr/follow/request.go b/typedapi/ccr/follow/request.go index 5f5e196048..087a1ed3d5 100644 --- a/typedapi/ccr/follow/request.go +++ b/typedapi/ccr/follow/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package follow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow/CreateFollowIndexRequest.ts#L26-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow/CreateFollowIndexRequest.ts#L26-L124 type Request struct { // DataStreamName If the leader index is part of a data stream, the name to which the local diff --git a/typedapi/ccr/follow/response.go b/typedapi/ccr/follow/response.go index a86655aa46..71d82d7c3e 100644 --- a/typedapi/ccr/follow/response.go +++ b/typedapi/ccr/follow/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package follow // Response holds the response body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow/CreateFollowIndexResponse.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow/CreateFollowIndexResponse.ts#L20-L26 type Response struct { FollowIndexCreated bool `json:"follow_index_created"` FollowIndexShardsAcked bool `json:"follow_index_shards_acked"` diff --git a/typedapi/ccr/followinfo/follow_info.go b/typedapi/ccr/followinfo/follow_info.go index 7ea373fa0e..5100d4f03e 100644 --- a/typedapi/ccr/followinfo/follow_info.go +++ b/typedapi/ccr/followinfo/follow_info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get follower information. // diff --git a/typedapi/ccr/followinfo/response.go b/typedapi/ccr/followinfo/response.go index 0ff646ff61..aed3afc1ca 100644 --- a/typedapi/ccr/followinfo/response.go +++ b/typedapi/ccr/followinfo/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package followinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followinfo // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow_info/FollowInfoResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow_info/FollowInfoResponse.ts#L22-L24 type Response struct { FollowerIndices []types.FollowerIndex `json:"follower_indices"` } diff --git a/typedapi/ccr/followstats/follow_stats.go b/typedapi/ccr/followstats/follow_stats.go index dcd0809ef2..b6fe9ec799 100644 --- a/typedapi/ccr/followstats/follow_stats.go +++ b/typedapi/ccr/followstats/follow_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get follower stats. // diff --git a/typedapi/ccr/followstats/response.go b/typedapi/ccr/followstats/response.go index 4bb55f2bee..418434a79a 100644 --- a/typedapi/ccr/followstats/response.go +++ b/typedapi/ccr/followstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package followstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L27 type Response struct { // Indices An array of follower index statistics. diff --git a/typedapi/ccr/forgetfollower/forget_follower.go b/typedapi/ccr/forgetfollower/forget_follower.go index 7bdcdcca47..663c5e6358 100644 --- a/typedapi/ccr/forgetfollower/forget_follower.go +++ b/typedapi/ccr/forgetfollower/forget_follower.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Forget a follower. // Remove the cross-cluster replication follower retention leases from the @@ -417,7 +417,6 @@ func (r *ForgetFollower) Pretty(pretty bool) *ForgetFollower { // API name: follower_cluster func (r *ForgetFollower) FollowerCluster(followercluster string) *ForgetFollower { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -429,11 +428,9 @@ func (r *ForgetFollower) FollowerCluster(followercluster string) *ForgetFollower // API name: follower_index func (r *ForgetFollower) FollowerIndex(indexname string) *ForgetFollower { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FollowerIndex = &indexname return r @@ -441,11 +438,9 @@ func (r *ForgetFollower) FollowerIndex(indexname string) *ForgetFollower { // API name: follower_index_uuid func (r *ForgetFollower) FollowerIndexUuid(uuid string) *ForgetFollower { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FollowerIndexUuid = &uuid return r @@ -453,7 +448,6 @@ func (r *ForgetFollower) FollowerIndexUuid(uuid string) *ForgetFollower { // API name: leader_remote_cluster func (r *ForgetFollower) LeaderRemoteCluster(leaderremotecluster string) *ForgetFollower { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/ccr/forgetfollower/request.go b/typedapi/ccr/forgetfollower/request.go index 894efdd927..220e1068bb 100644 --- a/typedapi/ccr/forgetfollower/request.go +++ b/typedapi/ccr/forgetfollower/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package forgetfollower @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L24-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L24-L65 type Request struct { FollowerCluster *string `json:"follower_cluster,omitempty"` FollowerIndex *string `json:"follower_index,omitempty"` diff --git a/typedapi/ccr/forgetfollower/response.go b/typedapi/ccr/forgetfollower/response.go index 5a01dcf9f7..70b0526895 100644 --- a/typedapi/ccr/forgetfollower/response.go +++ b/typedapi/ccr/forgetfollower/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package forgetfollower @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/forget_follower/ForgetFollowerIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/forget_follower/ForgetFollowerIndexResponse.ts#L22-L24 type Response struct { Shards_ types.ShardStatistics `json:"_shards"` } diff --git a/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go b/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go index 46d322d12d..088d93b57a 100644 --- a/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go +++ b/typedapi/ccr/getautofollowpattern/get_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get auto-follow patterns. // diff --git a/typedapi/ccr/getautofollowpattern/response.go b/typedapi/ccr/getautofollowpattern/response.go index f044bf8b87..2b14a78d38 100644 --- a/typedapi/ccr/getautofollowpattern/response.go +++ b/typedapi/ccr/getautofollowpattern/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getautofollowpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/get_auto_follow_pattern/GetAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/get_auto_follow_pattern/GetAutoFollowPatternResponse.ts#L22-L24 type Response struct { Patterns []types.AutoFollowPattern `json:"patterns"` } diff --git a/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go b/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go index 17108f775d..f9ed230d56 100644 --- a/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go +++ b/typedapi/ccr/pauseautofollowpattern/pause_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Pause an auto-follow pattern. // diff --git a/typedapi/ccr/pauseautofollowpattern/response.go b/typedapi/ccr/pauseautofollowpattern/response.go index 30a3c1208d..b5b149d96b 100644 --- a/typedapi/ccr/pauseautofollowpattern/response.go +++ b/typedapi/ccr/pauseautofollowpattern/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package pauseautofollowpattern // Response holds the response body struct for the package pauseautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/pausefollow/pause_follow.go b/typedapi/ccr/pausefollow/pause_follow.go index 9ffff38406..ec774e34a8 100644 --- a/typedapi/ccr/pausefollow/pause_follow.go +++ b/typedapi/ccr/pausefollow/pause_follow.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Pause a follower. // diff --git a/typedapi/ccr/pausefollow/response.go b/typedapi/ccr/pausefollow/response.go index 7febf71403..030a3e5c51 100644 --- a/typedapi/ccr/pausefollow/response.go +++ b/typedapi/ccr/pausefollow/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package pausefollow // Response holds the response body struct for the package pausefollow // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go b/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go index 797b5c08b1..51b106799d 100644 --- a/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go +++ b/typedapi/ccr/putautofollowpattern/put_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update auto-follow patterns. // Create a collection of cross-cluster replication auto-follow patterns for a @@ -387,198 +387,171 @@ func (r *PutAutoFollowPattern) Pretty(pretty bool) *PutAutoFollowPattern { return r } -// The name of follower index. The template {{leader_index}} can be used to +// FollowIndexPattern The name of follower index. The template {{leader_index}} can be used to // derive the name of the follower index from the name of the leader index. When // following a data stream, use {{leader_index}}; CCR does not support changes // to the names of a follower data stream’s backing indices. // API name: follow_index_pattern func (r *PutAutoFollowPattern) FollowIndexPattern(indexpattern string) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FollowIndexPattern = &indexpattern return r } -// An array of simple index patterns that can be used to exclude indices from +// LeaderIndexExclusionPatterns An array of simple index patterns that can be used to exclude indices from // being auto-followed. Indices in the remote cluster whose names are matching // one or more leader_index_patterns and one or more // leader_index_exclusion_patterns won’t be followed. // API name: leader_index_exclusion_patterns func (r *PutAutoFollowPattern) LeaderIndexExclusionPatterns(indexpatterns ...string) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.LeaderIndexExclusionPatterns = indexpatterns return r } -// An array of simple index patterns to match against indices in the remote +// LeaderIndexPatterns An array of simple index patterns to match against indices in the remote // cluster specified by the remote_cluster field. // API name: leader_index_patterns func (r *PutAutoFollowPattern) LeaderIndexPatterns(indexpatterns ...string) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.LeaderIndexPatterns = indexpatterns return r } -// The maximum number of outstanding reads requests from the remote cluster. +// MaxOutstandingReadRequests The maximum number of outstanding reads requests from the remote cluster. // API name: max_outstanding_read_requests func (r *PutAutoFollowPattern) MaxOutstandingReadRequests(maxoutstandingreadrequests int) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxOutstandingReadRequests = &maxoutstandingreadrequests return r } -// The maximum number of outstanding reads requests from the remote cluster. +// MaxOutstandingWriteRequests The maximum number of outstanding reads requests from the remote cluster. // API name: max_outstanding_write_requests func (r *PutAutoFollowPattern) MaxOutstandingWriteRequests(maxoutstandingwriterequests int) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxOutstandingWriteRequests = &maxoutstandingwriterequests return r } -// The maximum number of operations to pull per read from the remote cluster. +// MaxReadRequestOperationCount The maximum number of operations to pull per read from the remote cluster. // API name: max_read_request_operation_count func (r *PutAutoFollowPattern) MaxReadRequestOperationCount(maxreadrequestoperationcount int) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxReadRequestOperationCount = &maxreadrequestoperationcount return r } -// The maximum size in bytes of per read of a batch of operations pulled from +// MaxReadRequestSize The maximum size in bytes of per read of a batch of operations pulled from // the remote cluster. // API name: max_read_request_size -func (r *PutAutoFollowPattern) MaxReadRequestSize(bytesize types.ByteSizeVariant) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized +func (r *PutAutoFollowPattern) MaxReadRequestSize(bytesize types.ByteSize) *PutAutoFollowPattern { if r.req == nil { r.req = NewRequest() } - - r.req.MaxReadRequestSize = *bytesize.ByteSizeCaster() + r.req.MaxReadRequestSize = bytesize return r } -// The maximum time to wait before retrying an operation that failed +// MaxRetryDelay The maximum time to wait before retrying an operation that failed // exceptionally. An exponential backoff strategy is employed when retrying. // API name: max_retry_delay -func (r *PutAutoFollowPattern) MaxRetryDelay(duration types.DurationVariant) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized +func (r *PutAutoFollowPattern) MaxRetryDelay(duration types.Duration) *PutAutoFollowPattern { if r.req == nil { r.req = NewRequest() } - - r.req.MaxRetryDelay = *duration.DurationCaster() + r.req.MaxRetryDelay = duration return r } -// The maximum number of operations that can be queued for writing. When this +// MaxWriteBufferCount The maximum number of operations that can be queued for writing. When this // limit is reached, reads from the remote cluster will be deferred until the // number of queued operations goes below the limit. // API name: max_write_buffer_count func (r *PutAutoFollowPattern) MaxWriteBufferCount(maxwritebuffercount int) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxWriteBufferCount = &maxwritebuffercount return r } -// The maximum total bytes of operations that can be queued for writing. When +// MaxWriteBufferSize The maximum total bytes of operations that can be queued for writing. When // this limit is reached, reads from the remote cluster will be deferred until // the total bytes of queued operations goes below the limit. // API name: max_write_buffer_size -func (r *PutAutoFollowPattern) MaxWriteBufferSize(bytesize types.ByteSizeVariant) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized +func (r *PutAutoFollowPattern) MaxWriteBufferSize(bytesize types.ByteSize) *PutAutoFollowPattern { if r.req == nil { r.req = NewRequest() } - - r.req.MaxWriteBufferSize = *bytesize.ByteSizeCaster() + r.req.MaxWriteBufferSize = bytesize return r } -// The maximum number of operations per bulk write request executed on the +// MaxWriteRequestOperationCount The maximum number of operations per bulk write request executed on the // follower. // API name: max_write_request_operation_count func (r *PutAutoFollowPattern) MaxWriteRequestOperationCount(maxwriterequestoperationcount int) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxWriteRequestOperationCount = &maxwriterequestoperationcount return r } -// The maximum total bytes of operations per bulk write request executed on the +// MaxWriteRequestSize The maximum total bytes of operations per bulk write request executed on the // follower. // API name: max_write_request_size -func (r *PutAutoFollowPattern) MaxWriteRequestSize(bytesize types.ByteSizeVariant) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized +func (r *PutAutoFollowPattern) MaxWriteRequestSize(bytesize types.ByteSize) *PutAutoFollowPattern { if r.req == nil { r.req = NewRequest() } - - r.req.MaxWriteRequestSize = *bytesize.ByteSizeCaster() + r.req.MaxWriteRequestSize = bytesize return r } -// The maximum time to wait for new operations on the remote cluster when the +// ReadPollTimeout The maximum time to wait for new operations on the remote cluster when the // follower index is synchronized with the leader index. When the timeout has // elapsed, the poll for operations will return to the follower so that it can // update some statistics. Then the follower will immediately attempt to read // from the leader again. // API name: read_poll_timeout -func (r *PutAutoFollowPattern) ReadPollTimeout(duration types.DurationVariant) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized +func (r *PutAutoFollowPattern) ReadPollTimeout(duration types.Duration) *PutAutoFollowPattern { if r.req == nil { r.req = NewRequest() } - - r.req.ReadPollTimeout = *duration.DurationCaster() + r.req.ReadPollTimeout = duration return r } -// The remote cluster containing the leader indices to match against. +// RemoteCluster The remote cluster containing the leader indices to match against. // API name: remote_cluster func (r *PutAutoFollowPattern) RemoteCluster(remotecluster string) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -588,33 +561,15 @@ func (r *PutAutoFollowPattern) RemoteCluster(remotecluster string) *PutAutoFollo return r } -// Settings to override from the leader index. Note that certain settings can +// Settings Settings to override from the leader index. Note that certain settings can // not be overrode (e.g., index.number_of_shards). // API name: settings func (r *PutAutoFollowPattern) Settings(settings map[string]json.RawMessage) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Settings = settings - return r -} - -func (r *PutAutoFollowPattern) AddSetting(key string, value json.RawMessage) *PutAutoFollowPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Settings == nil { - r.req.Settings = make(map[string]json.RawMessage) - } else { - tmp = r.req.Settings - } - - tmp[key] = value + r.req.Settings = settings - r.req.Settings = tmp return r } diff --git a/typedapi/ccr/putautofollowpattern/request.go b/typedapi/ccr/putautofollowpattern/request.go index a11307f906..94858e7019 100644 --- a/typedapi/ccr/putautofollowpattern/request.go +++ b/typedapi/ccr/putautofollowpattern/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putautofollowpattern @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L133 type Request struct { // FollowIndexPattern The name of follower index. The template {{leader_index}} can be used to diff --git a/typedapi/ccr/putautofollowpattern/response.go b/typedapi/ccr/putautofollowpattern/response.go index d9596d64c5..ec61f80083 100644 --- a/typedapi/ccr/putautofollowpattern/response.go +++ b/typedapi/ccr/putautofollowpattern/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putautofollowpattern // Response holds the response body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/resumeautofollowpattern/response.go b/typedapi/ccr/resumeautofollowpattern/response.go index 171231cff8..d8bd60bdd7 100644 --- a/typedapi/ccr/resumeautofollowpattern/response.go +++ b/typedapi/ccr/resumeautofollowpattern/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resumeautofollowpattern // Response holds the response body struct for the package resumeautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go b/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go index d398c0c6af..80c8875ffc 100644 --- a/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go +++ b/typedapi/ccr/resumeautofollowpattern/resume_auto_follow_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Resume an auto-follow pattern. // diff --git a/typedapi/ccr/resumefollow/request.go b/typedapi/ccr/resumefollow/request.go index 3eda8e38f1..af6a87c0ba 100644 --- a/typedapi/ccr/resumefollow/request.go +++ b/typedapi/ccr/resumefollow/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resumefollow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L65 type Request struct { MaxOutstandingReadRequests *int64 `json:"max_outstanding_read_requests,omitempty"` MaxOutstandingWriteRequests *int64 `json:"max_outstanding_write_requests,omitempty"` diff --git a/typedapi/ccr/resumefollow/response.go b/typedapi/ccr/resumefollow/response.go index d78f3e3cad..7677241d28 100644 --- a/typedapi/ccr/resumefollow/response.go +++ b/typedapi/ccr/resumefollow/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resumefollow // Response holds the response body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/resumefollow/resume_follow.go b/typedapi/ccr/resumefollow/resume_follow.go index 0528a14b7f..186c27428a 100644 --- a/typedapi/ccr/resumefollow/resume_follow.go +++ b/typedapi/ccr/resumefollow/resume_follow.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Resume a follower. // Resume a cross-cluster replication follower index that was paused. @@ -379,7 +379,6 @@ func (r *ResumeFollow) Pretty(pretty bool) *ResumeFollow { // API name: max_outstanding_read_requests func (r *ResumeFollow) MaxOutstandingReadRequests(maxoutstandingreadrequests int64) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -391,7 +390,6 @@ func (r *ResumeFollow) MaxOutstandingReadRequests(maxoutstandingreadrequests int // API name: max_outstanding_write_requests func (r *ResumeFollow) MaxOutstandingWriteRequests(maxoutstandingwriterequests int64) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -403,7 +401,6 @@ func (r *ResumeFollow) MaxOutstandingWriteRequests(maxoutstandingwriterequests i // API name: max_read_request_operation_count func (r *ResumeFollow) MaxReadRequestOperationCount(maxreadrequestoperationcount int64) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -415,7 +412,6 @@ func (r *ResumeFollow) MaxReadRequestOperationCount(maxreadrequestoperationcount // API name: max_read_request_size func (r *ResumeFollow) MaxReadRequestSize(maxreadrequestsize string) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -426,20 +422,17 @@ func (r *ResumeFollow) MaxReadRequestSize(maxreadrequestsize string) *ResumeFoll } // API name: max_retry_delay -func (r *ResumeFollow) MaxRetryDelay(duration types.DurationVariant) *ResumeFollow { - // Initialize the request if it is not already initialized +func (r *ResumeFollow) MaxRetryDelay(duration types.Duration) *ResumeFollow { if r.req == nil { r.req = NewRequest() } - - r.req.MaxRetryDelay = *duration.DurationCaster() + r.req.MaxRetryDelay = duration return r } // API name: max_write_buffer_count func (r *ResumeFollow) MaxWriteBufferCount(maxwritebuffercount int64) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -451,7 +444,6 @@ func (r *ResumeFollow) MaxWriteBufferCount(maxwritebuffercount int64) *ResumeFol // API name: max_write_buffer_size func (r *ResumeFollow) MaxWriteBufferSize(maxwritebuffersize string) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -463,7 +455,6 @@ func (r *ResumeFollow) MaxWriteBufferSize(maxwritebuffersize string) *ResumeFoll // API name: max_write_request_operation_count func (r *ResumeFollow) MaxWriteRequestOperationCount(maxwriterequestoperationcount int64) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -475,7 +466,6 @@ func (r *ResumeFollow) MaxWriteRequestOperationCount(maxwriterequestoperationcou // API name: max_write_request_size func (r *ResumeFollow) MaxWriteRequestSize(maxwriterequestsize string) *ResumeFollow { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -486,13 +476,11 @@ func (r *ResumeFollow) MaxWriteRequestSize(maxwriterequestsize string) *ResumeFo } // API name: read_poll_timeout -func (r *ResumeFollow) ReadPollTimeout(duration types.DurationVariant) *ResumeFollow { - // Initialize the request if it is not already initialized +func (r *ResumeFollow) ReadPollTimeout(duration types.Duration) *ResumeFollow { if r.req == nil { r.req = NewRequest() } - - r.req.ReadPollTimeout = *duration.DurationCaster() + r.req.ReadPollTimeout = duration return r } diff --git a/typedapi/ccr/stats/response.go b/typedapi/ccr/stats/response.go index 344657199e..127738af04 100644 --- a/typedapi/ccr/stats/response.go +++ b/typedapi/ccr/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/stats/CcrStatsResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/stats/CcrStatsResponse.ts#L22-L29 type Response struct { // AutoFollowStats Statistics for the auto-follow coordinator. diff --git a/typedapi/ccr/stats/stats.go b/typedapi/ccr/stats/stats.go index 804b2da013..ea094108ce 100644 --- a/typedapi/ccr/stats/stats.go +++ b/typedapi/ccr/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cross-cluster replication stats. // diff --git a/typedapi/ccr/unfollow/response.go b/typedapi/ccr/unfollow/response.go index e931351a9e..f179c45f92 100644 --- a/typedapi/ccr/unfollow/response.go +++ b/typedapi/ccr/unfollow/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package unfollow // Response holds the response body struct for the package unfollow // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ccr/unfollow/unfollow.go b/typedapi/ccr/unfollow/unfollow.go index ef2b942d86..d29db71209 100644 --- a/typedapi/ccr/unfollow/unfollow.go +++ b/typedapi/ccr/unfollow/unfollow.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Unfollow an index. // diff --git a/typedapi/cluster/allocationexplain/allocation_explain.go b/typedapi/cluster/allocationexplain/allocation_explain.go index 6681429fde..d28d16a01c 100644 --- a/typedapi/cluster/allocationexplain/allocation_explain.go +++ b/typedapi/cluster/allocationexplain/allocation_explain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Explain the shard allocations. // Get explanations for shard allocations in the cluster. @@ -378,11 +378,10 @@ func (r *AllocationExplain) Pretty(pretty bool) *AllocationExplain { return r } -// Specifies the node ID or the name of the node to only explain a shard that is +// CurrentNode Specifies the node ID or the name of the node to only explain a shard that is // currently located on the specified node. // API name: current_node func (r *AllocationExplain) CurrentNode(currentnode string) *AllocationExplain { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -392,40 +391,34 @@ func (r *AllocationExplain) CurrentNode(currentnode string) *AllocationExplain { return r } -// Specifies the name of the index that you would like an explanation for. +// Index Specifies the name of the index that you would like an explanation for. // API name: index func (r *AllocationExplain) Index(indexname string) *AllocationExplain { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Index = &indexname return r } -// If true, returns explanation for the primary shard for the given shard ID. +// Primary If true, returns explanation for the primary shard for the given shard ID. // API name: primary func (r *AllocationExplain) Primary(primary bool) *AllocationExplain { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Primary = &primary return r } -// Specifies the ID of the shard that you would like an explanation for. +// Shard Specifies the ID of the shard that you would like an explanation for. // API name: shard func (r *AllocationExplain) Shard(shard int) *AllocationExplain { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Shard = &shard return r diff --git a/typedapi/cluster/allocationexplain/request.go b/typedapi/cluster/allocationexplain/request.go index a63607ddbf..8899470ca7 100644 --- a/typedapi/cluster/allocationexplain/request.go +++ b/typedapi/cluster/allocationexplain/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package allocationexplain @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L25-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L25-L79 type Request struct { // CurrentNode Specifies the node ID or the name of the node to only explain a shard that is diff --git a/typedapi/cluster/allocationexplain/response.go b/typedapi/cluster/allocationexplain/response.go index 1c0abdec56..de8998cb29 100644 --- a/typedapi/cluster/allocationexplain/response.go +++ b/typedapi/cluster/allocationexplain/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package allocationexplain @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/ClusterAllocationExplainResponse.ts#L32-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/ClusterAllocationExplainResponse.ts#L32-L64 type Response struct { AllocateExplanation *string `json:"allocate_explanation,omitempty"` AllocationDelay types.Duration `json:"allocation_delay,omitempty"` diff --git a/typedapi/cluster/deletecomponenttemplate/delete_component_template.go b/typedapi/cluster/deletecomponenttemplate/delete_component_template.go index aab553a230..bb34ddd7ce 100644 --- a/typedapi/cluster/deletecomponenttemplate/delete_component_template.go +++ b/typedapi/cluster/deletecomponenttemplate/delete_component_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete component templates. // Component templates are building blocks for constructing index templates that diff --git a/typedapi/cluster/deletecomponenttemplate/response.go b/typedapi/cluster/deletecomponenttemplate/response.go index 294a3086c3..65c504eda6 100644 --- a/typedapi/cluster/deletecomponenttemplate/response.go +++ b/typedapi/cluster/deletecomponenttemplate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletecomponenttemplate // Response holds the response body struct for the package deletecomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go b/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go index 7d038b2ef1..a9ab0ea624 100644 --- a/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go +++ b/typedapi/cluster/deletevotingconfigexclusions/delete_voting_config_exclusions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear cluster voting config exclusions. // Remove master-eligible nodes from the voting configuration exclusion list. diff --git a/typedapi/cluster/existscomponenttemplate/exists_component_template.go b/typedapi/cluster/existscomponenttemplate/exists_component_template.go index 2cdf66b6e2..6f2bc3123f 100644 --- a/typedapi/cluster/existscomponenttemplate/exists_component_template.go +++ b/typedapi/cluster/existscomponenttemplate/exists_component_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check component templates. // Returns information about whether a particular component template exists. diff --git a/typedapi/cluster/getcomponenttemplate/get_component_template.go b/typedapi/cluster/getcomponenttemplate/get_component_template.go index c32fe4ac33..f7fb5730d6 100644 --- a/typedapi/cluster/getcomponenttemplate/get_component_template.go +++ b/typedapi/cluster/getcomponenttemplate/get_component_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get component templates. // Get information about component templates. @@ -311,6 +311,19 @@ func (r *GetComponentTemplate) FlatSettings(flatsettings bool) *GetComponentTemp return r } +// SettingsFilter Filter out results, for example to filter out sensitive information. Supports +// wildcards or full settings keys +// API name: settings_filter +func (r *GetComponentTemplate) SettingsFilter(settingsfilters ...string) *GetComponentTemplate { + tmp := []string{} + for _, item := range settingsfilters { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("settings_filter", strings.Join(tmp, ",")) + + return r +} + // IncludeDefaults Return all default configurations for the component template (default: false) // API name: include_defaults func (r *GetComponentTemplate) IncludeDefaults(includedefaults bool) *GetComponentTemplate { diff --git a/typedapi/cluster/getcomponenttemplate/response.go b/typedapi/cluster/getcomponenttemplate/response.go index 54a014d6ca..4472107f12 100644 --- a/typedapi/cluster/getcomponenttemplate/response.go +++ b/typedapi/cluster/getcomponenttemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getcomponenttemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24 type Response struct { ComponentTemplates []types.ClusterComponentTemplate `json:"component_templates"` } diff --git a/typedapi/cluster/getsettings/get_settings.go b/typedapi/cluster/getsettings/get_settings.go index 06699860de..fb4b0553f4 100644 --- a/typedapi/cluster/getsettings/get_settings.go +++ b/typedapi/cluster/getsettings/get_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cluster-wide settings. // By default, it returns only settings that have been explicitly defined. diff --git a/typedapi/cluster/getsettings/response.go b/typedapi/cluster/getsettings/response.go index 900169f987..6d3a1eb9da 100644 --- a/typedapi/cluster/getsettings/response.go +++ b/typedapi/cluster/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsettings @@ -26,11 +26,15 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L32 type Response struct { - Defaults map[string]json.RawMessage `json:"defaults,omitempty"` + + // Defaults The default setting values. + Defaults map[string]json.RawMessage `json:"defaults,omitempty"` + // Persistent The settings that persist after the cluster restarts. Persistent map[string]json.RawMessage `json:"persistent"` - Transient map[string]json.RawMessage `json:"transient"` + // Transient The settings that do not persist after the cluster restarts. + Transient map[string]json.RawMessage `json:"transient"` } // NewResponse returns a Response diff --git a/typedapi/cluster/health/health.go b/typedapi/cluster/health/health.go index 13f75655ec..06ee2e6428 100644 --- a/typedapi/cluster/health/health.go +++ b/typedapi/cluster/health/health.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the cluster health status. // @@ -37,7 +37,6 @@ package health import ( - gobytes "bytes" "context" "encoding/json" "errors" @@ -45,6 +44,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -253,7 +253,8 @@ func (r Health) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{408}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -265,42 +266,6 @@ func (r Health) Do(providedCtx context.Context) (*Response, error) { return response, nil } - if res.StatusCode == 408 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { diff --git a/typedapi/cluster/health/response.go b/typedapi/cluster/health/response.go index 1dbdb842b8..1b585000d6 100644 --- a/typedapi/cluster/health/response.go +++ b/typedapi/cluster/health/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package health @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/health/ClusterHealthResponse.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/health/ClusterHealthResponse.ts#L26-L37 type Response struct { // ActivePrimaryShards The number of active primary shards. diff --git a/typedapi/cluster/info/info.go b/typedapi/cluster/info/info.go index 5e806e5ba6..53e083027d 100644 --- a/typedapi/cluster/info/info.go +++ b/typedapi/cluster/info/info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cluster info. // Returns basic information about the cluster. diff --git a/typedapi/cluster/info/response.go b/typedapi/cluster/info/response.go index aaa6ab8095..0f7dadda17 100644 --- a/typedapi/cluster/info/response.go +++ b/typedapi/cluster/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/info/ClusterInfoResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/info/ClusterInfoResponse.ts#L26-L34 type Response struct { ClusterName string `json:"cluster_name"` Http *types.Http `json:"http,omitempty"` diff --git a/typedapi/cluster/pendingtasks/pending_tasks.go b/typedapi/cluster/pendingtasks/pending_tasks.go index b71f61f9b9..d92dcf71ec 100644 --- a/typedapi/cluster/pendingtasks/pending_tasks.go +++ b/typedapi/cluster/pendingtasks/pending_tasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the pending cluster tasks. // Get information about cluster-level changes (such as create index, update diff --git a/typedapi/cluster/pendingtasks/response.go b/typedapi/cluster/pendingtasks/response.go index 7fc0e4fd79..f7cb912b59 100644 --- a/typedapi/cluster/pendingtasks/response.go +++ b/typedapi/cluster/pendingtasks/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24 type Response struct { Tasks []types.PendingTask `json:"tasks"` } diff --git a/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go b/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go index 43b05e8e35..59ebc734f5 100644 --- a/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go +++ b/typedapi/cluster/postvotingconfigexclusions/post_voting_config_exclusions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update voting configuration exclusions. // Update the cluster voting config exclusions by node IDs or node names. diff --git a/typedapi/cluster/putcomponenttemplate/put_component_template.go b/typedapi/cluster/putcomponenttemplate/put_component_template.go index f22fcaa39f..55e915a90c 100644 --- a/typedapi/cluster/putcomponenttemplate/put_component_template.go +++ b/typedapi/cluster/putcomponenttemplate/put_component_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a component template. // Component templates are building blocks for constructing index templates that @@ -386,6 +386,14 @@ func (r *PutComponentTemplate) Create(create bool) *PutComponentTemplate { return r } +// Cause User defined reason for create the component template. +// API name: cause +func (r *PutComponentTemplate) Cause(cause string) *PutComponentTemplate { + r.values.Set("cause", cause) + + return r +} + // MasterTimeout Period to wait for a connection to the master node. // If no response is received before the timeout expires, the request fails and // returns an error. @@ -440,64 +448,57 @@ func (r *PutComponentTemplate) Pretty(pretty bool) *PutComponentTemplate { return r } -// Marks this index template as deprecated. When creating or updating a +// Deprecated Marks this index template as deprecated. When creating or updating a // non-deprecated index template // that uses deprecated components, Elasticsearch will emit a deprecation // warning. // API name: deprecated func (r *PutComponentTemplate) Deprecated(deprecated bool) *PutComponentTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Deprecated = &deprecated return r } -// Optional user metadata about the component template. +// Meta_ Optional user metadata about the component template. // It may have any contents. This map is not automatically generated by // Elasticsearch. // This information is stored in the cluster state, so keeping it short is // preferable. // To unset `_meta`, replace the template without specifying this information. // API name: _meta -func (r *PutComponentTemplate) Meta_(metadata types.MetadataVariant) *PutComponentTemplate { - // Initialize the request if it is not already initialized +func (r *PutComponentTemplate) Meta_(metadata types.Metadata) *PutComponentTemplate { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// The template to be applied which includes mappings, settings, or aliases +// Template The template to be applied which includes mappings, settings, or aliases // configuration. // API name: template -func (r *PutComponentTemplate) Template(template types.IndexStateVariant) *PutComponentTemplate { - // Initialize the request if it is not already initialized +func (r *PutComponentTemplate) Template(template *types.IndexState) *PutComponentTemplate { if r.req == nil { r.req = NewRequest() } - r.req.Template = *template.IndexStateCaster() + r.req.Template = *template return r } -// Version number used to manage component templates externally. +// Version Version number used to manage component templates externally. // This number isn't automatically generated or incremented by Elasticsearch. // To unset a version, replace the template without specifying a version. // API name: version func (r *PutComponentTemplate) Version(versionnumber int64) *PutComponentTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionnumber return r diff --git a/typedapi/cluster/putcomponenttemplate/request.go b/typedapi/cluster/putcomponenttemplate/request.go index 14c1ae83dc..777104124b 100644 --- a/typedapi/cluster/putcomponenttemplate/request.go +++ b/typedapi/cluster/putcomponenttemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcomponenttemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L110 type Request struct { // Deprecated Marks this index template as deprecated. When creating or updating a diff --git a/typedapi/cluster/putcomponenttemplate/response.go b/typedapi/cluster/putcomponenttemplate/response.go index 432b89564f..da655e15ee 100644 --- a/typedapi/cluster/putcomponenttemplate/response.go +++ b/typedapi/cluster/putcomponenttemplate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcomponenttemplate // Response holds the response body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/cluster/putsettings/put_settings.go b/typedapi/cluster/putsettings/put_settings.go index d743cb43ec..dbc36f9692 100644 --- a/typedapi/cluster/putsettings/put_settings.go +++ b/typedapi/cluster/putsettings/put_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the cluster settings. // @@ -422,60 +422,26 @@ func (r *PutSettings) Pretty(pretty bool) *PutSettings { return r } +// Persistent The settings that persist after the cluster restarts. // API name: persistent func (r *PutSettings) Persistent(persistent map[string]json.RawMessage) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Persistent = persistent - return r -} -func (r *PutSettings) AddPersistent(key string, value json.RawMessage) *PutSettings { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Persistent == nil { - r.req.Persistent = make(map[string]json.RawMessage) - } else { - tmp = r.req.Persistent - } - - tmp[key] = value + r.req.Persistent = persistent - r.req.Persistent = tmp return r } +// Transient The settings that do not persist after the cluster restarts. // API name: transient func (r *PutSettings) Transient(transient map[string]json.RawMessage) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Transient = transient - return r -} -func (r *PutSettings) AddTransient(key string, value json.RawMessage) *PutSettings { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Transient == nil { - r.req.Transient = make(map[string]json.RawMessage) - } else { - tmp = r.req.Transient - } - - tmp[key] = value + r.req.Transient = transient - r.req.Transient = tmp return r } diff --git a/typedapi/cluster/putsettings/request.go b/typedapi/cluster/putsettings/request.go index d6453046cb..a9dc7971a1 100644 --- a/typedapi/cluster/putsettings/request.go +++ b/typedapi/cluster/putsettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsettings @@ -27,10 +27,13 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L71 type Request struct { + + // Persistent The settings that persist after the cluster restarts. Persistent map[string]json.RawMessage `json:"persistent,omitempty"` - Transient map[string]json.RawMessage `json:"transient,omitempty"` + // Transient The settings that do not persist after the cluster restarts. + Transient map[string]json.RawMessage `json:"transient,omitempty"` } // NewRequest returns a Request diff --git a/typedapi/cluster/putsettings/response.go b/typedapi/cluster/putsettings/response.go index 4cd5fe3b18..8df0bd55b2 100644 --- a/typedapi/cluster/putsettings/response.go +++ b/typedapi/cluster/putsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29 type Response struct { Acknowledged bool `json:"acknowledged"` Persistent map[string]json.RawMessage `json:"persistent"` diff --git a/typedapi/cluster/remoteinfo/remote_info.go b/typedapi/cluster/remoteinfo/remote_info.go index b16527e3da..dea915a8d3 100644 --- a/typedapi/cluster/remoteinfo/remote_info.go +++ b/typedapi/cluster/remoteinfo/remote_info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get remote cluster information. // @@ -33,8 +33,7 @@ // > Elasticsearch does not spontaneously try to reconnect to a disconnected // remote cluster. // > To trigger a reconnection, attempt a cross-cluster search, ES|QL -// cross-cluster search, or try the [resolve cluster -// endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster). +// cross-cluster search, or try the `/_resolve/cluster` endpoint. package remoteinfo import ( @@ -99,8 +98,7 @@ func NewRemoteInfoFunc(tp elastictransport.Interface) NewRemoteInfo { // > Elasticsearch does not spontaneously try to reconnect to a disconnected // remote cluster. // > To trigger a reconnection, attempt a cross-cluster search, ES|QL -// cross-cluster search, or try the [resolve cluster -// endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster). +// cross-cluster search, or try the `/_resolve/cluster` endpoint. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html func New(tp elastictransport.Interface) *RemoteInfo { diff --git a/typedapi/cluster/remoteinfo/response.go b/typedapi/cluster/remoteinfo/response.go index b0e65a23ae..702fdfaf03 100644 --- a/typedapi/cluster/remoteinfo/response.go +++ b/typedapi/cluster/remoteinfo/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package remoteinfo @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package remoteinfo // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L24-L27 type Response map[string]types.ClusterRemoteInfo diff --git a/typedapi/cluster/reroute/request.go b/typedapi/cluster/reroute/request.go index 2ec23f1689..2bf3a51830 100644 --- a/typedapi/cluster/reroute/request.go +++ b/typedapi/cluster/reroute/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reroute @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/ClusterRerouteRequest.ts#L25-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/ClusterRerouteRequest.ts#L25-L91 type Request struct { // Commands Defines the commands to perform. diff --git a/typedapi/cluster/reroute/reroute.go b/typedapi/cluster/reroute/reroute.go index 94ff7715f6..3b665eacad 100644 --- a/typedapi/cluster/reroute/reroute.go +++ b/typedapi/cluster/reroute/reroute.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reroute the cluster. // Manually change the allocation of individual shards in the cluster. @@ -446,17 +446,13 @@ func (r *Reroute) Pretty(pretty bool) *Reroute { return r } -// Defines the commands to perform. +// Commands Defines the commands to perform. // API name: commands -func (r *Reroute) Commands(commands ...types.CommandVariant) *Reroute { - // Initialize the request if it is not already initialized +func (r *Reroute) Commands(commands ...types.Command) *Reroute { if r.req == nil { r.req = NewRequest() } - for _, v := range commands { + r.req.Commands = commands - r.req.Commands = append(r.req.Commands, *v.CommandCaster()) - - } return r } diff --git a/typedapi/cluster/reroute/response.go b/typedapi/cluster/reroute/response.go index 647cafa41c..28a5f14572 100644 --- a/typedapi/cluster/reroute/response.go +++ b/typedapi/cluster/reroute/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reroute @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/ClusterRerouteResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/ClusterRerouteResponse.ts#L23-L34 type Response struct { Acknowledged bool `json:"acknowledged"` Explanations []types.RerouteExplanation `json:"explanations,omitempty"` diff --git a/typedapi/cluster/state/response.go b/typedapi/cluster/state/response.go index f3c15be5df..1599de5c44 100644 --- a/typedapi/cluster/state/response.go +++ b/typedapi/cluster/state/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package state @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package state // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/state/ClusterStateResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/state/ClusterStateResponse.ts#L22-L29 type Response = json.RawMessage diff --git a/typedapi/cluster/state/state.go b/typedapi/cluster/state/state.go index d112fd0adf..19637bb932 100644 --- a/typedapi/cluster/state/state.go +++ b/typedapi/cluster/state/state.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the cluster state. // Get comprehensive information about the state of the cluster. diff --git a/typedapi/cluster/stats/response.go b/typedapi/cluster/stats/response.go index fea9beca88..190d2cd39b 100644 --- a/typedapi/cluster/stats/response.go +++ b/typedapi/cluster/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -27,9 +27,11 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/ClusterStatsResponse.ts#L53-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/ClusterStatsResponse.ts#L71-L73 type Response struct { + // Ccs Cross-cluster stats + Ccs types.CCSStats `json:"ccs"` // ClusterName Name of the cluster, based on the cluster name setting. ClusterName string `json:"cluster_name"` // ClusterUuid Unique identifier for the cluster. @@ -41,9 +43,14 @@ type Response struct { NodeStats *types.NodeStatistics `json:"_nodes,omitempty"` // Nodes Contains statistics about nodes selected by the request’s node filters. Nodes types.ClusterNodes `json:"nodes"` + // Repositories Contains stats on repository feature usage exposed in cluster stats for + // telemetry. + Repositories map[string]map[string]int64 `json:"repositories"` + // Snapshots Contains stats cluster snapshots. + Snapshots types.ClusterSnapshotStats `json:"snapshots"` // Status Health status of the cluster, based on the state of its primary and replica // shards. - Status healthstatus.HealthStatus `json:"status"` + Status *healthstatus.HealthStatus `json:"status,omitempty"` // Timestamp Unix timestamp, in milliseconds, for the last time the cluster statistics // were refreshed. Timestamp int64 `json:"timestamp"` @@ -51,6 +58,8 @@ type Response struct { // NewResponse returns a Response func NewResponse() *Response { - r := &Response{} + r := &Response{ + Repositories: make(map[string]map[string]int64, 0), + } return r } diff --git a/typedapi/cluster/stats/stats.go b/typedapi/cluster/stats/stats.go index 66ddf31d5b..27a2a6fc51 100644 --- a/typedapi/cluster/stats/stats.go +++ b/typedapi/cluster/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cluster statistics. // Get basic index metrics (shard numbers, store size, memory usage) and diff --git a/typedapi/connector/checkin/check_in.go b/typedapi/connector/checkin/check_in.go index 6a9fbf1aa7..3a71b4c541 100644 --- a/typedapi/connector/checkin/check_in.go +++ b/typedapi/connector/checkin/check_in.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check in a connector. // diff --git a/typedapi/connector/checkin/response.go b/typedapi/connector/checkin/response.go index 89e39ff26e..19d67f1307 100644 --- a/typedapi/connector/checkin/response.go +++ b/typedapi/connector/checkin/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package checkin @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package checkin // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/check_in/ConnectorCheckInResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/check_in/ConnectorCheckInResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/delete/delete.go b/typedapi/connector/delete/delete.go index 4908f03ead..17b0738fe0 100644 --- a/typedapi/connector/delete/delete.go +++ b/typedapi/connector/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a connector. // diff --git a/typedapi/connector/delete/response.go b/typedapi/connector/delete/response.go index 7c59ef596a..f0fa267f31 100644 --- a/typedapi/connector/delete/response.go +++ b/typedapi/connector/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/connector/get/get.go b/typedapi/connector/get/get.go index db9b49c4b0..db79d41d1c 100644 --- a/typedapi/connector/get/get.go +++ b/typedapi/connector/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a connector. // diff --git a/typedapi/connector/get/response.go b/typedapi/connector/get/response.go index ae4c0329d2..3c51d5c86a 100644 --- a/typedapi/connector/get/response.go +++ b/typedapi/connector/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -35,7 +35,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/get/ConnectorGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/get/ConnectorGetResponse.ts#L22-L24 type Response struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/connector/lastsync/last_sync.go b/typedapi/connector/lastsync/last_sync.go index ee09ee6baa..7fd5ef4dd4 100644 --- a/typedapi/connector/lastsync/last_sync.go +++ b/typedapi/connector/lastsync/last_sync.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector last sync stats. // @@ -366,7 +366,6 @@ func (r *LastSync) Pretty(pretty bool) *LastSync { // API name: last_access_control_sync_error func (r *LastSync) LastAccessControlSyncError(lastaccesscontrolsyncerror string) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -377,30 +376,27 @@ func (r *LastSync) LastAccessControlSyncError(lastaccesscontrolsyncerror string) } // API name: last_access_control_sync_scheduled_at -func (r *LastSync) LastAccessControlSyncScheduledAt(datetime types.DateTimeVariant) *LastSync { - // Initialize the request if it is not already initialized +func (r *LastSync) LastAccessControlSyncScheduledAt(datetime types.DateTime) *LastSync { if r.req == nil { r.req = NewRequest() } - - r.req.LastAccessControlSyncScheduledAt = *datetime.DateTimeCaster() + r.req.LastAccessControlSyncScheduledAt = datetime return r } // API name: last_access_control_sync_status func (r *LastSync) LastAccessControlSyncStatus(lastaccesscontrolsyncstatus syncstatus.SyncStatus) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.LastAccessControlSyncStatus = &lastaccesscontrolsyncstatus + return r } // API name: last_deleted_document_count func (r *LastSync) LastDeletedDocumentCount(lastdeleteddocumentcount int64) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -411,20 +407,17 @@ func (r *LastSync) LastDeletedDocumentCount(lastdeleteddocumentcount int64) *Las } // API name: last_incremental_sync_scheduled_at -func (r *LastSync) LastIncrementalSyncScheduledAt(datetime types.DateTimeVariant) *LastSync { - // Initialize the request if it is not already initialized +func (r *LastSync) LastIncrementalSyncScheduledAt(datetime types.DateTime) *LastSync { if r.req == nil { r.req = NewRequest() } - - r.req.LastIncrementalSyncScheduledAt = *datetime.DateTimeCaster() + r.req.LastIncrementalSyncScheduledAt = datetime return r } // API name: last_indexed_document_count func (r *LastSync) LastIndexedDocumentCount(lastindexeddocumentcount int64) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -435,20 +428,17 @@ func (r *LastSync) LastIndexedDocumentCount(lastindexeddocumentcount int64) *Las } // API name: last_seen -func (r *LastSync) LastSeen(datetime types.DateTimeVariant) *LastSync { - // Initialize the request if it is not already initialized +func (r *LastSync) LastSeen(datetime types.DateTime) *LastSync { if r.req == nil { r.req = NewRequest() } - - r.req.LastSeen = *datetime.DateTimeCaster() + r.req.LastSeen = datetime return r } // API name: last_sync_error func (r *LastSync) LastSyncError(lastsyncerror string) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -459,42 +449,41 @@ func (r *LastSync) LastSyncError(lastsyncerror string) *LastSync { } // API name: last_sync_scheduled_at -func (r *LastSync) LastSyncScheduledAt(datetime types.DateTimeVariant) *LastSync { - // Initialize the request if it is not already initialized +func (r *LastSync) LastSyncScheduledAt(datetime types.DateTime) *LastSync { if r.req == nil { r.req = NewRequest() } - - r.req.LastSyncScheduledAt = *datetime.DateTimeCaster() + r.req.LastSyncScheduledAt = datetime return r } // API name: last_sync_status func (r *LastSync) LastSyncStatus(lastsyncstatus syncstatus.SyncStatus) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.LastSyncStatus = &lastsyncstatus + return r } // API name: last_synced -func (r *LastSync) LastSynced(datetime types.DateTimeVariant) *LastSync { - // Initialize the request if it is not already initialized +func (r *LastSync) LastSynced(datetime types.DateTime) *LastSync { if r.req == nil { r.req = NewRequest() } - - r.req.LastSynced = *datetime.DateTimeCaster() + r.req.LastSynced = datetime return r } // API name: sync_cursor +// +// synccursor should be a json.RawMessage or a structure +// if a structure is provided, the client will defer a json serialization +// prior to sending the payload to Elasticsearch. func (r *LastSync) SyncCursor(synccursor any) *LastSync { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -511,5 +500,6 @@ func (r *LastSync) SyncCursor(synccursor any) *LastSync { return nil }) } + return r } diff --git a/typedapi/connector/lastsync/request.go b/typedapi/connector/lastsync/request.go index c82c97968f..2bf516cf8e 100644 --- a/typedapi/connector/lastsync/request.go +++ b/typedapi/connector/lastsync/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package lastsync @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L66 type Request struct { LastAccessControlSyncError *string `json:"last_access_control_sync_error,omitempty"` LastAccessControlSyncScheduledAt types.DateTime `json:"last_access_control_sync_scheduled_at,omitempty"` diff --git a/typedapi/connector/lastsync/response.go b/typedapi/connector/lastsync/response.go index d92e4424f4..832617f9ba 100644 --- a/typedapi/connector/lastsync/response.go +++ b/typedapi/connector/lastsync/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package lastsync @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/list/list.go b/typedapi/connector/list/list.go index 2990f0da44..f94a57199b 100644 --- a/typedapi/connector/list/list.go +++ b/typedapi/connector/list/list.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get all connectors. // diff --git a/typedapi/connector/list/response.go b/typedapi/connector/list/response.go index 3442ef3d09..96b7fbedb8 100644 --- a/typedapi/connector/list/response.go +++ b/typedapi/connector/list/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/list/ConnectorListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/list/ConnectorListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.Connector `json:"results"` diff --git a/typedapi/connector/post/post.go b/typedapi/connector/post/post.go index cadb051261..0fb39cc3dc 100644 --- a/typedapi/connector/post/post.go +++ b/typedapi/connector/post/post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a connector. // @@ -350,7 +350,6 @@ func (r *Post) Pretty(pretty bool) *Post { // API name: description func (r *Post) Description(description string) *Post { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -362,11 +361,9 @@ func (r *Post) Description(description string) *Post { // API name: index_name func (r *Post) IndexName(indexname string) *Post { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexName = &indexname return r @@ -374,11 +371,9 @@ func (r *Post) IndexName(indexname string) *Post { // API name: is_native func (r *Post) IsNative(isnative bool) *Post { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IsNative = &isnative return r @@ -386,7 +381,6 @@ func (r *Post) IsNative(isnative bool) *Post { // API name: language func (r *Post) Language(language string) *Post { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -398,7 +392,6 @@ func (r *Post) Language(language string) *Post { // API name: name func (r *Post) Name(name string) *Post { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -410,7 +403,6 @@ func (r *Post) Name(name string) *Post { // API name: service_type func (r *Post) ServiceType(servicetype string) *Post { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/post/request.go b/typedapi/connector/post/request.go index e6c33351e2..c5c876adf3 100644 --- a/typedapi/connector/post/request.go +++ b/typedapi/connector/post/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package post @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/post/ConnectorPostRequest.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/post/ConnectorPostRequest.ts#L22-L52 type Request struct { Description *string `json:"description,omitempty"` IndexName *string `json:"index_name,omitempty"` diff --git a/typedapi/connector/post/response.go b/typedapi/connector/post/response.go index 670b0f856c..0e186d1522 100644 --- a/typedapi/connector/post/response.go +++ b/typedapi/connector/post/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package post @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/post/ConnectorPostResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/post/ConnectorPostResponse.ts#L23-L28 type Response struct { Id string `json:"id"` Result result.Result `json:"result"` diff --git a/typedapi/connector/put/put.go b/typedapi/connector/put/put.go index b62ddd5fec..494b11b852 100644 --- a/typedapi/connector/put/put.go +++ b/typedapi/connector/put/put.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a connector. package put @@ -361,7 +361,6 @@ func (r *Put) Pretty(pretty bool) *Put { // API name: description func (r *Put) Description(description string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -373,11 +372,9 @@ func (r *Put) Description(description string) *Put { // API name: index_name func (r *Put) IndexName(indexname string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexName = &indexname return r @@ -385,11 +382,9 @@ func (r *Put) IndexName(indexname string) *Put { // API name: is_native func (r *Put) IsNative(isnative bool) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IsNative = &isnative return r @@ -397,7 +392,6 @@ func (r *Put) IsNative(isnative bool) *Put { // API name: language func (r *Put) Language(language string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -409,7 +403,6 @@ func (r *Put) Language(language string) *Put { // API name: name func (r *Put) Name(name string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -421,7 +414,6 @@ func (r *Put) Name(name string) *Put { // API name: service_type func (r *Put) ServiceType(servicetype string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/put/request.go b/typedapi/connector/put/request.go index af5461cf42..e42a6ba1a0 100644 --- a/typedapi/connector/put/request.go +++ b/typedapi/connector/put/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package put @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/put/ConnectorPutRequest.ts#L22-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/put/ConnectorPutRequest.ts#L22-L58 type Request struct { Description *string `json:"description,omitempty"` IndexName *string `json:"index_name,omitempty"` diff --git a/typedapi/connector/put/response.go b/typedapi/connector/put/response.go index e6df88db8e..38fb954271 100644 --- a/typedapi/connector/put/response.go +++ b/typedapi/connector/put/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/put/ConnectorPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/put/ConnectorPutResponse.ts#L23-L28 type Response struct { Id string `json:"id"` Result result.Result `json:"result"` diff --git a/typedapi/connector/secretpost/secret_post.go b/typedapi/connector/secretpost/secret_post.go index 2181e8d28b..5108977d0a 100644 --- a/typedapi/connector/secretpost/secret_post.go +++ b/typedapi/connector/secretpost/secret_post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Creates a secret for a Connector. package secretpost diff --git a/typedapi/connector/syncjobcancel/response.go b/typedapi/connector/syncjobcancel/response.go index 395a932008..2056867555 100644 --- a/typedapi/connector/syncjobcancel/response.go +++ b/typedapi/connector/syncjobcancel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobcancel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjobcancel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/syncjobcancel/sync_job_cancel.go b/typedapi/connector/syncjobcancel/sync_job_cancel.go index 14ec394121..4e3cb7648b 100644 --- a/typedapi/connector/syncjobcancel/sync_job_cancel.go +++ b/typedapi/connector/syncjobcancel/sync_job_cancel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Cancel a connector sync job. // diff --git a/typedapi/connector/syncjobcheckin/response.go b/typedapi/connector/syncjobcheckin/response.go index 045c0f3ebe..740f8183af 100644 --- a/typedapi/connector/syncjobcheckin/response.go +++ b/typedapi/connector/syncjobcheckin/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobcheckin // Response holds the response body struct for the package syncjobcheckin // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_check_in/SyncJobCheckInResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_check_in/SyncJobCheckInResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjobcheckin/sync_job_check_in.go b/typedapi/connector/syncjobcheckin/sync_job_check_in.go index a8328c28ca..f0b855112c 100644 --- a/typedapi/connector/syncjobcheckin/sync_job_check_in.go +++ b/typedapi/connector/syncjobcheckin/sync_job_check_in.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check in a connector sync job. // Check in a connector sync job and set the `last_seen` field to the current diff --git a/typedapi/connector/syncjobclaim/request.go b/typedapi/connector/syncjobclaim/request.go index 8f3cebfc42..ff8b9abf5e 100644 --- a/typedapi/connector/syncjobclaim/request.go +++ b/typedapi/connector/syncjobclaim/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobclaim @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package syncjobclaim // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_claim/SyncJobClaimRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_claim/SyncJobClaimRequest.ts#L23-L61 type Request struct { // SyncCursor The cursor object from the last incremental sync job. diff --git a/typedapi/connector/syncjobclaim/response.go b/typedapi/connector/syncjobclaim/response.go index e592d8ecd7..30dd29b938 100644 --- a/typedapi/connector/syncjobclaim/response.go +++ b/typedapi/connector/syncjobclaim/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobclaim // Response holds the response body struct for the package syncjobclaim // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_claim/SyncJobClaimResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_claim/SyncJobClaimResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjobclaim/sync_job_claim.go b/typedapi/connector/syncjobclaim/sync_job_claim.go index e095a3099b..081f73cb20 100644 --- a/typedapi/connector/syncjobclaim/sync_job_claim.go +++ b/typedapi/connector/syncjobclaim/sync_job_claim.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Claim a connector sync job. // This action updates the job status to `in_progress` and sets the `last_seen` @@ -383,12 +383,15 @@ func (r *SyncJobClaim) Pretty(pretty bool) *SyncJobClaim { return r } -// The cursor object from the last incremental sync job. +// SyncCursor The cursor object from the last incremental sync job. // This should reference the `sync_cursor` field in the connector state for // which the job runs. // API name: sync_cursor +// +// synccursor should be a json.RawMessage or a structure +// if a structure is provided, the client will defer a json serialization +// prior to sending the payload to Elasticsearch. func (r *SyncJobClaim) SyncCursor(synccursor any) *SyncJobClaim { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -405,13 +408,13 @@ func (r *SyncJobClaim) SyncCursor(synccursor any) *SyncJobClaim { return nil }) } + return r } -// The host name of the current system that will run the job. +// WorkerHostname The host name of the current system that will run the job. // API name: worker_hostname func (r *SyncJobClaim) WorkerHostname(workerhostname string) *SyncJobClaim { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/syncjobdelete/response.go b/typedapi/connector/syncjobdelete/response.go index 42f84c4395..509c92ddf7 100644 --- a/typedapi/connector/syncjobdelete/response.go +++ b/typedapi/connector/syncjobdelete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobdelete // Response holds the response body struct for the package syncjobdelete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/connector/syncjobdelete/sync_job_delete.go b/typedapi/connector/syncjobdelete/sync_job_delete.go index 530b952a8f..fbedf43049 100644 --- a/typedapi/connector/syncjobdelete/sync_job_delete.go +++ b/typedapi/connector/syncjobdelete/sync_job_delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a connector sync job. // diff --git a/typedapi/connector/syncjoberror/request.go b/typedapi/connector/syncjoberror/request.go index f008ecacdf..7dea9997a4 100644 --- a/typedapi/connector/syncjoberror/request.go +++ b/typedapi/connector/syncjoberror/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjoberror @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package syncjoberror // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_error/SyncJobErrorRequest.ts#L23-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_error/SyncJobErrorRequest.ts#L23-L52 type Request struct { // Error The error for the connector sync job error field. diff --git a/typedapi/connector/syncjoberror/response.go b/typedapi/connector/syncjoberror/response.go index a7f4d6f6c2..3abbf7ad26 100644 --- a/typedapi/connector/syncjoberror/response.go +++ b/typedapi/connector/syncjoberror/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjoberror // Response holds the response body struct for the package syncjoberror // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_error/SyncJobErrorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_error/SyncJobErrorResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjoberror/sync_job_error.go b/typedapi/connector/syncjoberror/sync_job_error.go index 373791a5e7..bcced6e115 100644 --- a/typedapi/connector/syncjoberror/sync_job_error.go +++ b/typedapi/connector/syncjoberror/sync_job_error.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Set a connector sync job error. // Set the `error` field for a connector sync job and set its `status` to @@ -373,10 +373,9 @@ func (r *SyncJobError) Pretty(pretty bool) *SyncJobError { return r } -// The error for the connector sync job error field. +// Error The error for the connector sync job error field. // API name: error func (r *SyncJobError) Error(error string) *SyncJobError { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/syncjobget/response.go b/typedapi/connector/syncjobget/response.go index e492666b33..f0853fce26 100644 --- a/typedapi/connector/syncjobget/response.go +++ b/typedapi/connector/syncjobget/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobget @@ -36,7 +36,7 @@ import ( // Response holds the response body struct for the package syncjobget // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L24 type Response struct { CancelationRequestedAt types.DateTime `json:"cancelation_requested_at,omitempty"` CanceledAt types.DateTime `json:"canceled_at,omitempty"` diff --git a/typedapi/connector/syncjobget/sync_job_get.go b/typedapi/connector/syncjobget/sync_job_get.go index 6daa1f5608..08855393c7 100644 --- a/typedapi/connector/syncjobget/sync_job_get.go +++ b/typedapi/connector/syncjobget/sync_job_get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a connector sync job. package syncjobget diff --git a/typedapi/connector/syncjoblist/response.go b/typedapi/connector/syncjoblist/response.go index fcfc6282fe..a103e0bbbf 100644 --- a/typedapi/connector/syncjoblist/response.go +++ b/typedapi/connector/syncjoblist/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjoblist @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjoblist // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_list/SyncJobListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_list/SyncJobListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.ConnectorSyncJob `json:"results"` diff --git a/typedapi/connector/syncjoblist/sync_job_list.go b/typedapi/connector/syncjoblist/sync_job_list.go index eb9d328766..f3ad9316aa 100644 --- a/typedapi/connector/syncjoblist/sync_job_list.go +++ b/typedapi/connector/syncjoblist/sync_job_list.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get all connector sync jobs. // diff --git a/typedapi/connector/syncjobpost/request.go b/typedapi/connector/syncjobpost/request.go index bdca855be0..f16112d98c 100644 --- a/typedapi/connector/syncjobpost/request.go +++ b/typedapi/connector/syncjobpost/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobpost @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L51 type Request struct { // Id The id of the associated connector diff --git a/typedapi/connector/syncjobpost/response.go b/typedapi/connector/syncjobpost/response.go index ca8f29fbbc..d8873155b8 100644 --- a/typedapi/connector/syncjobpost/response.go +++ b/typedapi/connector/syncjobpost/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobpost // Response holds the response body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_post/SyncJobPostResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_post/SyncJobPostResponse.ts#L22-L26 type Response struct { Id string `json:"id"` } diff --git a/typedapi/connector/syncjobpost/sync_job_post.go b/typedapi/connector/syncjobpost/sync_job_post.go index 7ac991d2d6..047747efe0 100644 --- a/typedapi/connector/syncjobpost/sync_job_post.go +++ b/typedapi/connector/syncjobpost/sync_job_post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a connector sync job. // @@ -342,14 +342,12 @@ func (r *SyncJobPost) Pretty(pretty bool) *SyncJobPost { return r } -// The id of the associated connector +// Id The id of the associated connector // API name: id func (r *SyncJobPost) Id(id string) *SyncJobPost { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Id = id return r @@ -357,20 +355,20 @@ func (r *SyncJobPost) Id(id string) *SyncJobPost { // API name: job_type func (r *SyncJobPost) JobType(jobtype syncjobtype.SyncJobType) *SyncJobPost { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.JobType = &jobtype + return r } // API name: trigger_method func (r *SyncJobPost) TriggerMethod(triggermethod syncjobtriggermethod.SyncJobTriggerMethod) *SyncJobPost { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.TriggerMethod = &triggermethod + return r } diff --git a/typedapi/connector/syncjobupdatestats/request.go b/typedapi/connector/syncjobupdatestats/request.go index d7594348fb..b62a229da5 100644 --- a/typedapi/connector/syncjobupdatestats/request.go +++ b/typedapi/connector/syncjobupdatestats/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobupdatestats @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package syncjobupdatestats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_update_stats/SyncJobUpdateStatsRequest.ts#L24-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_update_stats/SyncJobUpdateStatsRequest.ts#L24-L78 type Request struct { // DeletedDocumentCount The number of documents the sync job deleted. diff --git a/typedapi/connector/syncjobupdatestats/response.go b/typedapi/connector/syncjobupdatestats/response.go index 10cda9f9fd..9fc4f7f03a 100644 --- a/typedapi/connector/syncjobupdatestats/response.go +++ b/typedapi/connector/syncjobupdatestats/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package syncjobupdatestats // Response holds the response body struct for the package syncjobupdatestats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/sync_job_update_stats/SyncJobUpdateStatsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/sync_job_update_stats/SyncJobUpdateStatsResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go b/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go index 51561c1285..bdd4b45774 100644 --- a/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go +++ b/typedapi/connector/syncjobupdatestats/sync_job_update_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Set the connector sync job stats. // Stats include: `deleted_document_count`, `indexed_document_count`, @@ -379,10 +379,9 @@ func (r *SyncJobUpdateStats) Pretty(pretty bool) *SyncJobUpdateStats { return r } -// The number of documents the sync job deleted. +// DeletedDocumentCount The number of documents the sync job deleted. // API name: deleted_document_count func (r *SyncJobUpdateStats) DeletedDocumentCount(deleteddocumentcount int64) *SyncJobUpdateStats { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -392,10 +391,9 @@ func (r *SyncJobUpdateStats) DeletedDocumentCount(deleteddocumentcount int64) *S return r } -// The number of documents the sync job indexed. +// IndexedDocumentCount The number of documents the sync job indexed. // API name: indexed_document_count func (r *SyncJobUpdateStats) IndexedDocumentCount(indexeddocumentcount int64) *SyncJobUpdateStats { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -405,10 +403,9 @@ func (r *SyncJobUpdateStats) IndexedDocumentCount(indexeddocumentcount int64) *S return r } -// The total size of the data (in MiB) the sync job indexed. +// IndexedDocumentVolume The total size of the data (in MiB) the sync job indexed. // API name: indexed_document_volume func (r *SyncJobUpdateStats) IndexedDocumentVolume(indexeddocumentvolume int64) *SyncJobUpdateStats { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -418,41 +415,35 @@ func (r *SyncJobUpdateStats) IndexedDocumentVolume(indexeddocumentvolume int64) return r } -// The timestamp to use in the `last_seen` property for the connector sync job. +// LastSeen The timestamp to use in the `last_seen` property for the connector sync job. // API name: last_seen -func (r *SyncJobUpdateStats) LastSeen(duration types.DurationVariant) *SyncJobUpdateStats { - // Initialize the request if it is not already initialized +func (r *SyncJobUpdateStats) LastSeen(duration types.Duration) *SyncJobUpdateStats { if r.req == nil { r.req = NewRequest() } - - r.req.LastSeen = *duration.DurationCaster() + r.req.LastSeen = duration return r } -// The connector-specific metadata. +// Metadata The connector-specific metadata. // API name: metadata -func (r *SyncJobUpdateStats) Metadata(metadata types.MetadataVariant) *SyncJobUpdateStats { - // Initialize the request if it is not already initialized +func (r *SyncJobUpdateStats) Metadata(metadata types.Metadata) *SyncJobUpdateStats { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// The total number of documents in the target index after the sync job +// TotalDocumentCount The total number of documents in the target index after the sync job // finished. // API name: total_document_count func (r *SyncJobUpdateStats) TotalDocumentCount(totaldocumentcount int) *SyncJobUpdateStats { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TotalDocumentCount = &totaldocumentcount return r diff --git a/typedapi/connector/updateactivefiltering/response.go b/typedapi/connector/updateactivefiltering/response.go index bdac636d08..ecfe8f8487 100644 --- a/typedapi/connector/updateactivefiltering/response.go +++ b/typedapi/connector/updateactivefiltering/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateactivefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateactivefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateactivefiltering/update_active_filtering.go b/typedapi/connector/updateactivefiltering/update_active_filtering.go index b986499dc5..9633774660 100644 --- a/typedapi/connector/updateactivefiltering/update_active_filtering.go +++ b/typedapi/connector/updateactivefiltering/update_active_filtering.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Activate the connector draft filter. // diff --git a/typedapi/connector/updateapikeyid/request.go b/typedapi/connector/updateapikeyid/request.go index a793468b40..8c1279a2eb 100644 --- a/typedapi/connector/updateapikeyid/request.go +++ b/typedapi/connector/updateapikeyid/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateapikeyid @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L53 type Request struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` diff --git a/typedapi/connector/updateapikeyid/response.go b/typedapi/connector/updateapikeyid/response.go index c002a3fc75..5ed5ccba95 100644 --- a/typedapi/connector/updateapikeyid/response.go +++ b/typedapi/connector/updateapikeyid/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateapikeyid @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateapikeyid/update_api_key_id.go b/typedapi/connector/updateapikeyid/update_api_key_id.go index a0a855a3cd..fd3846b193 100644 --- a/typedapi/connector/updateapikeyid/update_api_key_id.go +++ b/typedapi/connector/updateapikeyid/update_api_key_id.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector API key ID. // @@ -373,7 +373,6 @@ func (r *UpdateApiKeyId) Pretty(pretty bool) *UpdateApiKeyId { // API name: api_key_id func (r *UpdateApiKeyId) ApiKeyId(apikeyid string) *UpdateApiKeyId { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -385,7 +384,6 @@ func (r *UpdateApiKeyId) ApiKeyId(apikeyid string) *UpdateApiKeyId { // API name: api_key_secret_id func (r *UpdateApiKeyId) ApiKeySecretId(apikeysecretid string) *UpdateApiKeyId { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/updateconfiguration/request.go b/typedapi/connector/updateconfiguration/request.go index c7c2d843a6..cea4d19f93 100644 --- a/typedapi/connector/updateconfiguration/request.go +++ b/typedapi/connector/updateconfiguration/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateconfiguration @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L55 type Request struct { Configuration types.ConnectorConfiguration `json:"configuration,omitempty"` Values map[string]json.RawMessage `json:"values,omitempty"` diff --git a/typedapi/connector/updateconfiguration/response.go b/typedapi/connector/updateconfiguration/response.go index bdcd147d97..4a21564e68 100644 --- a/typedapi/connector/updateconfiguration/response.go +++ b/typedapi/connector/updateconfiguration/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateconfiguration @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateconfiguration/update_configuration.go b/typedapi/connector/updateconfiguration/update_configuration.go index f44cba1985..4a5814d65d 100644 --- a/typedapi/connector/updateconfiguration/update_configuration.go +++ b/typedapi/connector/updateconfiguration/update_configuration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector configuration. // @@ -362,42 +362,22 @@ func (r *UpdateConfiguration) Pretty(pretty bool) *UpdateConfiguration { } // API name: configuration -func (r *UpdateConfiguration) Configuration(connectorconfiguration types.ConnectorConfigurationVariant) *UpdateConfiguration { - // Initialize the request if it is not already initialized +func (r *UpdateConfiguration) Configuration(connectorconfiguration types.ConnectorConfiguration) *UpdateConfiguration { if r.req == nil { r.req = NewRequest() } - - r.req.Configuration = *connectorconfiguration.ConnectorConfigurationCaster() + r.req.Configuration = connectorconfiguration return r } // API name: values func (r *UpdateConfiguration) Values(values map[string]json.RawMessage) *UpdateConfiguration { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Values = values - return r -} - -func (r *UpdateConfiguration) AddValue(key string, value json.RawMessage) *UpdateConfiguration { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Values == nil { - r.req.Values = make(map[string]json.RawMessage) - } else { - tmp = r.req.Values - } - - tmp[key] = value + r.req.Values = values - r.req.Values = tmp return r } diff --git a/typedapi/connector/updateerror/request.go b/typedapi/connector/updateerror/request.go index 75d9d7f1b5..1c374fb3af 100644 --- a/typedapi/connector/updateerror/request.go +++ b/typedapi/connector/updateerror/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateerror @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L54 type Request struct { Error any `json:"error"` } diff --git a/typedapi/connector/updateerror/response.go b/typedapi/connector/updateerror/response.go index a9dcf01b8e..6bd3c44839 100644 --- a/typedapi/connector/updateerror/response.go +++ b/typedapi/connector/updateerror/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateerror @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateerror/update_error.go b/typedapi/connector/updateerror/update_error.go index 6ae0738efa..856b57fef7 100644 --- a/typedapi/connector/updateerror/update_error.go +++ b/typedapi/connector/updateerror/update_error.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector error field. // @@ -371,11 +371,9 @@ func (r *UpdateError) Pretty(pretty bool) *UpdateError { // API name: error func (r *UpdateError) Error(error any) *UpdateError { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Error = error return r diff --git a/typedapi/connector/updatefeatures/request.go b/typedapi/connector/updatefeatures/request.go index 0c87bb9051..e95d4078dc 100644 --- a/typedapi/connector/updatefeatures/request.go +++ b/typedapi/connector/updatefeatures/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefeatures @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefeatures // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts#L23-L61 type Request struct { Features types.ConnectorFeatures `json:"features"` } diff --git a/typedapi/connector/updatefeatures/response.go b/typedapi/connector/updatefeatures/response.go index bc1ef49a86..7346dcbfb8 100644 --- a/typedapi/connector/updatefeatures/response.go +++ b/typedapi/connector/updatefeatures/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefeatures // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatefeatures/update_features.go b/typedapi/connector/updatefeatures/update_features.go index 3322819205..de42c9f54e 100644 --- a/typedapi/connector/updatefeatures/update_features.go +++ b/typedapi/connector/updatefeatures/update_features.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector features. // Update the connector features in the connector document. @@ -388,13 +388,12 @@ func (r *UpdateFeatures) Pretty(pretty bool) *UpdateFeatures { } // API name: features -func (r *UpdateFeatures) Features(features types.ConnectorFeaturesVariant) *UpdateFeatures { - // Initialize the request if it is not already initialized +func (r *UpdateFeatures) Features(features *types.ConnectorFeatures) *UpdateFeatures { if r.req == nil { r.req = NewRequest() } - r.req.Features = *features.ConnectorFeaturesCaster() + r.req.Features = *features return r } diff --git a/typedapi/connector/updatefiltering/request.go b/typedapi/connector/updatefiltering/request.go index f61564033a..103a8925ce 100644 --- a/typedapi/connector/updatefiltering/request.go +++ b/typedapi/connector/updatefiltering/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefiltering @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L60 type Request struct { AdvancedSnippet *types.FilteringAdvancedSnippet `json:"advanced_snippet,omitempty"` Filtering []types.FilteringConfig `json:"filtering,omitempty"` diff --git a/typedapi/connector/updatefiltering/response.go b/typedapi/connector/updatefiltering/response.go index 65bb4c3ea4..c2b94709fd 100644 --- a/typedapi/connector/updatefiltering/response.go +++ b/typedapi/connector/updatefiltering/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatefiltering/update_filtering.go b/typedapi/connector/updatefiltering/update_filtering.go index 3c67fe64c2..968e954537 100644 --- a/typedapi/connector/updatefiltering/update_filtering.go +++ b/typedapi/connector/updatefiltering/update_filtering.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector filtering. // @@ -372,41 +372,32 @@ func (r *UpdateFiltering) Pretty(pretty bool) *UpdateFiltering { } // API name: advanced_snippet -func (r *UpdateFiltering) AdvancedSnippet(advancedsnippet types.FilteringAdvancedSnippetVariant) *UpdateFiltering { - // Initialize the request if it is not already initialized +func (r *UpdateFiltering) AdvancedSnippet(advancedsnippet *types.FilteringAdvancedSnippet) *UpdateFiltering { if r.req == nil { r.req = NewRequest() } - r.req.AdvancedSnippet = advancedsnippet.FilteringAdvancedSnippetCaster() + r.req.AdvancedSnippet = advancedsnippet return r } // API name: filtering -func (r *UpdateFiltering) Filtering(filterings ...types.FilteringConfigVariant) *UpdateFiltering { - // Initialize the request if it is not already initialized +func (r *UpdateFiltering) Filtering(filterings ...types.FilteringConfig) *UpdateFiltering { if r.req == nil { r.req = NewRequest() } - for _, v := range filterings { + r.req.Filtering = filterings - r.req.Filtering = append(r.req.Filtering, *v.FilteringConfigCaster()) - - } return r } // API name: rules -func (r *UpdateFiltering) Rules(rules ...types.FilteringRuleVariant) *UpdateFiltering { - // Initialize the request if it is not already initialized +func (r *UpdateFiltering) Rules(rules ...types.FilteringRule) *UpdateFiltering { if r.req == nil { r.req = NewRequest() } - for _, v := range rules { + r.req.Rules = rules - r.req.Rules = append(r.req.Rules, *v.FilteringRuleCaster()) - - } return r } diff --git a/typedapi/connector/updatefilteringvalidation/request.go b/typedapi/connector/updatefilteringvalidation/request.go index 69b7db4480..59dcfe7157 100644 --- a/typedapi/connector/updatefilteringvalidation/request.go +++ b/typedapi/connector/updatefilteringvalidation/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefilteringvalidation @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L48 type Request struct { Validation types.FilteringRulesValidation `json:"validation"` } diff --git a/typedapi/connector/updatefilteringvalidation/response.go b/typedapi/connector/updatefilteringvalidation/response.go index 07288419de..f2d11ba498 100644 --- a/typedapi/connector/updatefilteringvalidation/response.go +++ b/typedapi/connector/updatefilteringvalidation/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefilteringvalidation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go b/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go index b61884300d..9c8ba12f57 100644 --- a/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go +++ b/typedapi/connector/updatefilteringvalidation/update_filtering_validation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector draft filtering validation. // @@ -364,13 +364,12 @@ func (r *UpdateFilteringValidation) Pretty(pretty bool) *UpdateFilteringValidati } // API name: validation -func (r *UpdateFilteringValidation) Validation(validation types.FilteringRulesValidationVariant) *UpdateFilteringValidation { - // Initialize the request if it is not already initialized +func (r *UpdateFilteringValidation) Validation(validation *types.FilteringRulesValidation) *UpdateFilteringValidation { if r.req == nil { r.req = NewRequest() } - r.req.Validation = *validation.FilteringRulesValidationCaster() + r.req.Validation = *validation return r } diff --git a/typedapi/connector/updateindexname/request.go b/typedapi/connector/updateindexname/request.go index de9f2a5ba1..fbf0baed1c 100644 --- a/typedapi/connector/updateindexname/request.go +++ b/typedapi/connector/updateindexname/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateindexname @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L51 type Request struct { IndexName any `json:"index_name"` } diff --git a/typedapi/connector/updateindexname/response.go b/typedapi/connector/updateindexname/response.go index d0eb44fa66..7be24e5fae 100644 --- a/typedapi/connector/updateindexname/response.go +++ b/typedapi/connector/updateindexname/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateindexname @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateindexname/update_index_name.go b/typedapi/connector/updateindexname/update_index_name.go index 8f2fc2feb9..41936ee7e1 100644 --- a/typedapi/connector/updateindexname/update_index_name.go +++ b/typedapi/connector/updateindexname/update_index_name.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector index name. // @@ -365,11 +365,9 @@ func (r *UpdateIndexName) Pretty(pretty bool) *UpdateIndexName { // API name: index_name func (r *UpdateIndexName) IndexName(indexname any) *UpdateIndexName { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexName = indexname return r diff --git a/typedapi/connector/updatename/request.go b/typedapi/connector/updatename/request.go index c6a154f864..e671f548e1 100644 --- a/typedapi/connector/updatename/request.go +++ b/typedapi/connector/updatename/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatename @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L49 type Request struct { Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` diff --git a/typedapi/connector/updatename/response.go b/typedapi/connector/updatename/response.go index 17b6317978..5ba9b711e9 100644 --- a/typedapi/connector/updatename/response.go +++ b/typedapi/connector/updatename/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatename @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatename/update_name.go b/typedapi/connector/updatename/update_name.go index b1aa0291ac..8ef835b954 100644 --- a/typedapi/connector/updatename/update_name.go +++ b/typedapi/connector/updatename/update_name.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector name and description. package updatename @@ -359,7 +359,6 @@ func (r *UpdateName) Pretty(pretty bool) *UpdateName { // API name: description func (r *UpdateName) Description(description string) *UpdateName { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -371,7 +370,6 @@ func (r *UpdateName) Description(description string) *UpdateName { // API name: name func (r *UpdateName) Name(name string) *UpdateName { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/updatenative/request.go b/typedapi/connector/updatenative/request.go index 7906a8a750..ef676688dc 100644 --- a/typedapi/connector/updatenative/request.go +++ b/typedapi/connector/updatenative/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatenative @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L48 type Request struct { IsNative bool `json:"is_native"` } diff --git a/typedapi/connector/updatenative/response.go b/typedapi/connector/updatenative/response.go index 4076503ab4..6f281ec557 100644 --- a/typedapi/connector/updatenative/response.go +++ b/typedapi/connector/updatenative/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatenative @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatenative/update_native.go b/typedapi/connector/updatenative/update_native.go index e5e6ade6ab..abb13f1f98 100644 --- a/typedapi/connector/updatenative/update_native.go +++ b/typedapi/connector/updatenative/update_native.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector is_native flag. package updatenative @@ -359,11 +359,9 @@ func (r *UpdateNative) Pretty(pretty bool) *UpdateNative { // API name: is_native func (r *UpdateNative) IsNative(isnative bool) *UpdateNative { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IsNative = isnative return r diff --git a/typedapi/connector/updatepipeline/request.go b/typedapi/connector/updatepipeline/request.go index ff27a87420..2eb77ce1b1 100644 --- a/typedapi/connector/updatepipeline/request.go +++ b/typedapi/connector/updatepipeline/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatepipeline @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L52 type Request struct { Pipeline types.IngestPipelineParams `json:"pipeline"` } diff --git a/typedapi/connector/updatepipeline/response.go b/typedapi/connector/updatepipeline/response.go index e948368e59..3721ac2b39 100644 --- a/typedapi/connector/updatepipeline/response.go +++ b/typedapi/connector/updatepipeline/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatepipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatepipeline/update_pipeline.go b/typedapi/connector/updatepipeline/update_pipeline.go index 3d28ee0071..27465e7d7c 100644 --- a/typedapi/connector/updatepipeline/update_pipeline.go +++ b/typedapi/connector/updatepipeline/update_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector pipeline. // @@ -364,13 +364,12 @@ func (r *UpdatePipeline) Pretty(pretty bool) *UpdatePipeline { } // API name: pipeline -func (r *UpdatePipeline) Pipeline(pipeline types.IngestPipelineParamsVariant) *UpdatePipeline { - // Initialize the request if it is not already initialized +func (r *UpdatePipeline) Pipeline(pipeline *types.IngestPipelineParams) *UpdatePipeline { if r.req == nil { r.req = NewRequest() } - r.req.Pipeline = *pipeline.IngestPipelineParamsCaster() + r.req.Pipeline = *pipeline return r } diff --git a/typedapi/connector/updatescheduling/request.go b/typedapi/connector/updatescheduling/request.go index 20d94062c5..da5af4bde2 100644 --- a/typedapi/connector/updatescheduling/request.go +++ b/typedapi/connector/updatescheduling/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatescheduling @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L50 type Request struct { Scheduling types.SchedulingConfiguration `json:"scheduling"` } diff --git a/typedapi/connector/updatescheduling/response.go b/typedapi/connector/updatescheduling/response.go index cb7fb797bf..d3a04d06f3 100644 --- a/typedapi/connector/updatescheduling/response.go +++ b/typedapi/connector/updatescheduling/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatescheduling @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatescheduling/update_scheduling.go b/typedapi/connector/updatescheduling/update_scheduling.go index 7338994f6d..fe3b9b1b98 100644 --- a/typedapi/connector/updatescheduling/update_scheduling.go +++ b/typedapi/connector/updatescheduling/update_scheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector scheduling. package updatescheduling @@ -358,13 +358,12 @@ func (r *UpdateScheduling) Pretty(pretty bool) *UpdateScheduling { } // API name: scheduling -func (r *UpdateScheduling) Scheduling(scheduling types.SchedulingConfigurationVariant) *UpdateScheduling { - // Initialize the request if it is not already initialized +func (r *UpdateScheduling) Scheduling(scheduling *types.SchedulingConfiguration) *UpdateScheduling { if r.req == nil { r.req = NewRequest() } - r.req.Scheduling = *scheduling.SchedulingConfigurationCaster() + r.req.Scheduling = *scheduling return r } diff --git a/typedapi/connector/updateservicetype/request.go b/typedapi/connector/updateservicetype/request.go index aa6502c1bf..1a43a2ef83 100644 --- a/typedapi/connector/updateservicetype/request.go +++ b/typedapi/connector/updateservicetype/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateservicetype @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L48 type Request struct { ServiceType string `json:"service_type"` } diff --git a/typedapi/connector/updateservicetype/response.go b/typedapi/connector/updateservicetype/response.go index d68551765d..a1485dd8f6 100644 --- a/typedapi/connector/updateservicetype/response.go +++ b/typedapi/connector/updateservicetype/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateservicetype @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updateservicetype/update_service_type.go b/typedapi/connector/updateservicetype/update_service_type.go index b244fc41ce..0b3ef4adbc 100644 --- a/typedapi/connector/updateservicetype/update_service_type.go +++ b/typedapi/connector/updateservicetype/update_service_type.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector service type. package updateservicetype @@ -359,7 +359,6 @@ func (r *UpdateServiceType) Pretty(pretty bool) *UpdateServiceType { // API name: service_type func (r *UpdateServiceType) ServiceType(servicetype string) *UpdateServiceType { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/connector/updatestatus/request.go b/typedapi/connector/updatestatus/request.go index 8dc021c3b3..52dc55f922 100644 --- a/typedapi/connector/updatestatus/request.go +++ b/typedapi/connector/updatestatus/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatestatus @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L49 type Request struct { Status connectorstatus.ConnectorStatus `json:"status"` } diff --git a/typedapi/connector/updatestatus/response.go b/typedapi/connector/updatestatus/response.go index 9d00e633ab..c60ddf100e 100644 --- a/typedapi/connector/updatestatus/response.go +++ b/typedapi/connector/updatestatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatestatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/connector/updatestatus/update_status.go b/typedapi/connector/updatestatus/update_status.go index fd55799e8d..94cfd399ed 100644 --- a/typedapi/connector/updatestatus/update_status.go +++ b/typedapi/connector/updatestatus/update_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the connector status. package updatestatus @@ -360,10 +360,10 @@ func (r *UpdateStatus) Pretty(pretty bool) *UpdateStatus { // API name: status func (r *UpdateStatus) Status(status connectorstatus.ConnectorStatus) *UpdateStatus { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Status = status + return r } diff --git a/typedapi/core/bulk/bulk.go b/typedapi/core/bulk/bulk.go index 51d994f1a1..31fd6a3b46 100644 --- a/typedapi/core/bulk/bulk.go +++ b/typedapi/core/bulk/bulk.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Bulk index or delete documents. // Perform multiple `index`, `create`, `delete`, and `update` actions in a diff --git a/typedapi/core/bulk/request.go b/typedapi/core/bulk/request.go index b1d16e8d49..c32b74fb0a 100644 --- a/typedapi/core/bulk/request.go +++ b/typedapi/core/bulk/request.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/BulkRequest.ts#L32-L247 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/BulkRequest.ts#L32-L247 type Request = []any diff --git a/typedapi/core/bulk/response.go b/typedapi/core/bulk/response.go index 712d8af7f5..d8f16bb633 100644 --- a/typedapi/core/bulk/response.go +++ b/typedapi/core/bulk/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulk @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/BulkResponse.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/BulkResponse.ts#L24-L45 type Response struct { // Errors If `true`, one or more of the operations in the bulk request did not complete diff --git a/typedapi/core/clearscroll/clear_scroll.go b/typedapi/core/clearscroll/clear_scroll.go index 7a315b16c4..b5953e599c 100644 --- a/typedapi/core/clearscroll/clear_scroll.go +++ b/typedapi/core/clearscroll/clear_scroll.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear a scrolling search. // Clear the search context and results for a scrolling search. @@ -31,6 +31,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -256,7 +257,8 @@ func (r ClearScroll) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{404}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -268,42 +270,6 @@ func (r ClearScroll) Do(providedCtx context.Context) (*Response, error) { return response, nil } - if res.StatusCode == 404 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { @@ -374,15 +340,13 @@ func (r *ClearScroll) Pretty(pretty bool) *ClearScroll { return r } -// The scroll IDs to clear. +// ScrollId The scroll IDs to clear. // To clear all scroll IDs, use `_all`. // API name: scroll_id func (r *ClearScroll) ScrollId(scrollids ...string) *ClearScroll { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScrollId = scrollids return r diff --git a/typedapi/core/clearscroll/request.go b/typedapi/core/clearscroll/request.go index f7dead3958..6b9c3258db 100644 --- a/typedapi/core/clearscroll/request.go +++ b/typedapi/core/clearscroll/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearscroll @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L61 type Request struct { // ScrollId The scroll IDs to clear. diff --git a/typedapi/core/clearscroll/response.go b/typedapi/core/clearscroll/response.go index 99166115fd..e1e3dcf82c 100644 --- a/typedapi/core/clearscroll/response.go +++ b/typedapi/core/clearscroll/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearscroll // Response holds the response body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L43 type Response struct { // NumFreed The number of scrolling search requests cleared. diff --git a/typedapi/core/closepointintime/close_point_in_time.go b/typedapi/core/closepointintime/close_point_in_time.go index bc71810ab7..a0096aa948 100644 --- a/typedapi/core/closepointintime/close_point_in_time.go +++ b/typedapi/core/closepointintime/close_point_in_time.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Close a point in time. // A point in time must be opened explicitly before being used in search @@ -37,6 +37,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -264,7 +265,8 @@ func (r ClosePointInTime) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{404}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -276,42 +278,6 @@ func (r ClosePointInTime) Do(providedCtx context.Context) (*Response, error) { return response, nil } - if res.StatusCode == 404 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { @@ -382,14 +348,12 @@ func (r *ClosePointInTime) Pretty(pretty bool) *ClosePointInTime { return r } -// The ID of the point-in-time. +// Id The ID of the point-in-time. // API name: id func (r *ClosePointInTime) Id(id string) *ClosePointInTime { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Id = id return r diff --git a/typedapi/core/closepointintime/request.go b/typedapi/core/closepointintime/request.go index 7680de8aa6..45b94735ad 100644 --- a/typedapi/core/closepointintime/request.go +++ b/typedapi/core/closepointintime/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package closepointintime @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L48 type Request struct { // Id The ID of the point-in-time. diff --git a/typedapi/core/closepointintime/response.go b/typedapi/core/closepointintime/response.go index 2e76a3494f..caf82ae781 100644 --- a/typedapi/core/closepointintime/response.go +++ b/typedapi/core/closepointintime/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package closepointintime // Response holds the response body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L42 type Response struct { // NumFreed The number of search contexts that were successfully closed. diff --git a/typedapi/core/count/count.go b/typedapi/core/count/count.go index b8c42c149a..cbc85c1233 100644 --- a/typedapi/core/count/count.go +++ b/typedapi/core/count/count.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Count search results. // Get the number of documents matching a query. @@ -538,16 +538,15 @@ func (r *Count) Pretty(pretty bool) *Count { return r } -// Defines the search query using Query DSL. A request body query cannot be used +// Query Defines the search query using Query DSL. A request body query cannot be used // with the `q` query string parameter. // API name: query -func (r *Count) Query(query types.QueryVariant) *Count { - // Initialize the request if it is not already initialized +func (r *Count) Query(query *types.Query) *Count { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } diff --git a/typedapi/core/count/request.go b/typedapi/core/count/request.go index 488bd8e322..0712b55ec4 100644 --- a/typedapi/core/count/request.go +++ b/typedapi/core/count/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package count @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/count/CountRequest.ts#L26-L154 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/count/CountRequest.ts#L26-L154 type Request struct { // Query Defines the search query using Query DSL. A request body query cannot be used diff --git a/typedapi/core/count/response.go b/typedapi/core/count/response.go index 368c9d93e5..5c73cf8580 100644 --- a/typedapi/core/count/response.go +++ b/typedapi/core/count/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/count/CountResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/count/CountResponse.ts#L23-L25 type Response struct { Count int64 `json:"count"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/core/create/create.go b/typedapi/core/create/create.go index 8b87c98a1d..84b54a1d52 100644 --- a/typedapi/core/create/create.go +++ b/typedapi/core/create/create.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a new document in the index. // @@ -160,7 +160,6 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/optype" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/refresh" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/versiontype" ) @@ -598,22 +597,6 @@ func (r *Create) _index(index string) *Create { return r } -// IfPrimaryTerm Only perform the operation if the document has this primary term. -// API name: if_primary_term -func (r *Create) IfPrimaryTerm(ifprimaryterm string) *Create { - r.values.Set("if_primary_term", ifprimaryterm) - - return r -} - -// IfSeqNo Only perform the operation if the document has this sequence number. -// API name: if_seq_no -func (r *Create) IfSeqNo(sequencenumber string) *Create { - r.values.Set("if_seq_no", sequencenumber) - - return r -} - // IncludeSourceOnError True or false if to include the document source in the error message in case // of parsing errors. // API name: include_source_on_error @@ -623,21 +606,6 @@ func (r *Create) IncludeSourceOnError(includesourceonerror bool) *Create { return r } -// OpType Set to `create` to only index the document if it does not already exist (put -// if absent). -// If a document with the specified `_id` already exists, the indexing operation -// will fail. -// The behavior is the same as using the `/_create` endpoint. -// If a document ID is specified, this paramater defaults to `index`. -// Otherwise, it defaults to `create`. -// If the request targets a data stream, an `op_type` of `create` is required. -// API name: op_type -func (r *Create) OpType(optype optype.OpType) *Create { - r.values.Set("op_type", optype.String()) - - return r -} - // Pipeline The ID of the pipeline to use to preprocess incoming documents. // If the index has a default ingest pipeline specified, setting the value to // `_none` turns off the default ingest pipeline for this request. diff --git a/typedapi/core/create/request.go b/typedapi/core/create/request.go index 55b0402eab..7b45619583 100644 --- a/typedapi/core/create/request.go +++ b/typedapi/core/create/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package create @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/create/CreateRequest.ts#L35-L221 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/create/CreateRequest.ts#L32-L199 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/core/create/response.go b/typedapi/core/create/response.go index fc4b2c9e9a..8ec3ac981f 100644 --- a/typedapi/core/create/response.go +++ b/typedapi/core/create/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package create @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/create/CreateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/create/CreateResponse.ts#L22-L24 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. diff --git a/typedapi/core/delete/delete.go b/typedapi/core/delete/delete.go index fa88f0b5ea..79ce70c6bd 100644 --- a/typedapi/core/delete/delete.go +++ b/typedapi/core/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a document. // @@ -74,7 +74,6 @@ package delete import ( - gobytes "bytes" "context" "encoding/json" "errors" @@ -82,6 +81,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -329,7 +329,8 @@ func (r Delete) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{404}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -341,42 +342,6 @@ func (r Delete) Do(providedCtx context.Context) (*Response, error) { return response, nil } - if res.StatusCode == 404 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { diff --git a/typedapi/core/delete/response.go b/typedapi/core/delete/response.go index 232050da95..1ebe2f4575 100644 --- a/typedapi/core/delete/response.go +++ b/typedapi/core/delete/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/delete/DeleteResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/delete/DeleteResponse.ts#L22-L34 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. diff --git a/typedapi/core/deletebyquery/delete_by_query.go b/typedapi/core/deletebyquery/delete_by_query.go index fd4d240f33..c5ef42c9d7 100644 --- a/typedapi/core/deletebyquery/delete_by_query.go +++ b/typedapi/core/deletebyquery/delete_by_query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete documents. // @@ -896,10 +896,9 @@ func (r *DeleteByQuery) Pretty(pretty bool) *DeleteByQuery { return r } -// The maximum number of documents to delete. +// MaxDocs The maximum number of documents to delete. // API name: max_docs func (r *DeleteByQuery) MaxDocs(maxdocs int64) *DeleteByQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -909,29 +908,27 @@ func (r *DeleteByQuery) MaxDocs(maxdocs int64) *DeleteByQuery { return r } -// The documents to delete specified with Query DSL. +// Query The documents to delete specified with Query DSL. // API name: query -func (r *DeleteByQuery) Query(query types.QueryVariant) *DeleteByQuery { - // Initialize the request if it is not already initialized +func (r *DeleteByQuery) Query(query *types.Query) *DeleteByQuery { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// Slice the request manually using the provided slice ID and total number of +// Slice Slice the request manually using the provided slice ID and total number of // slices. // API name: slice -func (r *DeleteByQuery) Slice(slice types.SlicedScrollVariant) *DeleteByQuery { - // Initialize the request if it is not already initialized +func (r *DeleteByQuery) Slice(slice *types.SlicedScroll) *DeleteByQuery { if r.req == nil { r.req = NewRequest() } - r.req.Slice = slice.SlicedScrollCaster() + r.req.Slice = slice return r } diff --git a/typedapi/core/deletebyquery/request.go b/typedapi/core/deletebyquery/request.go index 9c48a00c01..0fa525914c 100644 --- a/typedapi/core/deletebyquery/request.go +++ b/typedapi/core/deletebyquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletebyquery @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L36-L314 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L36-L314 type Request struct { // MaxDocs The maximum number of documents to delete. diff --git a/typedapi/core/deletebyquery/response.go b/typedapi/core/deletebyquery/response.go index e1ce20bf3f..174127b350 100644 --- a/typedapi/core/deletebyquery/response.go +++ b/typedapi/core/deletebyquery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletebyquery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L88 type Response struct { // Batches The number of scroll responses pulled back by the delete by query. diff --git a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go index d6bd0a7c4e..4536c7345c 100644 --- a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go +++ b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Throttle a delete by query operation. // diff --git a/typedapi/core/deletebyqueryrethrottle/response.go b/typedapi/core/deletebyqueryrethrottle/response.go index f98d9909a9..ba20fedb04 100644 --- a/typedapi/core/deletebyqueryrethrottle/response.go +++ b/typedapi/core/deletebyqueryrethrottle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletebyqueryrethrottle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package deletebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L24 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/core/deletescript/delete_script.go b/typedapi/core/deletescript/delete_script.go index c649337fe6..29514e85e7 100644 --- a/typedapi/core/deletescript/delete_script.go +++ b/typedapi/core/deletescript/delete_script.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a script or search template. // Deletes a stored script or search template. diff --git a/typedapi/core/deletescript/response.go b/typedapi/core/deletescript/response.go index 0e3007b6cf..34620e56c6 100644 --- a/typedapi/core/deletescript/response.go +++ b/typedapi/core/deletescript/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletescript // Response holds the response body struct for the package deletescript // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/core/exists/exists.go b/typedapi/core/exists/exists.go index e55de0daee..81863ac0d4 100644 --- a/typedapi/core/exists/exists.go +++ b/typedapi/core/exists/exists.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check a document. // diff --git a/typedapi/core/existssource/exists_source.go b/typedapi/core/existssource/exists_source.go index f0a9033fda..a72681d6bd 100644 --- a/typedapi/core/existssource/exists_source.go +++ b/typedapi/core/existssource/exists_source.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check for a document source. // diff --git a/typedapi/core/explain/explain.go b/typedapi/core/explain/explain.go index 6ad09ce32f..81cb143ccd 100644 --- a/typedapi/core/explain/explain.go +++ b/typedapi/core/explain/explain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Explain a document match result. // Get information about why a specific document matches, or doesn't match, a @@ -500,15 +500,14 @@ func (r *Explain) Pretty(pretty bool) *Explain { return r } -// Defines the search definition using the Query DSL. +// Query Defines the search definition using the Query DSL. // API name: query -func (r *Explain) Query(query types.QueryVariant) *Explain { - // Initialize the request if it is not already initialized +func (r *Explain) Query(query *types.Query) *Explain { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } diff --git a/typedapi/core/explain/request.go b/typedapi/core/explain/request.go index 8703038ed2..857a4a49e0 100644 --- a/typedapi/core/explain/request.go +++ b/typedapi/core/explain/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explain @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/explain/ExplainRequest.ts#L26-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/explain/ExplainRequest.ts#L26-L125 type Request struct { // Query Defines the search definition using the Query DSL. diff --git a/typedapi/core/explain/response.go b/typedapi/core/explain/response.go index 9ce368b747..56f323ee56 100644 --- a/typedapi/core/explain/response.go +++ b/typedapi/core/explain/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explain @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/explain/ExplainResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/explain/ExplainResponse.ts#L23-L31 type Response struct { Explanation *types.ExplanationDetail `json:"explanation,omitempty"` Get *types.InlineGet `json:"get,omitempty"` diff --git a/typedapi/core/fieldcaps/field_caps.go b/typedapi/core/fieldcaps/field_caps.go index bafd1bd734..82a60b089a 100644 --- a/typedapi/core/fieldcaps/field_caps.go +++ b/typedapi/core/fieldcaps/field_caps.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the field capabilities. // @@ -451,21 +451,19 @@ func (r *FieldCaps) Pretty(pretty bool) *FieldCaps { return r } -// A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are +// Fields A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are // supported. // API name: fields func (r *FieldCaps) Fields(fields ...string) *FieldCaps { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Fields = fields return r } -// Filter indices if the provided query rewrites to `match_none` on every shard. +// IndexFilter Filter indices if the provided query rewrites to `match_none` on every shard. // // IMPORTANT: The filtering is done on a best-effort basis, it uses index // statistics and mappings to rewrite queries to `match_none` instead of fully @@ -476,29 +474,26 @@ func (r *FieldCaps) Fields(fields ...string) *FieldCaps { // However, not all queries can rewrite to `match_none` so this API may return // an index even if the provided filter matches no document. // API name: index_filter -func (r *FieldCaps) IndexFilter(indexfilter types.QueryVariant) *FieldCaps { - // Initialize the request if it is not already initialized +func (r *FieldCaps) IndexFilter(indexfilter *types.Query) *FieldCaps { if r.req == nil { r.req = NewRequest() } - r.req.IndexFilter = indexfilter.QueryCaster() + r.req.IndexFilter = indexfilter return r } -// Define ad-hoc runtime fields in the request similar to the way it is done in +// RuntimeMappings Define ad-hoc runtime fields in the request similar to the way it is done in // search requests. // These fields exist only as part of the query and take precedence over fields // defined with the same name in the index mappings. // API name: runtime_mappings -func (r *FieldCaps) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *FieldCaps { - // Initialize the request if it is not already initialized +func (r *FieldCaps) RuntimeMappings(runtimefields types.RuntimeFields) *FieldCaps { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } diff --git a/typedapi/core/fieldcaps/request.go b/typedapi/core/fieldcaps/request.go index c2ba9104ae..73b5e2d4ba 100644 --- a/typedapi/core/fieldcaps/request.go +++ b/typedapi/core/fieldcaps/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package fieldcaps @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L25-L130 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L25-L130 type Request struct { // Fields A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are diff --git a/typedapi/core/fieldcaps/response.go b/typedapi/core/fieldcaps/response.go index e44712fe07..1253ba2894 100644 --- a/typedapi/core/fieldcaps/response.go +++ b/typedapi/core/fieldcaps/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package fieldcaps @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L38 type Response struct { Fields map[string]map[string]types.FieldCapability `json:"fields"` // Indices The list of indices where this field has the same type family, or null if all diff --git a/typedapi/core/get/get.go b/typedapi/core/get/get.go index 1d1bd3adef..b591fed1e6 100644 --- a/typedapi/core/get/get.go +++ b/typedapi/core/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a document by its ID. // @@ -95,7 +95,6 @@ package get import ( - gobytes "bytes" "context" "encoding/json" "errors" @@ -103,6 +102,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -370,7 +370,8 @@ func (r Get) Do(providedCtx context.Context) (*Response, error) { } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{404}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -382,42 +383,6 @@ func (r Get) Do(providedCtx context.Context) (*Response, error) { return response, nil } - if res.StatusCode == 404 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { diff --git a/typedapi/core/get/response.go b/typedapi/core/get/response.go index f47f5cc1e3..2c6dacb601 100644 --- a/typedapi/core/get/response.go +++ b/typedapi/core/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get/GetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get/GetResponse.ts#L23-L34 type Response struct { // Fields If the `stored_fields` parameter is set to `true` and `found` is `true`, it diff --git a/typedapi/core/getscript/get_script.go b/typedapi/core/getscript/get_script.go index e78797ec0d..b73c0533cb 100644 --- a/typedapi/core/getscript/get_script.go +++ b/typedapi/core/getscript/get_script.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a script or search template. // Retrieves a stored script or search template. diff --git a/typedapi/core/getscript/response.go b/typedapi/core/getscript/response.go index 4f82b0df26..205629d196 100644 --- a/typedapi/core/getscript/response.go +++ b/typedapi/core/getscript/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getscript @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscript // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script/GetScriptResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script/GetScriptResponse.ts#L23-L29 type Response struct { Found bool `json:"found"` Id_ string `json:"_id"` diff --git a/typedapi/core/getscriptcontext/get_script_context.go b/typedapi/core/getscriptcontext/get_script_context.go index 1967b86932..b046503f44 100644 --- a/typedapi/core/getscriptcontext/get_script_context.go +++ b/typedapi/core/getscriptcontext/get_script_context.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get script contexts. // diff --git a/typedapi/core/getscriptcontext/response.go b/typedapi/core/getscriptcontext/response.go index 9afa03d6fe..8ba8c4bc1a 100644 --- a/typedapi/core/getscriptcontext/response.go +++ b/typedapi/core/getscriptcontext/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getscriptcontext @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptcontext // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script_context/GetScriptContextResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script_context/GetScriptContextResponse.ts#L22-L26 type Response struct { Contexts []types.GetScriptContext `json:"contexts"` } diff --git a/typedapi/core/getscriptlanguages/get_script_languages.go b/typedapi/core/getscriptlanguages/get_script_languages.go index b08abd2aef..3422817137 100644 --- a/typedapi/core/getscriptlanguages/get_script_languages.go +++ b/typedapi/core/getscriptlanguages/get_script_languages.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get script languages. // diff --git a/typedapi/core/getscriptlanguages/response.go b/typedapi/core/getscriptlanguages/response.go index 7724a279bf..c2f1fe2f3a 100644 --- a/typedapi/core/getscriptlanguages/response.go +++ b/typedapi/core/getscriptlanguages/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getscriptlanguages @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptlanguages // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27 type Response struct { LanguageContexts []types.LanguageContext `json:"language_contexts"` TypesAllowed []string `json:"types_allowed"` diff --git a/typedapi/core/getsource/get_source.go b/typedapi/core/getsource/get_source.go index 990beef958..317579ff4e 100644 --- a/typedapi/core/getsource/get_source.go +++ b/typedapi/core/getsource/get_source.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a document's source. // @@ -409,14 +409,6 @@ func (r *GetSource) SourceIncludes_(fields ...string) *GetSource { return r } -// StoredFields A comma-separated list of stored fields to return as part of a hit. -// API name: stored_fields -func (r *GetSource) StoredFields(fields ...string) *GetSource { - r.values.Set("stored_fields", strings.Join(fields, ",")) - - return r -} - // Version The version number for concurrency control. // It must match the current version of the document for the request to succeed. // API name: version diff --git a/typedapi/core/getsource/response.go b/typedapi/core/getsource/response.go index 85dac9f0dd..492851533b 100644 --- a/typedapi/core/getsource/response.go +++ b/typedapi/core/getsource/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsource @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsource // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_source/SourceResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_source/SourceResponse.ts#L20-L23 type Response = json.RawMessage diff --git a/typedapi/core/healthreport/health_report.go b/typedapi/core/healthreport/health_report.go index 57bca6973c..719a60ec4b 100644 --- a/typedapi/core/healthreport/health_report.go +++ b/typedapi/core/healthreport/health_report.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the cluster health. // Get a report with the health status of an Elasticsearch cluster. diff --git a/typedapi/core/healthreport/response.go b/typedapi/core/healthreport/response.go index de4f6f35ed..8a0b04a148 100644 --- a/typedapi/core/healthreport/response.go +++ b/typedapi/core/healthreport/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package healthreport @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package healthreport // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/Response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/Response.ts#L22-L28 type Response struct { ClusterName string `json:"cluster_name"` Indicators types.Indicators `json:"indicators"` diff --git a/typedapi/core/index/index.go b/typedapi/core/index/index.go index de44714c7a..c0cb344ce2 100644 --- a/typedapi/core/index/index.go +++ b/typedapi/core/index/index.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a document in an index. // @@ -880,6 +880,15 @@ func (r *Index) RequireAlias(requirealias bool) *Index { return r } +// RequireDataStream If `true`, the request's actions must target a data stream (existing or to be +// created). +// API name: require_data_stream +func (r *Index) RequireDataStream(requiredatastream bool) *Index { + r.values.Set("require_data_stream", strconv.FormatBool(requiredatastream)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/core/index/request.go b/typedapi/core/index/request.go index af4e651128..d564a9a00c 100644 --- a/typedapi/core/index/request.go +++ b/typedapi/core/index/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package index @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/index/IndexRequest.ts#L35-L268 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/index/IndexRequest.ts#L35-L273 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/core/index/response.go b/typedapi/core/index/response.go index 5cde74670f..e3eb7a9848 100644 --- a/typedapi/core/index/response.go +++ b/typedapi/core/index/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package index @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/index/IndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/index/IndexResponse.ts#L22-L24 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` // Id_ The unique identifier for the added document. diff --git a/typedapi/core/info/info.go b/typedapi/core/info/info.go index 549864afaf..c88b93c9eb 100644 --- a/typedapi/core/info/info.go +++ b/typedapi/core/info/info.go @@ -16,10 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cluster info. // Get basic build, version, and cluster information. +// ::: In Serverless, this API is retained for backward compatibility only. Some +// response fields, such as the version number, should be ignored. package info import ( @@ -71,6 +73,8 @@ func NewInfoFunc(tp elastictransport.Interface) NewInfo { // Get cluster info. // Get basic build, version, and cluster information. +// ::: In Serverless, this API is retained for backward compatibility only. Some +// response fields, such as the version number, should be ignored. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-api-root.html func New(tp elastictransport.Interface) *Info { diff --git a/typedapi/core/info/response.go b/typedapi/core/info/response.go index a71cf96827..6cf3e45346 100644 --- a/typedapi/core/info/response.go +++ b/typedapi/core/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/info/RootNodeInfoResponse.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/info/RootNodeInfoResponse.ts#L23-L40 type Response struct { // ClusterName The responding cluster's name. diff --git a/typedapi/core/knnsearch/knn_search.go b/typedapi/core/knnsearch/knn_search.go index 0012c5d5d0..a9c9114de1 100644 --- a/typedapi/core/knnsearch/knn_search.go +++ b/typedapi/core/knnsearch/knn_search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a knn search. // @@ -414,86 +414,73 @@ func (r *KnnSearch) Pretty(pretty bool) *KnnSearch { return r } -// The request returns doc values for field names matching these patterns +// DocvalueFields The request returns doc values for field names matching these patterns // in the `hits.fields` property of the response. // It accepts wildcard (`*`) patterns. // API name: docvalue_fields -func (r *KnnSearch) DocvalueFields(docvaluefields ...types.FieldAndFormatVariant) *KnnSearch { - // Initialize the request if it is not already initialized +func (r *KnnSearch) DocvalueFields(docvaluefields ...types.FieldAndFormat) *KnnSearch { if r.req == nil { r.req = NewRequest() } - for _, v := range docvaluefields { + r.req.DocvalueFields = docvaluefields - r.req.DocvalueFields = append(r.req.DocvalueFields, *v.FieldAndFormatCaster()) - - } return r } -// The request returns values for field names matching these patterns +// Fields The request returns values for field names matching these patterns // in the `hits.fields` property of the response. // It accepts wildcard (`*`) patterns. // API name: fields func (r *KnnSearch) Fields(fields ...string) *KnnSearch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Fields = fields return r } -// A query to filter the documents that can match. The kNN search will return +// Filter A query to filter the documents that can match. The kNN search will return // the top // `k` documents that also match this filter. The value can be a single query or // a // list of queries. If `filter` isn't provided, all documents are allowed to // match. // API name: filter -func (r *KnnSearch) Filter(filters ...types.QueryVariant) *KnnSearch { - // Initialize the request if it is not already initialized +func (r *KnnSearch) Filter(filters ...types.Query) *KnnSearch { if r.req == nil { r.req = NewRequest() } - r.req.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - r.req.Filter[i] = *v.QueryCaster() - } + r.req.Filter = filters return r } -// The kNN query to run. +// Knn The kNN query to run. // API name: knn -func (r *KnnSearch) Knn(knn types.CoreKnnQueryVariant) *KnnSearch { - // Initialize the request if it is not already initialized +func (r *KnnSearch) Knn(knn *types.CoreKnnQuery) *KnnSearch { if r.req == nil { r.req = NewRequest() } - r.req.Knn = *knn.CoreKnnQueryCaster() + r.req.Knn = *knn return r } -// Indicates which source fields are returned for matching documents. These +// Source_ Indicates which source fields are returned for matching documents. These // fields are returned in the `hits._source` property of the search response. // API name: _source -func (r *KnnSearch) Source_(sourceconfig types.SourceConfigVariant) *KnnSearch { - // Initialize the request if it is not already initialized +func (r *KnnSearch) Source_(sourceconfig types.SourceConfig) *KnnSearch { if r.req == nil { r.req = NewRequest() } - - r.req.Source_ = *sourceconfig.SourceConfigCaster() + r.req.Source_ = sourceconfig return r } -// A list of stored fields to return as part of a hit. If no fields are +// StoredFields A list of stored fields to return as part of a hit. If no fields are // specified, // no stored fields are included in the response. If this field is specified, // the `_source` @@ -502,11 +489,9 @@ func (r *KnnSearch) Source_(sourceconfig types.SourceConfigVariant) *KnnSearch { // and stored fields in the search response. // API name: stored_fields func (r *KnnSearch) StoredFields(fields ...string) *KnnSearch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.StoredFields = fields return r diff --git a/typedapi/core/knnsearch/request.go b/typedapi/core/knnsearch/request.go index f03fcf2ca4..a294664117 100644 --- a/typedapi/core/knnsearch/request.go +++ b/typedapi/core/knnsearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package knnsearch @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package knnsearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/knn_search/KnnSearchRequest.ts#L26-L112 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/knn_search/KnnSearchRequest.ts#L26-L112 type Request struct { // DocvalueFields The request returns doc values for field names matching these patterns @@ -158,7 +158,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := types.NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/core/knnsearch/response.go b/typedapi/core/knnsearch/response.go index 4ae3ec6922..ee7072e8f2 100644 --- a/typedapi/core/knnsearch/response.go +++ b/typedapi/core/knnsearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package knnsearch @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package knnsearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/knn_search/KnnSearchResponse.ts#L26-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/knn_search/KnnSearchResponse.ts#L26-L54 type Response struct { // Fields The field values for the documents. These fields diff --git a/typedapi/core/mget/mget.go b/typedapi/core/mget/mget.go index b6b6515f90..9ef934939e 100644 --- a/typedapi/core/mget/mget.go +++ b/typedapi/core/mget/mget.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get multiple documents. // @@ -490,31 +490,25 @@ func (r *Mget) Pretty(pretty bool) *Mget { return r } -// The documents you want to retrieve. Required if no index is specified in the +// Docs The documents you want to retrieve. Required if no index is specified in the // request URI. // API name: docs -func (r *Mget) Docs(docs ...types.MgetOperationVariant) *Mget { - // Initialize the request if it is not already initialized +func (r *Mget) Docs(docs ...types.MgetOperation) *Mget { if r.req == nil { r.req = NewRequest() } - for _, v := range docs { + r.req.Docs = docs - r.req.Docs = append(r.req.Docs, *v.MgetOperationCaster()) - - } return r } -// The IDs of the documents you want to retrieve. Allowed when the index is +// Ids The IDs of the documents you want to retrieve. Allowed when the index is // specified in the request URI. // API name: ids func (r *Mget) Ids(ids ...string) *Mget { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Ids = ids return r diff --git a/typedapi/core/mget/request.go b/typedapi/core/mget/request.go index a3b08c1f19..908b791138 100644 --- a/typedapi/core/mget/request.go +++ b/typedapi/core/mget/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mget @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mget/MultiGetRequest.ts#L25-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mget/MultiGetRequest.ts#L25-L127 type Request struct { // Docs The documents you want to retrieve. Required if no index is specified in the diff --git a/typedapi/core/mget/response.go b/typedapi/core/mget/response.go index 65c5a6b8e8..8ea21546df 100644 --- a/typedapi/core/mget/response.go +++ b/typedapi/core/mget/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mget @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mget/MultiGetResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mget/MultiGetResponse.ts#L22-L31 type Response struct { // Docs The response includes a docs array that contains the documents in the order diff --git a/typedapi/core/msearch/msearch.go b/typedapi/core/msearch/msearch.go index 1ceec2b193..e0c89495a8 100644 --- a/typedapi/core/msearch/msearch.go +++ b/typedapi/core/msearch/msearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run multiple searches. // diff --git a/typedapi/core/msearch/request.go b/typedapi/core/msearch/request.go index ebb535dd62..a6246745df 100644 --- a/typedapi/core/msearch/request.go +++ b/typedapi/core/msearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/MultiSearchRequest.ts#L25-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/MultiSearchRequest.ts#L25-L139 type Request = []types.MsearchRequestItem diff --git a/typedapi/core/msearch/response.go b/typedapi/core/msearch/response.go index 2427b0da30..45b589528e 100644 --- a/typedapi/core/msearch/response.go +++ b/typedapi/core/msearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package msearch @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/MultiSearchResponse.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/MultiSearchResponse.ts#L25-L27 type Response struct { Responses []types.MsearchResponseItem `json:"responses"` Took int64 `json:"took"` diff --git a/typedapi/core/msearchtemplate/msearch_template.go b/typedapi/core/msearchtemplate/msearch_template.go index eafd3ec8cb..465cbf9706 100644 --- a/typedapi/core/msearchtemplate/msearch_template.go +++ b/typedapi/core/msearchtemplate/msearch_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run multiple templated searches. // diff --git a/typedapi/core/msearchtemplate/request.go b/typedapi/core/msearchtemplate/request.go index de5121d4f4..5c4b62f103 100644 --- a/typedapi/core/msearchtemplate/request.go +++ b/typedapi/core/msearchtemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package msearchtemplate @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116 type Request = []types.RequestItem diff --git a/typedapi/core/msearchtemplate/response.go b/typedapi/core/msearchtemplate/response.go index d4bc3f9716..baac6b36a2 100644 --- a/typedapi/core/msearchtemplate/response.go +++ b/typedapi/core/msearchtemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package msearchtemplate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L31 type Response struct { Responses []types.MsearchResponseItem `json:"responses"` Took int64 `json:"took"` diff --git a/typedapi/core/mtermvectors/mtermvectors.go b/typedapi/core/mtermvectors/mtermvectors.go index 956614d7c1..35bdd6abde 100644 --- a/typedapi/core/mtermvectors/mtermvectors.go +++ b/typedapi/core/mtermvectors/mtermvectors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get multiple term vectors. // @@ -478,33 +478,25 @@ func (r *Mtermvectors) Pretty(pretty bool) *Mtermvectors { return r } -// An array of existing or artificial documents. +// Docs An array of existing or artificial documents. // API name: docs -func (r *Mtermvectors) Docs(docs ...types.MTermVectorsOperationVariant) *Mtermvectors { - // Initialize the request if it is not already initialized +func (r *Mtermvectors) Docs(docs ...types.MTermVectorsOperation) *Mtermvectors { if r.req == nil { r.req = NewRequest() } - for _, v := range docs { + r.req.Docs = docs - r.req.Docs = append(r.req.Docs, *v.MTermVectorsOperationCaster()) - - } return r } -// A simplified syntax to specify documents by their ID if they're in the same +// Ids A simplified syntax to specify documents by their ID if they're in the same // index. // API name: ids func (r *Mtermvectors) Ids(ids ...string) *Mtermvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range ids { + r.req.Ids = ids - r.req.Ids = append(r.req.Ids, v) - - } return r } diff --git a/typedapi/core/mtermvectors/request.go b/typedapi/core/mtermvectors/request.go index f0eefc0366..6db12a1a1f 100644 --- a/typedapi/core/mtermvectors/request.go +++ b/typedapi/core/mtermvectors/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mtermvectors @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134 type Request struct { // Docs An array of existing or artificial documents. diff --git a/typedapi/core/mtermvectors/response.go b/typedapi/core/mtermvectors/response.go index 7b7ed8088d..903d8dd0fe 100644 --- a/typedapi/core/mtermvectors/response.go +++ b/typedapi/core/mtermvectors/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mtermvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24 type Response struct { Docs []types.TermVectorsResult `json:"docs"` } diff --git a/typedapi/core/openpointintime/open_point_in_time.go b/typedapi/core/openpointintime/open_point_in_time.go index 6127420793..31b6aeec3c 100644 --- a/typedapi/core/openpointintime/open_point_in_time.go +++ b/typedapi/core/openpointintime/open_point_in_time.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Open a point in time. // @@ -474,8 +474,7 @@ func (r *OpenPointInTime) Routing(routing string) *OpenPointInTime { // ExpandWildcards The type of index that wildcard patterns can match. // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. -// It supports comma-separated values, such as `open,hidden`. Valid values are: -// `all`, `open`, `closed`, `hidden`, `none`. +// It supports comma-separated values, such as `open,hidden`. // API name: expand_wildcards func (r *OpenPointInTime) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *OpenPointInTime { tmp := []string{} @@ -553,15 +552,14 @@ func (r *OpenPointInTime) Pretty(pretty bool) *OpenPointInTime { return r } -// Filter indices if the provided query rewrites to `match_none` on every shard. +// IndexFilter Filter indices if the provided query rewrites to `match_none` on every shard. // API name: index_filter -func (r *OpenPointInTime) IndexFilter(indexfilter types.QueryVariant) *OpenPointInTime { - // Initialize the request if it is not already initialized +func (r *OpenPointInTime) IndexFilter(indexfilter *types.Query) *OpenPointInTime { if r.req == nil { r.req = NewRequest() } - r.req.IndexFilter = indexfilter.QueryCaster() + r.req.IndexFilter = indexfilter return r } diff --git a/typedapi/core/openpointintime/request.go b/typedapi/core/openpointintime/request.go index f8c9f397a3..c6b6ff6c51 100644 --- a/typedapi/core/openpointintime/request.go +++ b/typedapi/core/openpointintime/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package openpointintime @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127 type Request struct { // IndexFilter Filter indices if the provided query rewrites to `match_none` on every shard. diff --git a/typedapi/core/openpointintime/response.go b/typedapi/core/openpointintime/response.go index c48084abe7..3270e98095 100644 --- a/typedapi/core/openpointintime/response.go +++ b/typedapi/core/openpointintime/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package openpointintime @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29 type Response struct { Id string `json:"id"` // Shards_ Shards used to create the PIT diff --git a/typedapi/core/ping/ping.go b/typedapi/core/ping/ping.go index 9f48e59f01..6b60d65572 100644 --- a/typedapi/core/ping/ping.go +++ b/typedapi/core/ping/ping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Ping the cluster. // Get information about whether the cluster is running. diff --git a/typedapi/core/putscript/put_script.go b/typedapi/core/putscript/put_script.go index 0b827b0657..e413d85025 100644 --- a/typedapi/core/putscript/put_script.go +++ b/typedapi/core/putscript/put_script.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a script or search template. // Creates or updates a stored script or search template. @@ -411,15 +411,14 @@ func (r *PutScript) Pretty(pretty bool) *PutScript { return r } -// The script or search template, its parameters, and its language. +// Script The script or search template, its parameters, and its language. // API name: script -func (r *PutScript) Script(script types.StoredScriptVariant) *PutScript { - // Initialize the request if it is not already initialized +func (r *PutScript) Script(script *types.StoredScript) *PutScript { if r.req == nil { r.req = NewRequest() } - r.req.Script = *script.StoredScriptCaster() + r.req.Script = *script return r } diff --git a/typedapi/core/putscript/request.go b/typedapi/core/putscript/request.go index 0db20c976a..a3b231c3d1 100644 --- a/typedapi/core/putscript/request.go +++ b/typedapi/core/putscript/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putscript @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/put_script/PutScriptRequest.ts#L25-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/put_script/PutScriptRequest.ts#L25-L87 type Request struct { // Script The script or search template, its parameters, and its language. diff --git a/typedapi/core/putscript/response.go b/typedapi/core/putscript/response.go index ee5a57241a..8f0cc131dc 100644 --- a/typedapi/core/putscript/response.go +++ b/typedapi/core/putscript/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putscript // Response holds the response body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/put_script/PutScriptResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/put_script/PutScriptResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/core/rankeval/rank_eval.go b/typedapi/core/rankeval/rank_eval.go index 6619d2f5c6..d0fba09d4d 100644 --- a/typedapi/core/rankeval/rank_eval.go +++ b/typedapi/core/rankeval/rank_eval.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Evaluate ranked search results. // @@ -410,30 +410,25 @@ func (r *RankEval) Pretty(pretty bool) *RankEval { return r } -// Definition of the evaluation metric to calculate. +// Metric Definition of the evaluation metric to calculate. // API name: metric -func (r *RankEval) Metric(metric types.RankEvalMetricVariant) *RankEval { - // Initialize the request if it is not already initialized +func (r *RankEval) Metric(metric *types.RankEvalMetric) *RankEval { if r.req == nil { r.req = NewRequest() } - r.req.Metric = metric.RankEvalMetricCaster() + r.req.Metric = metric return r } -// A set of typical search requests, together with their provided ratings. +// Requests A set of typical search requests, together with their provided ratings. // API name: requests -func (r *RankEval) Requests(requests ...types.RankEvalRequestItemVariant) *RankEval { - // Initialize the request if it is not already initialized +func (r *RankEval) Requests(requests ...types.RankEvalRequestItem) *RankEval { if r.req == nil { r.req = NewRequest() } - for _, v := range requests { + r.req.Requests = requests - r.req.Requests = append(r.req.Requests, *v.RankEvalRequestItemCaster()) - - } return r } diff --git a/typedapi/core/rankeval/request.go b/typedapi/core/rankeval/request.go index 20feecafbe..4ec1ba21b3 100644 --- a/typedapi/core/rankeval/request.go +++ b/typedapi/core/rankeval/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rankeval @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/RankEvalRequest.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/RankEvalRequest.ts#L24-L76 type Request struct { // Metric Definition of the evaluation metric to calculate. diff --git a/typedapi/core/rankeval/response.go b/typedapi/core/rankeval/response.go index 700b939976..825b1ef681 100644 --- a/typedapi/core/rankeval/response.go +++ b/typedapi/core/rankeval/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rankeval @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/RankEvalResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/RankEvalResponse.ts#L26-L34 type Response struct { // Details The details section contains one entry for every query in the original diff --git a/typedapi/core/reindex/reindex.go b/typedapi/core/reindex/reindex.go index dfa7e0ad6d..49a58b6c5c 100644 --- a/typedapi/core/reindex/reindex.go +++ b/typedapi/core/reindex/reindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reindex documents. // @@ -981,31 +981,30 @@ func (r *Reindex) Pretty(pretty bool) *Reindex { return r } -// Indicates whether to continue reindexing even when there are conflicts. +// Conflicts Indicates whether to continue reindexing even when there are conflicts. // API name: conflicts func (r *Reindex) Conflicts(conflicts conflicts.Conflicts) *Reindex { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Conflicts = &conflicts + return r } -// The destination you are copying to. +// Dest The destination you are copying to. // API name: dest -func (r *Reindex) Dest(dest types.ReindexDestinationVariant) *Reindex { - // Initialize the request if it is not already initialized +func (r *Reindex) Dest(dest *types.ReindexDestination) *Reindex { if r.req == nil { r.req = NewRequest() } - r.req.Dest = *dest.ReindexDestinationCaster() + r.req.Dest = *dest return r } -// The maximum number of documents to reindex. +// MaxDocs The maximum number of documents to reindex. // By default, all documents are reindexed. // If it is a value less then or equal to `scroll_size`, a scroll will not be // used to retrieve the results for the operation. @@ -1016,7 +1015,6 @@ func (r *Reindex) Dest(dest types.ReindexDestinationVariant) *Reindex { // through every document in the source query. // API name: max_docs func (r *Reindex) MaxDocs(maxdocs int64) *Reindex { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1026,22 +1024,20 @@ func (r *Reindex) MaxDocs(maxdocs int64) *Reindex { return r } -// The script to run to update the document source or metadata when reindexing. +// Script The script to run to update the document source or metadata when reindexing. // API name: script -func (r *Reindex) Script(script types.ScriptVariant) *Reindex { - // Initialize the request if it is not already initialized +func (r *Reindex) Script(script *types.Script) *Reindex { if r.req == nil { r.req = NewRequest() } - r.req.Script = script.ScriptCaster() + r.req.Script = script return r } // API name: size func (r *Reindex) Size(size int64) *Reindex { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1051,15 +1047,14 @@ func (r *Reindex) Size(size int64) *Reindex { return r } -// The source you are copying from. +// Source The source you are copying from. // API name: source -func (r *Reindex) Source(source types.ReindexSourceVariant) *Reindex { - // Initialize the request if it is not already initialized +func (r *Reindex) Source(source *types.ReindexSource) *Reindex { if r.req == nil { r.req = NewRequest() } - r.req.Source = *source.ReindexSourceCaster() + r.req.Source = *source return r } diff --git a/typedapi/core/reindex/request.go b/typedapi/core/reindex/request.go index c157adcd91..64bb3cbc71 100644 --- a/typedapi/core/reindex/request.go +++ b/typedapi/core/reindex/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reindex @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex/ReindexRequest.ts#L27-L309 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex/ReindexRequest.ts#L27-L317 type Request struct { // Conflicts Indicates whether to continue reindexing even when there are conflicts. diff --git a/typedapi/core/reindex/response.go b/typedapi/core/reindex/response.go index 6152b04e98..b388720db0 100644 --- a/typedapi/core/reindex/response.go +++ b/typedapi/core/reindex/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex/ReindexResponse.ts#L26-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex/ReindexResponse.ts#L26-L92 type Response struct { // Batches The number of scroll responses that were pulled back by the reindex. diff --git a/typedapi/core/reindexrethrottle/reindex_rethrottle.go b/typedapi/core/reindexrethrottle/reindex_rethrottle.go index 8fa65e369c..6119bfa39b 100644 --- a/typedapi/core/reindexrethrottle/reindex_rethrottle.go +++ b/typedapi/core/reindexrethrottle/reindex_rethrottle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Throttle a reindex operation. // diff --git a/typedapi/core/reindexrethrottle/response.go b/typedapi/core/reindexrethrottle/response.go index 96d458c460..4c6a9db706 100644 --- a/typedapi/core/reindexrethrottle/response.go +++ b/typedapi/core/reindexrethrottle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reindexrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindexrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25 type Response struct { Nodes map[string]types.ReindexNode `json:"nodes"` } diff --git a/typedapi/core/rendersearchtemplate/render_search_template.go b/typedapi/core/rendersearchtemplate/render_search_template.go index dffecdadd2..6ea8bf8ff0 100644 --- a/typedapi/core/rendersearchtemplate/render_search_template.go +++ b/typedapi/core/rendersearchtemplate/render_search_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Render a search template. // @@ -342,7 +342,6 @@ func (r *RenderSearchTemplate) Pretty(pretty bool) *RenderSearchTemplate { // API name: file func (r *RenderSearchTemplate) File(file string) *RenderSearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -352,62 +351,41 @@ func (r *RenderSearchTemplate) File(file string) *RenderSearchTemplate { return r } -// The ID of the search template to render. +// Id The ID of the search template to render. // If no `source` is specified, this or the `` request path // parameter is required. // If you specify both this parameter and the `` parameter, the API // uses only ``. // API name: id func (r *RenderSearchTemplate) Id(id string) *RenderSearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Id = &id return r } -// Key-value pairs used to replace Mustache variables in the template. +// Params Key-value pairs used to replace Mustache variables in the template. // The key is the variable name. // The value is the variable value. // API name: params func (r *RenderSearchTemplate) Params(params map[string]json.RawMessage) *RenderSearchTemplate { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Params = params - return r -} - -func (r *RenderSearchTemplate) AddParam(key string, value json.RawMessage) *RenderSearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Params == nil { - r.req.Params = make(map[string]json.RawMessage) - } else { - tmp = r.req.Params - } - - tmp[key] = value + r.req.Params = params - r.req.Params = tmp return r } -// An inline search template. +// Source An inline search template. // It supports the same parameters as the search API's request body. // These parameters also support Mustache variables. // If no `id` or `` is specified, this parameter is required. // API name: source func (r *RenderSearchTemplate) Source(source string) *RenderSearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/core/rendersearchtemplate/request.go b/typedapi/core/rendersearchtemplate/request.go index 1dadadf5e5..1e7c606e15 100644 --- a/typedapi/core/rendersearchtemplate/request.go +++ b/typedapi/core/rendersearchtemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rendersearchtemplate @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L76 type Request struct { File *string `json:"file,omitempty"` // Id The ID of the search template to render. diff --git a/typedapi/core/rendersearchtemplate/response.go b/typedapi/core/rendersearchtemplate/response.go index 3ceddb7d2d..6006a0a930 100644 --- a/typedapi/core/rendersearchtemplate/response.go +++ b/typedapi/core/rendersearchtemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rendersearchtemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25 type Response struct { TemplateOutput map[string]json.RawMessage `json:"template_output"` } diff --git a/typedapi/core/scriptspainlessexecute/request.go b/typedapi/core/scriptspainlessexecute/request.go index a875de0093..c28ae156de 100644 --- a/typedapi/core/scriptspainlessexecute/request.go +++ b/typedapi/core/scriptspainlessexecute/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package scriptspainlessexecute @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L64 type Request struct { // Context The context that the script should run in. diff --git a/typedapi/core/scriptspainlessexecute/response.go b/typedapi/core/scriptspainlessexecute/response.go index 4c76f2455d..5159a0dc4a 100644 --- a/typedapi/core/scriptspainlessexecute/response.go +++ b/typedapi/core/scriptspainlessexecute/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package scriptspainlessexecute @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24 type Response struct { Result json.RawMessage `json:"result,omitempty"` } diff --git a/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go b/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go index cd7eb4886f..9fc2922328 100644 --- a/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go +++ b/typedapi/core/scriptspainlessexecute/scripts_painless_execute.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a script. // @@ -361,42 +361,40 @@ func (r *ScriptsPainlessExecute) Pretty(pretty bool) *ScriptsPainlessExecute { return r } -// The context that the script should run in. +// Context The context that the script should run in. // NOTE: Result ordering in the field contexts is not guaranteed. // API name: context func (r *ScriptsPainlessExecute) Context(context painlesscontext.PainlessContext) *ScriptsPainlessExecute { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Context = &context + return r } -// Additional parameters for the `context`. +// ContextSetup Additional parameters for the `context`. // NOTE: This parameter is required for all contexts except `painless_test`, // which is the default if no value is provided for `context`. // API name: context_setup -func (r *ScriptsPainlessExecute) ContextSetup(contextsetup types.PainlessContextSetupVariant) *ScriptsPainlessExecute { - // Initialize the request if it is not already initialized +func (r *ScriptsPainlessExecute) ContextSetup(contextsetup *types.PainlessContextSetup) *ScriptsPainlessExecute { if r.req == nil { r.req = NewRequest() } - r.req.ContextSetup = contextsetup.PainlessContextSetupCaster() + r.req.ContextSetup = contextsetup return r } -// The Painless script to run. +// Script The Painless script to run. // API name: script -func (r *ScriptsPainlessExecute) Script(script types.ScriptVariant) *ScriptsPainlessExecute { - // Initialize the request if it is not already initialized +func (r *ScriptsPainlessExecute) Script(script *types.Script) *ScriptsPainlessExecute { if r.req == nil { r.req = NewRequest() } - r.req.Script = script.ScriptCaster() + r.req.Script = script return r } diff --git a/typedapi/core/scroll/request.go b/typedapi/core/scroll/request.go index a84c1c2d94..6ec294fc89 100644 --- a/typedapi/core/scroll/request.go +++ b/typedapi/core/scroll/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package scroll @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/scroll/ScrollRequest.ts#L24-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/scroll/ScrollRequest.ts#L24-L88 type Request struct { // Scroll The period to retain the search context for scrolling. diff --git a/typedapi/core/scroll/response.go b/typedapi/core/scroll/response.go index 64cf452413..842743d5ec 100644 --- a/typedapi/core/scroll/response.go +++ b/typedapi/core/scroll/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package scroll @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/scroll/ScrollResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/scroll/ScrollResponse.ts#L22-L24 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` diff --git a/typedapi/core/scroll/scroll.go b/typedapi/core/scroll/scroll.go index 0aa429f6c8..d9283d7262 100644 --- a/typedapi/core/scroll/scroll.go +++ b/typedapi/core/scroll/scroll.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a scrolling search. // @@ -395,27 +395,23 @@ func (r *Scroll) Pretty(pretty bool) *Scroll { return r } -// The period to retain the search context for scrolling. +// Scroll The period to retain the search context for scrolling. // API name: scroll -func (r *Scroll) Scroll(duration types.DurationVariant) *Scroll { - // Initialize the request if it is not already initialized +func (r *Scroll) Scroll(duration types.Duration) *Scroll { if r.req == nil { r.req = NewRequest() } - - r.req.Scroll = *duration.DurationCaster() + r.req.Scroll = duration return r } -// The scroll ID of the search. +// ScrollId The scroll ID of the search. // API name: scroll_id func (r *Scroll) ScrollId(scrollid string) *Scroll { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScrollId = scrollid return r diff --git a/typedapi/core/search/request.go b/typedapi/core/search/request.go index 1e66fa4112..9e173aa3e9 100644 --- a/typedapi/core/search/request.go +++ b/typedapi/core/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/SearchRequest.ts#L54-L590 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/SearchRequest.ts#L54-L590 type Request struct { // Aggregations Defines the aggregations that are run as part of the search request. @@ -449,7 +449,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := types.NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/core/search/response.go b/typedapi/core/search/response.go index 4082364b96..672872d262 100644 --- a/typedapi/core/search/response.go +++ b/typedapi/core/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/SearchResponse.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/SearchResponse.ts#L34-L36 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` diff --git a/typedapi/core/search/search.go b/typedapi/core/search/search.go index a1cc580f9b..a56b8914df 100644 --- a/typedapi/core/search/search.go +++ b/typedapi/core/search/search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a search. // @@ -782,194 +782,137 @@ func (r *Search) Pretty(pretty bool) *Search { return r } -// Defines the aggregations that are run as part of the search request. +// Aggregations Defines the aggregations that are run as part of the search request. // API name: aggregations func (r *Search) Aggregations(aggregations map[string]types.Aggregations) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Aggregations = aggregations - return r -} - -func (r *Search) AddAggregation(key string, value types.AggregationsVariant) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.Aggregations - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggregations - } - - tmp[key] = *value.AggregationsCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } -// Collapses search results the values of the specified field. +// Collapse Collapses search results the values of the specified field. // API name: collapse -func (r *Search) Collapse(collapse types.FieldCollapseVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Collapse(collapse *types.FieldCollapse) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Collapse = collapse.FieldCollapseCaster() + r.req.Collapse = collapse return r } -// An array of wildcard (`*`) field patterns. +// DocvalueFields An array of wildcard (`*`) field patterns. // The request returns doc values for field names matching these patterns in the // `hits.fields` property of the response. // API name: docvalue_fields -func (r *Search) DocvalueFields(docvaluefields ...types.FieldAndFormatVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) DocvalueFields(docvaluefields ...types.FieldAndFormat) *Search { if r.req == nil { r.req = NewRequest() } - for _, v := range docvaluefields { - - r.req.DocvalueFields = append(r.req.DocvalueFields, *v.FieldAndFormatCaster()) + r.req.DocvalueFields = docvaluefields - } return r } -// If `true`, the request returns detailed information about score computation +// Explain If `true`, the request returns detailed information about score computation // as part of a hit. // API name: explain func (r *Search) Explain(explain bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Explain = &explain return r } -// Configuration of search extensions defined by Elasticsearch plugins. +// Ext Configuration of search extensions defined by Elasticsearch plugins. // API name: ext func (r *Search) Ext(ext map[string]json.RawMessage) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Ext = ext - return r -} - -func (r *Search) AddExt(key string, value json.RawMessage) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Ext == nil { - r.req.Ext = make(map[string]json.RawMessage) - } else { - tmp = r.req.Ext - } - tmp[key] = value + r.req.Ext = ext - r.req.Ext = tmp return r } -// An array of wildcard (`*`) field patterns. +// Fields An array of wildcard (`*`) field patterns. // The request returns values for field names matching these patterns in the // `hits.fields` property of the response. // API name: fields -func (r *Search) Fields(fields ...types.FieldAndFormatVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Fields(fields ...types.FieldAndFormat) *Search { if r.req == nil { r.req = NewRequest() } - for _, v := range fields { - - r.req.Fields = append(r.req.Fields, *v.FieldAndFormatCaster()) + r.req.Fields = fields - } return r } -// The starting document offset, which must be non-negative. +// From The starting document offset, which must be non-negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` parameter. // API name: from func (r *Search) From(from int) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } -// Specifies the highlighter to use for retrieving highlighted snippets from one +// Highlight Specifies the highlighter to use for retrieving highlighted snippets from one // or more fields in your search results. // API name: highlight -func (r *Search) Highlight(highlight types.HighlightVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Highlight(highlight *types.Highlight) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Highlight = highlight.HighlightCaster() + r.req.Highlight = highlight return r } -// Boost the `_score` of documents from specified indices. +// IndicesBoost Boost the `_score` of documents from specified indices. // The boost value is the factor by which scores are multiplied. // A boost value greater than `1.0` increases the score. // A boost value between `0` and `1.0` decreases the score. // API name: indices_boost -func (r *Search) IndicesBoost(indicesboost []map[string]types.Float64) *Search { - // Initialize the request if it is not already initialized +func (r *Search) IndicesBoost(indicesboosts ...map[string]types.Float64) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.IndicesBoost = indicesboost + r.req.IndicesBoost = indicesboosts return r } -// The approximate kNN search to run. +// Knn The approximate kNN search to run. // API name: knn -func (r *Search) Knn(knns ...types.KnnSearchVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Knn(knns ...types.KnnSearch) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Knn = make([]types.KnnSearch, len(knns)) - for i, v := range knns { - r.req.Knn[i] = *v.KnnSearchCaster() - } + r.req.Knn = knns return r } -// The minimum `_score` for matching documents. +// MinScore The minimum `_score` for matching documents. // Documents with a lower `_score` are not included in search results and // results collected by aggregations. // API name: min_score func (r *Search) MinScore(minscore types.Float64) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -979,295 +922,242 @@ func (r *Search) MinScore(minscore types.Float64) *Search { return r } -// Limit the search to a point in time (PIT). +// Pit Limit the search to a point in time (PIT). // If you provide a PIT, you cannot specify an `` in the request path. // API name: pit -func (r *Search) Pit(pit types.PointInTimeReferenceVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Pit(pit *types.PointInTimeReference) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Pit = pit.PointInTimeReferenceCaster() + r.req.Pit = pit return r } -// Use the `post_filter` parameter to filter search results. +// PostFilter Use the `post_filter` parameter to filter search results. // The search hits are filtered after the aggregations are calculated. // A post filter has no impact on the aggregation results. // API name: post_filter -func (r *Search) PostFilter(postfilter types.QueryVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) PostFilter(postfilter *types.Query) *Search { if r.req == nil { r.req = NewRequest() } - r.req.PostFilter = postfilter.QueryCaster() + r.req.PostFilter = postfilter return r } -// Set to `true` to return detailed timing information about the execution of +// Profile Set to `true` to return detailed timing information about the execution of // individual components in a search request. // NOTE: This is a debugging tool and adds significant overhead to search // execution. // API name: profile func (r *Search) Profile(profile bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Profile = &profile return r } -// The search definition using the Query DSL. +// Query The search definition using the Query DSL. // API name: query -func (r *Search) Query(query types.QueryVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Query(query *types.Query) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// The Reciprocal Rank Fusion (RRF) to use. +// Rank The Reciprocal Rank Fusion (RRF) to use. // API name: rank -func (r *Search) Rank(rank types.RankContainerVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Rank(rank *types.RankContainer) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Rank = rank.RankContainerCaster() + r.req.Rank = rank return r } -// Can be used to improve precision by reordering just the top (for example 100 +// Rescore Can be used to improve precision by reordering just the top (for example 100 // - 500) documents returned by the `query` and `post_filter` phases. // API name: rescore -func (r *Search) Rescore(rescores ...types.RescoreVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Rescore(rescores ...types.Rescore) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Rescore = make([]types.Rescore, len(rescores)) - for i, v := range rescores { - r.req.Rescore[i] = *v.RescoreCaster() - } + r.req.Rescore = rescores return r } -// A retriever is a specification to describe top documents returned from a +// Retriever A retriever is a specification to describe top documents returned from a // search. // A retriever replaces other elements of the search API that also return top // documents such as `query` and `knn`. // API name: retriever -func (r *Search) Retriever(retriever types.RetrieverContainerVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Retriever(retriever *types.RetrieverContainer) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Retriever = retriever.RetrieverContainerCaster() + r.req.Retriever = retriever return r } -// One or more runtime fields in the search request. +// RuntimeMappings One or more runtime fields in the search request. // These fields take precedence over mapped fields with the same name. // API name: runtime_mappings -func (r *Search) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) RuntimeMappings(runtimefields types.RuntimeFields) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// Retrieve a script evaluation (based on different fields) for each hit. +// ScriptFields Retrieve a script evaluation (based on different fields) for each hit. // API name: script_fields func (r *Search) ScriptFields(scriptfields map[string]types.ScriptField) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.ScriptFields = scriptfields - return r -} - -func (r *Search) AddScriptField(key string, value types.ScriptFieldVariant) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.ScriptField - if r.req.ScriptFields == nil { - r.req.ScriptFields = make(map[string]types.ScriptField) - } else { - tmp = r.req.ScriptFields - } - - tmp[key] = *value.ScriptFieldCaster() + r.req.ScriptFields = scriptfields - r.req.ScriptFields = tmp return r } -// Used to retrieve the next page of hits using a set of sort values from the +// SearchAfter Used to retrieve the next page of hits using a set of sort values from the // previous page. // API name: search_after -func (r *Search) SearchAfter(sortresults ...types.FieldValueVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) SearchAfter(sortresults ...types.FieldValue) *Search { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// If `true`, the request returns sequence number and primary term of the last +// SeqNoPrimaryTerm If `true`, the request returns sequence number and primary term of the last // modification of each hit. // API name: seq_no_primary_term func (r *Search) SeqNoPrimaryTerm(seqnoprimaryterm bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.SeqNoPrimaryTerm = &seqnoprimaryterm return r } -// The number of hits to return, which must not be negative. +// Size The number of hits to return, which must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` property. // API name: size func (r *Search) Size(size int) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// Split a scrolled search into multiple slices that can be consumed +// Slice Split a scrolled search into multiple slices that can be consumed // independently. // API name: slice -func (r *Search) Slice(slice types.SlicedScrollVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Slice(slice *types.SlicedScroll) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Slice = slice.SlicedScrollCaster() + r.req.Slice = slice return r } -// A comma-separated list of : pairs. +// Sort A comma-separated list of : pairs. // API name: sort -func (r *Search) Sort(sorts ...types.SortCombinationsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Sort(sorts ...types.SortCombinations) *Search { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } -// The source fields that are returned for matching documents. +// Source_ The source fields that are returned for matching documents. // These fields are returned in the `hits._source` property of the search // response. // If the `stored_fields` property is specified, the `_source` property defaults // to `false`. // Otherwise, it defaults to `true`. // API name: _source -func (r *Search) Source_(sourceconfig types.SourceConfigVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Source_(sourceconfig types.SourceConfig) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.Source_ = *sourceconfig.SourceConfigCaster() + r.req.Source_ = sourceconfig return r } -// The stats groups to associate with the search. +// Stats The stats groups to associate with the search. // Each group maintains a statistics aggregation for its associated searches. // You can retrieve these stats using the indices stats API. // API name: stats func (r *Search) Stats(stats ...string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range stats { - - r.req.Stats = append(r.req.Stats, v) + r.req.Stats = stats - } return r } -// A comma-separated list of stored fields to return as part of a hit. +// StoredFields A comma-separated list of stored fields to return as part of a hit. // If no fields are specified, no stored fields are included in the response. // If this field is specified, the `_source` property defaults to `false`. // You can pass `_source: true` to return both source fields and stored fields // in the search response. // API name: stored_fields func (r *Search) StoredFields(fields ...string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.StoredFields = fields return r } -// Defines a suggester that provides similar looking terms based on a provided +// Suggest Defines a suggester that provides similar looking terms based on a provided // text. // API name: suggest -func (r *Search) Suggest(suggest types.SuggesterVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Suggest(suggest *types.Suggester) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Suggest = suggest.SuggesterCaster() + r.req.Suggest = suggest return r } -// The maximum number of documents to collect for each shard. +// TerminateAfter The maximum number of documents to collect for each shard. // If a query reaches this limit, Elasticsearch terminates the query early. // Elasticsearch collects documents before sorting. // @@ -1280,7 +1170,6 @@ func (r *Search) Suggest(suggest types.SuggesterVariant) *Search { // If set to `0` (default), the query does not terminate early. // API name: terminate_after func (r *Search) TerminateAfter(terminateafter int64) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1290,13 +1179,12 @@ func (r *Search) TerminateAfter(terminateafter int64) *Search { return r } -// The period of time to wait for a response from each shard. +// Timeout The period of time to wait for a response from each shard. // If no response is received before the timeout expires, the request fails and // returns an error. // Defaults to no timeout. // API name: timeout func (r *Search) Timeout(timeout string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1306,45 +1194,39 @@ func (r *Search) Timeout(timeout string) *Search { return r } -// If `true`, calculate and return document scores, even if the scores are not +// TrackScores If `true`, calculate and return document scores, even if the scores are not // used for sorting. // API name: track_scores func (r *Search) TrackScores(trackscores bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TrackScores = &trackscores return r } -// Number of hits matching the query to count accurately. +// TrackTotalHits Number of hits matching the query to count accurately. // If `true`, the exact number of hits is returned at the cost of some // performance. // If `false`, the response does not include the total number of hits matching // the query. // API name: track_total_hits -func (r *Search) TrackTotalHits(trackhits types.TrackHitsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) TrackTotalHits(trackhits types.TrackHits) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.TrackTotalHits = *trackhits.TrackHitsCaster() + r.req.TrackTotalHits = trackhits return r } -// If `true`, the request returns the document version as part of a hit. +// Version If `true`, the request returns the document version as part of a hit. // API name: version func (r *Search) Version(version bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &version return r diff --git a/typedapi/core/searchmvt/request.go b/typedapi/core/searchmvt/request.go index ae1e081a07..2e40fb7cd0 100644 --- a/typedapi/core/searchmvt/request.go +++ b/typedapi/core/searchmvt/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package searchmvt @@ -35,7 +35,7 @@ import ( // Request holds the request body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L373 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L380 type Request struct { // Aggs Sub-aggregations for the geotile_grid. diff --git a/typedapi/core/searchmvt/response.go b/typedapi/core/searchmvt/response.go index 819c11a732..8e2925c519 100644 --- a/typedapi/core/searchmvt/response.go +++ b/typedapi/core/searchmvt/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package searchmvt // Response holds the response body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_mvt/SearchMvtResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_mvt/SearchMvtResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/core/searchmvt/search_mvt.go b/typedapi/core/searchmvt/search_mvt.go index c9a535b762..e13807f1f9 100644 --- a/typedapi/core/searchmvt/search_mvt.go +++ b/typedapi/core/searchmvt/search_mvt.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Search a vector tile. // @@ -773,7 +773,7 @@ func (r *SearchMvt) Pretty(pretty bool) *SearchMvt { return r } -// Sub-aggregations for the geotile_grid. +// Aggs Sub-aggregations for the geotile_grid. // // It supports the following aggregation types: // @@ -794,50 +794,30 @@ func (r *SearchMvt) Pretty(pretty bool) *SearchMvt { // reserved for internal aggregations. // API name: aggs func (r *SearchMvt) Aggs(aggs map[string]types.Aggregations) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aggs = aggs - return r -} - -func (r *SearchMvt) AddAgg(key string, value types.AggregationsVariant) *SearchMvt { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Aggregations - if r.req.Aggs == nil { - r.req.Aggs = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggs - } - tmp[key] = *value.AggregationsCaster() + r.req.Aggs = aggs - r.req.Aggs = tmp return r } -// The size, in pixels, of a clipping buffer outside the tile. This allows +// Buffer The size, in pixels, of a clipping buffer outside the tile. This allows // renderers // to avoid outline artifacts from geometries that extend past the extent of the // tile. // API name: buffer func (r *SearchMvt) Buffer(buffer int) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Buffer = &buffer return r } -// If `false`, the meta layer's feature is the bounding box of the tile. +// ExactBounds If `false`, the meta layer's feature is the bounding box of the tile. // If `true`, the meta layer's feature is a bounding box resulting from a // `geo_bounds` aggregation. The aggregation runs on values that // intersect @@ -845,75 +825,67 @@ func (r *SearchMvt) Buffer(buffer int) *SearchMvt { // bounding box may be larger than the vector tile. // API name: exact_bounds func (r *SearchMvt) ExactBounds(exactbounds bool) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ExactBounds = &exactbounds return r } -// The size, in pixels, of a side of the tile. Vector tiles are square with +// Extent The size, in pixels, of a side of the tile. Vector tiles are square with // equal sides. // API name: extent func (r *SearchMvt) Extent(extent int) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Extent = &extent return r } -// The fields to return in the `hits` layer. +// Fields The fields to return in the `hits` layer. // It supports wildcards (`*`). // This parameter does not support fields with array values. Fields with array // values may return inconsistent results. // API name: fields func (r *SearchMvt) Fields(fields ...string) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Fields = fields return r } -// The aggregation used to create a grid for the `field`. +// GridAgg The aggregation used to create a grid for the `field`. // API name: grid_agg func (r *SearchMvt) GridAgg(gridagg gridaggregationtype.GridAggregationType) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.GridAgg = &gridagg + return r } -// Additional zoom levels available through the aggs layer. For example, if +// GridPrecision Additional zoom levels available through the aggs layer. For example, if // `` is `7` // and `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If // 0, results // don't include the aggs layer. // API name: grid_precision func (r *SearchMvt) GridPrecision(gridprecision int) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.GridPrecision = &gridprecision return r } -// Determines the geometry type for features in the aggs layer. In the aggs +// GridType Determines the geometry type for features in the aggs layer. In the aggs // layer, // each feature represents a `geotile_grid` cell. If `grid, each feature is a // polygon @@ -922,91 +894,80 @@ func (r *SearchMvt) GridPrecision(gridprecision int) *SearchMvt { // of the cell. // API name: grid_type func (r *SearchMvt) GridType(gridtype gridtype.GridType) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.GridType = &gridtype + return r } -// The query DSL used to filter documents for the search. +// Query The query DSL used to filter documents for the search. // API name: query -func (r *SearchMvt) Query(query types.QueryVariant) *SearchMvt { - // Initialize the request if it is not already initialized +func (r *SearchMvt) Query(query *types.Query) *SearchMvt { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// Defines one or more runtime fields in the search request. These fields take +// RuntimeMappings Defines one or more runtime fields in the search request. These fields take // precedence over mapped fields with the same name. // API name: runtime_mappings -func (r *SearchMvt) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *SearchMvt { - // Initialize the request if it is not already initialized +func (r *SearchMvt) RuntimeMappings(runtimefields types.RuntimeFields) *SearchMvt { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// The maximum number of features to return in the hits layer. Accepts 0-10000. +// Size The maximum number of features to return in the hits layer. Accepts 0-10000. // If 0, results don't include the hits layer. // API name: size func (r *SearchMvt) Size(size int) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// Sort the features in the hits layer. By default, the API calculates a +// Sort Sort the features in the hits layer. By default, the API calculates a // bounding // box for each feature. It sorts features based on this box's diagonal length, // from longest to shortest. // API name: sort -func (r *SearchMvt) Sort(sorts ...types.SortCombinationsVariant) *SearchMvt { - // Initialize the request if it is not already initialized +func (r *SearchMvt) Sort(sorts ...types.SortCombinations) *SearchMvt { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } -// The number of hits matching the query to count accurately. If `true`, the +// TrackTotalHits The number of hits matching the query to count accurately. If `true`, the // exact number // of hits is returned at the cost of some performance. If `false`, the response // does // not include the total number of hits matching the query. // API name: track_total_hits -func (r *SearchMvt) TrackTotalHits(trackhits types.TrackHitsVariant) *SearchMvt { - // Initialize the request if it is not already initialized +func (r *SearchMvt) TrackTotalHits(trackhits types.TrackHits) *SearchMvt { if r.req == nil { r.req = NewRequest() } - - r.req.TrackTotalHits = *trackhits.TrackHitsCaster() + r.req.TrackTotalHits = trackhits return r } -// If `true`, the hits and aggs layers will contain additional point features +// WithLabels If `true`, the hits and aggs layers will contain additional point features // representing // suggested label positions for the original features. // @@ -1025,11 +986,9 @@ func (r *SearchMvt) TrackTotalHits(trackhits types.TrackHitsVariant) *SearchMvt // `_mvt_label_position`. // API name: with_labels func (r *SearchMvt) WithLabels(withlabels bool) *SearchMvt { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.WithLabels = &withlabels return r diff --git a/typedapi/core/searchshards/response.go b/typedapi/core/searchshards/response.go index 2fc12efcb8..f9304a77bc 100644 --- a/typedapi/core/searchshards/response.go +++ b/typedapi/core/searchshards/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package searchshards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package searchshards // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_shards/SearchShardsResponse.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_shards/SearchShardsResponse.ts#L34-L40 type Response struct { Indices map[string]types.ShardStoreIndex `json:"indices"` Nodes map[string]types.SearchShardsNodeAttributes `json:"nodes"` diff --git a/typedapi/core/searchshards/search_shards.go b/typedapi/core/searchshards/search_shards.go index da3d80922b..2304bcd1b0 100644 --- a/typedapi/core/searchshards/search_shards.go +++ b/typedapi/core/searchshards/search_shards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the search shards. // @@ -340,7 +340,6 @@ func (r *SearchShards) AllowNoIndices(allownoindices bool) *SearchShards { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *SearchShards) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *SearchShards { tmp := []string{} diff --git a/typedapi/core/searchtemplate/request.go b/typedapi/core/searchtemplate/request.go index 52088cd40f..c6a5b3bdc8 100644 --- a/typedapi/core/searchtemplate/request.go +++ b/typedapi/core/searchtemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package searchtemplate @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_template/SearchTemplateRequest.ts#L32-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_template/SearchTemplateRequest.ts#L32-L152 type Request struct { // Explain If `true`, returns detailed information about score calculation as part of diff --git a/typedapi/core/searchtemplate/response.go b/typedapi/core/searchtemplate/response.go index 4960ccef36..b1ef7ae337 100644 --- a/typedapi/core/searchtemplate/response.go +++ b/typedapi/core/searchtemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package searchtemplate @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_template/SearchTemplateResponse.ts#L30-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_template/SearchTemplateResponse.ts#L30-L48 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` diff --git a/typedapi/core/searchtemplate/search_template.go b/typedapi/core/searchtemplate/search_template.go index d986dfe3b6..f8c70790df 100644 --- a/typedapi/core/searchtemplate/search_template.go +++ b/typedapi/core/searchtemplate/search_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a search with a search template. package searchtemplate @@ -348,7 +348,6 @@ func (r *SearchTemplate) CcsMinimizeRoundtrips(ccsminimizeroundtrips bool) *Sear // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *SearchTemplate) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *SearchTemplate { tmp := []string{} @@ -474,88 +473,63 @@ func (r *SearchTemplate) Pretty(pretty bool) *SearchTemplate { return r } -// If `true`, returns detailed information about score calculation as part of +// Explain If `true`, returns detailed information about score calculation as part of // each hit. // If you specify both this and the `explain` query parameter, the API uses only // the query parameter. // API name: explain func (r *SearchTemplate) Explain(explain bool) *SearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Explain = &explain return r } -// The ID of the search template to use. If no `source` is specified, +// Id The ID of the search template to use. If no `source` is specified, // this parameter is required. // API name: id func (r *SearchTemplate) Id(id string) *SearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Id = &id return r } -// Key-value pairs used to replace Mustache variables in the template. +// Params Key-value pairs used to replace Mustache variables in the template. // The key is the variable name. // The value is the variable value. // API name: params func (r *SearchTemplate) Params(params map[string]json.RawMessage) *SearchTemplate { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Params = params - return r -} - -func (r *SearchTemplate) AddParam(key string, value json.RawMessage) *SearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Params == nil { - r.req.Params = make(map[string]json.RawMessage) - } else { - tmp = r.req.Params - } - - tmp[key] = value + r.req.Params = params - r.req.Params = tmp return r } -// If `true`, the query execution is profiled. +// Profile If `true`, the query execution is profiled. // API name: profile func (r *SearchTemplate) Profile(profile bool) *SearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Profile = &profile return r } -// An inline search template. Supports the same parameters as the search API's +// Source An inline search template. Supports the same parameters as the search API's // request body. It also supports Mustache variables. If no `id` is specified, // this // parameter is required. // API name: source func (r *SearchTemplate) Source(source string) *SearchTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/core/termsenum/request.go b/typedapi/core/termsenum/request.go index c15b338b9e..f1e681dd1f 100644 --- a/typedapi/core/termsenum/request.go +++ b/typedapi/core/termsenum/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package termsenum @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L93 type Request struct { // CaseInsensitive When `true`, the provided search string is matched against index terms diff --git a/typedapi/core/termsenum/response.go b/typedapi/core/termsenum/response.go index 218686f5e7..0e6c35e276 100644 --- a/typedapi/core/termsenum/response.go +++ b/typedapi/core/termsenum/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package termsenum @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L32 type Response struct { // Complete If `false`, the returned terms set may be incomplete and should be treated as diff --git a/typedapi/core/termsenum/terms_enum.go b/typedapi/core/termsenum/terms_enum.go index 887c59c895..aaef74f546 100644 --- a/typedapi/core/termsenum/terms_enum.go +++ b/typedapi/core/termsenum/terms_enum.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get terms in an index. // @@ -378,53 +378,47 @@ func (r *TermsEnum) Pretty(pretty bool) *TermsEnum { return r } -// When `true`, the provided search string is matched against index terms +// CaseInsensitive When `true`, the provided search string is matched against index terms // without case sensitivity. // API name: case_insensitive func (r *TermsEnum) CaseInsensitive(caseinsensitive bool) *TermsEnum { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.CaseInsensitive = &caseinsensitive return r } -// The string to match at the start of indexed terms. If not provided, all terms +// Field The string to match at the start of indexed terms. If not provided, all terms // in the field are considered. // API name: field func (r *TermsEnum) Field(field string) *TermsEnum { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Field = field return r } -// Filter an index shard if the provided query rewrites to `match_none`. +// IndexFilter Filter an index shard if the provided query rewrites to `match_none`. // API name: index_filter -func (r *TermsEnum) IndexFilter(indexfilter types.QueryVariant) *TermsEnum { - // Initialize the request if it is not already initialized +func (r *TermsEnum) IndexFilter(indexfilter *types.Query) *TermsEnum { if r.req == nil { r.req = NewRequest() } - r.req.IndexFilter = indexfilter.QueryCaster() + r.req.IndexFilter = indexfilter return r } -// The string after which terms in the index should be returned. +// SearchAfter The string after which terms in the index should be returned. // It allows for a form of pagination if the last result from one request is // passed as the `search_after` parameter for a subsequent request. // API name: search_after func (r *TermsEnum) SearchAfter(searchafter string) *TermsEnum { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -434,20 +428,18 @@ func (r *TermsEnum) SearchAfter(searchafter string) *TermsEnum { return r } -// The number of matching terms to return. +// Size The number of matching terms to return. // API name: size func (r *TermsEnum) Size(size int) *TermsEnum { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// The string to match at the start of indexed terms. +// String The string to match at the start of indexed terms. // If it is not provided, all terms in the field are considered. // // > info @@ -455,7 +447,6 @@ func (r *TermsEnum) Size(size int) *TermsEnum { // which is Lucene's term byte-length limit of 32766. // API name: string func (r *TermsEnum) String(string string) *TermsEnum { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -465,17 +456,15 @@ func (r *TermsEnum) String(string string) *TermsEnum { return r } -// The maximum length of time to spend collecting results. +// Timeout The maximum length of time to spend collecting results. // If the timeout is exceeded the `complete` flag set to `false` in the response // and the results may be partial or empty. // API name: timeout -func (r *TermsEnum) Timeout(duration types.DurationVariant) *TermsEnum { - // Initialize the request if it is not already initialized +func (r *TermsEnum) Timeout(duration types.Duration) *TermsEnum { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/core/termvectors/request.go b/typedapi/core/termvectors/request.go index 7483dd13fa..b879b98a7c 100644 --- a/typedapi/core/termvectors/request.go +++ b/typedapi/core/termvectors/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package termvectors @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/TermVectorsRequest.ts#L33-L239 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/TermVectorsRequest.ts#L33-L239 type Request struct { // Doc An artificial document (a document not present in the index) for which you diff --git a/typedapi/core/termvectors/response.go b/typedapi/core/termvectors/response.go index 33120f6590..868f5e65c8 100644 --- a/typedapi/core/termvectors/response.go +++ b/typedapi/core/termvectors/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package termvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/TermVectorsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/TermVectorsResponse.ts#L25-L34 type Response struct { Found bool `json:"found"` Id_ *string `json:"_id,omitempty"` diff --git a/typedapi/core/termvectors/termvectors.go b/typedapi/core/termvectors/termvectors.go index e9f03b9a7e..9762b248ff 100644 --- a/typedapi/core/termvectors/termvectors.go +++ b/typedapi/core/termvectors/termvectors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get term vector information. // @@ -508,11 +508,14 @@ func (r *Termvectors) Pretty(pretty bool) *Termvectors { return r } -// An artificial document (a document not present in the index) for which you +// Doc An artificial document (a document not present in the index) for which you // want to retrieve term vectors. // API name: doc +// +// doc should be a json.RawMessage or a structure +// if a structure is provided, the client will defer a json serialization +// prior to sending the payload to Elasticsearch. func (r *Termvectors) Doc(doc any) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -529,10 +532,11 @@ func (r *Termvectors) Doc(doc any) *Termvectors { return nil }) } + return r } -// If `true`, the response includes: +// FieldStatistics If `true`, the response includes: // // * The document count (how many documents contain this field). // * The sum of document frequencies (the sum of document frequencies for all @@ -541,135 +545,104 @@ func (r *Termvectors) Doc(doc any) *Termvectors { // each term in this field). // API name: field_statistics func (r *Termvectors) FieldStatistics(fieldstatistics bool) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FieldStatistics = &fieldstatistics return r } -// A list of fields to include in the statistics. +// Fields A list of fields to include in the statistics. // It is used as the default list unless a specific field list is provided in // the `completion_fields` or `fielddata_fields` parameters. // API name: fields func (r *Termvectors) Fields(fields ...string) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Fields = fields return r } -// Filter terms based on their tf-idf scores. +// Filter Filter terms based on their tf-idf scores. // This could be useful in order find out a good characteristic vector of a // document. // This feature works in a similar manner to the second phase of the More Like // This Query. // API name: filter -func (r *Termvectors) Filter(filter types.TermVectorsFilterVariant) *Termvectors { - // Initialize the request if it is not already initialized +func (r *Termvectors) Filter(filter *types.TermVectorsFilter) *Termvectors { if r.req == nil { r.req = NewRequest() } - r.req.Filter = filter.TermVectorsFilterCaster() + r.req.Filter = filter return r } -// If `true`, the response includes term offsets. +// Offsets If `true`, the response includes term offsets. // API name: offsets func (r *Termvectors) Offsets(offsets bool) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Offsets = &offsets return r } -// If `true`, the response includes term payloads. +// Payloads If `true`, the response includes term payloads. // API name: payloads func (r *Termvectors) Payloads(payloads bool) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Payloads = &payloads return r } -// Override the default per-field analyzer. +// PerFieldAnalyzer Override the default per-field analyzer. // This is useful in order to generate term vectors in any fashion, especially // when using artificial documents. // When providing an analyzer for a field that already stores term vectors, the // term vectors will be regenerated. // API name: per_field_analyzer func (r *Termvectors) PerFieldAnalyzer(perfieldanalyzer map[string]string) *Termvectors { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.PerFieldAnalyzer = perfieldanalyzer - return r -} - -func (r *Termvectors) AddPerFieldAnalyzer(key string, value string) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]string - if r.req.PerFieldAnalyzer == nil { - r.req.PerFieldAnalyzer = make(map[string]string) - } else { - tmp = r.req.PerFieldAnalyzer - } - - tmp[key] = value + r.req.PerFieldAnalyzer = perfieldanalyzer - r.req.PerFieldAnalyzer = tmp return r } -// If `true`, the response includes term positions. +// Positions If `true`, the response includes term positions. // API name: positions func (r *Termvectors) Positions(positions bool) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Positions = &positions return r } -// A custom value that is used to route operations to a specific shard. +// Routing A custom value that is used to route operations to a specific shard. // API name: routing func (r *Termvectors) Routing(routing string) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Routing = &routing return r } -// If `true`, the response includes: +// TermStatistics If `true`, the response includes: // // * The total term frequency (how often a term occurs in all documents). // * The document frequency (the number of documents containing the current @@ -679,36 +652,32 @@ func (r *Termvectors) Routing(routing string) *Termvectors { // serious performance impact. // API name: term_statistics func (r *Termvectors) TermStatistics(termstatistics bool) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TermStatistics = &termstatistics return r } -// If `true`, returns the document version as part of a hit. +// Version If `true`, returns the document version as part of a hit. // API name: version func (r *Termvectors) Version(versionnumber int64) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionnumber return r } -// The version type. +// VersionType The version type. // API name: version_type func (r *Termvectors) VersionType(versiontype versiontype.VersionType) *Termvectors { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.VersionType = &versiontype + return r } diff --git a/typedapi/core/update/request.go b/typedapi/core/update/request.go index db6fe75806..1d4c188e5c 100644 --- a/typedapi/core/update/request.go +++ b/typedapi/core/update/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package update @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/update/UpdateRequest.ts#L38-L194 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/update/UpdateRequest.ts#L38-L194 type Request struct { // DetectNoop If `true`, the `result` in the response is set to `noop` (no operation) when @@ -162,7 +162,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := types.NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/core/update/response.go b/typedapi/core/update/response.go index fc33ed3ed7..c583ee8ea5 100644 --- a/typedapi/core/update/response.go +++ b/typedapi/core/update/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package update @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/update/UpdateResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/update/UpdateResponse.ts#L27-L29 type Response struct { ForcedRefresh *bool `json:"forced_refresh,omitempty"` Get *types.InlineGet `json:"get,omitempty"` diff --git a/typedapi/core/update/update.go b/typedapi/core/update/update.go index f2be12f48c..aaf3353281 100644 --- a/typedapi/core/update/update.go +++ b/typedapi/core/update/update.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a document. // @@ -533,25 +533,26 @@ func (r *Update) Pretty(pretty bool) *Update { return r } -// If `true`, the `result` in the response is set to `noop` (no operation) when +// DetectNoop If `true`, the `result` in the response is set to `noop` (no operation) when // there are no changes to the document. // API name: detect_noop func (r *Update) DetectNoop(detectnoop bool) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.DetectNoop = &detectnoop return r } -// A partial update to an existing document. +// Doc A partial update to an existing document. // If both `doc` and `script` are specified, `doc` is ignored. // API name: doc +// +// doc should be a json.RawMessage or a structure +// if a structure is provided, the client will defer a json serialization +// prior to sending the payload to Elasticsearch. func (r *Update) Doc(doc any) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -568,70 +569,67 @@ func (r *Update) Doc(doc any) *Update { return nil }) } + return r } -// If `true`, use the contents of 'doc' as the value of 'upsert'. +// DocAsUpsert If `true`, use the contents of 'doc' as the value of 'upsert'. // NOTE: Using ingest pipelines with `doc_as_upsert` is not supported. // API name: doc_as_upsert func (r *Update) DocAsUpsert(docasupsert bool) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.DocAsUpsert = &docasupsert return r } -// The script to run to update the document. +// Script The script to run to update the document. // API name: script -func (r *Update) Script(script types.ScriptVariant) *Update { - // Initialize the request if it is not already initialized +func (r *Update) Script(script *types.Script) *Update { if r.req == nil { r.req = NewRequest() } - r.req.Script = script.ScriptCaster() + r.req.Script = script return r } -// If `true`, run the script whether or not the document exists. +// ScriptedUpsert If `true`, run the script whether or not the document exists. // API name: scripted_upsert func (r *Update) ScriptedUpsert(scriptedupsert bool) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScriptedUpsert = &scriptedupsert return r } -// If `false`, turn off source retrieval. +// Source_ If `false`, turn off source retrieval. // You can also specify a comma-separated list of the fields you want to // retrieve. // API name: _source -func (r *Update) Source_(sourceconfig types.SourceConfigVariant) *Update { - // Initialize the request if it is not already initialized +func (r *Update) Source_(sourceconfig types.SourceConfig) *Update { if r.req == nil { r.req = NewRequest() } - - r.req.Source_ = *sourceconfig.SourceConfigCaster() + r.req.Source_ = sourceconfig return r } -// If the document does not already exist, the contents of 'upsert' are inserted +// Upsert If the document does not already exist, the contents of 'upsert' are inserted // as a new document. // If the document exists, the 'script' is run. // API name: upsert +// +// upsert should be a json.RawMessage or a structure +// if a structure is provided, the client will defer a json serialization +// prior to sending the payload to Elasticsearch. func (r *Update) Upsert(upsert any) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -648,5 +646,6 @@ func (r *Update) Upsert(upsert any) *Update { return nil }) } + return r } diff --git a/typedapi/core/updatebyquery/request.go b/typedapi/core/updatebyquery/request.go index 3b01b05051..27013bb669 100644 --- a/typedapi/core/updatebyquery/request.go +++ b/typedapi/core/updatebyquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatebyquery @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L340 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L339 type Request struct { // Conflicts The preferred behavior when update by query hits version conflicts: `abort` diff --git a/typedapi/core/updatebyquery/response.go b/typedapi/core/updatebyquery/response.go index d5e79b1d0b..265d1ced70 100644 --- a/typedapi/core/updatebyquery/response.go +++ b/typedapi/core/updatebyquery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatebyquery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L67 type Response struct { // Batches The number of scroll responses pulled back by the update by query. diff --git a/typedapi/core/updatebyquery/update_by_query.go b/typedapi/core/updatebyquery/update_by_query.go index ece77f5333..ff32093f40 100644 --- a/typedapi/core/updatebyquery/update_by_query.go +++ b/typedapi/core/updatebyquery/update_by_query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update documents. // Updates documents that match the specified query. @@ -647,7 +647,6 @@ func (r *UpdateByQuery) Df(df string) *UpdateByQuery { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // It supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *UpdateByQuery) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *UpdateByQuery { tmp := []string{} @@ -934,22 +933,21 @@ func (r *UpdateByQuery) Pretty(pretty bool) *UpdateByQuery { return r } -// The preferred behavior when update by query hits version conflicts: `abort` +// Conflicts The preferred behavior when update by query hits version conflicts: `abort` // or `proceed`. // API name: conflicts func (r *UpdateByQuery) Conflicts(conflicts conflicts.Conflicts) *UpdateByQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Conflicts = &conflicts + return r } -// The maximum number of documents to update. +// MaxDocs The maximum number of documents to update. // API name: max_docs func (r *UpdateByQuery) MaxDocs(maxdocs int64) *UpdateByQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -959,42 +957,39 @@ func (r *UpdateByQuery) MaxDocs(maxdocs int64) *UpdateByQuery { return r } -// The documents to update using the Query DSL. +// Query The documents to update using the Query DSL. // API name: query -func (r *UpdateByQuery) Query(query types.QueryVariant) *UpdateByQuery { - // Initialize the request if it is not already initialized +func (r *UpdateByQuery) Query(query *types.Query) *UpdateByQuery { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// The script to run to update the document source or metadata when updating. +// Script The script to run to update the document source or metadata when updating. // API name: script -func (r *UpdateByQuery) Script(script types.ScriptVariant) *UpdateByQuery { - // Initialize the request if it is not already initialized +func (r *UpdateByQuery) Script(script *types.Script) *UpdateByQuery { if r.req == nil { r.req = NewRequest() } - r.req.Script = script.ScriptCaster() + r.req.Script = script return r } -// Slice the request manually using the provided slice ID and total number of +// Slice Slice the request manually using the provided slice ID and total number of // slices. // API name: slice -func (r *UpdateByQuery) Slice(slice types.SlicedScrollVariant) *UpdateByQuery { - // Initialize the request if it is not already initialized +func (r *UpdateByQuery) Slice(slice *types.SlicedScroll) *UpdateByQuery { if r.req == nil { r.req = NewRequest() } - r.req.Slice = slice.SlicedScrollCaster() + r.req.Slice = slice return r } diff --git a/typedapi/core/updatebyqueryrethrottle/response.go b/typedapi/core/updatebyqueryrethrottle/response.go index c823ba03c3..a46836e2d4 100644 --- a/typedapi/core/updatebyqueryrethrottle/response.go +++ b/typedapi/core/updatebyqueryrethrottle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatebyqueryrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25 type Response struct { Nodes map[string]types.UpdateByQueryRethrottleNode `json:"nodes"` } diff --git a/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go b/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go index f2234272d6..6a8234188d 100644 --- a/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go +++ b/typedapi/core/updatebyqueryrethrottle/update_by_query_rethrottle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Throttle an update by query operation. // diff --git a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go index db0a688afd..9cd8fd7d16 100644 --- a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go +++ b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a dangling index. // If Elasticsearch encounters index data that is absent from the current diff --git a/typedapi/danglingindices/deletedanglingindex/response.go b/typedapi/danglingindices/deletedanglingindex/response.go index 53fc8db9da..77aa001387 100644 --- a/typedapi/danglingindices/deletedanglingindex/response.go +++ b/typedapi/danglingindices/deletedanglingindex/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletedanglingindex // Response holds the response body struct for the package deletedanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/danglingindices/importdanglingindex/import_dangling_index.go b/typedapi/danglingindices/importdanglingindex/import_dangling_index.go index 05e79fda3f..8e83227f6b 100644 --- a/typedapi/danglingindices/importdanglingindex/import_dangling_index.go +++ b/typedapi/danglingindices/importdanglingindex/import_dangling_index.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Import a dangling index. // diff --git a/typedapi/danglingindices/importdanglingindex/response.go b/typedapi/danglingindices/importdanglingindex/response.go index efefbeb871..74684ac14d 100644 --- a/typedapi/danglingindices/importdanglingindex/response.go +++ b/typedapi/danglingindices/importdanglingindex/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package importdanglingindex // Response holds the response body struct for the package importdanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go b/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go index a71b748276..b748d75069 100644 --- a/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go +++ b/typedapi/danglingindices/listdanglingindices/list_dangling_indices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the dangling indices. // diff --git a/typedapi/danglingindices/listdanglingindices/response.go b/typedapi/danglingindices/listdanglingindices/response.go index f8930329c7..adcb1494ee 100644 --- a/typedapi/danglingindices/listdanglingindices/response.go +++ b/typedapi/danglingindices/listdanglingindices/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package listdanglingindices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listdanglingindices // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27 type Response struct { DanglingIndices []types.DanglingIndex `json:"dangling_indices"` } diff --git a/typedapi/enrich/deletepolicy/delete_policy.go b/typedapi/enrich/deletepolicy/delete_policy.go index c068ccb22e..e39309f6c7 100644 --- a/typedapi/enrich/deletepolicy/delete_policy.go +++ b/typedapi/enrich/deletepolicy/delete_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an enrich policy. // Deletes an existing enrich policy and its enrich index. diff --git a/typedapi/enrich/deletepolicy/response.go b/typedapi/enrich/deletepolicy/response.go index 67d9cac1ac..f89f9d8737 100644 --- a/typedapi/enrich/deletepolicy/response.go +++ b/typedapi/enrich/deletepolicy/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletepolicy // Response holds the response body struct for the package deletepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/enrich/executepolicy/execute_policy.go b/typedapi/enrich/executepolicy/execute_policy.go index f61c0cc8c0..539ade31de 100644 --- a/typedapi/enrich/executepolicy/execute_policy.go +++ b/typedapi/enrich/executepolicy/execute_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run an enrich policy. // Create the enrich index for an existing enrich policy. diff --git a/typedapi/enrich/executepolicy/response.go b/typedapi/enrich/executepolicy/response.go index 2bbb3abcdd..8dc9a24336 100644 --- a/typedapi/enrich/executepolicy/response.go +++ b/typedapi/enrich/executepolicy/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package executepolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package executepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 type Response struct { Status *types.ExecuteEnrichPolicyStatus `json:"status,omitempty"` Task types.TaskId `json:"task,omitempty"` diff --git a/typedapi/enrich/getpolicy/get_policy.go b/typedapi/enrich/getpolicy/get_policy.go index c19bfe79da..b54ce279e0 100644 --- a/typedapi/enrich/getpolicy/get_policy.go +++ b/typedapi/enrich/getpolicy/get_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get an enrich policy. // Returns information about an enrich policy. diff --git a/typedapi/enrich/getpolicy/response.go b/typedapi/enrich/getpolicy/response.go index 3fd2bc330a..a3aab2821a 100644 --- a/typedapi/enrich/getpolicy/response.go +++ b/typedapi/enrich/getpolicy/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getpolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24 type Response struct { Policies []types.Summary `json:"policies"` } diff --git a/typedapi/enrich/putpolicy/put_policy.go b/typedapi/enrich/putpolicy/put_policy.go index 6ac71b6590..d78c90f6af 100644 --- a/typedapi/enrich/putpolicy/put_policy.go +++ b/typedapi/enrich/putpolicy/put_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an enrich policy. // Creates an enrich policy. @@ -367,42 +367,39 @@ func (r *PutPolicy) Pretty(pretty bool) *PutPolicy { return r } -// Matches enrich data to incoming documents based on a `geo_shape` query. +// GeoMatch Matches enrich data to incoming documents based on a `geo_shape` query. // API name: geo_match -func (r *PutPolicy) GeoMatch(geomatch types.EnrichPolicyVariant) *PutPolicy { - // Initialize the request if it is not already initialized +func (r *PutPolicy) GeoMatch(geomatch *types.EnrichPolicy) *PutPolicy { if r.req == nil { r.req = NewRequest() } - r.req.GeoMatch = geomatch.EnrichPolicyCaster() + r.req.GeoMatch = geomatch return r } -// Matches enrich data to incoming documents based on a `term` query. +// Match Matches enrich data to incoming documents based on a `term` query. // API name: match -func (r *PutPolicy) Match(match types.EnrichPolicyVariant) *PutPolicy { - // Initialize the request if it is not already initialized +func (r *PutPolicy) Match(match *types.EnrichPolicy) *PutPolicy { if r.req == nil { r.req = NewRequest() } - r.req.Match = match.EnrichPolicyCaster() + r.req.Match = match return r } -// Matches a number, date, or IP address in incoming documents to a range in the +// Range Matches a number, date, or IP address in incoming documents to a range in the // enrich index based on a `term` query. // API name: range -func (r *PutPolicy) Range(range_ types.EnrichPolicyVariant) *PutPolicy { - // Initialize the request if it is not already initialized +func (r *PutPolicy) Range(range_ *types.EnrichPolicy) *PutPolicy { if r.req == nil { r.req = NewRequest() } - r.req.Range = range_.EnrichPolicyCaster() + r.req.Range = range_ return r } diff --git a/typedapi/enrich/putpolicy/request.go b/typedapi/enrich/putpolicy/request.go index 1abd53e9c9..6102b2af04 100644 --- a/typedapi/enrich/putpolicy/request.go +++ b/typedapi/enrich/putpolicy/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putpolicy @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L25-L67 type Request struct { // GeoMatch Matches enrich data to incoming documents based on a `geo_shape` query. diff --git a/typedapi/enrich/putpolicy/response.go b/typedapi/enrich/putpolicy/response.go index 5a43542567..2f009c6a66 100644 --- a/typedapi/enrich/putpolicy/response.go +++ b/typedapi/enrich/putpolicy/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putpolicy // Response holds the response body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/enrich/stats/response.go b/typedapi/enrich/stats/response.go index 0edfde5265..57f96c40b3 100644 --- a/typedapi/enrich/stats/response.go +++ b/typedapi/enrich/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/stats/EnrichStatsResponse.ts#L22-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/stats/EnrichStatsResponse.ts#L22-L39 type Response struct { // CacheStats Objects containing information about the enrich cache stats on each ingest diff --git a/typedapi/enrich/stats/stats.go b/typedapi/enrich/stats/stats.go index 80a1c70a10..07823f1b8a 100644 --- a/typedapi/enrich/stats/stats.go +++ b/typedapi/enrich/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get enrich stats. // Returns enrich coordinator statistics and information about enrich policies diff --git a/typedapi/eql/delete/delete.go b/typedapi/eql/delete/delete.go index 16ff29efdf..440bd661c7 100644 --- a/typedapi/eql/delete/delete.go +++ b/typedapi/eql/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an async EQL search. // Delete an async EQL search or a stored synchronous EQL search. diff --git a/typedapi/eql/delete/response.go b/typedapi/eql/delete/response.go index 2d507514eb..ba9a4ed0ae 100644 --- a/typedapi/eql/delete/response.go +++ b/typedapi/eql/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/delete/EqlDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/delete/EqlDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/eql/get/get.go b/typedapi/eql/get/get.go index c52f0ecea6..213f6b27c4 100644 --- a/typedapi/eql/get/get.go +++ b/typedapi/eql/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get async EQL search results. // Get the current status and available results for an async EQL search or a diff --git a/typedapi/eql/get/response.go b/typedapi/eql/get/response.go index 4ace326741..2de8a92281 100644 --- a/typedapi/eql/get/response.go +++ b/typedapi/eql/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/get/EqlGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/get/EqlGetResponse.ts#L22-L24 type Response struct { // Hits Contains matching events and sequences. Also contains related metadata. diff --git a/typedapi/eql/getstatus/get_status.go b/typedapi/eql/getstatus/get_status.go index 6952f03890..e99d34e108 100644 --- a/typedapi/eql/getstatus/get_status.go +++ b/typedapi/eql/getstatus/get_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the async EQL status. // Get the current status for an async EQL search or a stored synchronous EQL diff --git a/typedapi/eql/getstatus/response.go b/typedapi/eql/getstatus/response.go index 7b4945fb76..0f6da3d33f 100644 --- a/typedapi/eql/getstatus/response.go +++ b/typedapi/eql/getstatus/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getstatus // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/get_status/EqlGetStatusResponse.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/get_status/EqlGetStatusResponse.ts#L24-L51 type Response struct { // CompletionStatus For a completed search shows the http status code of the completed search. diff --git a/typedapi/eql/search/request.go b/typedapi/eql/search/request.go index 9f76454786..90de84b708 100644 --- a/typedapi/eql/search/request.go +++ b/typedapi/eql/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/search/EqlSearchRequest.ts#L28-L161 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/search/EqlSearchRequest.ts#L28-L166 type Request struct { // AllowPartialSearchResults Allow query execution also in case of shard failures. diff --git a/typedapi/eql/search/response.go b/typedapi/eql/search/response.go index 3439601650..93db41600a 100644 --- a/typedapi/eql/search/response.go +++ b/typedapi/eql/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/search/EqlSearchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/search/EqlSearchResponse.ts#L22-L24 type Response struct { // Hits Contains matching events and sequences. Also contains related metadata. diff --git a/typedapi/eql/search/search.go b/typedapi/eql/search/search.go index 0f88d475fb..52825b838b 100644 --- a/typedapi/eql/search/search.go +++ b/typedapi/eql/search/search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get EQL search results. // Returns search results for an Event Query Language (EQL) query. @@ -319,6 +319,8 @@ func (r *Search) _index(index string) *Search { return r } +// AllowNoIndices Whether to ignore if a wildcard indices expression resolves into no concrete +// indices. (This includes `_all` string or when no indices have been specified) // API name: allow_no_indices func (r *Search) AllowNoIndices(allownoindices bool) *Search { r.values.Set("allow_no_indices", strconv.FormatBool(allownoindices)) @@ -326,6 +328,8 @@ func (r *Search) AllowNoIndices(allownoindices bool) *Search { return r } +// ExpandWildcards Whether to expand wildcard expression to concrete indices that are open, +// closed or both. // API name: expand_wildcards func (r *Search) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Search { tmp := []string{} @@ -337,6 +341,15 @@ func (r *Search) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcar return r } +// CcsMinimizeRoundtrips Indicates whether network round-trips should be minimized as part of +// cross-cluster search requests execution +// API name: ccs_minimize_roundtrips +func (r *Search) CcsMinimizeRoundtrips(ccsminimizeroundtrips bool) *Search { + r.values.Set("ccs_minimize_roundtrips", strconv.FormatBool(ccsminimizeroundtrips)) + + return r +} + // IgnoreUnavailable If true, missing or closed indices are not included in the response. // API name: ignore_unavailable func (r *Search) IgnoreUnavailable(ignoreunavailable bool) *Search { @@ -389,24 +402,22 @@ func (r *Search) Pretty(pretty bool) *Search { return r } -// Allow query execution also in case of shard failures. +// AllowPartialSearchResults Allow query execution also in case of shard failures. // If true, the query will keep running and will return results based on the // available shards. // For sequences, the behavior can be further refined using // allow_partial_sequence_results // API name: allow_partial_search_results func (r *Search) AllowPartialSearchResults(allowpartialsearchresults bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowPartialSearchResults = &allowpartialsearchresults return r } -// This flag applies only to sequences and has effect only if +// AllowPartialSequenceResults This flag applies only to sequences and has effect only if // allow_partial_search_results=true. // If true, the sequence query will return results based on the available // shards, ignoring the others. @@ -414,11 +425,9 @@ func (r *Search) AllowPartialSearchResults(allowpartialsearchresults bool) *Sear // empty results. // API name: allow_partial_sequence_results func (r *Search) AllowPartialSequenceResults(allowpartialsequenceresults bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowPartialSequenceResults = &allowpartialsequenceresults return r @@ -426,33 +435,28 @@ func (r *Search) AllowPartialSequenceResults(allowpartialsequenceresults bool) * // API name: case_sensitive func (r *Search) CaseSensitive(casesensitive bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.CaseSensitive = &casesensitive return r } -// Field containing the event classification, such as process, file, or network. +// EventCategoryField Field containing the event classification, such as process, file, or network. // API name: event_category_field func (r *Search) EventCategoryField(field string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.EventCategoryField = &field return r } -// Maximum number of events to search at a time for sequence queries. +// FetchSize Maximum number of events to search at a time for sequence queries. // API name: fetch_size func (r *Search) FetchSize(fetchsize uint) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -462,83 +466,68 @@ func (r *Search) FetchSize(fetchsize uint) *Search { return r } -// Array of wildcard (*) patterns. The response returns values for field names +// Fields Array of wildcard (*) patterns. The response returns values for field names // matching these patterns in the fields property of each hit. // API name: fields -func (r *Search) Fields(fields ...types.FieldAndFormatVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Fields(fields ...types.FieldAndFormat) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Fields = make([]types.FieldAndFormat, len(fields)) - for i, v := range fields { - r.req.Fields[i] = *v.FieldAndFormatCaster() - } + r.req.Fields = fields return r } -// Query, written in Query DSL, used to filter the events on which the EQL query +// Filter Query, written in Query DSL, used to filter the events on which the EQL query // runs. // API name: filter -func (r *Search) Filter(filters ...types.QueryVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Filter(filters ...types.Query) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Filter = make([]types.Query, len(filters)) - for i, v := range filters { - r.req.Filter[i] = *v.QueryCaster() - } + r.req.Filter = filters return r } // API name: keep_alive -func (r *Search) KeepAlive(duration types.DurationVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) KeepAlive(duration types.Duration) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.KeepAlive = *duration.DurationCaster() + r.req.KeepAlive = duration return r } // API name: keep_on_completion func (r *Search) KeepOnCompletion(keeponcompletion bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.KeepOnCompletion = &keeponcompletion return r } -// By default, the response of a sample query contains up to `10` samples, with +// MaxSamplesPerKey By default, the response of a sample query contains up to `10` samples, with // one sample per unique set of join keys. Use the `size` // parameter to get a smaller or larger set of samples. To retrieve more than // one sample per set of join keys, use the // `max_samples_per_key` parameter. Pipes are not supported for sample queries. // API name: max_samples_per_key func (r *Search) MaxSamplesPerKey(maxsamplesperkey int) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxSamplesPerKey = &maxsamplesperkey return r } -// EQL query you wish to run. +// Query EQL query you wish to run. // API name: query func (r *Search) Query(query string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -550,31 +539,28 @@ func (r *Search) Query(query string) *Search { // API name: result_position func (r *Search) ResultPosition(resultposition resultposition.ResultPosition) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.ResultPosition = &resultposition + return r } // API name: runtime_mappings -func (r *Search) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) RuntimeMappings(runtimefields types.RuntimeFields) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// For basic queries, the maximum number of matching events to return. Defaults +// Size For basic queries, the maximum number of matching events to return. Defaults // to 10 // API name: size func (r *Search) Size(size uint) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -584,40 +570,34 @@ func (r *Search) Size(size uint) *Search { return r } -// Field used to sort hits with the same timestamp in ascending order +// TiebreakerField Field used to sort hits with the same timestamp in ascending order // API name: tiebreaker_field func (r *Search) TiebreakerField(field string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TiebreakerField = &field return r } -// Field containing event timestamp. Default "@timestamp" +// TimestampField Field containing event timestamp. Default "@timestamp" // API name: timestamp_field func (r *Search) TimestampField(field string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TimestampField = &field return r } // API name: wait_for_completion_timeout -func (r *Search) WaitForCompletionTimeout(duration types.DurationVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) WaitForCompletionTimeout(duration types.Duration) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.WaitForCompletionTimeout = *duration.DurationCaster() + r.req.WaitForCompletionTimeout = duration return r } diff --git a/typedapi/esql/asyncquery/async_query.go b/typedapi/esql/asyncquery/async_query.go index 68564c8436..61853c60d0 100644 --- a/typedapi/esql/asyncquery/async_query.go +++ b/typedapi/esql/asyncquery/async_query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run an async ES|QL query. // Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its @@ -303,6 +303,10 @@ func (r *AsyncQuery) Header(key, value string) *AsyncQuery { // AllowPartialResults If `true`, partial results will be returned if there are shard failures, but // the query can continue to execute on other clusters and shards. +// If `false`, the query will fail if there are any failures. +// +// To override the default behavior, you can set the +// `esql.query.allow_partial_results` cluster setting to `false`. // API name: allow_partial_results func (r *AsyncQuery) AllowPartialResults(allowpartialresults bool) *AsyncQuery { r.values.Set("allow_partial_results", strconv.FormatBool(allowpartialresults)) @@ -330,7 +334,16 @@ func (r *AsyncQuery) DropNullColumns(dropnullcolumns bool) *AsyncQuery { return r } -// Format A short version of the Accept header, for example `json` or `yaml`. +// Format A short version of the Accept header, e.g. json, yaml. +// +// `csv`, `tsv`, and `txt` formats will return results in a tabular format, +// excluding other metadata fields from the response. +// +// For async requests, nothing will be returned if the async query doesn't +// finish within the timeout. +// The query ID and running status are available in the +// `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP +// headers of the response, respectively. // API name: format func (r *AsyncQuery) Format(format esqlformat.EsqlFormat) *AsyncQuery { r.values.Set("format", format.String()) @@ -338,31 +351,6 @@ func (r *AsyncQuery) Format(format esqlformat.EsqlFormat) *AsyncQuery { return r } -// KeepAlive The period for which the query and its results are stored in the cluster. -// The default period is five days. -// When this period expires, the query and its results are deleted, even if the -// query is still ongoing. -// If the `keep_on_completion` parameter is false, Elasticsearch only stores -// async queries that do not complete within the period set by the -// `wait_for_completion_timeout` parameter, regardless of this value. -// API name: keep_alive -func (r *AsyncQuery) KeepAlive(duration string) *AsyncQuery { - r.values.Set("keep_alive", duration) - - return r -} - -// KeepOnCompletion Indicates whether the query and its results are stored in the cluster. -// If false, the query and its results are stored in the cluster only if the -// request does not complete during the period set by the -// `wait_for_completion_timeout` parameter. -// API name: keep_on_completion -func (r *AsyncQuery) KeepOnCompletion(keeponcompletion bool) *AsyncQuery { - r.values.Set("keep_on_completion", strconv.FormatBool(keeponcompletion)) - - return r -} - // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -407,56 +395,81 @@ func (r *AsyncQuery) Pretty(pretty bool) *AsyncQuery { return r } -// By default, ES|QL returns results as rows. For example, FROM returns each +// Columnar By default, ES|QL returns results as rows. For example, FROM returns each // individual document as one row. For the JSON, YAML, CBOR and smile formats, // ES|QL can return the results in a columnar fashion where one row represents // all the values of a certain column in the results. // API name: columnar func (r *AsyncQuery) Columnar(columnar bool) *AsyncQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Columnar = &columnar return r } -// Specify a Query DSL query in the filter parameter to filter the set of +// Filter Specify a Query DSL query in the filter parameter to filter the set of // documents that an ES|QL query runs on. // API name: filter -func (r *AsyncQuery) Filter(filter types.QueryVariant) *AsyncQuery { - // Initialize the request if it is not already initialized +func (r *AsyncQuery) Filter(filter *types.Query) *AsyncQuery { if r.req == nil { r.req = NewRequest() } - r.req.Filter = filter.QueryCaster() + r.req.Filter = filter return r } -// When set to `true` and performing a cross-cluster query, the response will +// IncludeCcsMetadata When set to `true` and performing a cross-cluster query, the response will // include an extra `_clusters` // object with information about the clusters that participated in the search // along with info such as shards // count. // API name: include_ccs_metadata func (r *AsyncQuery) IncludeCcsMetadata(includeccsmetadata bool) *AsyncQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IncludeCcsMetadata = &includeccsmetadata return r } +// KeepAlive The period for which the query and its results are stored in the cluster. +// The default period is five days. +// When this period expires, the query and its results are deleted, even if the +// query is still ongoing. +// If the `keep_on_completion` parameter is false, Elasticsearch only stores +// async queries that do not complete within the period set by the +// `wait_for_completion_timeout` parameter, regardless of this value. +// API name: keep_alive +func (r *AsyncQuery) KeepAlive(duration types.Duration) *AsyncQuery { + if r.req == nil { + r.req = NewRequest() + } + r.req.KeepAlive = duration + + return r +} + +// KeepOnCompletion Indicates whether the query and its results are stored in the cluster. +// If false, the query and its results are stored in the cluster only if the +// request does not complete during the period set by the +// `wait_for_completion_timeout` parameter. +// API name: keep_on_completion +func (r *AsyncQuery) KeepOnCompletion(keeponcompletion bool) *AsyncQuery { + if r.req == nil { + r.req = NewRequest() + } + r.req.KeepOnCompletion = &keeponcompletion + + return r +} + // API name: locale func (r *AsyncQuery) Locale(locale string) *AsyncQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -466,24 +479,20 @@ func (r *AsyncQuery) Locale(locale string) *AsyncQuery { return r } -// To avoid any attempts of hacking or code injection, extract the values in a +// Params To avoid any attempts of hacking or code injection, extract the values in a // separate list of parameters. Use question mark placeholders (?) in the query // string for each of the parameters. // API name: params -func (r *AsyncQuery) Params(params ...types.FieldValueVariant) *AsyncQuery { - // Initialize the request if it is not already initialized +func (r *AsyncQuery) Params(params ...types.FieldValue) *AsyncQuery { if r.req == nil { r.req = NewRequest() } - for _, v := range params { - - r.req.Params = append(r.req.Params, *v.FieldValueCaster()) + r.req.Params = params - } return r } -// If provided and `true` the response will include an extra `profile` object +// Profile If provided and `true` the response will include an extra `profile` object // with information on how the query was executed. This information is for human // debugging // and its format can change at any time but it can give some insight into the @@ -491,21 +500,18 @@ func (r *AsyncQuery) Params(params ...types.FieldValueVariant) *AsyncQuery { // of each part of the query. // API name: profile func (r *AsyncQuery) Profile(profile bool) *AsyncQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Profile = &profile return r } -// The ES|QL query API accepts an ES|QL query string in the query parameter, +// Query The ES|QL query API accepts an ES|QL query string in the query parameter, // runs it, and returns the results. // API name: query func (r *AsyncQuery) Query(query string) *AsyncQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -515,31 +521,30 @@ func (r *AsyncQuery) Query(query string) *AsyncQuery { return r } -// Tables to use with the LOOKUP operation. The top level key is the table +// Tables Tables to use with the LOOKUP operation. The top level key is the table // name and the next level key is the column name. // API name: tables func (r *AsyncQuery) Tables(tables map[string]map[string]types.TableValuesContainer) *AsyncQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } + r.req.Tables = tables + return r } -// The period to wait for the request to finish. +// WaitForCompletionTimeout The period to wait for the request to finish. // By default, the request waits for 1 second for the query results. // If the query completes during this period, results are returned // Otherwise, a query ID is returned that can later be used to retrieve the // results. // API name: wait_for_completion_timeout -func (r *AsyncQuery) WaitForCompletionTimeout(duration types.DurationVariant) *AsyncQuery { - // Initialize the request if it is not already initialized +func (r *AsyncQuery) WaitForCompletionTimeout(duration types.Duration) *AsyncQuery { if r.req == nil { r.req = NewRequest() } - - r.req.WaitForCompletionTimeout = *duration.DurationCaster() + r.req.WaitForCompletionTimeout = duration return r } diff --git a/typedapi/esql/asyncquery/request.go b/typedapi/esql/asyncquery/request.go index 5657c238ac..d1e1da9a1a 100644 --- a/typedapi/esql/asyncquery/request.go +++ b/typedapi/esql/asyncquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package asyncquery @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package asyncquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/async_query/AsyncQueryRequest.ts#L28-L138 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/async_query/AsyncQueryRequest.ts#L28-L138 type Request struct { // Columnar By default, ES|QL returns results as rows. For example, FROM returns each @@ -49,8 +49,21 @@ type Request struct { // object with information about the clusters that participated in the search // along with info such as shards // count. - IncludeCcsMetadata *bool `json:"include_ccs_metadata,omitempty"` - Locale *string `json:"locale,omitempty"` + IncludeCcsMetadata *bool `json:"include_ccs_metadata,omitempty"` + // KeepAlive The period for which the query and its results are stored in the cluster. + // The default period is five days. + // When this period expires, the query and its results are deleted, even if the + // query is still ongoing. + // If the `keep_on_completion` parameter is false, Elasticsearch only stores + // async queries that do not complete within the period set by the + // `wait_for_completion_timeout` parameter, regardless of this value. + KeepAlive types.Duration `json:"keep_alive,omitempty"` + // KeepOnCompletion Indicates whether the query and its results are stored in the cluster. + // If false, the query and its results are stored in the cluster only if the + // request does not complete during the period set by the + // `wait_for_completion_timeout` parameter. + KeepOnCompletion *bool `json:"keep_on_completion,omitempty"` + Locale *string `json:"locale,omitempty"` // Params To avoid any attempts of hacking or code injection, extract the values in a // separate list of parameters. Use question mark placeholders (?) in the query // string for each of the parameters. @@ -144,6 +157,25 @@ func (s *Request) UnmarshalJSON(data []byte) error { s.IncludeCcsMetadata = &v } + case "keep_alive": + if err := dec.Decode(&s.KeepAlive); err != nil { + return fmt.Errorf("%s | %w", "KeepAlive", err) + } + + case "keep_on_completion": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "KeepOnCompletion", err) + } + s.KeepOnCompletion = &value + case bool: + s.KeepOnCompletion = &v + } + case "locale": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/esql/asyncquerydelete/async_query_delete.go b/typedapi/esql/asyncquerydelete/async_query_delete.go index a1298278a2..d1bcd7d66e 100644 --- a/typedapi/esql/asyncquerydelete/async_query_delete.go +++ b/typedapi/esql/asyncquerydelete/async_query_delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an async ES|QL query. // If the query is still running, it is cancelled. diff --git a/typedapi/esql/asyncquerydelete/response.go b/typedapi/esql/asyncquerydelete/response.go index 8188c10c12..414219d7ec 100644 --- a/typedapi/esql/asyncquerydelete/response.go +++ b/typedapi/esql/asyncquerydelete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package asyncquerydelete // Response holds the response body struct for the package asyncquerydelete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/async_query_delete/AsyncQueryDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/async_query_delete/AsyncQueryDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/esql/asyncqueryget/async_query_get.go b/typedapi/esql/asyncqueryget/async_query_get.go index 9374a58af7..2b926948dd 100644 --- a/typedapi/esql/asyncqueryget/async_query_get.go +++ b/typedapi/esql/asyncqueryget/async_query_get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get async ES|QL query results. // Get the current status and available results or stored results for an ES|QL @@ -38,6 +38,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/esqlformat" ) const ( @@ -322,6 +323,14 @@ func (r *AsyncQueryGet) DropNullColumns(dropnullcolumns bool) *AsyncQueryGet { return r } +// Format A short version of the Accept header, for example `json` or `yaml`. +// API name: format +func (r *AsyncQueryGet) Format(format esqlformat.EsqlFormat) *AsyncQueryGet { + r.values.Set("format", format.String()) + + return r +} + // KeepAlive The period for which the query and its results are stored in the cluster. // When this period expires, the query and its results are deleted, even if the // query is still ongoing. diff --git a/typedapi/esql/asyncquerystop/async_query_stop.go b/typedapi/esql/asyncquerystop/async_query_stop.go index 9a13195690..93080f8351 100644 --- a/typedapi/esql/asyncquerystop/async_query_stop.go +++ b/typedapi/esql/asyncquerystop/async_query_stop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop async ES|QL query. // diff --git a/typedapi/esql/query/query.go b/typedapi/esql/query/query.go index b392761885..3e7b5a866f 100644 --- a/typedapi/esql/query/query.go +++ b/typedapi/esql/query/query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run an ES|QL query. // Get search results for an ES|QL (Elasticsearch query language) query. @@ -292,6 +292,9 @@ func (r *Query) Header(key, value string) *Query { } // Format A short version of the Accept header, e.g. json, yaml. +// +// `csv`, `tsv`, and `txt` formats will return results in a tabular format, +// excluding other metadata fields from the response. // API name: format func (r *Query) Format(format esqlformat.EsqlFormat) *Query { r.values.Set("format", format.String()) @@ -321,6 +324,10 @@ func (r *Query) DropNullColumns(dropnullcolumns bool) *Query { // AllowPartialResults If `true`, partial results will be returned if there are shard failures, but // the query can continue to execute on other clusters and shards. +// If `false`, the query will fail if there are any failures. +// +// To override the default behavior, you can set the +// `esql.query.allow_partial_results` cluster setting to `false`. // API name: allow_partial_results func (r *Query) AllowPartialResults(allowpartialresults bool) *Query { r.values.Set("allow_partial_results", strconv.FormatBool(allowpartialresults)) @@ -372,48 +379,43 @@ func (r *Query) Pretty(pretty bool) *Query { return r } -// By default, ES|QL returns results as rows. For example, FROM returns each +// Columnar By default, ES|QL returns results as rows. For example, FROM returns each // individual document as one row. For the JSON, YAML, CBOR and smile formats, // ES|QL can return the results in a columnar fashion where one row represents // all the values of a certain column in the results. // API name: columnar func (r *Query) Columnar(columnar bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Columnar = &columnar return r } -// Specify a Query DSL query in the filter parameter to filter the set of +// Filter Specify a Query DSL query in the filter parameter to filter the set of // documents that an ES|QL query runs on. // API name: filter -func (r *Query) Filter(filter types.QueryVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) Filter(filter *types.Query) *Query { if r.req == nil { r.req = NewRequest() } - r.req.Filter = filter.QueryCaster() + r.req.Filter = filter return r } -// When set to `true` and performing a cross-cluster query, the response will +// IncludeCcsMetadata When set to `true` and performing a cross-cluster query, the response will // include an extra `_clusters` // object with information about the clusters that participated in the search // along with info such as shards // count. // API name: include_ccs_metadata func (r *Query) IncludeCcsMetadata(includeccsmetadata bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IncludeCcsMetadata = &includeccsmetadata return r @@ -421,7 +423,6 @@ func (r *Query) IncludeCcsMetadata(includeccsmetadata bool) *Query { // API name: locale func (r *Query) Locale(locale string) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -431,24 +432,20 @@ func (r *Query) Locale(locale string) *Query { return r } -// To avoid any attempts of hacking or code injection, extract the values in a +// Params To avoid any attempts of hacking or code injection, extract the values in a // separate list of parameters. Use question mark placeholders (?) in the query // string for each of the parameters. // API name: params -func (r *Query) Params(params ...types.FieldValueVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) Params(params ...types.FieldValue) *Query { if r.req == nil { r.req = NewRequest() } - for _, v := range params { - - r.req.Params = append(r.req.Params, *v.FieldValueCaster()) + r.req.Params = params - } return r } -// If provided and `true` the response will include an extra `profile` object +// Profile If provided and `true` the response will include an extra `profile` object // with information on how the query was executed. This information is for human // debugging // and its format can change at any time but it can give some insight into the @@ -456,21 +453,18 @@ func (r *Query) Params(params ...types.FieldValueVariant) *Query { // of each part of the query. // API name: profile func (r *Query) Profile(profile bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Profile = &profile return r } -// The ES|QL query API accepts an ES|QL query string in the query parameter, +// Query The ES|QL query API accepts an ES|QL query string in the query parameter, // runs it, and returns the results. // API name: query func (r *Query) Query(query string) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -480,14 +474,15 @@ func (r *Query) Query(query string) *Query { return r } -// Tables to use with the LOOKUP operation. The top level key is the table +// Tables Tables to use with the LOOKUP operation. The top level key is the table // name and the next level key is the column name. // API name: tables func (r *Query) Tables(tables map[string]map[string]types.TableValuesContainer) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } + r.req.Tables = tables + return r } diff --git a/typedapi/esql/query/request.go b/typedapi/esql/query/request.go index ea2327d6de..7462402540 100644 --- a/typedapi/esql/query/request.go +++ b/typedapi/esql/query/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package query @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/query/QueryRequest.ts#L27-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/query/QueryRequest.ts#L27-L115 type Request struct { // Columnar By default, ES|QL returns results as rows. For example, FROM returns each diff --git a/typedapi/features/getfeatures/get_features.go b/typedapi/features/getfeatures/get_features.go index c0bb793e38..d07ee64769 100644 --- a/typedapi/features/getfeatures/get_features.go +++ b/typedapi/features/getfeatures/get_features.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the features. // Get a list of features that can be included in snapshots using the diff --git a/typedapi/features/getfeatures/response.go b/typedapi/features/getfeatures/response.go index 2cce7b8bf0..9a04663cf1 100644 --- a/typedapi/features/getfeatures/response.go +++ b/typedapi/features/getfeatures/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/features/get_features/GetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/features/get_features/GetFeaturesResponse.ts#L22-L26 type Response struct { Features []types.Feature `json:"features"` } diff --git a/typedapi/features/resetfeatures/reset_features.go b/typedapi/features/resetfeatures/reset_features.go index 3a16b9d21e..a5450a6e76 100644 --- a/typedapi/features/resetfeatures/reset_features.go +++ b/typedapi/features/resetfeatures/reset_features.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reset the features. // Clear all of the state information stored in system indices by Elasticsearch diff --git a/typedapi/features/resetfeatures/response.go b/typedapi/features/resetfeatures/response.go index 7a5338feae..41b0f4e55d 100644 --- a/typedapi/features/resetfeatures/response.go +++ b/typedapi/features/resetfeatures/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resetfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resetfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/features/reset_features/ResetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/features/reset_features/ResetFeaturesResponse.ts#L22-L26 type Response struct { Features []types.Feature `json:"features"` } diff --git a/typedapi/fleet/globalcheckpoints/global_checkpoints.go b/typedapi/fleet/globalcheckpoints/global_checkpoints.go index 3970d9bd9d..f5bc48fedf 100644 --- a/typedapi/fleet/globalcheckpoints/global_checkpoints.go +++ b/typedapi/fleet/globalcheckpoints/global_checkpoints.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get global checkpoints. // diff --git a/typedapi/fleet/globalcheckpoints/response.go b/typedapi/fleet/globalcheckpoints/response.go index 7e7d143b15..3ccad0fb08 100644 --- a/typedapi/fleet/globalcheckpoints/response.go +++ b/typedapi/fleet/globalcheckpoints/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package globalcheckpoints // Response holds the response body struct for the package globalcheckpoints // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27 type Response struct { GlobalCheckpoints []int64 `json:"global_checkpoints"` TimedOut bool `json:"timed_out"` diff --git a/typedapi/fleet/msearch/msearch.go b/typedapi/fleet/msearch/msearch.go index 9f7ba8fd37..39b14fa3eb 100644 --- a/typedapi/fleet/msearch/msearch.go +++ b/typedapi/fleet/msearch/msearch.go @@ -16,15 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 - -// Executes several [fleet -// searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) -// with a single API request. -// The API follows the same structure as the [multi -// search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) -// API. However, similar to the fleet search API, it -// supports the wait_for_checkpoints parameter. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Executes several fleet searches with a single API request. +// +// The API follows the same structure as the multi search (`_msearch`) API. +// However, similar to the fleet search API, it supports the +// `wait_for_checkpoints` parameter. package msearch import ( @@ -87,13 +85,11 @@ func NewMsearchFunc(tp elastictransport.Interface) NewMsearch { } } -// Executes several [fleet -// searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) -// with a single API request. -// The API follows the same structure as the [multi -// search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) -// API. However, similar to the fleet search API, it -// supports the wait_for_checkpoints parameter. +// Executes several fleet searches with a single API request. +// +// The API follows the same structure as the multi search (`_msearch`) API. +// However, similar to the fleet search API, it supports the +// `wait_for_checkpoints` parameter. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-multi-search.html func New(tp elastictransport.Interface) *Msearch { @@ -464,13 +460,11 @@ func (r *Msearch) WaitForCheckpoints(waitforcheckpoints ...int64) *Msearch { return r } -// AllowPartialSearchResults If true, returns partial results if there are shard request timeouts or -// [shard -// failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). -// If false, returns -// an error with no partial results. Defaults to the configured cluster setting -// `search.default_allow_partial_results` -// which is true by default. +// AllowPartialSearchResults If true, returns partial results if there are shard request timeouts or shard +// failures. +// If false, returns an error with no partial results. +// Defaults to the configured cluster setting +// `search.default_allow_partial_results` which is true by default. // API name: allow_partial_search_results func (r *Msearch) AllowPartialSearchResults(allowpartialsearchresults bool) *Msearch { r.values.Set("allow_partial_search_results", strconv.FormatBool(allowpartialsearchresults)) diff --git a/typedapi/fleet/msearch/request.go b/typedapi/fleet/msearch/request.go index 2f3270c1b3..d533d85014 100644 --- a/typedapi/fleet/msearch/request.go +++ b/typedapi/fleet/msearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/fleet/msearch/MultiSearchRequest.ts#L31-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/fleet/msearch/MultiSearchRequest.ts#L31-L128 type Request = []types.MsearchRequestItem diff --git a/typedapi/fleet/msearch/response.go b/typedapi/fleet/msearch/response.go index 671b5bc4af..0aad874b13 100644 --- a/typedapi/fleet/msearch/response.go +++ b/typedapi/fleet/msearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package msearch @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/fleet/msearch/MultiSearchResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/fleet/msearch/MultiSearchResponse.ts#L25-L29 type Response struct { Docs []types.MsearchResponseItem `json:"docs"` } diff --git a/typedapi/fleet/postsecret/post_secret.go b/typedapi/fleet/postsecret/post_secret.go index 502e7ba95e..9a86138eae 100644 --- a/typedapi/fleet/postsecret/post_secret.go +++ b/typedapi/fleet/postsecret/post_secret.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Creates a secret stored by Fleet. package postsecret diff --git a/typedapi/fleet/search/request.go b/typedapi/fleet/search/request.go index 27bbcb9ccd..cc63805dce 100644 --- a/typedapi/fleet/search/request.go +++ b/typedapi/fleet/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/fleet/search/SearchRequest.ts#L55-L267 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/fleet/search/SearchRequest.ts#L55-L268 type Request struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Collapse *types.FieldCollapse `json:"collapse,omitempty"` @@ -378,7 +378,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := types.NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/fleet/search/response.go b/typedapi/fleet/search/response.go index 7076c1055e..da4fbb1822 100644 --- a/typedapi/fleet/search/response.go +++ b/typedapi/fleet/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/fleet/search/SearchResponse.ts#L33-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/fleet/search/SearchResponse.ts#L33-L50 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` diff --git a/typedapi/fleet/search/search.go b/typedapi/fleet/search/search.go index e1de7d3123..8b030a7449 100644 --- a/typedapi/fleet/search/search.go +++ b/typedapi/fleet/search/search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // The purpose of the fleet search api is to provide a search api where the // search will only be executed @@ -544,10 +544,8 @@ func (r *Search) WaitForCheckpoints(waitforcheckpoints ...int64) *Search { return r } -// AllowPartialSearchResults If true, returns partial results if there are shard request timeouts or -// [shard -// failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). -// If false, returns +// AllowPartialSearchResults If true, returns partial results if there are shard request timeouts or shard +// failures. If false, returns // an error with no partial results. Defaults to the configured cluster setting // `search.default_allow_partial_results` // which is true by default. @@ -604,167 +602,114 @@ func (r *Search) Pretty(pretty bool) *Search { // API name: aggregations func (r *Search) Aggregations(aggregations map[string]types.Aggregations) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Aggregations = aggregations - return r -} - -func (r *Search) AddAggregation(key string, value types.AggregationsVariant) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.Aggregations - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggregations - } - - tmp[key] = *value.AggregationsCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } // API name: collapse -func (r *Search) Collapse(collapse types.FieldCollapseVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Collapse(collapse *types.FieldCollapse) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Collapse = collapse.FieldCollapseCaster() + r.req.Collapse = collapse return r } -// Array of wildcard (*) patterns. The request returns doc values for field +// DocvalueFields Array of wildcard (*) patterns. The request returns doc values for field // names matching these patterns in the hits.fields property of the response. // API name: docvalue_fields -func (r *Search) DocvalueFields(docvaluefields ...types.FieldAndFormatVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) DocvalueFields(docvaluefields ...types.FieldAndFormat) *Search { if r.req == nil { r.req = NewRequest() } - for _, v := range docvaluefields { + r.req.DocvalueFields = docvaluefields - r.req.DocvalueFields = append(r.req.DocvalueFields, *v.FieldAndFormatCaster()) - - } return r } -// If true, returns detailed information about score computation as part of a +// Explain If true, returns detailed information about score computation as part of a // hit. // API name: explain func (r *Search) Explain(explain bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Explain = &explain return r } -// Configuration of search extensions defined by Elasticsearch plugins. +// Ext Configuration of search extensions defined by Elasticsearch plugins. // API name: ext func (r *Search) Ext(ext map[string]json.RawMessage) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Ext = ext - return r -} - -func (r *Search) AddExt(key string, value json.RawMessage) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Ext == nil { - r.req.Ext = make(map[string]json.RawMessage) - } else { - tmp = r.req.Ext - } - - tmp[key] = value + r.req.Ext = ext - r.req.Ext = tmp return r } -// Array of wildcard (*) patterns. The request returns values for field names +// Fields Array of wildcard (*) patterns. The request returns values for field names // matching these patterns in the hits.fields property of the response. // API name: fields -func (r *Search) Fields(fields ...types.FieldAndFormatVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Fields(fields ...types.FieldAndFormat) *Search { if r.req == nil { r.req = NewRequest() } - for _, v := range fields { + r.req.Fields = fields - r.req.Fields = append(r.req.Fields, *v.FieldAndFormatCaster()) - - } return r } -// Starting document offset. By default, you cannot page through more than +// From Starting document offset. By default, you cannot page through more than // 10,000 // hits using the from and size parameters. To page through more hits, use the // search_after parameter. // API name: from func (r *Search) From(from int) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } // API name: highlight -func (r *Search) Highlight(highlight types.HighlightVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Highlight(highlight *types.Highlight) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Highlight = highlight.HighlightCaster() + r.req.Highlight = highlight return r } -// Boosts the _score of documents from specified indices. +// IndicesBoost Boosts the _score of documents from specified indices. // API name: indices_boost -func (r *Search) IndicesBoost(indicesboost []map[string]types.Float64) *Search { - // Initialize the request if it is not already initialized +func (r *Search) IndicesBoost(indicesboosts ...map[string]types.Float64) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.IndicesBoost = indicesboost + r.req.IndicesBoost = indicesboosts return r } -// Minimum _score for matching documents. Documents with a lower _score are +// MinScore Minimum _score for matching documents. Documents with a lower _score are // not included in search results and results collected by aggregations. // API name: min_score func (r *Search) MinScore(minscore types.Float64) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -774,216 +719,168 @@ func (r *Search) MinScore(minscore types.Float64) *Search { return r } -// Limits the search to a point in time (PIT). If you provide a PIT, you +// Pit Limits the search to a point in time (PIT). If you provide a PIT, you // cannot specify an in the request path. // API name: pit -func (r *Search) Pit(pit types.PointInTimeReferenceVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Pit(pit *types.PointInTimeReference) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Pit = pit.PointInTimeReferenceCaster() + r.req.Pit = pit return r } // API name: post_filter -func (r *Search) PostFilter(postfilter types.QueryVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) PostFilter(postfilter *types.Query) *Search { if r.req == nil { r.req = NewRequest() } - r.req.PostFilter = postfilter.QueryCaster() + r.req.PostFilter = postfilter return r } // API name: profile func (r *Search) Profile(profile bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Profile = &profile return r } -// Defines the search definition using the Query DSL. +// Query Defines the search definition using the Query DSL. // API name: query -func (r *Search) Query(query types.QueryVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Query(query *types.Query) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } // API name: rescore -func (r *Search) Rescore(rescores ...types.RescoreVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Rescore(rescores ...types.Rescore) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Rescore = make([]types.Rescore, len(rescores)) - for i, v := range rescores { - r.req.Rescore[i] = *v.RescoreCaster() - } + r.req.Rescore = rescores return r } -// Defines one or more runtime fields in the search request. These fields take +// RuntimeMappings Defines one or more runtime fields in the search request. These fields take // precedence over mapped fields with the same name. // API name: runtime_mappings -func (r *Search) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) RuntimeMappings(runtimefields types.RuntimeFields) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// Retrieve a script evaluation (based on different fields) for each hit. +// ScriptFields Retrieve a script evaluation (based on different fields) for each hit. // API name: script_fields func (r *Search) ScriptFields(scriptfields map[string]types.ScriptField) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.ScriptFields = scriptfields - return r -} - -func (r *Search) AddScriptField(key string, value types.ScriptFieldVariant) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.ScriptField - if r.req.ScriptFields == nil { - r.req.ScriptFields = make(map[string]types.ScriptField) - } else { - tmp = r.req.ScriptFields - } - - tmp[key] = *value.ScriptFieldCaster() + r.req.ScriptFields = scriptfields - r.req.ScriptFields = tmp return r } // API name: search_after -func (r *Search) SearchAfter(sortresults ...types.FieldValueVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) SearchAfter(sortresults ...types.FieldValue) *Search { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// If true, returns sequence number and primary term of the last modification +// SeqNoPrimaryTerm If true, returns sequence number and primary term of the last modification // of each hit. See Optimistic concurrency control. // API name: seq_no_primary_term func (r *Search) SeqNoPrimaryTerm(seqnoprimaryterm bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.SeqNoPrimaryTerm = &seqnoprimaryterm return r } -// The number of hits to return. By default, you cannot page through more +// Size The number of hits to return. By default, you cannot page through more // than 10,000 hits using the from and size parameters. To page through more // hits, use the search_after parameter. // API name: size func (r *Search) Size(size int) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } // API name: slice -func (r *Search) Slice(slice types.SlicedScrollVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Slice(slice *types.SlicedScroll) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Slice = slice.SlicedScrollCaster() + r.req.Slice = slice return r } // API name: sort -func (r *Search) Sort(sorts ...types.SortCombinationsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Sort(sorts ...types.SortCombinations) *Search { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } -// Indicates which source fields are returned for matching documents. These +// Source_ Indicates which source fields are returned for matching documents. These // fields are returned in the hits._source property of the search response. // API name: _source -func (r *Search) Source_(sourceconfig types.SourceConfigVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Source_(sourceconfig types.SourceConfig) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.Source_ = *sourceconfig.SourceConfigCaster() + r.req.Source_ = sourceconfig return r } -// Stats groups to associate with the search. Each group maintains a statistics +// Stats Stats groups to associate with the search. Each group maintains a statistics // aggregation for its associated searches. You can retrieve these stats using // the indices stats API. // API name: stats func (r *Search) Stats(stats ...string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range stats { - - r.req.Stats = append(r.req.Stats, v) + r.req.Stats = stats - } return r } -// List of stored fields to return as part of a hit. If no fields are specified, +// StoredFields List of stored fields to return as part of a hit. If no fields are specified, // no stored fields are included in the response. If this field is specified, // the _source // parameter defaults to false. You can pass _source: true to return both source @@ -991,29 +888,26 @@ func (r *Search) Stats(stats ...string) *Search { // and stored fields in the search response. // API name: stored_fields func (r *Search) StoredFields(fields ...string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.StoredFields = fields return r } // API name: suggest -func (r *Search) Suggest(suggest types.SuggesterVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) Suggest(suggest *types.Suggester) *Search { if r.req == nil { r.req = NewRequest() } - r.req.Suggest = suggest.SuggesterCaster() + r.req.Suggest = suggest return r } -// Maximum number of documents to collect for each shard. If a query reaches +// TerminateAfter Maximum number of documents to collect for each shard. If a query reaches // this // limit, Elasticsearch terminates the query early. Elasticsearch collects // documents @@ -1021,7 +915,6 @@ func (r *Search) Suggest(suggest types.SuggesterVariant) *Search { // early. // API name: terminate_after func (r *Search) TerminateAfter(terminateafter int64) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1031,14 +924,13 @@ func (r *Search) TerminateAfter(terminateafter int64) *Search { return r } -// Specifies the period of time to wait for a response from each shard. If no +// Timeout Specifies the period of time to wait for a response from each shard. If no // response // is received before the timeout expires, the request fails and returns an // error. // Defaults to no timeout. // API name: timeout func (r *Search) Timeout(timeout string) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -1048,44 +940,38 @@ func (r *Search) Timeout(timeout string) *Search { return r } -// If true, calculate and return document scores, even if the scores are not +// TrackScores If true, calculate and return document scores, even if the scores are not // used for sorting. // API name: track_scores func (r *Search) TrackScores(trackscores bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TrackScores = &trackscores return r } -// Number of hits matching the query to count accurately. If true, the exact +// TrackTotalHits Number of hits matching the query to count accurately. If true, the exact // number of hits is returned at the cost of some performance. If false, the // response does not include the total number of hits matching the query. // Defaults to 10,000 hits. // API name: track_total_hits -func (r *Search) TrackTotalHits(trackhits types.TrackHitsVariant) *Search { - // Initialize the request if it is not already initialized +func (r *Search) TrackTotalHits(trackhits types.TrackHits) *Search { if r.req == nil { r.req = NewRequest() } - - r.req.TrackTotalHits = *trackhits.TrackHitsCaster() + r.req.TrackTotalHits = trackhits return r } -// If true, returns document version as part of a hit. +// Version If true, returns document version as part of a hit. // API name: version func (r *Search) Version(version bool) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &version return r diff --git a/typedapi/graph/explore/explore.go b/typedapi/graph/explore/explore.go index 9e39b4dae1..80529e7120 100644 --- a/typedapi/graph/explore/explore.go +++ b/typedapi/graph/explore/explore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Explore graph analytics. // Extract and summarize information about the documents and terms in an @@ -396,59 +396,52 @@ func (r *Explore) Pretty(pretty bool) *Explore { return r } -// Specifies or more fields from which you want to extract terms that are +// Connections Specifies or more fields from which you want to extract terms that are // associated with the specified vertices. // API name: connections -func (r *Explore) Connections(connections types.HopVariant) *Explore { - // Initialize the request if it is not already initialized +func (r *Explore) Connections(connections *types.Hop) *Explore { if r.req == nil { r.req = NewRequest() } - r.req.Connections = connections.HopCaster() + r.req.Connections = connections return r } -// Direct the Graph API how to build the graph. +// Controls Direct the Graph API how to build the graph. // API name: controls -func (r *Explore) Controls(controls types.ExploreControlsVariant) *Explore { - // Initialize the request if it is not already initialized +func (r *Explore) Controls(controls *types.ExploreControls) *Explore { if r.req == nil { r.req = NewRequest() } - r.req.Controls = controls.ExploreControlsCaster() + r.req.Controls = controls return r } -// A seed query that identifies the documents of interest. Can be any valid +// Query A seed query that identifies the documents of interest. Can be any valid // Elasticsearch query. // API name: query -func (r *Explore) Query(query types.QueryVariant) *Explore { - // Initialize the request if it is not already initialized +func (r *Explore) Query(query *types.Query) *Explore { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// Specifies one or more fields that contain the terms you want to include in +// Vertices Specifies one or more fields that contain the terms you want to include in // the graph as vertices. // API name: vertices -func (r *Explore) Vertices(vertices ...types.VertexDefinitionVariant) *Explore { - // Initialize the request if it is not already initialized +func (r *Explore) Vertices(vertices ...types.VertexDefinition) *Explore { if r.req == nil { r.req = NewRequest() } - for _, v := range vertices { + r.req.Vertices = vertices - r.req.Vertices = append(r.req.Vertices, *v.VertexDefinitionCaster()) - - } return r } diff --git a/typedapi/graph/explore/request.go b/typedapi/graph/explore/request.go index cdb124e8ba..f3df016169 100644 --- a/typedapi/graph/explore/request.go +++ b/typedapi/graph/explore/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explore @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/explore/GraphExploreRequest.ts#L28-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/explore/GraphExploreRequest.ts#L28-L84 type Request struct { // Connections Specifies or more fields from which you want to extract terms that are diff --git a/typedapi/graph/explore/response.go b/typedapi/graph/explore/response.go index 2f080e8d0f..3d19ab93ae 100644 --- a/typedapi/graph/explore/response.go +++ b/typedapi/graph/explore/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/explore/GraphExploreResponse.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/explore/GraphExploreResponse.ts#L25-L33 type Response struct { Connections []types.Connection `json:"connections"` Failures []types.ShardFailure `json:"failures"` diff --git a/typedapi/ilm/deletelifecycle/delete_lifecycle.go b/typedapi/ilm/deletelifecycle/delete_lifecycle.go index 9a0556bd3e..6d60018fd4 100644 --- a/typedapi/ilm/deletelifecycle/delete_lifecycle.go +++ b/typedapi/ilm/deletelifecycle/delete_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a lifecycle policy. // You cannot delete policies that are currently in use. If the policy is being diff --git a/typedapi/ilm/deletelifecycle/response.go b/typedapi/ilm/deletelifecycle/response.go index 1f5356d610..14d63a8b8d 100644 --- a/typedapi/ilm/deletelifecycle/response.go +++ b/typedapi/ilm/deletelifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/explainlifecycle/explain_lifecycle.go b/typedapi/ilm/explainlifecycle/explain_lifecycle.go index 2203169097..89a96b8465 100644 --- a/typedapi/ilm/explainlifecycle/explain_lifecycle.go +++ b/typedapi/ilm/explainlifecycle/explain_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Explain the lifecycle state. // Get the current lifecycle status for one or more indices. diff --git a/typedapi/ilm/explainlifecycle/response.go b/typedapi/ilm/explainlifecycle/response.go index f950e489c2..e5d958a2d1 100644 --- a/typedapi/ilm/explainlifecycle/response.go +++ b/typedapi/ilm/explainlifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explainlifecycle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package explainlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts#L24-L28 type Response struct { Indices map[string]types.LifecycleExplain `json:"indices"` } diff --git a/typedapi/ilm/getlifecycle/get_lifecycle.go b/typedapi/ilm/getlifecycle/get_lifecycle.go index 22da18f399..ef66bacfb0 100644 --- a/typedapi/ilm/getlifecycle/get_lifecycle.go +++ b/typedapi/ilm/getlifecycle/get_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get lifecycle policies. package getlifecycle diff --git a/typedapi/ilm/getlifecycle/response.go b/typedapi/ilm/getlifecycle/response.go index 59741fbc19..f5fd598eae 100644 --- a/typedapi/ilm/getlifecycle/response.go +++ b/typedapi/ilm/getlifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/get_lifecycle/GetLifecycleResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/get_lifecycle/GetLifecycleResponse.ts#L23-L26 type Response map[string]types.Lifecycle diff --git a/typedapi/ilm/getstatus/get_status.go b/typedapi/ilm/getstatus/get_status.go index 4c0523f838..4b3a388cb7 100644 --- a/typedapi/ilm/getstatus/get_status.go +++ b/typedapi/ilm/getstatus/get_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the ILM status. // diff --git a/typedapi/ilm/getstatus/response.go b/typedapi/ilm/getstatus/response.go index d565fe555a..9fb0c7a2fe 100644 --- a/typedapi/ilm/getstatus/response.go +++ b/typedapi/ilm/getstatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/get_status/GetIlmStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/get_status/GetIlmStatusResponse.ts#L22-L24 type Response struct { OperationMode lifecycleoperationmode.LifecycleOperationMode `json:"operation_mode"` } diff --git a/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go b/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go index 1810d46949..98524f9074 100644 --- a/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go +++ b/typedapi/ilm/migratetodatatiers/migrate_to_data_tiers.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Migrate to data tiers routing. // Switch the indices, ILM policies, and legacy, composable, and component @@ -385,7 +385,6 @@ func (r *MigrateToDataTiers) Pretty(pretty bool) *MigrateToDataTiers { // API name: legacy_template_to_delete func (r *MigrateToDataTiers) LegacyTemplateToDelete(legacytemplatetodelete string) *MigrateToDataTiers { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -397,7 +396,6 @@ func (r *MigrateToDataTiers) LegacyTemplateToDelete(legacytemplatetodelete strin // API name: node_attribute func (r *MigrateToDataTiers) NodeAttribute(nodeattribute string) *MigrateToDataTiers { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/ilm/migratetodatatiers/request.go b/typedapi/ilm/migratetodatatiers/request.go index 8c4aca0d31..54848ab45f 100644 --- a/typedapi/ilm/migratetodatatiers/request.go +++ b/typedapi/ilm/migratetodatatiers/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package migratetodatatiers @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/migrate_to_data_tiers/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/migrate_to_data_tiers/Request.ts#L22-L61 type Request struct { LegacyTemplateToDelete *string `json:"legacy_template_to_delete,omitempty"` NodeAttribute *string `json:"node_attribute,omitempty"` diff --git a/typedapi/ilm/migratetodatatiers/response.go b/typedapi/ilm/migratetodatatiers/response.go index 3ad2415bdb..1bcc7be0fc 100644 --- a/typedapi/ilm/migratetodatatiers/response.go +++ b/typedapi/ilm/migratetodatatiers/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package migratetodatatiers @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L51 type Response struct { DryRun bool `json:"dry_run"` // MigratedComponentTemplates The component templates that were updated to not contain custom routing diff --git a/typedapi/ilm/movetostep/move_to_step.go b/typedapi/ilm/movetostep/move_to_step.go index e54c5a70fa..7d10838eaa 100644 --- a/typedapi/ilm/movetostep/move_to_step.go +++ b/typedapi/ilm/movetostep/move_to_step.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Move to a lifecycle step. // Manually move an index into a specific step in the lifecycle policy and run @@ -403,28 +403,26 @@ func (r *MoveToStep) Pretty(pretty bool) *MoveToStep { return r } -// The step that the index is expected to be in. +// CurrentStep The step that the index is expected to be in. // API name: current_step -func (r *MoveToStep) CurrentStep(currentstep types.StepKeyVariant) *MoveToStep { - // Initialize the request if it is not already initialized +func (r *MoveToStep) CurrentStep(currentstep *types.StepKey) *MoveToStep { if r.req == nil { r.req = NewRequest() } - r.req.CurrentStep = *currentstep.StepKeyCaster() + r.req.CurrentStep = *currentstep return r } -// The step that you want to run. +// NextStep The step that you want to run. // API name: next_step -func (r *MoveToStep) NextStep(nextstep types.StepKeyVariant) *MoveToStep { - // Initialize the request if it is not already initialized +func (r *MoveToStep) NextStep(nextstep *types.StepKey) *MoveToStep { if r.req == nil { r.req = NewRequest() } - r.req.NextStep = *nextstep.StepKeyCaster() + r.req.NextStep = *nextstep return r } diff --git a/typedapi/ilm/movetostep/request.go b/typedapi/ilm/movetostep/request.go index 1790849d03..4ab4523f7e 100644 --- a/typedapi/ilm/movetostep/request.go +++ b/typedapi/ilm/movetostep/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package movetostep @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L64 type Request struct { // CurrentStep The step that the index is expected to be in. diff --git a/typedapi/ilm/movetostep/response.go b/typedapi/ilm/movetostep/response.go index 533675a643..0a3c474efc 100644 --- a/typedapi/ilm/movetostep/response.go +++ b/typedapi/ilm/movetostep/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package movetostep // Response holds the response body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/putlifecycle/put_lifecycle.go b/typedapi/ilm/putlifecycle/put_lifecycle.go index 50dc58b000..410069b28e 100644 --- a/typedapi/ilm/putlifecycle/put_lifecycle.go +++ b/typedapi/ilm/putlifecycle/put_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a lifecycle policy. // If the specified policy exists, it is replaced and the policy version is diff --git a/typedapi/ilm/putlifecycle/request.go b/typedapi/ilm/putlifecycle/request.go index 64de9e5748..f5930b41d9 100644 --- a/typedapi/ilm/putlifecycle/request.go +++ b/typedapi/ilm/putlifecycle/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putlifecycle @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L66 type Request struct { Policy *types.IlmPolicy `json:"policy,omitempty"` } diff --git a/typedapi/ilm/putlifecycle/response.go b/typedapi/ilm/putlifecycle/response.go index 2426292a45..436d989a9d 100644 --- a/typedapi/ilm/putlifecycle/response.go +++ b/typedapi/ilm/putlifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/removepolicy/remove_policy.go b/typedapi/ilm/removepolicy/remove_policy.go index 03912fe017..e4dbafb78e 100644 --- a/typedapi/ilm/removepolicy/remove_policy.go +++ b/typedapi/ilm/removepolicy/remove_policy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Remove policies from an index. // Remove the assigned lifecycle policies from an index or a data stream's diff --git a/typedapi/ilm/removepolicy/response.go b/typedapi/ilm/removepolicy/response.go index af227ce6bb..45854c757a 100644 --- a/typedapi/ilm/removepolicy/response.go +++ b/typedapi/ilm/removepolicy/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package removepolicy // Response holds the response body struct for the package removepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/remove_policy/RemovePolicyResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/remove_policy/RemovePolicyResponse.ts#L22-L27 type Response struct { FailedIndexes []string `json:"failed_indexes"` HasFailures bool `json:"has_failures"` diff --git a/typedapi/ilm/retry/response.go b/typedapi/ilm/retry/response.go index 843cfccfac..8aaefcf8ee 100644 --- a/typedapi/ilm/retry/response.go +++ b/typedapi/ilm/retry/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package retry // Response holds the response body struct for the package retry // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/retry/RetryIlmResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/retry/RetryIlmResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/retry/retry.go b/typedapi/ilm/retry/retry.go index b58bf79e6c..e32e4399f0 100644 --- a/typedapi/ilm/retry/retry.go +++ b/typedapi/ilm/retry/retry.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Retry a policy. // Retry running the lifecycle policy for an index that is in the ERROR step. diff --git a/typedapi/ilm/start/response.go b/typedapi/ilm/start/response.go index c6f3f6da51..18ec4b878b 100644 --- a/typedapi/ilm/start/response.go +++ b/typedapi/ilm/start/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/start/StartIlmResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/start/StartIlmResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/start/start.go b/typedapi/ilm/start/start.go index 015550a7e5..6e2b38d61d 100644 --- a/typedapi/ilm/start/start.go +++ b/typedapi/ilm/start/start.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start the ILM plugin. // Start the index lifecycle management plugin if it is currently stopped. diff --git a/typedapi/ilm/stop/response.go b/typedapi/ilm/stop/response.go index 57c387f2b6..030c414c66 100644 --- a/typedapi/ilm/stop/response.go +++ b/typedapi/ilm/stop/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/stop/StopIlmResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/stop/StopIlmResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ilm/stop/stop.go b/typedapi/ilm/stop/stop.go index 3c76b342cf..a2273ac9e3 100644 --- a/typedapi/ilm/stop/stop.go +++ b/typedapi/ilm/stop/stop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop the ILM plugin. // Halt all lifecycle management operations and stop the index lifecycle diff --git a/typedapi/indices/addblock/add_block.go b/typedapi/indices/addblock/add_block.go index 4655d02d6f..4f2e10d63f 100644 --- a/typedapi/indices/addblock/add_block.go +++ b/typedapi/indices/addblock/add_block.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Add an index block. // diff --git a/typedapi/indices/addblock/response.go b/typedapi/indices/addblock/response.go index 3615a2f402..7604ffcdf6 100644 --- a/typedapi/indices/addblock/response.go +++ b/typedapi/indices/addblock/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package addblock @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package addblock // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Indices []types.IndicesBlockStatus `json:"indices"` diff --git a/typedapi/indices/analyze/analyze.go b/typedapi/indices/analyze/analyze.go index 9e94dc8c6f..5e530f25ad 100644 --- a/typedapi/indices/analyze/analyze.go +++ b/typedapi/indices/analyze/analyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get tokens from text analysis. // The analyze API performs analysis on a text string and returns the resulting @@ -99,7 +99,7 @@ func NewAnalyzeFunc(tp elastictransport.Interface) NewAnalyze { // The `_analyze` endpoint without a specified index will always use `10000` as // its limit. // -// https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html +// https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-analyze func New(tp elastictransport.Interface) *Analyze { r := &Analyze{ transport: tp, @@ -379,12 +379,11 @@ func (r *Analyze) Pretty(pretty bool) *Analyze { return r } -// The name of the analyzer that should be applied to the provided `text`. +// Analyzer The name of the analyzer that should be applied to the provided `text`. // This could be a built-in analyzer, or an analyzer that’s been configured in // the index. // API name: analyzer func (r *Analyze) Analyzer(analyzer string) *Analyze { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -394,85 +393,68 @@ func (r *Analyze) Analyzer(analyzer string) *Analyze { return r } -// Array of token attributes used to filter the output of the `explain` +// Attributes Array of token attributes used to filter the output of the `explain` // parameter. // API name: attributes func (r *Analyze) Attributes(attributes ...string) *Analyze { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range attributes { + r.req.Attributes = attributes - r.req.Attributes = append(r.req.Attributes, v) - - } return r } -// Array of character filters used to preprocess characters before the +// CharFilter Array of character filters used to preprocess characters before the // tokenizer. // API name: char_filter -func (r *Analyze) CharFilter(charfilters ...types.CharFilterVariant) *Analyze { - // Initialize the request if it is not already initialized +func (r *Analyze) CharFilter(charfilters ...types.CharFilter) *Analyze { if r.req == nil { r.req = NewRequest() } - for _, v := range charfilters { - - r.req.CharFilter = append(r.req.CharFilter, *v.CharFilterCaster()) + r.req.CharFilter = charfilters - } return r } -// If `true`, the response includes token attributes and additional details. +// Explain If `true`, the response includes token attributes and additional details. // API name: explain func (r *Analyze) Explain(explain bool) *Analyze { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Explain = &explain return r } -// Field used to derive the analyzer. +// Field Field used to derive the analyzer. // To use this parameter, you must specify an index. // If specified, the `analyzer` parameter overrides this value. // API name: field func (r *Analyze) Field(field string) *Analyze { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Field = &field return r } -// Array of token filters used to apply after the tokenizer. +// Filter Array of token filters used to apply after the tokenizer. // API name: filter -func (r *Analyze) Filter(filters ...types.TokenFilterVariant) *Analyze { - // Initialize the request if it is not already initialized +func (r *Analyze) Filter(filters ...types.TokenFilter) *Analyze { if r.req == nil { r.req = NewRequest() } - for _, v := range filters { - - r.req.Filter = append(r.req.Filter, *v.TokenFilterCaster()) + r.req.Filter = filters - } return r } -// Normalizer to use to convert text into a single token. +// Normalizer Normalizer to use to convert text into a single token. // API name: normalizer func (r *Analyze) Normalizer(normalizer string) *Analyze { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -482,29 +464,25 @@ func (r *Analyze) Normalizer(normalizer string) *Analyze { return r } -// Text to analyze. +// Text Text to analyze. // If an array of strings is provided, it is analyzed as a multi-value field. // API name: text func (r *Analyze) Text(texttoanalyzes ...string) *Analyze { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Text = texttoanalyzes return r } -// Tokenizer to use to convert text into tokens. +// Tokenizer Tokenizer to use to convert text into tokens. // API name: tokenizer -func (r *Analyze) Tokenizer(tokenizer types.TokenizerVariant) *Analyze { - // Initialize the request if it is not already initialized +func (r *Analyze) Tokenizer(tokenizer types.Tokenizer) *Analyze { if r.req == nil { r.req = NewRequest() } - - r.req.Tokenizer = *tokenizer.TokenizerCaster() + r.req.Tokenizer = tokenizer return r } diff --git a/typedapi/indices/analyze/request.go b/typedapi/indices/analyze/request.go index d6a0f1579e..ad421e423b 100644 --- a/typedapi/indices/analyze/request.go +++ b/typedapi/indices/analyze/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package analyze @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L119 type Request struct { // Analyzer The name of the analyzer that should be applied to the provided `text`. @@ -199,12 +199,60 @@ func (s *Request) UnmarshalJSON(data []byte) error { switch kind["type"] { + case "apostrophe": + o := types.NewApostropheTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "apostrophe", err) + } + s.Filter = append(s.Filter, *o) + case "arabic_stem": + o := types.NewArabicStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "arabic_stem", err) + } + s.Filter = append(s.Filter, *o) + case "arabic_normalization": + o := types.NewArabicNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "arabic_normalization", err) + } + s.Filter = append(s.Filter, *o) case "asciifolding": o := types.NewAsciiFoldingTokenFilter() if err := localDec.Decode(&o); err != nil { return fmt.Errorf("%s | %w", "asciifolding", err) } s.Filter = append(s.Filter, *o) + case "bengali_normalization": + o := types.NewBengaliNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "bengali_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "brazilian_stem": + o := types.NewBrazilianStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "brazilian_stem", err) + } + s.Filter = append(s.Filter, *o) + case "cjk_bigram": + o := types.NewCjkBigramTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "cjk_bigram", err) + } + s.Filter = append(s.Filter, *o) + case "cjk_width": + o := types.NewCjkWidthTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "cjk_width", err) + } + s.Filter = append(s.Filter, *o) + case "classic": + o := types.NewClassicTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "classic", err) + } + s.Filter = append(s.Filter, *o) case "common_grams": o := types.NewCommonGramsTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -217,12 +265,30 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "condition", err) } s.Filter = append(s.Filter, *o) + case "czech_stem": + o := types.NewCzechStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "czech_stem", err) + } + s.Filter = append(s.Filter, *o) + case "decimal_digit": + o := types.NewDecimalDigitTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "decimal_digit", err) + } + s.Filter = append(s.Filter, *o) case "delimited_payload": o := types.NewDelimitedPayloadTokenFilter() if err := localDec.Decode(&o); err != nil { return fmt.Errorf("%s | %w", "delimited_payload", err) } s.Filter = append(s.Filter, *o) + case "dutch_stem": + o := types.NewDutchStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "dutch_stem", err) + } + s.Filter = append(s.Filter, *o) case "edge_ngram": o := types.NewEdgeNGramTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -241,6 +307,36 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "fingerprint", err) } s.Filter = append(s.Filter, *o) + case "flatten_graph": + o := types.NewFlattenGraphTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "flatten_graph", err) + } + s.Filter = append(s.Filter, *o) + case "french_stem": + o := types.NewFrenchStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "french_stem", err) + } + s.Filter = append(s.Filter, *o) + case "german_normalization": + o := types.NewGermanNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "german_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "german_stem": + o := types.NewGermanStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "german_stem", err) + } + s.Filter = append(s.Filter, *o) + case "hindi_normalization": + o := types.NewHindiNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "hindi_normalization", err) + } + s.Filter = append(s.Filter, *o) case "hunspell": o := types.NewHunspellTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -253,6 +349,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "hyphenation_decompounder", err) } s.Filter = append(s.Filter, *o) + case "indic_normalization": + o := types.NewIndicNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "indic_normalization", err) + } + s.Filter = append(s.Filter, *o) case "keep_types": o := types.NewKeepTypesTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -271,6 +373,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "keyword_marker", err) } s.Filter = append(s.Filter, *o) + case "keyword_repeat": + o := types.NewKeywordRepeatTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "keyword_repeat", err) + } + s.Filter = append(s.Filter, *o) case "kstem": o := types.NewKStemTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -295,6 +403,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "lowercase", err) } s.Filter = append(s.Filter, *o) + case "min_hash": + o := types.NewMinHashTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "min_hash", err) + } + s.Filter = append(s.Filter, *o) case "multiplexer": o := types.NewMultiplexerTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -325,6 +439,18 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "pattern_replace", err) } s.Filter = append(s.Filter, *o) + case "persian_normalization": + o := types.NewPersianNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "persian_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "persian_stem": + o := types.NewPersianStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "persian_stem", err) + } + s.Filter = append(s.Filter, *o) case "porter_stem": o := types.NewPorterStemTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -349,6 +475,30 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "reverse", err) } s.Filter = append(s.Filter, *o) + case "russian_stem": + o := types.NewRussianStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "russian_stem", err) + } + s.Filter = append(s.Filter, *o) + case "scandinavian_folding": + o := types.NewScandinavianFoldingTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "scandinavian_folding", err) + } + s.Filter = append(s.Filter, *o) + case "scandinavian_normalization": + o := types.NewScandinavianNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "scandinavian_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "serbian_normalization": + o := types.NewSerbianNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "serbian_normalization", err) + } + s.Filter = append(s.Filter, *o) case "shingle": o := types.NewShingleTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -361,6 +511,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "snowball", err) } s.Filter = append(s.Filter, *o) + case "sorani_normalization": + o := types.NewSoraniNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "sorani_normalization", err) + } + s.Filter = append(s.Filter, *o) case "stemmer_override": o := types.NewStemmerOverrideTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -427,6 +583,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "word_delimiter", err) } s.Filter = append(s.Filter, *o) + case "ja_stop": + o := types.NewJaStopTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "ja_stop", err) + } + s.Filter = append(s.Filter, *o) case "kuromoji_stemmer": o := types.NewKuromojiStemmerTokenFilter() if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/indices/analyze/response.go b/typedapi/indices/analyze/response.go index 4184f0594c..96cc31b6ec 100644 --- a/typedapi/indices/analyze/response.go +++ b/typedapi/indices/analyze/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package analyze @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/IndicesAnalyzeResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/IndicesAnalyzeResponse.ts#L22-L27 type Response struct { Detail *types.AnalyzeDetail `json:"detail,omitempty"` Tokens []types.AnalyzeToken `json:"tokens,omitempty"` diff --git a/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go b/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go index 217f514d0a..d4a5cd5b47 100644 --- a/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go +++ b/typedapi/indices/cancelmigratereindex/cancel_migrate_reindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Cancel a migration reindex operation. // diff --git a/typedapi/indices/cancelmigratereindex/response.go b/typedapi/indices/cancelmigratereindex/response.go index 810d2fd96a..91a60bde69 100644 --- a/typedapi/indices/cancelmigratereindex/response.go +++ b/typedapi/indices/cancelmigratereindex/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package cancelmigratereindex // Response holds the response body struct for the package cancelmigratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/clearcache/clear_cache.go b/typedapi/indices/clearcache/clear_cache.go index 9ed7cc15ec..17431f8b44 100644 --- a/typedapi/indices/clearcache/clear_cache.go +++ b/typedapi/indices/clearcache/clear_cache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the cache. // Clear the cache of one or more indices. @@ -337,7 +337,6 @@ func (r *ClearCache) AllowNoIndices(allownoindices bool) *ClearCache { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *ClearCache) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *ClearCache { tmp := []string{} diff --git a/typedapi/indices/clearcache/response.go b/typedapi/indices/clearcache/response.go index fec9c68971..c7738af28a 100644 --- a/typedapi/indices/clearcache/response.go +++ b/typedapi/indices/clearcache/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L24 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/clone/clone.go b/typedapi/indices/clone/clone.go index 107fc38eab..ad50979fad 100644 --- a/typedapi/indices/clone/clone.go +++ b/typedapi/indices/clone/clone.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clone an index. // Clone an existing index into a new index. @@ -546,62 +546,26 @@ func (r *Clone) Pretty(pretty bool) *Clone { return r } -// Aliases for the resulting index. +// Aliases Aliases for the resulting index. // API name: aliases func (r *Clone) Aliases(aliases map[string]types.Alias) *Clone { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aliases = aliases - return r -} -func (r *Clone) AddAlias(key string, value types.AliasVariant) *Clone { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Alias - if r.req.Aliases == nil { - r.req.Aliases = make(map[string]types.Alias) - } else { - tmp = r.req.Aliases - } - - tmp[key] = *value.AliasCaster() + r.req.Aliases = aliases - r.req.Aliases = tmp return r } -// Configuration options for the target index. +// Settings Configuration options for the target index. // API name: settings func (r *Clone) Settings(settings map[string]json.RawMessage) *Clone { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings - return r -} -func (r *Clone) AddSetting(key string, value json.RawMessage) *Clone { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Settings == nil { - r.req.Settings = make(map[string]json.RawMessage) - } else { - tmp = r.req.Settings - } - - tmp[key] = value + r.req.Settings = settings - r.req.Settings = tmp return r } diff --git a/typedapi/indices/clone/request.go b/typedapi/indices/clone/request.go index 4fbd423efc..9707e6fb62 100644 --- a/typedapi/indices/clone/request.go +++ b/typedapi/indices/clone/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clone @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/clone/IndicesCloneRequest.ts#L27-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/clone/IndicesCloneRequest.ts#L27-L127 type Request struct { // Aliases Aliases for the resulting index. diff --git a/typedapi/indices/clone/response.go b/typedapi/indices/clone/response.go index 83c2632505..868db763dc 100644 --- a/typedapi/indices/clone/response.go +++ b/typedapi/indices/clone/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/clone/IndicesCloneResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/clone/IndicesCloneResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/close/close.go b/typedapi/indices/close/close.go index 3f79799406..19871139b2 100644 --- a/typedapi/indices/close/close.go +++ b/typedapi/indices/close/close.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Close an index. // A closed index is blocked for read or write operations and does not allow all @@ -369,7 +369,6 @@ func (r *Close) AllowNoIndices(allownoindices bool) *Close { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Close) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Close { tmp := []string{} diff --git a/typedapi/indices/close/response.go b/typedapi/indices/close/response.go index 4522e4ad5b..fd100609a6 100644 --- a/typedapi/indices/close/response.go +++ b/typedapi/indices/close/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package close @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package close // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/close/CloseIndexResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/close/CloseIndexResponse.ts#L24-L30 type Response struct { Acknowledged bool `json:"acknowledged"` Indices map[string]types.CloseIndexResult `json:"indices"` diff --git a/typedapi/indices/create/create.go b/typedapi/indices/create/create.go index e6abc3af28..1cf3a5d642 100644 --- a/typedapi/indices/create/create.go +++ b/typedapi/indices/create/create.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an index. // You can use the create index API to add a new index to an Elasticsearch @@ -452,61 +452,41 @@ func (r *Create) Pretty(pretty bool) *Create { return r } -// Aliases for the index. +// Aliases Aliases for the index. // API name: aliases func (r *Create) Aliases(aliases map[string]types.Alias) *Create { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aliases = aliases - return r -} -func (r *Create) AddAlias(key string, value types.AliasVariant) *Create { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Alias - if r.req.Aliases == nil { - r.req.Aliases = make(map[string]types.Alias) - } else { - tmp = r.req.Aliases - } - - tmp[key] = *value.AliasCaster() + r.req.Aliases = aliases - r.req.Aliases = tmp return r } -// Mapping for fields in the index. If specified, this mapping can include: +// Mappings Mapping for fields in the index. If specified, this mapping can include: // - Field names // - Field data types // - Mapping parameters // API name: mappings -func (r *Create) Mappings(mappings types.TypeMappingVariant) *Create { - // Initialize the request if it is not already initialized +func (r *Create) Mappings(mappings *types.TypeMapping) *Create { if r.req == nil { r.req = NewRequest() } - r.req.Mappings = mappings.TypeMappingCaster() + r.req.Mappings = mappings return r } -// Configuration options for the index. +// Settings Configuration options for the index. // API name: settings -func (r *Create) Settings(settings types.IndexSettingsVariant) *Create { - // Initialize the request if it is not already initialized +func (r *Create) Settings(settings *types.IndexSettings) *Create { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.IndexSettingsCaster() + r.req.Settings = settings return r } diff --git a/typedapi/indices/create/request.go b/typedapi/indices/create/request.go index e239a6485f..988e588ac0 100644 --- a/typedapi/indices/create/request.go +++ b/typedapi/indices/create/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package create @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/create/IndicesCreateRequest.ts#L28-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/create/IndicesCreateRequest.ts#L28-L108 type Request struct { // Aliases Aliases for the index. diff --git a/typedapi/indices/create/response.go b/typedapi/indices/create/response.go index 49cb98072b..ae80501356 100644 --- a/typedapi/indices/create/response.go +++ b/typedapi/indices/create/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package create // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/create/IndicesCreateResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/create/IndicesCreateResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/createdatastream/create_data_stream.go b/typedapi/indices/createdatastream/create_data_stream.go index 21a9fdac34..cbcc61fa0c 100644 --- a/typedapi/indices/createdatastream/create_data_stream.go +++ b/typedapi/indices/createdatastream/create_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a data stream. // diff --git a/typedapi/indices/createdatastream/response.go b/typedapi/indices/createdatastream/response.go index 005c33567f..36317d849b 100644 --- a/typedapi/indices/createdatastream/response.go +++ b/typedapi/indices/createdatastream/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createdatastream // Response holds the response body struct for the package createdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/createfrom/create_from.go b/typedapi/indices/createfrom/create_from.go index 81eab86dff..a987ab0ea5 100644 --- a/typedapi/indices/createfrom/create_from.go +++ b/typedapi/indices/createfrom/create_from.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an index from a source index. // @@ -381,41 +381,37 @@ func (r *CreateFrom) Pretty(pretty bool) *CreateFrom { return r } -// Mappings overrides to be applied to the destination index (optional) +// MappingsOverride Mappings overrides to be applied to the destination index (optional) // API name: mappings_override -func (r *CreateFrom) MappingsOverride(mappingsoverride types.TypeMappingVariant) *CreateFrom { - // Initialize the request if it is not already initialized +func (r *CreateFrom) MappingsOverride(mappingsoverride *types.TypeMapping) *CreateFrom { if r.req == nil { r.req = NewRequest() } - r.req.MappingsOverride = mappingsoverride.TypeMappingCaster() + r.req.MappingsOverride = mappingsoverride return r } -// If index blocks should be removed when creating destination index (optional) +// RemoveIndexBlocks If index blocks should be removed when creating destination index (optional) // API name: remove_index_blocks func (r *CreateFrom) RemoveIndexBlocks(removeindexblocks bool) *CreateFrom { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RemoveIndexBlocks = &removeindexblocks return r } -// Settings overrides to be applied to the destination index (optional) +// SettingsOverride Settings overrides to be applied to the destination index (optional) // API name: settings_override -func (r *CreateFrom) SettingsOverride(settingsoverride types.IndexSettingsVariant) *CreateFrom { - // Initialize the request if it is not already initialized +func (r *CreateFrom) SettingsOverride(settingsoverride *types.IndexSettings) *CreateFrom { if r.req == nil { r.req = NewRequest() } - r.req.SettingsOverride = settingsoverride.IndexSettingsCaster() + r.req.SettingsOverride = settingsoverride return r } diff --git a/typedapi/indices/createfrom/request.go b/typedapi/indices/createfrom/request.go index d47dc704d1..2bc474ad2a 100644 --- a/typedapi/indices/createfrom/request.go +++ b/typedapi/indices/createfrom/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createfrom @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package createfrom // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/create_from/MigrateCreateFromRequest.ts#L25-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/create_from/MigrateCreateFromRequest.ts#L25-L44 type Request = types.CreateFrom // NewRequest returns a Request diff --git a/typedapi/indices/createfrom/response.go b/typedapi/indices/createfrom/response.go index 248b19baee..b4bdd3e336 100644 --- a/typedapi/indices/createfrom/response.go +++ b/typedapi/indices/createfrom/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createfrom // Response holds the response body struct for the package createfrom // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/create_from/MigrateCreateFromResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/create_from/MigrateCreateFromResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/datastreamsstats/data_streams_stats.go b/typedapi/indices/datastreamsstats/data_streams_stats.go index 51535ed79d..eaa77b2d8d 100644 --- a/typedapi/indices/datastreamsstats/data_streams_stats.go +++ b/typedapi/indices/datastreamsstats/data_streams_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get data stream stats. // diff --git a/typedapi/indices/datastreamsstats/response.go b/typedapi/indices/datastreamsstats/response.go index 6f7de19283..80ab530b77 100644 --- a/typedapi/indices/datastreamsstats/response.go +++ b/typedapi/indices/datastreamsstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package datastreamsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package datastreamsstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43 type Response struct { // BackingIndices Total number of backing indices for the selected data streams. diff --git a/typedapi/indices/delete/delete.go b/typedapi/indices/delete/delete.go index 71d876c6a1..af3ea3b705 100644 --- a/typedapi/indices/delete/delete.go +++ b/typedapi/indices/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete indices. // Deleting an index deletes its documents, shards, and metadata. @@ -330,7 +330,6 @@ func (r *Delete) AllowNoIndices(allownoindices bool) *Delete { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Delete) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Delete { tmp := []string{} diff --git a/typedapi/indices/delete/response.go b/typedapi/indices/delete/response.go index 990c9f6752..ec28702d09 100644 --- a/typedapi/indices/delete/response.go +++ b/typedapi/indices/delete/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/delete/IndicesDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/delete/IndicesDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletealias/delete_alias.go b/typedapi/indices/deletealias/delete_alias.go index a10d9c8944..56d6747372 100644 --- a/typedapi/indices/deletealias/delete_alias.go +++ b/typedapi/indices/deletealias/delete_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an alias. // Removes a data stream or index from an alias. diff --git a/typedapi/indices/deletealias/response.go b/typedapi/indices/deletealias/response.go index 34d1b132b9..173da8182a 100644 --- a/typedapi/indices/deletealias/response.go +++ b/typedapi/indices/deletealias/response.go @@ -16,18 +16,19 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletealias // Response holds the response body struct for the package deletealias // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. - Acknowledged bool `json:"acknowledged"` + Acknowledged bool `json:"acknowledged"` + Errors *bool `json:"errors,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go b/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go index 86199b7734..a4837460f2 100644 --- a/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go +++ b/typedapi/indices/deletedatalifecycle/delete_data_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete data stream lifecycles. // Removes the data stream lifecycle from a data stream, rendering it not diff --git a/typedapi/indices/deletedatalifecycle/response.go b/typedapi/indices/deletedatalifecycle/response.go index 1393954a4e..ccb726af29 100644 --- a/typedapi/indices/deletedatalifecycle/response.go +++ b/typedapi/indices/deletedatalifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletedatalifecycle // Response holds the response body struct for the package deletedatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletedatastream/delete_data_stream.go b/typedapi/indices/deletedatastream/delete_data_stream.go index 204d0bd5f7..9bcd8fb201 100644 --- a/typedapi/indices/deletedatastream/delete_data_stream.go +++ b/typedapi/indices/deletedatastream/delete_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete data streams. // Deletes one or more data streams and their backing indices. diff --git a/typedapi/indices/deletedatastream/response.go b/typedapi/indices/deletedatastream/response.go index cf8cb14aa6..cb20f55f1a 100644 --- a/typedapi/indices/deletedatastream/response.go +++ b/typedapi/indices/deletedatastream/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletedatastream // Response holds the response body struct for the package deletedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deleteindextemplate/delete_index_template.go b/typedapi/indices/deleteindextemplate/delete_index_template.go index 2757f46521..7a002913c0 100644 --- a/typedapi/indices/deleteindextemplate/delete_index_template.go +++ b/typedapi/indices/deleteindextemplate/delete_index_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an index template. // The provided may contain multiple template names separated diff --git a/typedapi/indices/deleteindextemplate/response.go b/typedapi/indices/deleteindextemplate/response.go index 29a13a9699..baa7ed8023 100644 --- a/typedapi/indices/deleteindextemplate/response.go +++ b/typedapi/indices/deleteindextemplate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteindextemplate // Response holds the response body struct for the package deleteindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletetemplate/delete_template.go b/typedapi/indices/deletetemplate/delete_template.go index bb4d5b7b4c..ad11f97dcf 100644 --- a/typedapi/indices/deletetemplate/delete_template.go +++ b/typedapi/indices/deletetemplate/delete_template.go @@ -16,9 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a legacy index template. +// IMPORTANT: This documentation is about legacy index templates, which are +// deprecated and will be replaced by the composable templates introduced in +// Elasticsearch 7.8. package deletetemplate import ( @@ -77,6 +80,9 @@ func NewDeleteTemplateFunc(tp elastictransport.Interface) NewDeleteTemplate { } // Delete a legacy index template. +// IMPORTANT: This documentation is about legacy index templates, which are +// deprecated and will be replaced by the composable templates introduced in +// Elasticsearch 7.8. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template-v1.html func New(tp elastictransport.Interface) *DeleteTemplate { diff --git a/typedapi/indices/deletetemplate/response.go b/typedapi/indices/deletetemplate/response.go index e3529db45d..200d541b22 100644 --- a/typedapi/indices/deletetemplate/response.go +++ b/typedapi/indices/deletetemplate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletetemplate // Response holds the response body struct for the package deletetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/diskusage/disk_usage.go b/typedapi/indices/diskusage/disk_usage.go index 50799072e5..b4d4842876 100644 --- a/typedapi/indices/diskusage/disk_usage.go +++ b/typedapi/indices/diskusage/disk_usage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Analyze the index disk usage. // Analyze the disk usage of each field of an index or data stream. diff --git a/typedapi/indices/diskusage/response.go b/typedapi/indices/diskusage/response.go index cf839846a6..c2dd4f0db3 100644 --- a/typedapi/indices/diskusage/response.go +++ b/typedapi/indices/diskusage/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package diskusage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package diskusage // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/indices/downsample/downsample.go b/typedapi/indices/downsample/downsample.go index a39fe21079..a68bbfa872 100644 --- a/typedapi/indices/downsample/downsample.go +++ b/typedapi/indices/downsample/downsample.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Downsample an index. // Aggregate a time series (TSDS) index and store pre-computed statistical @@ -397,14 +397,12 @@ func (r *Downsample) Pretty(pretty bool) *Downsample { return r } -// The interval at which to aggregate the original time series index. +// FixedInterval The interval at which to aggregate the original time series index. // API name: fixed_interval func (r *Downsample) FixedInterval(durationlarge string) *Downsample { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FixedInterval = durationlarge return r diff --git a/typedapi/indices/downsample/request.go b/typedapi/indices/downsample/request.go index eca3bac2db..1201326a3d 100644 --- a/typedapi/indices/downsample/request.go +++ b/typedapi/indices/downsample/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package downsample @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/downsample/Request.ts#L24-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/downsample/Request.ts#L24-L58 type Request = types.DownsampleConfig // NewRequest returns a Request diff --git a/typedapi/indices/downsample/response.go b/typedapi/indices/downsample/response.go index ab8ad2b4cb..6b88357974 100644 --- a/typedapi/indices/downsample/response.go +++ b/typedapi/indices/downsample/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package downsample @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/downsample/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/downsample/Response.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/indices/exists/exists.go b/typedapi/indices/exists/exists.go index d6915db883..a19d59f83c 100644 --- a/typedapi/indices/exists/exists.go +++ b/typedapi/indices/exists/exists.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check indices. // Check if one or more indices, index aliases, or data streams exist. @@ -262,7 +262,6 @@ func (r *Exists) AllowNoIndices(allownoindices bool) *Exists { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Exists) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Exists { tmp := []string{} diff --git a/typedapi/indices/existsalias/exists_alias.go b/typedapi/indices/existsalias/exists_alias.go index 491c520dfc..04e2a38191 100644 --- a/typedapi/indices/existsalias/exists_alias.go +++ b/typedapi/indices/existsalias/exists_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check aliases. // @@ -297,7 +297,6 @@ func (r *ExistsAlias) AllowNoIndices(allownoindices bool) *ExistsAlias { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *ExistsAlias) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *ExistsAlias { tmp := []string{} diff --git a/typedapi/indices/existsindextemplate/exists_index_template.go b/typedapi/indices/existsindextemplate/exists_index_template.go index ba740c4276..cd5a300180 100644 --- a/typedapi/indices/existsindextemplate/exists_index_template.go +++ b/typedapi/indices/existsindextemplate/exists_index_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check index templates. // diff --git a/typedapi/indices/existstemplate/exists_template.go b/typedapi/indices/existstemplate/exists_template.go index e410d32f9e..06876bc900 100644 --- a/typedapi/indices/existstemplate/exists_template.go +++ b/typedapi/indices/existstemplate/exists_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check existence of index templates. // Get information about whether index templates exist. diff --git a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go index 1eeace4408..ace3946c88 100644 --- a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go +++ b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the status for a data stream lifecycle. // Get information about an index or data stream's current data stream lifecycle diff --git a/typedapi/indices/explaindatalifecycle/response.go b/typedapi/indices/explaindatalifecycle/response.go index 306676e399..c0f268a8f4 100644 --- a/typedapi/indices/explaindatalifecycle/response.go +++ b/typedapi/indices/explaindatalifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explaindatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29 type Response struct { Indices map[string]types.DataStreamLifecycleExplain `json:"indices"` } diff --git a/typedapi/indices/fieldusagestats/field_usage_stats.go b/typedapi/indices/fieldusagestats/field_usage_stats.go index 273bd1be71..adc998af9d 100644 --- a/typedapi/indices/fieldusagestats/field_usage_stats.go +++ b/typedapi/indices/fieldusagestats/field_usage_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get field usage stats. // Get field usage information for each shard and field of an index. diff --git a/typedapi/indices/fieldusagestats/response.go b/typedapi/indices/fieldusagestats/response.go index 305e17d4b8..93cdd31b62 100644 --- a/typedapi/indices/fieldusagestats/response.go +++ b/typedapi/indices/fieldusagestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package fieldusagestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fieldusagestats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L30 type Response struct { FieldsUsageBody map[string]types.UsageStatsIndex `json:"-"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/flush/flush.go b/typedapi/indices/flush/flush.go index 54709566d5..1133463f27 100644 --- a/typedapi/indices/flush/flush.go +++ b/typedapi/indices/flush/flush.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Flush data streams or indices. // Flushing a data stream or index is the process of making sure that any data @@ -364,7 +364,6 @@ func (r *Flush) AllowNoIndices(allownoindices bool) *Flush { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Flush) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Flush { tmp := []string{} diff --git a/typedapi/indices/flush/response.go b/typedapi/indices/flush/response.go index ea5450be97..93e83bbf8c 100644 --- a/typedapi/indices/flush/response.go +++ b/typedapi/indices/flush/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package flush @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package flush // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/flush/IndicesFlushResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/flush/IndicesFlushResponse.ts#L22-L24 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/forcemerge/forcemerge.go b/typedapi/indices/forcemerge/forcemerge.go index e49dc6afe5..9dcb384532 100644 --- a/typedapi/indices/forcemerge/forcemerge.go +++ b/typedapi/indices/forcemerge/forcemerge.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Force a merge. // Perform the force merge operation on the shards of one or more indices. diff --git a/typedapi/indices/forcemerge/response.go b/typedapi/indices/forcemerge/response.go index ab8f4671fe..e9a486db18 100644 --- a/typedapi/indices/forcemerge/response.go +++ b/typedapi/indices/forcemerge/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package forcemerge @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forcemerge // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L24 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` // Task task contains a task id returned when wait_for_completion=false, diff --git a/typedapi/indices/get/get.go b/typedapi/indices/get/get.go index 003d526757..ec51da98a2 100644 --- a/typedapi/indices/get/get.go +++ b/typedapi/indices/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index information. // Get information about one or more indices. For data streams, the API returns diff --git a/typedapi/indices/get/response.go b/typedapi/indices/get/response.go index fc63eed0b5..14592991dd 100644 --- a/typedapi/indices/get/response.go +++ b/typedapi/indices/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get/IndicesGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get/IndicesGetResponse.ts#L24-L27 type Response map[string]types.IndexState diff --git a/typedapi/indices/getalias/get_alias.go b/typedapi/indices/getalias/get_alias.go index 30df61c816..af54448d06 100644 --- a/typedapi/indices/getalias/get_alias.go +++ b/typedapi/indices/getalias/get_alias.go @@ -16,14 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get aliases. // Retrieves information for one or more data stream or index aliases. package getalias import ( - gobytes "bytes" "context" "encoding/json" "errors" @@ -261,42 +260,6 @@ func (r GetAlias) Do(providedCtx context.Context) (Response, error) { return response, nil } - if res.StatusCode == 404 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { @@ -399,7 +362,6 @@ func (r *GetAlias) AllowNoIndices(allownoindices bool) *GetAlias { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *GetAlias) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *GetAlias { tmp := []string{} diff --git a/typedapi/indices/getalias/response.go b/typedapi/indices/getalias/response.go index 603b5653c4..f6c40e521a 100644 --- a/typedapi/indices/getalias/response.go +++ b/typedapi/indices/getalias/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getalias @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getalias // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_alias/IndicesGetAliasResponse.ts#L26-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_alias/IndicesGetAliasResponse.ts#L28-L37 type Response map[string]types.IndexAliases diff --git a/typedapi/indices/getdatalifecycle/get_data_lifecycle.go b/typedapi/indices/getdatalifecycle/get_data_lifecycle.go index 976c3dc750..985622d6de 100644 --- a/typedapi/indices/getdatalifecycle/get_data_lifecycle.go +++ b/typedapi/indices/getdatalifecycle/get_data_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get data stream lifecycles. // @@ -308,7 +308,6 @@ func (r *GetDataLifecycle) _name(name string) *GetDataLifecycle { // ExpandWildcards Type of data stream that wildcard patterns can match. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *GetDataLifecycle) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *GetDataLifecycle { tmp := []string{} diff --git a/typedapi/indices/getdatalifecycle/response.go b/typedapi/indices/getdatalifecycle/response.go index 44159079ab..1e576a20a8 100644 --- a/typedapi/indices/getdatalifecycle/response.go +++ b/typedapi/indices/getdatalifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 type Response struct { DataStreams []types.DataStreamWithLifecycle `json:"data_streams"` } diff --git a/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go b/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go index f2e25b0074..b17396f115 100644 --- a/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go +++ b/typedapi/indices/getdatalifecyclestats/get_data_lifecycle_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get data stream lifecycle stats. // Get statistics about the data streams that are managed by a data stream diff --git a/typedapi/indices/getdatalifecyclestats/response.go b/typedapi/indices/getdatalifecyclestats/response.go index 6a10784bfe..b4ba4dc2e9 100644 --- a/typedapi/indices/getdatalifecyclestats/response.go +++ b/typedapi/indices/getdatalifecyclestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdatalifecyclestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatalifecyclestats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44 type Response struct { // DataStreamCount The count of data streams currently being managed by the data stream diff --git a/typedapi/indices/getdatastream/get_data_stream.go b/typedapi/indices/getdatastream/get_data_stream.go index 1a4c31d5db..69e5b4cf67 100644 --- a/typedapi/indices/getdatastream/get_data_stream.go +++ b/typedapi/indices/getdatastream/get_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get data streams. // diff --git a/typedapi/indices/getdatastream/response.go b/typedapi/indices/getdatastream/response.go index fe27b4146e..189234965d 100644 --- a/typedapi/indices/getdatastream/response.go +++ b/typedapi/indices/getdatastream/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 type Response struct { DataStreams []types.DataStream `json:"data_streams"` } diff --git a/typedapi/indices/getfieldmapping/get_field_mapping.go b/typedapi/indices/getfieldmapping/get_field_mapping.go index bbfdf9c409..e97d09a507 100644 --- a/typedapi/indices/getfieldmapping/get_field_mapping.go +++ b/typedapi/indices/getfieldmapping/get_field_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get mapping definitions. // Retrieves mapping definitions for one or more fields. @@ -363,7 +363,6 @@ func (r *GetFieldMapping) AllowNoIndices(allownoindices bool) *GetFieldMapping { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *GetFieldMapping) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *GetFieldMapping { tmp := []string{} diff --git a/typedapi/indices/getfieldmapping/response.go b/typedapi/indices/getfieldmapping/response.go index b625e08c3f..67a345a668 100644 --- a/typedapi/indices/getfieldmapping/response.go +++ b/typedapi/indices/getfieldmapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getfieldmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfieldmapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27 type Response map[string]types.TypeFieldMappings diff --git a/typedapi/indices/getindextemplate/get_index_template.go b/typedapi/indices/getindextemplate/get_index_template.go index 7af9966cb2..05e99e354a 100644 --- a/typedapi/indices/getindextemplate/get_index_template.go +++ b/typedapi/indices/getindextemplate/get_index_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index templates. // Get information about one or more index templates. diff --git a/typedapi/indices/getindextemplate/response.go b/typedapi/indices/getindextemplate/response.go index 19cb9b369a..df0b560bef 100644 --- a/typedapi/indices/getindextemplate/response.go +++ b/typedapi/indices/getindextemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27 type Response struct { IndexTemplates []types.IndexTemplateItem `json:"index_templates"` } diff --git a/typedapi/indices/getmapping/get_mapping.go b/typedapi/indices/getmapping/get_mapping.go index 510af53b7d..c9319a0828 100644 --- a/typedapi/indices/getmapping/get_mapping.go +++ b/typedapi/indices/getmapping/get_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get mapping definitions. // For data streams, the API retrieves mappings for the stream’s backing @@ -323,7 +323,6 @@ func (r *GetMapping) AllowNoIndices(allownoindices bool) *GetMapping { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *GetMapping) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *GetMapping { tmp := []string{} diff --git a/typedapi/indices/getmapping/response.go b/typedapi/indices/getmapping/response.go index 2216b0e36e..6e001c30e0 100644 --- a/typedapi/indices/getmapping/response.go +++ b/typedapi/indices/getmapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 type Response map[string]types.IndexMappingRecord diff --git a/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go b/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go index 166d46e5aa..6d7fdcefea 100644 --- a/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go +++ b/typedapi/indices/getmigratereindexstatus/get_migrate_reindex_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the migration reindexing status. // diff --git a/typedapi/indices/getmigratereindexstatus/response.go b/typedapi/indices/getmigratereindexstatus/response.go index be9be21122..ab693cf9ff 100644 --- a/typedapi/indices/getmigratereindexstatus/response.go +++ b/typedapi/indices/getmigratereindexstatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getmigratereindexstatus @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package getmigratereindexstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L23-L36 type Response struct { Complete bool `json:"complete"` Errors []types.StatusError `json:"errors"` diff --git a/typedapi/indices/getsettings/get_settings.go b/typedapi/indices/getsettings/get_settings.go index 1a0b44fac8..6b33747481 100644 --- a/typedapi/indices/getsettings/get_settings.go +++ b/typedapi/indices/getsettings/get_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index settings. // Get setting information for one or more indices. diff --git a/typedapi/indices/getsettings/response.go b/typedapi/indices/getsettings/response.go index 8a748eda79..ca018fdbc0 100644 --- a/typedapi/indices/getsettings/response.go +++ b/typedapi/indices/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27 type Response map[string]types.IndexState diff --git a/typedapi/indices/gettemplate/get_template.go b/typedapi/indices/gettemplate/get_template.go index 9ad18636bb..c44c7d9774 100644 --- a/typedapi/indices/gettemplate/get_template.go +++ b/typedapi/indices/gettemplate/get_template.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 -// Get index templates. +// Get legacy index templates. // Get information about one or more index templates. // // IMPORTANT: This documentation is about legacy index templates, which are @@ -79,7 +79,7 @@ func NewGetTemplateFunc(tp elastictransport.Interface) NewGetTemplate { } } -// Get index templates. +// Get legacy index templates. // Get information about one or more index templates. // // IMPORTANT: This documentation is about legacy index templates, which are diff --git a/typedapi/indices/gettemplate/response.go b/typedapi/indices/gettemplate/response.go index 9fcfeb3d14..772b9e7d0b 100644 --- a/typedapi/indices/gettemplate/response.go +++ b/typedapi/indices/gettemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 type Response map[string]types.TemplateMapping diff --git a/typedapi/indices/migratereindex/migrate_reindex.go b/typedapi/indices/migratereindex/migrate_reindex.go index 9a6917d503..f76131109f 100644 --- a/typedapi/indices/migratereindex/migrate_reindex.go +++ b/typedapi/indices/migratereindex/migrate_reindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reindex legacy backing indices. // @@ -345,26 +345,25 @@ func (r *MigrateReindex) Pretty(pretty bool) *MigrateReindex { return r } -// Reindex mode. Currently only 'upgrade' is supported. +// Mode Reindex mode. Currently only 'upgrade' is supported. // API name: mode func (r *MigrateReindex) Mode(mode modeenum.ModeEnum) *MigrateReindex { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Mode = mode + return r } -// The source index or data stream (only data streams are currently supported). +// Source The source index or data stream (only data streams are currently supported). // API name: source -func (r *MigrateReindex) Source(source types.SourceIndexVariant) *MigrateReindex { - // Initialize the request if it is not already initialized +func (r *MigrateReindex) Source(source *types.SourceIndex) *MigrateReindex { if r.req == nil { r.req = NewRequest() } - r.req.Source = *source.SourceIndexCaster() + r.req.Source = *source return r } diff --git a/typedapi/indices/migratereindex/request.go b/typedapi/indices/migratereindex/request.go index f168856751..60705b4069 100644 --- a/typedapi/indices/migratereindex/request.go +++ b/typedapi/indices/migratereindex/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package migratereindex @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package migratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L23-L37 type Request = types.MigrateReindex // NewRequest returns a Request diff --git a/typedapi/indices/migratereindex/response.go b/typedapi/indices/migratereindex/response.go index a1c6fba769..9b21b83c48 100644 --- a/typedapi/indices/migratereindex/response.go +++ b/typedapi/indices/migratereindex/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package migratereindex // Response holds the response body struct for the package migratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/migrate_reindex/MigrateReindexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/migrate_reindex/MigrateReindexResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/migratetodatastream/migrate_to_data_stream.go b/typedapi/indices/migratetodatastream/migrate_to_data_stream.go index 0775fe6828..5a1a01938b 100644 --- a/typedapi/indices/migratetodatastream/migrate_to_data_stream.go +++ b/typedapi/indices/migratetodatastream/migrate_to_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Convert an index alias to a data stream. // Converts an index alias to a data stream. diff --git a/typedapi/indices/migratetodatastream/response.go b/typedapi/indices/migratetodatastream/response.go index 67a409729b..4fa4a96c5a 100644 --- a/typedapi/indices/migratetodatastream/response.go +++ b/typedapi/indices/migratetodatastream/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package migratetodatastream // Response holds the response body struct for the package migratetodatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/modifydatastream/modify_data_stream.go b/typedapi/indices/modifydatastream/modify_data_stream.go index 3337573324..c0f1e9419a 100644 --- a/typedapi/indices/modifydatastream/modify_data_stream.go +++ b/typedapi/indices/modifydatastream/modify_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update data streams. // Performs one or more data stream modification actions in a single atomic @@ -338,17 +338,13 @@ func (r *ModifyDataStream) Pretty(pretty bool) *ModifyDataStream { return r } -// Actions to perform. +// Actions Actions to perform. // API name: actions -func (r *ModifyDataStream) Actions(actions ...types.IndicesModifyActionVariant) *ModifyDataStream { - // Initialize the request if it is not already initialized +func (r *ModifyDataStream) Actions(actions ...types.IndicesModifyAction) *ModifyDataStream { if r.req == nil { r.req = NewRequest() } - for _, v := range actions { + r.req.Actions = actions - r.req.Actions = append(r.req.Actions, *v.IndicesModifyActionCaster()) - - } return r } diff --git a/typedapi/indices/modifydatastream/request.go b/typedapi/indices/modifydatastream/request.go index 2db93ab48b..1911047b88 100644 --- a/typedapi/indices/modifydatastream/request.go +++ b/typedapi/indices/modifydatastream/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package modifydatastream @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L45 type Request struct { // Actions Actions to perform. diff --git a/typedapi/indices/modifydatastream/response.go b/typedapi/indices/modifydatastream/response.go index eea0726538..bc79239015 100644 --- a/typedapi/indices/modifydatastream/response.go +++ b/typedapi/indices/modifydatastream/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package modifydatastream // Response holds the response body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/open/open.go b/typedapi/indices/open/open.go index 1ae219019f..c69779be03 100644 --- a/typedapi/indices/open/open.go +++ b/typedapi/indices/open/open.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Open a closed index. // For data streams, the API opens any closed backing indices. @@ -390,7 +390,6 @@ func (r *Open) AllowNoIndices(allownoindices bool) *Open { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Open) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Open { tmp := []string{} diff --git a/typedapi/indices/open/response.go b/typedapi/indices/open/response.go index f27a325781..65c4f17607 100644 --- a/typedapi/indices/open/response.go +++ b/typedapi/indices/open/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package open // Response holds the response body struct for the package open // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/open/IndicesOpenResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/open/IndicesOpenResponse.ts#L20-L25 type Response struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` diff --git a/typedapi/indices/promotedatastream/promote_data_stream.go b/typedapi/indices/promotedatastream/promote_data_stream.go index 1ff6bd6f96..44cf40afd6 100644 --- a/typedapi/indices/promotedatastream/promote_data_stream.go +++ b/typedapi/indices/promotedatastream/promote_data_stream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Promote a data stream. // Promote a data stream from a replicated data stream managed by cross-cluster diff --git a/typedapi/indices/promotedatastream/response.go b/typedapi/indices/promotedatastream/response.go index 5c8fa04875..180873187e 100644 --- a/typedapi/indices/promotedatastream/response.go +++ b/typedapi/indices/promotedatastream/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package promotedatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package promotedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/indices/putalias/put_alias.go b/typedapi/indices/putalias/put_alias.go index 9128ea63ac..194559f214 100644 --- a/typedapi/indices/putalias/put_alias.go +++ b/typedapi/indices/putalias/put_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update an alias. // Adds a data stream or index to an alias. @@ -418,35 +418,32 @@ func (r *PutAlias) Pretty(pretty bool) *PutAlias { return r } -// Query used to limit documents the alias can access. +// Filter Query used to limit documents the alias can access. // API name: filter -func (r *PutAlias) Filter(filter types.QueryVariant) *PutAlias { - // Initialize the request if it is not already initialized +func (r *PutAlias) Filter(filter *types.Query) *PutAlias { if r.req == nil { r.req = NewRequest() } - r.req.Filter = filter.QueryCaster() + r.req.Filter = filter return r } -// Value used to route indexing operations to a specific shard. +// IndexRouting Value used to route indexing operations to a specific shard. // If specified, this overwrites the `routing` value for indexing operations. // Data stream aliases don’t support this parameter. // API name: index_routing func (r *PutAlias) IndexRouting(routing string) *PutAlias { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexRouting = &routing return r } -// If `true`, sets the write index or data stream for the alias. +// IsWriteIndex If `true`, sets the write index or data stream for the alias. // If an alias points to multiple indices or data streams and `is_write_index` // isn’t set, the alias rejects write requests. // If an index alias points to one index and `is_write_index` isn’t set, the @@ -455,40 +452,34 @@ func (r *PutAlias) IndexRouting(routing string) *PutAlias { // alias points to one data stream. // API name: is_write_index func (r *PutAlias) IsWriteIndex(iswriteindex bool) *PutAlias { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IsWriteIndex = &iswriteindex return r } -// Value used to route indexing and search operations to a specific shard. +// Routing Value used to route indexing and search operations to a specific shard. // Data stream aliases don’t support this parameter. // API name: routing func (r *PutAlias) Routing(routing string) *PutAlias { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Routing = &routing return r } -// Value used to route search operations to a specific shard. +// SearchRouting Value used to route search operations to a specific shard. // If specified, this overwrites the `routing` value for search operations. // Data stream aliases don’t support this parameter. // API name: search_routing func (r *PutAlias) SearchRouting(routing string) *PutAlias { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.SearchRouting = &routing return r diff --git a/typedapi/indices/putalias/request.go b/typedapi/indices/putalias/request.go index 6e6ef3705e..4e41c0b794 100644 --- a/typedapi/indices/putalias/request.go +++ b/typedapi/indices/putalias/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putalias @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L103 type Request struct { // Filter Query used to limit documents the alias can access. diff --git a/typedapi/indices/putalias/response.go b/typedapi/indices/putalias/response.go index a15357c3ff..8b2afa10e1 100644 --- a/typedapi/indices/putalias/response.go +++ b/typedapi/indices/putalias/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putalias // Response holds the response body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putdatalifecycle/put_data_lifecycle.go b/typedapi/indices/putdatalifecycle/put_data_lifecycle.go index 4c5d7494c6..1d8daaaf0a 100644 --- a/typedapi/indices/putdatalifecycle/put_data_lifecycle.go +++ b/typedapi/indices/putdatalifecycle/put_data_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update data stream lifecycles. // Update the data stream lifecycle of the specified data streams. @@ -320,7 +320,6 @@ func (r *PutDataLifecycle) _name(name string) *PutDataLifecycle { // ExpandWildcards Type of data stream that wildcard patterns can match. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `hidden`, `open`, `closed`, `none`. // API name: expand_wildcards func (r *PutDataLifecycle) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutDataLifecycle { tmp := []string{} @@ -396,46 +395,41 @@ func (r *PutDataLifecycle) Pretty(pretty bool) *PutDataLifecycle { return r } -// If defined, every document added to this data stream will be stored at least +// DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. // Any time after this duration the document could be deleted. // When empty, every document in this data stream will be stored indefinitely. // API name: data_retention -func (r *PutDataLifecycle) DataRetention(duration types.DurationVariant) *PutDataLifecycle { - // Initialize the request if it is not already initialized +func (r *PutDataLifecycle) DataRetention(duration types.Duration) *PutDataLifecycle { if r.req == nil { r.req = NewRequest() } - - r.req.DataRetention = *duration.DurationCaster() + r.req.DataRetention = duration return r } -// The downsampling configuration to execute for the managed backing index after +// Downsampling The downsampling configuration to execute for the managed backing index after // rollover. // API name: downsampling -func (r *PutDataLifecycle) Downsampling(downsampling types.DataStreamLifecycleDownsamplingVariant) *PutDataLifecycle { - // Initialize the request if it is not already initialized +func (r *PutDataLifecycle) Downsampling(downsampling *types.DataStreamLifecycleDownsampling) *PutDataLifecycle { if r.req == nil { r.req = NewRequest() } - r.req.Downsampling = downsampling.DataStreamLifecycleDownsamplingCaster() + r.req.Downsampling = downsampling return r } -// If defined, it turns data stream lifecycle on/off (`true`/`false`) for this +// Enabled If defined, it turns data stream lifecycle on/off (`true`/`false`) for this // data stream. A data stream lifecycle // that's disabled (enabled: `false`) will have no effect on the data stream. // API name: enabled func (r *PutDataLifecycle) Enabled(enabled bool) *PutDataLifecycle { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Enabled = &enabled return r diff --git a/typedapi/indices/putdatalifecycle/request.go b/typedapi/indices/putdatalifecycle/request.go index be20a440a5..60264eb021 100644 --- a/typedapi/indices/putdatalifecycle/request.go +++ b/typedapi/indices/putdatalifecycle/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putdatalifecycle @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L93 type Request struct { // DataRetention If defined, every document added to this data stream will be stored at least diff --git a/typedapi/indices/putdatalifecycle/response.go b/typedapi/indices/putdatalifecycle/response.go index f6b4ddc7cc..4ba5d8cb2a 100644 --- a/typedapi/indices/putdatalifecycle/response.go +++ b/typedapi/indices/putdatalifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putdatalifecycle // Response holds the response body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putindextemplate/put_index_template.go b/typedapi/indices/putindextemplate/put_index_template.go index 889c467fb4..cef49da2a3 100644 --- a/typedapi/indices/putindextemplate/put_index_template.go +++ b/typedapi/indices/putindextemplate/put_index_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update an index template. // Index templates define settings, mappings, and aliases that can be applied @@ -471,7 +471,7 @@ func (r *PutIndexTemplate) Pretty(pretty bool) *PutIndexTemplate { return r } -// This setting overrides the value of the `action.auto_create_index` cluster +// AllowAutoCreate This setting overrides the value of the `action.auto_create_index` cluster // setting. // If set to `true` in a template, then indices can be automatically created // using that template even if auto-creation of indices is disabled via @@ -480,114 +480,97 @@ func (r *PutIndexTemplate) Pretty(pretty bool) *PutIndexTemplate { // always be explicitly created, and may never be automatically created. // API name: allow_auto_create func (r *PutIndexTemplate) AllowAutoCreate(allowautocreate bool) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowAutoCreate = &allowautocreate return r } -// An ordered list of component template names. +// ComposedOf An ordered list of component template names. // Component templates are merged in the order specified, meaning that the last // component template specified has the highest precedence. // API name: composed_of func (r *PutIndexTemplate) ComposedOf(composedofs ...string) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range composedofs { - - r.req.ComposedOf = append(r.req.ComposedOf, v) + r.req.ComposedOf = composedofs - } return r } -// If this object is included, the template is used to create data streams and +// DataStream If this object is included, the template is used to create data streams and // their backing indices. // Supports an empty object. // Data streams require a matching index template with a `data_stream` object. // API name: data_stream -func (r *PutIndexTemplate) DataStream(datastream types.DataStreamVisibilityVariant) *PutIndexTemplate { - // Initialize the request if it is not already initialized +func (r *PutIndexTemplate) DataStream(datastream *types.DataStreamVisibility) *PutIndexTemplate { if r.req == nil { r.req = NewRequest() } - r.req.DataStream = datastream.DataStreamVisibilityCaster() + r.req.DataStream = datastream return r } -// Marks this index template as deprecated. When creating or updating a +// Deprecated Marks this index template as deprecated. When creating or updating a // non-deprecated index template // that uses deprecated components, Elasticsearch will emit a deprecation // warning. // API name: deprecated func (r *PutIndexTemplate) Deprecated(deprecated bool) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Deprecated = &deprecated return r } -// The configuration option ignore_missing_component_templates can be used when +// IgnoreMissingComponentTemplates The configuration option ignore_missing_component_templates can be used when // an index template // references a component template that might not exist // API name: ignore_missing_component_templates func (r *PutIndexTemplate) IgnoreMissingComponentTemplates(ignoremissingcomponenttemplates ...string) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range ignoremissingcomponenttemplates { - - r.req.IgnoreMissingComponentTemplates = append(r.req.IgnoreMissingComponentTemplates, v) + r.req.IgnoreMissingComponentTemplates = ignoremissingcomponenttemplates - } return r } -// Name of the index template to create. +// IndexPatterns Name of the index template to create. // API name: index_patterns func (r *PutIndexTemplate) IndexPatterns(indices ...string) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexPatterns = indices return r } -// Optional user metadata about the index template. +// Meta_ Optional user metadata about the index template. // It may have any contents. // It is not automatically generated or used by Elasticsearch. // This user-defined object is stored in the cluster state, so keeping it short // is preferable // To unset the metadata, replace the template without specifying it. // API name: _meta -func (r *PutIndexTemplate) Meta_(metadata types.MetadataVariant) *PutIndexTemplate { - // Initialize the request if it is not already initialized +func (r *PutIndexTemplate) Meta_(metadata types.Metadata) *PutIndexTemplate { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// Priority to determine index template precedence when a new data stream or +// Priority Priority to determine index template precedence when a new data stream or // index is created. // The index template with the highest priority is chosen. // If no priority is specified the template is treated as though it is of @@ -595,7 +578,6 @@ func (r *PutIndexTemplate) Meta_(metadata types.MetadataVariant) *PutIndexTempla // This number is not automatically generated by Elasticsearch. // API name: priority func (r *PutIndexTemplate) Priority(priority int64) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -605,33 +587,30 @@ func (r *PutIndexTemplate) Priority(priority int64) *PutIndexTemplate { return r } -// Template to be applied. +// Template Template to be applied. // It may optionally include an `aliases`, `mappings`, or `settings` // configuration. // API name: template -func (r *PutIndexTemplate) Template(template types.IndexTemplateMappingVariant) *PutIndexTemplate { - // Initialize the request if it is not already initialized +func (r *PutIndexTemplate) Template(template *types.IndexTemplateMapping) *PutIndexTemplate { if r.req == nil { r.req = NewRequest() } - r.req.Template = template.IndexTemplateMappingCaster() + r.req.Template = template return r } -// Version number used to manage index templates externally. +// Version Version number used to manage index templates externally. // This number is not automatically generated by Elasticsearch. // External systems can use these version numbers to simplify template // management. // To unset a version, replace the template without specifying one. // API name: version func (r *PutIndexTemplate) Version(versionnumber int64) *PutIndexTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionnumber return r diff --git a/typedapi/indices/putindextemplate/request.go b/typedapi/indices/putindextemplate/request.go index bdf977696f..9bedf423a7 100644 --- a/typedapi/indices/putindextemplate/request.go +++ b/typedapi/indices/putindextemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putindextemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L157 type Request struct { // AllowAutoCreate This setting overrides the value of the `action.auto_create_index` cluster diff --git a/typedapi/indices/putindextemplate/response.go b/typedapi/indices/putindextemplate/response.go index 6c7083262c..f4db6a076d 100644 --- a/typedapi/indices/putindextemplate/response.go +++ b/typedapi/indices/putindextemplate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putindextemplate // Response holds the response body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putmapping/put_mapping.go b/typedapi/indices/putmapping/put_mapping.go index b2bf913d52..aea5a8ff4c 100644 --- a/typedapi/indices/putmapping/put_mapping.go +++ b/typedapi/indices/putmapping/put_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update field mappings. // Add new fields to an existing data stream or index. @@ -404,7 +404,6 @@ func (r *PutMapping) AllowNoIndices(allownoindices bool) *PutMapping { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *PutMapping) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutMapping { tmp := []string{} @@ -498,170 +497,135 @@ func (r *PutMapping) Pretty(pretty bool) *PutMapping { return r } -// Controls whether dynamic date detection is enabled. +// DateDetection Controls whether dynamic date detection is enabled. // API name: date_detection func (r *PutMapping) DateDetection(datedetection bool) *PutMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.DateDetection = &datedetection return r } -// Controls whether new fields are added dynamically. +// Dynamic Controls whether new fields are added dynamically. // API name: dynamic func (r *PutMapping) Dynamic(dynamic dynamicmapping.DynamicMapping) *PutMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Dynamic = &dynamic + return r } -// If date detection is enabled then new string fields are checked +// DynamicDateFormats If date detection is enabled then new string fields are checked // against 'dynamic_date_formats' and if the value matches then // a new date field is added instead of string. // API name: dynamic_date_formats func (r *PutMapping) DynamicDateFormats(dynamicdateformats ...string) *PutMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range dynamicdateformats { - - r.req.DynamicDateFormats = append(r.req.DynamicDateFormats, v) + r.req.DynamicDateFormats = dynamicdateformats - } return r } -// Specify dynamic templates for the mapping. +// DynamicTemplates Specify dynamic templates for the mapping. // API name: dynamic_templates -func (r *PutMapping) DynamicTemplates(dynamictemplates []map[string]types.DynamicTemplate) *PutMapping { - // Initialize the request if it is not already initialized +func (r *PutMapping) DynamicTemplates(dynamictemplates ...map[string]types.DynamicTemplate) *PutMapping { if r.req == nil { r.req = NewRequest() } - r.req.DynamicTemplates = dynamictemplates return r } -// Control whether field names are enabled for the index. +// FieldNames_ Control whether field names are enabled for the index. // API name: _field_names -func (r *PutMapping) FieldNames_(fieldnames_ types.FieldNamesFieldVariant) *PutMapping { - // Initialize the request if it is not already initialized +func (r *PutMapping) FieldNames_(fieldnames_ *types.FieldNamesField) *PutMapping { if r.req == nil { r.req = NewRequest() } - r.req.FieldNames_ = fieldnames_.FieldNamesFieldCaster() + r.req.FieldNames_ = fieldnames_ return r } -// A mapping type can have custom meta data associated with it. These are +// Meta_ A mapping type can have custom meta data associated with it. These are // not used at all by Elasticsearch, but can be used to store // application-specific metadata. // API name: _meta -func (r *PutMapping) Meta_(metadata types.MetadataVariant) *PutMapping { - // Initialize the request if it is not already initialized +func (r *PutMapping) Meta_(metadata types.Metadata) *PutMapping { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// Automatically map strings into numeric data types for all fields. +// NumericDetection Automatically map strings into numeric data types for all fields. // API name: numeric_detection func (r *PutMapping) NumericDetection(numericdetection bool) *PutMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.NumericDetection = &numericdetection return r } -// Mapping for a field. For new fields, this mapping can include: +// Properties Mapping for a field. For new fields, this mapping can include: // // - Field name // - Field data type // - Mapping parameters // API name: properties func (r *PutMapping) Properties(properties map[string]types.Property) *PutMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Properties = properties - return r -} -func (r *PutMapping) AddProperty(key string, value types.PropertyVariant) *PutMapping { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Property - if r.req.Properties == nil { - r.req.Properties = make(map[string]types.Property) - } else { - tmp = r.req.Properties - } - - tmp[key] = *value.PropertyCaster() + r.req.Properties = properties - r.req.Properties = tmp return r } -// Enable making a routing value required on indexed documents. +// Routing_ Enable making a routing value required on indexed documents. // API name: _routing -func (r *PutMapping) Routing_(routing_ types.RoutingFieldVariant) *PutMapping { - // Initialize the request if it is not already initialized +func (r *PutMapping) Routing_(routing_ *types.RoutingField) *PutMapping { if r.req == nil { r.req = NewRequest() } - r.req.Routing_ = routing_.RoutingFieldCaster() + r.req.Routing_ = routing_ return r } -// Mapping of runtime fields for the index. +// Runtime Mapping of runtime fields for the index. // API name: runtime -func (r *PutMapping) Runtime(runtimefields types.RuntimeFieldsVariant) *PutMapping { - // Initialize the request if it is not already initialized +func (r *PutMapping) Runtime(runtimefields types.RuntimeFields) *PutMapping { if r.req == nil { r.req = NewRequest() } - - r.req.Runtime = *runtimefields.RuntimeFieldsCaster() + r.req.Runtime = runtimefields return r } -// Control whether the _source field is enabled on the index. +// Source_ Control whether the _source field is enabled on the index. // API name: _source -func (r *PutMapping) Source_(source_ types.SourceFieldVariant) *PutMapping { - // Initialize the request if it is not already initialized +func (r *PutMapping) Source_(source_ *types.SourceField) *PutMapping { if r.req == nil { r.req = NewRequest() } - r.req.Source_ = source_.SourceFieldCaster() + r.req.Source_ = source_ return r } diff --git a/typedapi/indices/putmapping/request.go b/typedapi/indices/putmapping/request.go index aa27331b64..52a1bf568d 100644 --- a/typedapi/indices/putmapping/request.go +++ b/typedapi/indices/putmapping/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putmapping @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L181 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L180 type Request struct { // DateDetection Controls whether dynamic date detection is enabled. @@ -299,6 +299,12 @@ func (s *Request) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := types.NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := types.NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { diff --git a/typedapi/indices/putmapping/response.go b/typedapi/indices/putmapping/response.go index 2b3a173d44..50d4f50cbb 100644 --- a/typedapi/indices/putmapping/response.go +++ b/typedapi/indices/putmapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putsettings/put_settings.go b/typedapi/indices/putsettings/put_settings.go index 7eb538e63b..bd0488d1b1 100644 --- a/typedapi/indices/putsettings/put_settings.go +++ b/typedapi/indices/putsettings/put_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update index settings. // Changes dynamic index settings in real time. @@ -25,10 +25,57 @@ // // To revert a setting to the default value, use a null value. // The list of per-index settings that can be updated dynamically on live -// indices can be found in index module documentation. +// indices can be found in index settings documentation. // To preserve existing settings from being updated, set the `preserve_existing` // parameter to `true`. // +// There are multiple valid ways to represent index settings in the request +// +// body. You can specify only the setting, for example: +// +// ``` +// +// { +// "number_of_replicas": 1 +// } +// +// ``` +// +// Or you can use an `index` setting object: +// ``` +// +// { +// "index": { +// "number_of_replicas": 1 +// } +// } +// +// ``` +// +// Or you can use dot annotation: +// ``` +// +// { +// "index.number_of_replicas": 1 +// } +// +// ``` +// +// Or you can embed any of the aforementioned options in a `settings` object. +// For example: +// +// ``` +// +// { +// "settings": { +// "index": { +// "number_of_replicas": 1 +// } +// } +// } +// +// ``` +// // NOTE: You can only define new analyzers on closed indices. // To add an analyzer, you must close the index, define the analyzer, and reopen // the index. @@ -112,10 +159,57 @@ func NewPutSettingsFunc(tp elastictransport.Interface) NewPutSettings { // // To revert a setting to the default value, use a null value. // The list of per-index settings that can be updated dynamically on live -// indices can be found in index module documentation. +// indices can be found in index settings documentation. // To preserve existing settings from being updated, set the `preserve_existing` // parameter to `true`. // +// There are multiple valid ways to represent index settings in the request +// +// body. You can specify only the setting, for example: +// +// ``` +// +// { +// "number_of_replicas": 1 +// } +// +// ``` +// +// Or you can use an `index` setting object: +// ``` +// +// { +// "index": { +// "number_of_replicas": 1 +// } +// } +// +// ``` +// +// Or you can use dot annotation: +// ``` +// +// { +// "index.number_of_replicas": 1 +// } +// +// ``` +// +// Or you can embed any of the aforementioned options in a `settings` object. +// For example: +// +// ``` +// +// { +// "settings": { +// "index": { +// "number_of_replicas": 1 +// } +// } +// } +// +// ``` +// // NOTE: You can only define new analyzers on closed indices. // To add an analyzer, you must close the index, define the analyzer, and reopen // the index. @@ -493,68 +587,62 @@ func (r *PutSettings) Pretty(pretty bool) *PutSettings { } // API name: analysis -func (r *PutSettings) Analysis(analysis types.IndexSettingsAnalysisVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Analysis(analysis *types.IndexSettingsAnalysis) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Analysis = analysis.IndexSettingsAnalysisCaster() + r.req.Analysis = analysis return r } -// Settings to define analyzers, tokenizers, token filters and character +// Analyze Settings to define analyzers, tokenizers, token filters and character // filters. // API name: analyze -func (r *PutSettings) Analyze(analyze types.SettingsAnalyzeVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Analyze(analyze *types.SettingsAnalyze) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Analyze = analyze.SettingsAnalyzeCaster() + r.req.Analyze = analyze return r } // API name: auto_expand_replicas func (r *PutSettings) AutoExpandReplicas(autoexpandreplicas any) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AutoExpandReplicas = autoexpandreplicas return r } // API name: blocks -func (r *PutSettings) Blocks(blocks types.IndexSettingBlocksVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Blocks(blocks *types.IndexSettingBlocks) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Blocks = blocks.IndexSettingBlocksCaster() + r.req.Blocks = blocks return r } // API name: check_on_startup func (r *PutSettings) CheckOnStartup(checkonstartup indexcheckonstartup.IndexCheckOnStartup) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.CheckOnStartup = &checkonstartup + return r } // API name: codec func (r *PutSettings) Codec(codec string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -565,36 +653,30 @@ func (r *PutSettings) Codec(codec string) *PutSettings { } // API name: creation_date -func (r *PutSettings) CreationDate(stringifiedepochtimeunitmillis types.StringifiedEpochTimeUnitMillisVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) CreationDate(stringifiedepochtimeunitmillis types.StringifiedEpochTimeUnitMillis) *PutSettings { if r.req == nil { r.req = NewRequest() } - - r.req.CreationDate = *stringifiedepochtimeunitmillis.StringifiedEpochTimeUnitMillisCaster() + r.req.CreationDate = stringifiedepochtimeunitmillis return r } // API name: creation_date_string -func (r *PutSettings) CreationDateString(datetime types.DateTimeVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) CreationDateString(datetime types.DateTime) *PutSettings { if r.req == nil { r.req = NewRequest() } - - r.req.CreationDateString = *datetime.DateTimeCaster() + r.req.CreationDateString = datetime return r } // API name: default_pipeline func (r *PutSettings) DefaultPipeline(pipelinename string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.DefaultPipeline = &pipelinename return r @@ -602,11 +684,9 @@ func (r *PutSettings) DefaultPipeline(pipelinename string) *PutSettings { // API name: final_pipeline func (r *PutSettings) FinalPipeline(pipelinename string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FinalPipeline = &pipelinename return r @@ -614,162 +694,128 @@ func (r *PutSettings) FinalPipeline(pipelinename string) *PutSettings { // API name: format func (r *PutSettings) Format(format string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.Format = format + r.req.Format = &format return r } // API name: gc_deletes -func (r *PutSettings) GcDeletes(duration types.DurationVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) GcDeletes(duration types.Duration) *PutSettings { if r.req == nil { r.req = NewRequest() } - - r.req.GcDeletes = *duration.DurationCaster() + r.req.GcDeletes = duration return r } // API name: hidden func (r *PutSettings) Hidden(hidden string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.Hidden = hidden + r.req.Hidden = &hidden return r } // API name: highlight -func (r *PutSettings) Highlight(highlight types.SettingsHighlightVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Highlight(highlight *types.SettingsHighlight) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Highlight = highlight.SettingsHighlightCaster() + r.req.Highlight = highlight return r } // API name: index -func (r *PutSettings) Index(index types.IndexSettingsVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Index(index *types.IndexSettings) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Index = index.IndexSettingsCaster() + r.req.Index = index return r } // API name: IndexSettings func (r *PutSettings) IndexSettings(indexsettings map[string]json.RawMessage) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexSettings = indexsettings - return r -} -func (r *PutSettings) AddIndexSetting(key string, value json.RawMessage) *PutSettings { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.IndexSettings == nil { - r.req.IndexSettings = make(map[string]json.RawMessage) - } else { - tmp = r.req.IndexSettings - } - - tmp[key] = value + r.req.IndexSettings = indexsettings - r.req.IndexSettings = tmp return r } -// Configure indexing back pressure limits. +// IndexingPressure Configure indexing back pressure limits. // API name: indexing_pressure -func (r *PutSettings) IndexingPressure(indexingpressure types.IndicesIndexingPressureVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) IndexingPressure(indexingpressure *types.IndicesIndexingPressure) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.IndexingPressure = indexingpressure.IndicesIndexingPressureCaster() + r.req.IndexingPressure = indexingpressure return r } // API name: indexing.slowlog -func (r *PutSettings) IndexingSlowlog(indexingslowlog types.IndexingSlowlogSettingsVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) IndexingSlowlog(indexingslowlog *types.IndexingSlowlogSettings) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.IndexingSlowlog = indexingslowlog.IndexingSlowlogSettingsCaster() + r.req.IndexingSlowlog = indexingslowlog return r } // API name: lifecycle -func (r *PutSettings) Lifecycle(lifecycle types.IndexSettingsLifecycleVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Lifecycle(lifecycle *types.IndexSettingsLifecycle) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Lifecycle = lifecycle.IndexSettingsLifecycleCaster() + r.req.Lifecycle = lifecycle return r } // API name: load_fixed_bitset_filters_eagerly func (r *PutSettings) LoadFixedBitsetFiltersEagerly(loadfixedbitsetfilterseagerly bool) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.LoadFixedBitsetFiltersEagerly = &loadfixedbitsetfilterseagerly return r } -// Enable or disable dynamic mapping for an index. +// Mapping Enable or disable dynamic mapping for an index. // API name: mapping -func (r *PutSettings) Mapping(mapping types.MappingLimitSettingsVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Mapping(mapping *types.MappingLimitSettings) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Mapping = mapping.MappingLimitSettingsCaster() + r.req.Mapping = mapping return r } // API name: max_docvalue_fields_search func (r *PutSettings) MaxDocvalueFieldsSearch(maxdocvaluefieldssearch int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxDocvalueFieldsSearch = &maxdocvaluefieldssearch return r @@ -777,11 +823,9 @@ func (r *PutSettings) MaxDocvalueFieldsSearch(maxdocvaluefieldssearch int) *PutS // API name: max_inner_result_window func (r *PutSettings) MaxInnerResultWindow(maxinnerresultwindow int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxInnerResultWindow = &maxinnerresultwindow return r @@ -789,11 +833,9 @@ func (r *PutSettings) MaxInnerResultWindow(maxinnerresultwindow int) *PutSetting // API name: max_ngram_diff func (r *PutSettings) MaxNgramDiff(maxngramdiff int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxNgramDiff = &maxngramdiff return r @@ -801,11 +843,9 @@ func (r *PutSettings) MaxNgramDiff(maxngramdiff int) *PutSettings { // API name: max_refresh_listeners func (r *PutSettings) MaxRefreshListeners(maxrefreshlisteners int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxRefreshListeners = &maxrefreshlisteners return r @@ -813,11 +853,9 @@ func (r *PutSettings) MaxRefreshListeners(maxrefreshlisteners int) *PutSettings // API name: max_regex_length func (r *PutSettings) MaxRegexLength(maxregexlength int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxRegexLength = &maxregexlength return r @@ -825,11 +863,9 @@ func (r *PutSettings) MaxRegexLength(maxregexlength int) *PutSettings { // API name: max_rescore_window func (r *PutSettings) MaxRescoreWindow(maxrescorewindow int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxRescoreWindow = &maxrescorewindow return r @@ -837,11 +873,9 @@ func (r *PutSettings) MaxRescoreWindow(maxrescorewindow int) *PutSettings { // API name: max_result_window func (r *PutSettings) MaxResultWindow(maxresultwindow int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxResultWindow = &maxresultwindow return r @@ -849,11 +883,9 @@ func (r *PutSettings) MaxResultWindow(maxresultwindow int) *PutSettings { // API name: max_script_fields func (r *PutSettings) MaxScriptFields(maxscriptfields int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxScriptFields = &maxscriptfields return r @@ -861,11 +893,9 @@ func (r *PutSettings) MaxScriptFields(maxscriptfields int) *PutSettings { // API name: max_shingle_diff func (r *PutSettings) MaxShingleDiff(maxshinglediff int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxShingleDiff = &maxshinglediff return r @@ -873,11 +903,9 @@ func (r *PutSettings) MaxShingleDiff(maxshinglediff int) *PutSettings { // API name: max_slices_per_scroll func (r *PutSettings) MaxSlicesPerScroll(maxslicesperscroll int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxSlicesPerScroll = &maxslicesperscroll return r @@ -885,31 +913,27 @@ func (r *PutSettings) MaxSlicesPerScroll(maxslicesperscroll int) *PutSettings { // API name: max_terms_count func (r *PutSettings) MaxTermsCount(maxtermscount int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxTermsCount = &maxtermscount return r } // API name: merge -func (r *PutSettings) Merge(merge types.MergeVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Merge(merge *types.Merge) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Merge = merge.MergeCaster() + r.req.Merge = merge return r } // API name: mode func (r *PutSettings) Mode(mode string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -921,23 +945,19 @@ func (r *PutSettings) Mode(mode string) *PutSettings { // API name: number_of_replicas func (r *PutSettings) NumberOfReplicas(numberofreplicas string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.NumberOfReplicas = numberofreplicas + r.req.NumberOfReplicas = &numberofreplicas return r } // API name: number_of_routing_shards func (r *PutSettings) NumberOfRoutingShards(numberofroutingshards int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.NumberOfRoutingShards = &numberofroutingshards return r @@ -945,248 +965,204 @@ func (r *PutSettings) NumberOfRoutingShards(numberofroutingshards int) *PutSetti // API name: number_of_shards func (r *PutSettings) NumberOfShards(numberofshards string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.NumberOfShards = numberofshards + r.req.NumberOfShards = &numberofshards return r } // API name: priority func (r *PutSettings) Priority(priority string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.Priority = priority + r.req.Priority = &priority return r } // API name: provided_name func (r *PutSettings) ProvidedName(name string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ProvidedName = &name return r } // API name: queries -func (r *PutSettings) Queries(queries types.QueriesVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Queries(queries *types.Queries) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Queries = queries.QueriesCaster() + r.req.Queries = queries return r } // API name: query_string -func (r *PutSettings) QueryString(querystring types.SettingsQueryStringVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) QueryString(querystring *types.SettingsQueryString) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.QueryString = querystring.SettingsQueryStringCaster() + r.req.QueryString = querystring return r } // API name: refresh_interval -func (r *PutSettings) RefreshInterval(duration types.DurationVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) RefreshInterval(duration types.Duration) *PutSettings { if r.req == nil { r.req = NewRequest() } - - r.req.RefreshInterval = *duration.DurationCaster() + r.req.RefreshInterval = duration return r } // API name: routing -func (r *PutSettings) Routing(routing types.IndexRoutingVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Routing(routing *types.IndexRouting) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Routing = routing.IndexRoutingCaster() + r.req.Routing = routing return r } // API name: routing_partition_size -func (r *PutSettings) RoutingPartitionSize(stringifiedinteger types.StringifiedintegerVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) RoutingPartitionSize(stringifiedinteger types.Stringifiedinteger) *PutSettings { if r.req == nil { r.req = NewRequest() } - - r.req.RoutingPartitionSize = *stringifiedinteger.StringifiedintegerCaster() + r.req.RoutingPartitionSize = stringifiedinteger return r } // API name: routing_path func (r *PutSettings) RoutingPath(routingpaths ...string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RoutingPath = make([]string, len(routingpaths)) r.req.RoutingPath = routingpaths return r } // API name: search -func (r *PutSettings) Search(search types.SettingsSearchVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Search(search *types.SettingsSearch) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Search = search.SettingsSearchCaster() + r.req.Search = search return r } // API name: settings -func (r *PutSettings) Settings(settings types.IndexSettingsVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Settings(settings *types.IndexSettings) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.IndexSettingsCaster() + r.req.Settings = settings return r } -// Configure custom similarity settings to customize how search results are +// Similarity Configure custom similarity settings to customize how search results are // scored. // API name: similarity func (r *PutSettings) Similarity(similarity map[string]types.SettingsSimilarity) *PutSettings { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Similarity = similarity - return r -} - -func (r *PutSettings) AddSimilarity(key string, value types.SettingsSimilarityVariant) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.SettingsSimilarity - if r.req.Similarity == nil { - r.req.Similarity = make(map[string]types.SettingsSimilarity) - } else { - tmp = r.req.Similarity - } - - tmp[key] = *value.SettingsSimilarityCaster() + r.req.Similarity = similarity - r.req.Similarity = tmp return r } // API name: soft_deletes -func (r *PutSettings) SoftDeletes(softdeletes types.SoftDeletesVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) SoftDeletes(softdeletes *types.SoftDeletes) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.SoftDeletes = softdeletes.SoftDeletesCaster() + r.req.SoftDeletes = softdeletes return r } // API name: sort -func (r *PutSettings) Sort(sort types.IndexSegmentSortVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Sort(sort *types.IndexSegmentSort) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Sort = sort.IndexSegmentSortCaster() + r.req.Sort = sort return r } -// The store module allows you to control how index data is stored and accessed +// Store The store module allows you to control how index data is stored and accessed // on disk. // API name: store -func (r *PutSettings) Store(store types.StorageVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Store(store *types.Storage) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Store = store.StorageCaster() + r.req.Store = store return r } // API name: time_series -func (r *PutSettings) TimeSeries(timeseries types.IndexSettingsTimeSeriesVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) TimeSeries(timeseries *types.IndexSettingsTimeSeries) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.TimeSeries = timeseries.IndexSettingsTimeSeriesCaster() + r.req.TimeSeries = timeseries return r } // API name: top_metrics_max_size func (r *PutSettings) TopMetricsMaxSize(topmetricsmaxsize int) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TopMetricsMaxSize = &topmetricsmaxsize return r } // API name: translog -func (r *PutSettings) Translog(translog types.TranslogVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Translog(translog *types.Translog) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Translog = translog.TranslogCaster() + r.req.Translog = translog return r } // API name: uuid func (r *PutSettings) Uuid(uuid string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Uuid = &uuid return r @@ -1194,24 +1170,21 @@ func (r *PutSettings) Uuid(uuid string) *PutSettings { // API name: verified_before_close func (r *PutSettings) VerifiedBeforeClose(verifiedbeforeclose string) *PutSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.VerifiedBeforeClose = verifiedbeforeclose + r.req.VerifiedBeforeClose = &verifiedbeforeclose return r } // API name: version -func (r *PutSettings) Version(version types.IndexVersioningVariant) *PutSettings { - // Initialize the request if it is not already initialized +func (r *PutSettings) Version(version *types.IndexVersioning) *PutSettings { if r.req == nil { r.req = NewRequest() } - r.req.Version = version.IndexVersioningCaster() + r.req.Version = version return r } diff --git a/typedapi/indices/putsettings/request.go b/typedapi/indices/putsettings/request.go index 0ab5097fef..f17f64a9ce 100644 --- a/typedapi/indices/putsettings/request.go +++ b/typedapi/indices/putsettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsettings @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L162 type Request = types.IndexSettings // NewRequest returns a Request diff --git a/typedapi/indices/putsettings/response.go b/typedapi/indices/putsettings/response.go index 7b4ace2986..d89e25de94 100644 --- a/typedapi/indices/putsettings/response.go +++ b/typedapi/indices/putsettings/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsettings // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/puttemplate/put_template.go b/typedapi/indices/puttemplate/put_template.go index cb22f01305..652eb78e91 100644 --- a/typedapi/indices/puttemplate/put_template.go +++ b/typedapi/indices/puttemplate/put_template.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 -// Create or update an index template. +// Create or update a legacy index template. // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // Elasticsearch applies templates to new indices based on an index pattern that @@ -112,7 +112,7 @@ func NewPutTemplateFunc(tp elastictransport.Interface) NewPutTemplate { } } -// Create or update an index template. +// Create or update a legacy index template. // Index templates define settings, mappings, and aliases that can be applied // automatically to new indices. // Elasticsearch applies templates to new indices based on an index pattern that @@ -442,103 +442,77 @@ func (r *PutTemplate) Pretty(pretty bool) *PutTemplate { return r } -// Aliases for the index. +// Aliases Aliases for the index. // API name: aliases func (r *PutTemplate) Aliases(aliases map[string]types.Alias) *PutTemplate { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Aliases = aliases - return r -} - -func (r *PutTemplate) AddAlias(key string, value types.AliasVariant) *PutTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.Alias - if r.req.Aliases == nil { - r.req.Aliases = make(map[string]types.Alias) - } else { - tmp = r.req.Aliases - } - - tmp[key] = *value.AliasCaster() + r.req.Aliases = aliases - r.req.Aliases = tmp return r } -// Array of wildcard expressions used to match the names +// IndexPatterns Array of wildcard expressions used to match the names // of indices during creation. // API name: index_patterns func (r *PutTemplate) IndexPatterns(indexpatterns ...string) *PutTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexPatterns = make([]string, len(indexpatterns)) r.req.IndexPatterns = indexpatterns return r } -// Mapping for fields in the index. +// Mappings Mapping for fields in the index. // API name: mappings -func (r *PutTemplate) Mappings(mappings types.TypeMappingVariant) *PutTemplate { - // Initialize the request if it is not already initialized +func (r *PutTemplate) Mappings(mappings *types.TypeMapping) *PutTemplate { if r.req == nil { r.req = NewRequest() } - r.req.Mappings = mappings.TypeMappingCaster() + r.req.Mappings = mappings return r } -// Order in which Elasticsearch applies this template if index +// Order Order in which Elasticsearch applies this template if index // matches multiple templates. // // Templates with lower 'order' values are merged first. Templates with higher // 'order' values are merged later, overriding templates with lower values. // API name: order func (r *PutTemplate) Order(order int) *PutTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Order = &order return r } -// Configuration options for the index. +// Settings Configuration options for the index. // API name: settings -func (r *PutTemplate) Settings(settings types.IndexSettingsVariant) *PutTemplate { - // Initialize the request if it is not already initialized +func (r *PutTemplate) Settings(settings *types.IndexSettings) *PutTemplate { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.IndexSettingsCaster() + r.req.Settings = settings return r } -// Version number used to manage index templates externally. This number +// Version Version number used to manage index templates externally. This number // is not automatically generated by Elasticsearch. // To unset a version, replace the template without specifying one. // API name: version func (r *PutTemplate) Version(versionnumber int64) *PutTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionnumber return r diff --git a/typedapi/indices/puttemplate/request.go b/typedapi/indices/puttemplate/request.go index d9185c25a0..d93092e2d7 100644 --- a/typedapi/indices/puttemplate/request.go +++ b/typedapi/indices/puttemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L125 type Request struct { // Aliases Aliases for the index. diff --git a/typedapi/indices/puttemplate/response.go b/typedapi/indices/puttemplate/response.go index 8cf3639f5e..0acca3a2cf 100644 --- a/typedapi/indices/puttemplate/response.go +++ b/typedapi/indices/puttemplate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttemplate // Response holds the response body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/recovery/recovery.go b/typedapi/indices/recovery/recovery.go index 3fecc2f140..b2c2c0584b 100644 --- a/typedapi/indices/recovery/recovery.go +++ b/typedapi/indices/recovery/recovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index recovery information. // Get information about ongoing and completed shard recoveries for one or more @@ -69,6 +69,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/expandwildcard" ) const ( @@ -390,6 +391,40 @@ func (r *Recovery) Detailed(detailed bool) *Recovery { return r } +// AllowNoIndices If `false`, the request returns an error if any wildcard expression, index +// alias, or `_all` value targets only missing or closed indices. +// This behavior applies even if the request targets other open indices. +// API name: allow_no_indices +func (r *Recovery) AllowNoIndices(allownoindices bool) *Recovery { + r.values.Set("allow_no_indices", strconv.FormatBool(allownoindices)) + + return r +} + +// ExpandWildcards Type of index that wildcard patterns can match. +// If the request can target data streams, this argument determines whether +// wildcard expressions match hidden data streams. +// Supports comma-separated values, such as `open,hidden`. +// API name: expand_wildcards +func (r *Recovery) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Recovery { + tmp := []string{} + for _, item := range expandwildcards { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + return r +} + +// IgnoreUnavailable If `false`, the request returns an error if it targets a missing or closed +// index. +// API name: ignore_unavailable +func (r *Recovery) IgnoreUnavailable(ignoreunavailable bool) *Recovery { + r.values.Set("ignore_unavailable", strconv.FormatBool(ignoreunavailable)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/indices/recovery/response.go b/typedapi/indices/recovery/response.go index 0f98a1479c..897e0feb5b 100644 --- a/typedapi/indices/recovery/response.go +++ b/typedapi/indices/recovery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/IndicesRecoveryResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/IndicesRecoveryResponse.ts#L24-L27 type Response map[string]types.RecoveryStatus diff --git a/typedapi/indices/refresh/refresh.go b/typedapi/indices/refresh/refresh.go index 6b60f6b39c..7275333223 100644 --- a/typedapi/indices/refresh/refresh.go +++ b/typedapi/indices/refresh/refresh.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Refresh an index. // A refresh makes recent operations performed on one or more indices available @@ -367,7 +367,6 @@ func (r *Refresh) AllowNoIndices(allownoindices bool) *Refresh { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Refresh) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Refresh { tmp := []string{} diff --git a/typedapi/indices/refresh/response.go b/typedapi/indices/refresh/response.go index 9a41dba978..854d0532ee 100644 --- a/typedapi/indices/refresh/response.go +++ b/typedapi/indices/refresh/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package refresh @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package refresh // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L24 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go b/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go index d36ee226de..dd950601f7 100644 --- a/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go +++ b/typedapi/indices/reloadsearchanalyzers/reload_search_analyzers.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reload search analyzers. // Reload an index's search analyzers and their resources. diff --git a/typedapi/indices/reloadsearchanalyzers/response.go b/typedapi/indices/reloadsearchanalyzers/response.go index c61369ecb4..2e8d0af8c3 100644 --- a/typedapi/indices/reloadsearchanalyzers/response.go +++ b/typedapi/indices/reloadsearchanalyzers/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reloadsearchanalyzers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsearchanalyzers // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L24 type Response struct { ReloadDetails []types.ReloadDetails `json:"reload_details"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/resolvecluster/resolve_cluster.go b/typedapi/indices/resolvecluster/resolve_cluster.go index 61fb9cceb0..866b861ea3 100644 --- a/typedapi/indices/resolvecluster/resolve_cluster.go +++ b/typedapi/indices/resolvecluster/resolve_cluster.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Resolve the cluster. // @@ -495,7 +495,6 @@ func (r *ResolveCluster) AllowNoIndices(allownoindices bool) *ResolveCluster { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // NOTE: This option is only supported when specifying an index expression. You // will get an error if you specify index // options to the `_resolve/cluster` API endpoint that takes no index diff --git a/typedapi/indices/resolvecluster/response.go b/typedapi/indices/resolvecluster/response.go index 3b0f12da2e..18aac46399 100644 --- a/typedapi/indices/resolvecluster/response.go +++ b/typedapi/indices/resolvecluster/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resolvecluster @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolvecluster // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27 type Response map[string]types.ResolveClusterInfo diff --git a/typedapi/indices/resolveindex/resolve_index.go b/typedapi/indices/resolveindex/resolve_index.go index a9fc997ad5..3d7dfaece6 100644 --- a/typedapi/indices/resolveindex/resolve_index.go +++ b/typedapi/indices/resolveindex/resolve_index.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Resolve indices. // Resolve the names and/or index patterns for indices, aliases, and data @@ -313,7 +313,6 @@ func (r *ResolveIndex) _name(name string) *ResolveIndex { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *ResolveIndex) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *ResolveIndex { tmp := []string{} diff --git a/typedapi/indices/resolveindex/response.go b/typedapi/indices/resolveindex/response.go index c629e03f0c..c6195fc15f 100644 --- a/typedapi/indices/resolveindex/response.go +++ b/typedapi/indices/resolveindex/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resolveindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolveindex // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/resolve_index/ResolveIndexResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/resolve_index/ResolveIndexResponse.ts#L22-L28 type Response struct { Aliases []types.ResolveIndexAliasItem `json:"aliases"` DataStreams []types.ResolveIndexDataStreamsItem `json:"data_streams"` diff --git a/typedapi/indices/rollover/request.go b/typedapi/indices/rollover/request.go index 812953431b..8d91ef08f8 100644 --- a/typedapi/indices/rollover/request.go +++ b/typedapi/indices/rollover/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rollover @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L153 type Request struct { // Aliases Aliases for the target index. diff --git a/typedapi/indices/rollover/response.go b/typedapi/indices/rollover/response.go index a659b6544c..0e9830ae85 100644 --- a/typedapi/indices/rollover/response.go +++ b/typedapi/indices/rollover/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rollover // Response holds the response body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/rollover/IndicesRolloverResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/rollover/IndicesRolloverResponse.ts#L22-L32 type Response struct { Acknowledged bool `json:"acknowledged"` Conditions map[string]bool `json:"conditions"` diff --git a/typedapi/indices/rollover/rollover.go b/typedapi/indices/rollover/rollover.go index 52a91c553b..db71e398c1 100644 --- a/typedapi/indices/rollover/rollover.go +++ b/typedapi/indices/rollover/rollover.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Roll over to a new index. // TIP: It is recommended to use the index lifecycle rollover action to automate @@ -544,38 +544,20 @@ func (r *Rollover) Pretty(pretty bool) *Rollover { return r } -// Aliases for the target index. +// Aliases Aliases for the target index. // Data streams do not support this parameter. // API name: aliases func (r *Rollover) Aliases(aliases map[string]types.Alias) *Rollover { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aliases = aliases - return r -} -func (r *Rollover) AddAlias(key string, value types.AliasVariant) *Rollover { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Alias - if r.req.Aliases == nil { - r.req.Aliases = make(map[string]types.Alias) - } else { - tmp = r.req.Aliases - } - - tmp[key] = *value.AliasCaster() + r.req.Aliases = aliases - r.req.Aliases = tmp return r } -// Conditions for the rollover. +// Conditions Conditions for the rollover. // If specified, Elasticsearch only performs the rollover if the current index // satisfies these conditions. // If this parameter is not specified, Elasticsearch performs the rollover @@ -585,59 +567,39 @@ func (r *Rollover) AddAlias(key string, value types.AliasVariant) *Rollover { // The index will rollover if any `max_*` condition is satisfied and all `min_*` // conditions are satisfied. // API name: conditions -func (r *Rollover) Conditions(conditions types.RolloverConditionsVariant) *Rollover { - // Initialize the request if it is not already initialized +func (r *Rollover) Conditions(conditions *types.RolloverConditions) *Rollover { if r.req == nil { r.req = NewRequest() } - r.req.Conditions = conditions.RolloverConditionsCaster() + r.req.Conditions = conditions return r } -// Mapping for fields in the index. +// Mappings Mapping for fields in the index. // If specified, this mapping can include field names, field data types, and // mapping paramaters. // API name: mappings -func (r *Rollover) Mappings(mappings types.TypeMappingVariant) *Rollover { - // Initialize the request if it is not already initialized +func (r *Rollover) Mappings(mappings *types.TypeMapping) *Rollover { if r.req == nil { r.req = NewRequest() } - r.req.Mappings = mappings.TypeMappingCaster() + r.req.Mappings = mappings return r } -// Configuration options for the index. +// Settings Configuration options for the index. // Data streams do not support this parameter. // API name: settings func (r *Rollover) Settings(settings map[string]json.RawMessage) *Rollover { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings - return r -} -func (r *Rollover) AddSetting(key string, value json.RawMessage) *Rollover { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Settings == nil { - r.req.Settings = make(map[string]json.RawMessage) - } else { - tmp = r.req.Settings - } - - tmp[key] = value + r.req.Settings = settings - r.req.Settings = tmp return r } diff --git a/typedapi/indices/segments/response.go b/typedapi/indices/segments/response.go index d97fd288a0..c497b256d5 100644 --- a/typedapi/indices/segments/response.go +++ b/typedapi/indices/segments/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/segments/IndicesSegmentsResponse.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/segments/IndicesSegmentsResponse.ts#L24-L29 type Response struct { Indices map[string]types.IndexSegment `json:"indices"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/segments/segments.go b/typedapi/indices/segments/segments.go index 96b91b9b5c..9cc1aa22e2 100644 --- a/typedapi/indices/segments/segments.go +++ b/typedapi/indices/segments/segments.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index segments. // Get low-level information about the Lucene segments in index shards. @@ -325,7 +325,6 @@ func (r *Segments) AllowNoIndices(allownoindices bool) *Segments { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *Segments) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *Segments { tmp := []string{} diff --git a/typedapi/indices/shardstores/response.go b/typedapi/indices/shardstores/response.go index 7ac23c9366..3028ebdf05 100644 --- a/typedapi/indices/shardstores/response.go +++ b/typedapi/indices/shardstores/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package shardstores @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shardstores // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26 type Response struct { Indices map[string]types.IndicesShardStores `json:"indices"` } diff --git a/typedapi/indices/shardstores/shard_stores.go b/typedapi/indices/shardstores/shard_stores.go index 8debe0661f..6d779977e9 100644 --- a/typedapi/indices/shardstores/shard_stores.go +++ b/typedapi/indices/shardstores/shard_stores.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index shard stores. // Get store information about replica shards in one or more indices. diff --git a/typedapi/indices/shrink/request.go b/typedapi/indices/shrink/request.go index 0962d31364..e0b6c2ff24 100644 --- a/typedapi/indices/shrink/request.go +++ b/typedapi/indices/shrink/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package shrink @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L113 type Request struct { // Aliases The key is the alias name. diff --git a/typedapi/indices/shrink/response.go b/typedapi/indices/shrink/response.go index d470094369..8a3ccb15c0 100644 --- a/typedapi/indices/shrink/response.go +++ b/typedapi/indices/shrink/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package shrink // Response holds the response body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shrink/IndicesShrinkResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shrink/IndicesShrinkResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/shrink/shrink.go b/typedapi/indices/shrink/shrink.go index eb021cbd78..cd12455549 100644 --- a/typedapi/indices/shrink/shrink.go +++ b/typedapi/indices/shrink/shrink.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Shrink an index. // Shrink an index into a new index with fewer primary shards. @@ -516,63 +516,27 @@ func (r *Shrink) Pretty(pretty bool) *Shrink { return r } -// The key is the alias name. +// Aliases The key is the alias name. // Index alias names support date math. // API name: aliases func (r *Shrink) Aliases(aliases map[string]types.Alias) *Shrink { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aliases = aliases - return r -} -func (r *Shrink) AddAlias(key string, value types.AliasVariant) *Shrink { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Alias - if r.req.Aliases == nil { - r.req.Aliases = make(map[string]types.Alias) - } else { - tmp = r.req.Aliases - } - - tmp[key] = *value.AliasCaster() + r.req.Aliases = aliases - r.req.Aliases = tmp return r } -// Configuration options for the target index. +// Settings Configuration options for the target index. // API name: settings func (r *Shrink) Settings(settings map[string]json.RawMessage) *Shrink { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings - return r -} -func (r *Shrink) AddSetting(key string, value json.RawMessage) *Shrink { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Settings == nil { - r.req.Settings = make(map[string]json.RawMessage) - } else { - tmp = r.req.Settings - } - - tmp[key] = value + r.req.Settings = settings - r.req.Settings = tmp return r } diff --git a/typedapi/indices/simulateindextemplate/response.go b/typedapi/indices/simulateindextemplate/response.go index 77e6520ecc..3cef60e386 100644 --- a/typedapi/indices/simulateindextemplate/response.go +++ b/typedapi/indices/simulateindextemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package simulateindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulateindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30 type Response struct { Overlapping []types.Overlapping `json:"overlapping,omitempty"` Template types.Template `json:"template"` diff --git a/typedapi/indices/simulateindextemplate/simulate_index_template.go b/typedapi/indices/simulateindextemplate/simulate_index_template.go index e00e1b5920..8f11983662 100644 --- a/typedapi/indices/simulateindextemplate/simulate_index_template.go +++ b/typedapi/indices/simulateindextemplate/simulate_index_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Simulate an index. // Get the index configuration that would be applied to the specified index from diff --git a/typedapi/indices/simulatetemplate/request.go b/typedapi/indices/simulatetemplate/request.go index 522d9689e9..11c75e2a5d 100644 --- a/typedapi/indices/simulatetemplate/request.go +++ b/typedapi/indices/simulatetemplate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package simulatetemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L135 type Request struct { // AllowAutoCreate This setting overrides the value of the `action.auto_create_index` cluster diff --git a/typedapi/indices/simulatetemplate/response.go b/typedapi/indices/simulatetemplate/response.go index 212f8f22f2..aecc70c916 100644 --- a/typedapi/indices/simulatetemplate/response.go +++ b/typedapi/indices/simulatetemplate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package simulatetemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31 type Response struct { Overlapping []types.Overlapping `json:"overlapping,omitempty"` Template types.Template `json:"template"` diff --git a/typedapi/indices/simulatetemplate/simulate_template.go b/typedapi/indices/simulatetemplate/simulate_template.go index 9c1554615f..15ef471b5f 100644 --- a/typedapi/indices/simulatetemplate/simulate_template.go +++ b/typedapi/indices/simulatetemplate/simulate_template.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Simulate an index template. // Get the index configuration that would be applied by a particular index @@ -405,7 +405,7 @@ func (r *SimulateTemplate) Pretty(pretty bool) *SimulateTemplate { return r } -// This setting overrides the value of the `action.auto_create_index` cluster +// AllowAutoCreate This setting overrides the value of the `action.auto_create_index` cluster // setting. // If set to `true` in a template, then indices can be automatically created // using that template even if auto-creation of indices is disabled via @@ -414,112 +414,95 @@ func (r *SimulateTemplate) Pretty(pretty bool) *SimulateTemplate { // always be explicitly created, and may never be automatically created. // API name: allow_auto_create func (r *SimulateTemplate) AllowAutoCreate(allowautocreate bool) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowAutoCreate = &allowautocreate return r } -// An ordered list of component template names. +// ComposedOf An ordered list of component template names. // Component templates are merged in the order specified, meaning that the last // component template specified has the highest precedence. // API name: composed_of func (r *SimulateTemplate) ComposedOf(composedofs ...string) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range composedofs { - - r.req.ComposedOf = append(r.req.ComposedOf, v) + r.req.ComposedOf = composedofs - } return r } -// If this object is included, the template is used to create data streams and +// DataStream If this object is included, the template is used to create data streams and // their backing indices. // Supports an empty object. // Data streams require a matching index template with a `data_stream` object. // API name: data_stream -func (r *SimulateTemplate) DataStream(datastream types.DataStreamVisibilityVariant) *SimulateTemplate { - // Initialize the request if it is not already initialized +func (r *SimulateTemplate) DataStream(datastream *types.DataStreamVisibility) *SimulateTemplate { if r.req == nil { r.req = NewRequest() } - r.req.DataStream = datastream.DataStreamVisibilityCaster() + r.req.DataStream = datastream return r } -// Marks this index template as deprecated. When creating or updating a +// Deprecated Marks this index template as deprecated. When creating or updating a // non-deprecated index template // that uses deprecated components, Elasticsearch will emit a deprecation // warning. // API name: deprecated func (r *SimulateTemplate) Deprecated(deprecated bool) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Deprecated = &deprecated return r } -// The configuration option ignore_missing_component_templates can be used when +// IgnoreMissingComponentTemplates The configuration option ignore_missing_component_templates can be used when // an index template // references a component template that might not exist // API name: ignore_missing_component_templates func (r *SimulateTemplate) IgnoreMissingComponentTemplates(ignoremissingcomponenttemplates ...string) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range ignoremissingcomponenttemplates { - - r.req.IgnoreMissingComponentTemplates = append(r.req.IgnoreMissingComponentTemplates, v) + r.req.IgnoreMissingComponentTemplates = ignoremissingcomponenttemplates - } return r } -// Array of wildcard (`*`) expressions used to match the names of data streams +// IndexPatterns Array of wildcard (`*`) expressions used to match the names of data streams // and indices during creation. // API name: index_patterns func (r *SimulateTemplate) IndexPatterns(indices ...string) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexPatterns = indices return r } -// Optional user metadata about the index template. +// Meta_ Optional user metadata about the index template. // May have any contents. // This map is not automatically generated by Elasticsearch. // API name: _meta -func (r *SimulateTemplate) Meta_(metadata types.MetadataVariant) *SimulateTemplate { - // Initialize the request if it is not already initialized +func (r *SimulateTemplate) Meta_(metadata types.Metadata) *SimulateTemplate { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// Priority to determine index template precedence when a new data stream or +// Priority Priority to determine index template precedence when a new data stream or // index is created. // The index template with the highest priority is chosen. // If no priority is specified the template is treated as though it is of @@ -527,7 +510,6 @@ func (r *SimulateTemplate) Meta_(metadata types.MetadataVariant) *SimulateTempla // This number is not automatically generated by Elasticsearch. // API name: priority func (r *SimulateTemplate) Priority(priority int64) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -537,30 +519,27 @@ func (r *SimulateTemplate) Priority(priority int64) *SimulateTemplate { return r } -// Template to be applied. +// Template Template to be applied. // It may optionally include an `aliases`, `mappings`, or `settings` // configuration. // API name: template -func (r *SimulateTemplate) Template(template types.IndexTemplateMappingVariant) *SimulateTemplate { - // Initialize the request if it is not already initialized +func (r *SimulateTemplate) Template(template *types.IndexTemplateMapping) *SimulateTemplate { if r.req == nil { r.req = NewRequest() } - r.req.Template = template.IndexTemplateMappingCaster() + r.req.Template = template return r } -// Version number used to manage index templates externally. +// Version Version number used to manage index templates externally. // This number is not automatically generated by Elasticsearch. // API name: version func (r *SimulateTemplate) Version(versionnumber int64) *SimulateTemplate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionnumber return r diff --git a/typedapi/indices/split/request.go b/typedapi/indices/split/request.go index 25f29d446c..3190f1574d 100644 --- a/typedapi/indices/split/request.go +++ b/typedapi/indices/split/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package split @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/split/IndicesSplitRequest.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/split/IndicesSplitRequest.ts#L27-L113 type Request struct { // Aliases Aliases for the resulting index. diff --git a/typedapi/indices/split/response.go b/typedapi/indices/split/response.go index c1c6fa4831..449d9c2120 100644 --- a/typedapi/indices/split/response.go +++ b/typedapi/indices/split/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package split // Response holds the response body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/split/IndicesSplitResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/split/IndicesSplitResponse.ts#L22-L28 type Response struct { Acknowledged bool `json:"acknowledged"` Index string `json:"index"` diff --git a/typedapi/indices/split/split.go b/typedapi/indices/split/split.go index 2f9f1f0676..c1c0823da2 100644 --- a/typedapi/indices/split/split.go +++ b/typedapi/indices/split/split.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Split an index. // Split an index into a new index with more primary shards. @@ -500,62 +500,26 @@ func (r *Split) Pretty(pretty bool) *Split { return r } -// Aliases for the resulting index. +// Aliases Aliases for the resulting index. // API name: aliases func (r *Split) Aliases(aliases map[string]types.Alias) *Split { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aliases = aliases - return r -} -func (r *Split) AddAlias(key string, value types.AliasVariant) *Split { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Alias - if r.req.Aliases == nil { - r.req.Aliases = make(map[string]types.Alias) - } else { - tmp = r.req.Aliases - } - - tmp[key] = *value.AliasCaster() + r.req.Aliases = aliases - r.req.Aliases = tmp return r } -// Configuration options for the target index. +// Settings Configuration options for the target index. // API name: settings func (r *Split) Settings(settings map[string]json.RawMessage) *Split { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings - return r -} -func (r *Split) AddSetting(key string, value json.RawMessage) *Split { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Settings == nil { - r.req.Settings = make(map[string]json.RawMessage) - } else { - tmp = r.req.Settings - } - - tmp[key] = value + r.req.Settings = settings - r.req.Settings = tmp return r } diff --git a/typedapi/indices/stats/response.go b/typedapi/indices/stats/response.go index ca0eb45ff4..7afb967f78 100644 --- a/typedapi/indices/stats/response.go +++ b/typedapi/indices/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/IndicesStatsResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/IndicesStatsResponse.ts#L24-L30 type Response struct { All_ types.IndicesStats `json:"_all"` Indices map[string]types.IndicesStats `json:"indices,omitempty"` diff --git a/typedapi/indices/stats/stats.go b/typedapi/indices/stats/stats.go index a85c9b0159..0e8e2cd6d5 100644 --- a/typedapi/indices/stats/stats.go +++ b/typedapi/indices/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get index statistics. // For data streams, the API retrieves statistics for the stream's backing diff --git a/typedapi/indices/unfreeze/response.go b/typedapi/indices/unfreeze/response.go index 8eb3336a29..de0983e1b5 100644 --- a/typedapi/indices/unfreeze/response.go +++ b/typedapi/indices/unfreeze/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package unfreeze // Response holds the response body struct for the package unfreeze // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/unfreeze/IndicesUnfreezeResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/unfreeze/IndicesUnfreezeResponse.ts#L20-L25 type Response struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` diff --git a/typedapi/indices/unfreeze/unfreeze.go b/typedapi/indices/unfreeze/unfreeze.go index 328d4bdd05..08e9581425 100644 --- a/typedapi/indices/unfreeze/unfreeze.go +++ b/typedapi/indices/unfreeze/unfreeze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Unfreeze an index. // When a frozen index is unfrozen, the index goes through the normal recovery diff --git a/typedapi/indices/updatealiases/request.go b/typedapi/indices/updatealiases/request.go index a3f9618d50..a0467a87c2 100644 --- a/typedapi/indices/updatealiases/request.go +++ b/typedapi/indices/updatealiases/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatealiases @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L59 type Request struct { // Actions Actions to perform. diff --git a/typedapi/indices/updatealiases/response.go b/typedapi/indices/updatealiases/response.go index 8b5abdbf01..07a6e40543 100644 --- a/typedapi/indices/updatealiases/response.go +++ b/typedapi/indices/updatealiases/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatealiases // Response holds the response body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/updatealiases/update_aliases.go b/typedapi/indices/updatealiases/update_aliases.go index 037b9b66f1..573e007110 100644 --- a/typedapi/indices/updatealiases/update_aliases.go +++ b/typedapi/indices/updatealiases/update_aliases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update an alias. // Adds a data stream or index to an alias. @@ -354,17 +354,13 @@ func (r *UpdateAliases) Pretty(pretty bool) *UpdateAliases { return r } -// Actions to perform. +// Actions Actions to perform. // API name: actions -func (r *UpdateAliases) Actions(actions ...types.IndicesActionVariant) *UpdateAliases { - // Initialize the request if it is not already initialized +func (r *UpdateAliases) Actions(actions ...types.IndicesAction) *UpdateAliases { if r.req == nil { r.req = NewRequest() } - for _, v := range actions { + r.req.Actions = actions - r.req.Actions = append(r.req.Actions, *v.IndicesActionCaster()) - - } return r } diff --git a/typedapi/indices/validatequery/request.go b/typedapi/indices/validatequery/request.go index 1971edd267..62f288e58b 100644 --- a/typedapi/indices/validatequery/request.go +++ b/typedapi/indices/validatequery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package validatequery @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L123 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L122 type Request struct { // Query Query in the Lucene query string syntax. diff --git a/typedapi/indices/validatequery/response.go b/typedapi/indices/validatequery/response.go index 1eea91f18e..edb1a08bee 100644 --- a/typedapi/indices/validatequery/response.go +++ b/typedapi/indices/validatequery/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package validatequery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30 type Response struct { Error *string `json:"error,omitempty"` Explanations []types.IndicesValidationExplanation `json:"explanations,omitempty"` diff --git a/typedapi/indices/validatequery/validate_query.go b/typedapi/indices/validatequery/validate_query.go index 97655ebf3f..0dba53e64d 100644 --- a/typedapi/indices/validatequery/validate_query.go +++ b/typedapi/indices/validatequery/validate_query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Validate a query. // Validates a query without running it. @@ -384,7 +384,6 @@ func (r *ValidateQuery) Df(df string) *ValidateQuery { // If the request can target data streams, this argument determines whether // wildcard expressions match hidden data streams. // Supports comma-separated values, such as `open,hidden`. -// Valid values are: `all`, `open`, `closed`, `hidden`, `none`. // API name: expand_wildcards func (r *ValidateQuery) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *ValidateQuery { tmp := []string{} @@ -484,15 +483,14 @@ func (r *ValidateQuery) Pretty(pretty bool) *ValidateQuery { return r } -// Query in the Lucene query string syntax. +// Query Query in the Lucene query string syntax. // API name: query -func (r *ValidateQuery) Query(query types.QueryVariant) *ValidateQuery { - // Initialize the request if it is not already initialized +func (r *ValidateQuery) Query(query *types.Query) *ValidateQuery { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } diff --git a/typedapi/inference/chatcompletionunified/chat_completion_unified.go b/typedapi/inference/chatcompletionunified/chat_completion_unified.go index 553e17fba9..e60ea63716 100644 --- a/typedapi/inference/chatcompletionunified/chat_completion_unified.go +++ b/typedapi/inference/chatcompletionunified/chat_completion_unified.go @@ -16,9 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Perform chat completion inference +// +// The chat completion inference API enables real-time responses for chat +// completion tasks by delivering answers incrementally, reducing response times +// during computation. +// It only works with the `chat_completion` task type for `openai` and `elastic` +// inference services. +// +// NOTE: The `chat_completion` task type is only available within the _stream +// API and only supports streaming. +// The Chat completion inference API and the Stream inference API differ in +// their response structure and capabilities. +// The Chat completion inference API provides more comprehensive customization +// options through more fields and function calling support. +// If you use the `openai`, `hugging_face` or the `elastic` service, use the +// Chat completion inference API. package chatcompletionunified import ( @@ -83,6 +98,21 @@ func NewChatCompletionUnifiedFunc(tp elastictransport.Interface) NewChatCompleti // Perform chat completion inference // +// The chat completion inference API enables real-time responses for chat +// completion tasks by delivering answers incrementally, reducing response times +// during computation. +// It only works with the `chat_completion` task type for `openai` and `elastic` +// inference services. +// +// NOTE: The `chat_completion` task type is only available within the _stream +// API and only supports streaming. +// The Chat completion inference API and the Stream inference API differ in +// their response structure and capabilities. +// The Chat completion inference API provides more comprehensive customization +// options through more fields and function calling support. +// If you use the `openai`, `hugging_face` or the `elastic` service, use the +// Chat completion inference API. +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/chat-completion-inference-api.html func New(tp elastictransport.Interface) *ChatCompletionUnified { r := &ChatCompletionUnified{ @@ -367,11 +397,10 @@ func (r *ChatCompletionUnified) Pretty(pretty bool) *ChatCompletionUnified { return r } -// The upper bound limit for the number of tokens that can be generated for a +// MaxCompletionTokens The upper bound limit for the number of tokens that can be generated for a // completion request. // API name: max_completion_tokens func (r *ChatCompletionUnified) MaxCompletionTokens(maxcompletiontokens int64) *ChatCompletionUnified { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -381,25 +410,24 @@ func (r *ChatCompletionUnified) MaxCompletionTokens(maxcompletiontokens int64) * return r } -// A list of objects representing the conversation. +// Messages A list of objects representing the conversation. +// Requests should generally only add new messages from the user (role `user`). +// The other message roles (`assistant`, `system`, or `tool`) should generally +// only be copied from the response to a previous completion request, such that +// the messages array is built up throughout a conversation. // API name: messages -func (r *ChatCompletionUnified) Messages(messages ...types.MessageVariant) *ChatCompletionUnified { - // Initialize the request if it is not already initialized +func (r *ChatCompletionUnified) Messages(messages ...types.Message) *ChatCompletionUnified { if r.req == nil { r.req = NewRequest() } - for _, v := range messages { + r.req.Messages = messages - r.req.Messages = append(r.req.Messages, *v.MessageCaster()) - - } return r } -// The ID of the model to use. +// Model The ID of the model to use. // API name: model func (r *ChatCompletionUnified) Model(model string) *ChatCompletionUnified { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -409,26 +437,21 @@ func (r *ChatCompletionUnified) Model(model string) *ChatCompletionUnified { return r } -// A sequence of strings to control when the model should stop generating +// Stop A sequence of strings to control when the model should stop generating // additional tokens. // API name: stop func (r *ChatCompletionUnified) Stop(stops ...string) *ChatCompletionUnified { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range stops { + r.req.Stop = stops - r.req.Stop = append(r.req.Stop, v) - - } return r } -// The sampling temperature to use. +// Temperature The sampling temperature to use. // API name: temperature func (r *ChatCompletionUnified) Temperature(temperature float32) *ChatCompletionUnified { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -438,38 +461,75 @@ func (r *ChatCompletionUnified) Temperature(temperature float32) *ChatCompletion return r } -// Controls which tool is called by the model. +// ToolChoice Controls which tool is called by the model. +// String representation: One of `auto`, `none`, or `requrired`. `auto` allows +// the model to choose between calling tools and generating a message. `none` +// causes the model to not call any tools. `required` forces the model to call +// one or more tools. +// Example (object representation): +// ``` +// +// { +// "tool_choice": { +// "type": "function", +// "function": { +// "name": "get_current_weather" +// } +// } +// } +// +// ``` // API name: tool_choice -func (r *ChatCompletionUnified) ToolChoice(completiontooltype types.CompletionToolTypeVariant) *ChatCompletionUnified { - // Initialize the request if it is not already initialized +func (r *ChatCompletionUnified) ToolChoice(completiontooltype types.CompletionToolType) *ChatCompletionUnified { if r.req == nil { r.req = NewRequest() } - - r.req.ToolChoice = *completiontooltype.CompletionToolTypeCaster() + r.req.ToolChoice = completiontooltype return r } -// A list of tools that the model can call. +// Tools A list of tools that the model can call. +// Example: +// ``` +// +// { +// "tools": [ +// { +// "type": "function", +// "function": { +// "name": "get_price_of_item", +// "description": "Get the current price of an item", +// "parameters": { +// "type": "object", +// "properties": { +// "item": { +// "id": "12345" +// }, +// "unit": { +// "type": "currency" +// } +// } +// } +// } +// } +// ] +// } +// +// ``` // API name: tools -func (r *ChatCompletionUnified) Tools(tools ...types.CompletionToolVariant) *ChatCompletionUnified { - // Initialize the request if it is not already initialized +func (r *ChatCompletionUnified) Tools(tools ...types.CompletionTool) *ChatCompletionUnified { if r.req == nil { r.req = NewRequest() } - for _, v := range tools { - - r.req.Tools = append(r.req.Tools, *v.CompletionToolCaster()) + r.req.Tools = tools - } return r } -// Nucleus sampling, an alternative to sampling with temperature. +// TopP Nucleus sampling, an alternative to sampling with temperature. // API name: top_p func (r *ChatCompletionUnified) TopP(topp float32) *ChatCompletionUnified { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/inference/chatcompletionunified/request.go b/typedapi/inference/chatcompletionunified/request.go index ca0aeaaced..91c5d2775e 100644 --- a/typedapi/inference/chatcompletionunified/request.go +++ b/typedapi/inference/chatcompletionunified/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package chatcompletionunified @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package chatcompletionunified // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/chat_completion_unified/UnifiedRequest.ts#L24-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/chat_completion_unified/UnifiedRequest.ts#L24-L61 type Request = types.RequestChatCompletion // NewRequest returns a Request diff --git a/typedapi/inference/chatcompletionunified/response.go b/typedapi/inference/chatcompletionunified/response.go index b1226b3740..eb38c86e03 100644 --- a/typedapi/inference/chatcompletionunified/response.go +++ b/typedapi/inference/chatcompletionunified/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package chatcompletionunified // Response holds the response body struct for the package chatcompletionunified // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/chat_completion_unified/UnifiedResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/chat_completion_unified/UnifiedResponse.ts#L22-L24 type Response = []byte diff --git a/typedapi/inference/completion/completion.go b/typedapi/inference/completion/completion.go index 2701e31ff9..827c489cbf 100644 --- a/typedapi/inference/completion/completion.go +++ b/typedapi/inference/completion/completion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Perform completion inference on the service package completion @@ -365,28 +365,24 @@ func (r *Completion) Pretty(pretty bool) *Completion { return r } -// Inference input. +// Input Inference input. // Either a string or an array of strings. // API name: input func (r *Completion) Input(inputs ...string) *Completion { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) r.req.Input = inputs return r } -// Optional task settings +// TaskSettings Optional task settings // API name: task_settings func (r *Completion) TaskSettings(tasksettings json.RawMessage) *Completion { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/completion/request.go b/typedapi/inference/completion/request.go index 55a778c5f5..f335b9685f 100644 --- a/typedapi/inference/completion/request.go +++ b/typedapi/inference/completion/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package completion @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package completion // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/completion/CompletionRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/completion/CompletionRequest.ts#L25-L63 type Request struct { // Input Inference input. diff --git a/typedapi/inference/completion/response.go b/typedapi/inference/completion/response.go index 122b0b6c64..8e266a7a8b 100644 --- a/typedapi/inference/completion/response.go +++ b/typedapi/inference/completion/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package completion @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package completion // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/completion/CompletionResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/completion/CompletionResponse.ts#L22-L24 type Response []types.CompletionResult diff --git a/typedapi/inference/delete/delete.go b/typedapi/inference/delete/delete.go index a4d917abf3..f1eae44a6e 100644 --- a/typedapi/inference/delete/delete.go +++ b/typedapi/inference/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an inference endpoint package delete diff --git a/typedapi/inference/delete/response.go b/typedapi/inference/delete/response.go index 8a51a2da46..f18014098d 100644 --- a/typedapi/inference/delete/response.go +++ b/typedapi/inference/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/delete/DeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/delete/DeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/inference/get/get.go b/typedapi/inference/get/get.go index 8b7db7e5e0..da60fb6678 100644 --- a/typedapi/inference/get/get.go +++ b/typedapi/inference/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get an inference endpoint package get diff --git a/typedapi/inference/get/response.go b/typedapi/inference/get/response.go index 65cc238d08..cead71d80b 100644 --- a/typedapi/inference/get/response.go +++ b/typedapi/inference/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/get/GetResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/get/GetResponse.ts#L22-L26 type Response struct { Endpoints []types.InferenceEndpointInfo `json:"endpoints"` } diff --git a/typedapi/inference/inference/inference.go b/typedapi/inference/inference/inference.go index 6ec440036c..959a4c0c3e 100644 --- a/typedapi/inference/inference/inference.go +++ b/typedapi/inference/inference/inference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Perform inference on the service. // @@ -430,7 +430,7 @@ func (r *Inference) Pretty(pretty bool) *Inference { return r } -// The text on which you want to perform the inference task. +// Input The text on which you want to perform the inference task. // It can be a single string or an array. // // > info @@ -438,21 +438,45 @@ func (r *Inference) Pretty(pretty bool) *Inference { // single string as input. // API name: input func (r *Inference) Input(inputs ...string) *Inference { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) r.req.Input = inputs return r } -// The query input, which is required only for the `rerank` task. +// InputType Specifies the input data type for the text embedding model. The `input_type` +// parameter only applies to Inference Endpoints with the `text_embedding` task +// type. Possible values include: +// * `SEARCH` +// * `INGEST` +// * `CLASSIFICATION` +// * `CLUSTERING` +// Not all services support all values. Unsupported values will trigger a +// validation exception. +// Accepted values depend on the configured inference service, refer to the +// relevant service-specific documentation for more info. +// +// > info +// > The `input_type` parameter specified on the root level of the request body +// will take precedence over the `input_type` parameter specified in +// `task_settings`. +// API name: input_type +func (r *Inference) InputType(inputtype string) *Inference { + if r.req == nil { + r.req = NewRequest() + } + + r.req.InputType = &inputtype + + return r +} + +// Query The query input, which is required only for the `rerank` task. // It is not required for other tasks. // API name: query func (r *Inference) Query(query string) *Inference { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -462,16 +486,14 @@ func (r *Inference) Query(query string) *Inference { return r } -// Task settings for the individual inference request. +// TaskSettings Task settings for the individual inference request. // These settings are specific to the task type you specified and override the // task settings specified when initializing the service. // API name: task_settings func (r *Inference) TaskSettings(tasksettings json.RawMessage) *Inference { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/inference/request.go b/typedapi/inference/inference/request.go index 1b399290c9..dc1757acd5 100644 --- a/typedapi/inference/inference/request.go +++ b/typedapi/inference/inference/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package inference @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/inference/InferenceRequest.ts#L26-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/inference/InferenceRequest.ts#L26-L104 type Request struct { // Input The text on which you want to perform the inference task. @@ -41,6 +41,23 @@ type Request struct { // > Inference endpoints for the `completion` task type currently only support a // single string as input. Input []string `json:"input"` + // InputType Specifies the input data type for the text embedding model. The `input_type` + // parameter only applies to Inference Endpoints with the `text_embedding` task + // type. Possible values include: + // * `SEARCH` + // * `INGEST` + // * `CLASSIFICATION` + // * `CLUSTERING` + // Not all services support all values. Unsupported values will trigger a + // validation exception. + // Accepted values depend on the configured inference service, refer to the + // relevant service-specific documentation for more info. + // + // > info + // > The `input_type` parameter specified on the root level of the request body + // will take precedence over the `input_type` parameter specified in + // `task_settings`. + InputType *string `json:"input_type,omitempty"` // Query The query input, which is required only for the `rerank` task. // It is not required for other tasks. Query *string `json:"query,omitempty"` @@ -99,6 +116,18 @@ func (s *Request) UnmarshalJSON(data []byte) error { } } + case "input_type": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "InputType", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.InputType = &o + case "query": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { diff --git a/typedapi/inference/inference/response.go b/typedapi/inference/inference/response.go index 3792f3a203..fa524c5920 100644 --- a/typedapi/inference/inference/response.go +++ b/typedapi/inference/inference/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package inference @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/inference/InferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/inference/InferenceResponse.ts#L22-L25 type Response struct { AdditionalInferenceResultProperty map[string]json.RawMessage `json:"-"` Completion []types.CompletionResult `json:"completion,omitempty"` diff --git a/typedapi/inference/put/put.go b/typedapi/inference/put/put.go index 58a6656be3..374274f5df 100644 --- a/typedapi/inference/put/put.go +++ b/typedapi/inference/put/put.go @@ -16,18 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an inference endpoint. -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. // // IMPORTANT: The inference APIs enable you to use certain services, such as // built-in machine learning models (ELSER, E5), models uploaded through Eland, @@ -38,6 +29,30 @@ // However, if you do not plan to use the inference APIs to use these models or // if you want to use non-NLP models, use the machine learning trained model // APIs. +// +// The following integrations are available through the inference API. You can +// find the available task types next to the integration name: +// * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, +// `text_embedding`) +// * Amazon Bedrock (`completion`, `text_embedding`) +// * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, +// `sparse_embedding`, `text_embedding`) +// * Anthropic (`completion`) +// * Azure AI Studio (`completion`, `text_embedding`) +// * Azure OpenAI (`completion`, `text_embedding`) +// * Cohere (`completion`, `rerank`, `text_embedding`) +// * DeepSeek (`completion`, `chat_completion`) +// * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this +// service is for built-in models and models uploaded through Eland) +// * ELSER (`sparse_embedding`) +// * Google AI Studio (`completion`, `text_embedding`) +// * Google Vertex AI (`rerank`, `text_embedding`) +// * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * Mistral (`chat_completion`, `completion`, `text_embedding`) +// * OpenAI (`chat_completion`, `completion`, `text_embedding`) +// * VoyageAI (`text_embedding`, `rerank`) +// * Watsonx inference integration (`text_embedding`) +// * JinaAI (`text_embedding`, `rerank`) package put import ( @@ -104,15 +119,6 @@ func NewPutFunc(tp elastictransport.Interface) NewPut { } // Create an inference endpoint. -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. // // IMPORTANT: The inference APIs enable you to use certain services, such as // built-in machine learning models (ELSER, E5), models uploaded through Eland, @@ -124,6 +130,30 @@ func NewPutFunc(tp elastictransport.Interface) NewPut { // if you want to use non-NLP models, use the machine learning trained model // APIs. // +// The following integrations are available through the inference API. You can +// find the available task types next to the integration name: +// * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, +// `text_embedding`) +// * Amazon Bedrock (`completion`, `text_embedding`) +// * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, +// `sparse_embedding`, `text_embedding`) +// * Anthropic (`completion`) +// * Azure AI Studio (`completion`, `text_embedding`) +// * Azure OpenAI (`completion`, `text_embedding`) +// * Cohere (`completion`, `rerank`, `text_embedding`) +// * DeepSeek (`completion`, `chat_completion`) +// * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this +// service is for built-in models and models uploaded through Eland) +// * ELSER (`sparse_embedding`) +// * Google AI Studio (`completion`, `text_embedding`) +// * Google Vertex AI (`rerank`, `text_embedding`) +// * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) +// * Mistral (`chat_completion`, `completion`, `text_embedding`) +// * OpenAI (`chat_completion`, `completion`, `text_embedding`) +// * VoyageAI (`text_embedding`, `rerank`) +// * Watsonx inference integration (`text_embedding`) +// * JinaAI (`text_embedding`, `rerank`) +// // https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html func New(tp elastictransport.Interface) *Put { r := &Put{ @@ -360,7 +390,8 @@ func (r *Put) Header(key, value string) *Put { return r } -// TaskType The task type +// TaskType The task type. Refer to the integration list in the API description for the +// available task types. // API Name: tasktype func (r *Put) TaskType(tasktype string) *Put { r.paramSet |= tasktypeMask @@ -378,6 +409,15 @@ func (r *Put) _inferenceid(inferenceid string) *Put { return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *Put) Timeout(duration string) *Put { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -422,23 +462,21 @@ func (r *Put) Pretty(pretty bool) *Put { return r } -// Chunking configuration object +// ChunkingSettings Chunking configuration object // API name: chunking_settings -func (r *Put) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *Put { - // Initialize the request if it is not already initialized +func (r *Put) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *Put { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The service type +// Service The service type // API name: service func (r *Put) Service(service string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -448,27 +486,23 @@ func (r *Put) Service(service string) *Put { return r } -// Settings specific to the service +// ServiceSettings Settings specific to the service // API name: service_settings func (r *Put) ServiceSettings(servicesettings json.RawMessage) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = servicesettings return r } -// Task settings specific to the service and task type +// TaskSettings Task settings specific to the service and task type // API name: task_settings func (r *Put) TaskSettings(tasksettings json.RawMessage) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/put/request.go b/typedapi/inference/put/request.go index c75cb11930..1ae0d20b46 100644 --- a/typedapi/inference/put/request.go +++ b/typedapi/inference/put/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put/PutRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put/PutRequest.ts#L26-L88 type Request = types.InferenceEndpoint // NewRequest returns a Request diff --git a/typedapi/inference/put/response.go b/typedapi/inference/put/response.go index c531870173..96ca879ddc 100644 --- a/typedapi/inference/put/response.go +++ b/typedapi/inference/put/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package put @@ -29,7 +29,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put/PutResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put/PutResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object diff --git a/typedapi/inference/putalibabacloud/put_alibabacloud.go b/typedapi/inference/putalibabacloud/put_alibabacloud.go index fa54a8e696..79a89df0b3 100644 --- a/typedapi/inference/putalibabacloud/put_alibabacloud.go +++ b/typedapi/inference/putalibabacloud/put_alibabacloud.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an AlibabaCloud AI Search inference endpoint. // // Create an inference endpoint to perform an inference task with the // `alibabacloud-ai-search` service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putalibabacloud import ( @@ -105,16 +95,6 @@ func NewPutAlibabacloudFunc(tp elastictransport.Interface) NewPutAlibabacloud { // Create an inference endpoint to perform an inference task with the // `alibabacloud-ai-search` service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-alibabacloud-ai-search.html func New(tp elastictransport.Interface) *PutAlibabacloud { r := &PutAlibabacloud{ @@ -358,6 +338,15 @@ func (r *PutAlibabacloud) _alibabacloudinferenceid(alibabacloudinferenceid strin return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAlibabacloud) Timeout(duration string) *PutAlibabacloud { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -402,55 +391,52 @@ func (r *PutAlibabacloud) Pretty(pretty bool) *PutAlibabacloud { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutAlibabacloud) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAlibabacloud { - // Initialize the request if it is not already initialized +func (r *PutAlibabacloud) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutAlibabacloud { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `alibabacloud-ai-search`. // API name: service func (r *PutAlibabacloud) Service(service alibabacloudservicetype.AlibabaCloudServiceType) *PutAlibabacloud { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `alibabacloud-ai-search` service. // API name: service_settings -func (r *PutAlibabacloud) ServiceSettings(servicesettings types.AlibabaCloudServiceSettingsVariant) *PutAlibabacloud { - // Initialize the request if it is not already initialized +func (r *PutAlibabacloud) ServiceSettings(servicesettings *types.AlibabaCloudServiceSettings) *PutAlibabacloud { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.AlibabaCloudServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutAlibabacloud) TaskSettings(tasksettings types.AlibabaCloudTaskSettingsVariant) *PutAlibabacloud { - // Initialize the request if it is not already initialized +func (r *PutAlibabacloud) TaskSettings(tasksettings *types.AlibabaCloudTaskSettings) *PutAlibabacloud { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.AlibabaCloudTaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putalibabacloud/request.go b/typedapi/inference/putalibabacloud/request.go index aeff13a2a2..9fe72ecfaf 100644 --- a/typedapi/inference/putalibabacloud/request.go +++ b/typedapi/inference/putalibabacloud/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putalibabacloud @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putalibabacloud // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L30-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L31-L85 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putalibabacloud/response.go b/typedapi/inference/putalibabacloud/response.go index bfbfbb31c3..8206632f88 100644 --- a/typedapi/inference/putalibabacloud/response.go +++ b/typedapi/inference/putalibabacloud/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putalibabacloud @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypealibabacloudai" ) // Response holds the response body struct for the package putalibabacloud // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_alibabacloud/PutAlibabaCloudResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_alibabacloud/PutAlibabaCloudResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypealibabacloudai.TaskTypeAlibabaCloudAI `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putamazonbedrock/put_amazonbedrock.go b/typedapi/inference/putamazonbedrock/put_amazonbedrock.go index 0cb8fb05e9..6cc80cf7ae 100644 --- a/typedapi/inference/putamazonbedrock/put_amazonbedrock.go +++ b/typedapi/inference/putamazonbedrock/put_amazonbedrock.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an Amazon Bedrock inference endpoint. // -// Creates an inference endpoint to perform an inference task with the +// Create an inference endpoint to perform an inference task with the // `amazonbedrock` service. // // >info @@ -30,16 +30,6 @@ // associated key pairs. If you want to use a different access and secret key // pair, delete the inference model and recreate it with the same name and the // updated keys. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putamazonbedrock import ( @@ -110,7 +100,7 @@ func NewPutAmazonbedrockFunc(tp elastictransport.Interface) NewPutAmazonbedrock // Create an Amazon Bedrock inference endpoint. // -// Creates an inference endpoint to perform an inference task with the +// Create an inference endpoint to perform an inference task with the // `amazonbedrock` service. // // >info @@ -121,16 +111,6 @@ func NewPutAmazonbedrockFunc(tp elastictransport.Interface) NewPutAmazonbedrock // pair, delete the inference model and recreate it with the same name and the // updated keys. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-bedrock.html func New(tp elastictransport.Interface) *PutAmazonbedrock { r := &PutAmazonbedrock{ @@ -374,6 +354,15 @@ func (r *PutAmazonbedrock) _amazonbedrockinferenceid(amazonbedrockinferenceid st return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAmazonbedrock) Timeout(duration string) *PutAmazonbedrock { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -418,55 +407,52 @@ func (r *PutAmazonbedrock) Pretty(pretty bool) *PutAmazonbedrock { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutAmazonbedrock) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAmazonbedrock { - // Initialize the request if it is not already initialized +func (r *PutAmazonbedrock) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutAmazonbedrock { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `amazonbedrock`. // API name: service func (r *PutAmazonbedrock) Service(service amazonbedrockservicetype.AmazonBedrockServiceType) *PutAmazonbedrock { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `amazonbedrock` service. // API name: service_settings -func (r *PutAmazonbedrock) ServiceSettings(servicesettings types.AmazonBedrockServiceSettingsVariant) *PutAmazonbedrock { - // Initialize the request if it is not already initialized +func (r *PutAmazonbedrock) ServiceSettings(servicesettings *types.AmazonBedrockServiceSettings) *PutAmazonbedrock { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.AmazonBedrockServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutAmazonbedrock) TaskSettings(tasksettings types.AmazonBedrockTaskSettingsVariant) *PutAmazonbedrock { - // Initialize the request if it is not already initialized +func (r *PutAmazonbedrock) TaskSettings(tasksettings *types.AmazonBedrockTaskSettings) *PutAmazonbedrock { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.AmazonBedrockTaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putamazonbedrock/request.go b/typedapi/inference/putamazonbedrock/request.go index 733a45fe35..e0ee78ee49 100644 --- a/typedapi/inference/putamazonbedrock/request.go +++ b/typedapi/inference/putamazonbedrock/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putamazonbedrock @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putamazonbedrock // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L30-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L31-L88 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putamazonbedrock/response.go b/typedapi/inference/putamazonbedrock/response.go index 5400418b82..1721ce9723 100644 --- a/typedapi/inference/putamazonbedrock/response.go +++ b/typedapi/inference/putamazonbedrock/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putamazonbedrock @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeamazonbedrock" ) // Response holds the response body struct for the package putamazonbedrock // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeamazonbedrock.TaskTypeAmazonBedrock `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go b/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go new file mode 100644 index 0000000000..c84a496392 --- /dev/null +++ b/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go @@ -0,0 +1,444 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Create an Amazon SageMaker inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `amazon_sagemaker` service. +package putamazonsagemaker + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/amazonsagemakerservicetype" +) + +const ( + tasktypeMask = iota + 1 + + amazonsagemakerinferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutAmazonsagemaker struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + amazonsagemakerinferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutAmazonsagemaker type alias for index. +type NewPutAmazonsagemaker func(tasktype, amazonsagemakerinferenceid string) *PutAmazonsagemaker + +// NewPutAmazonsagemakerFunc returns a new instance of PutAmazonsagemaker with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutAmazonsagemakerFunc(tp elastictransport.Interface) NewPutAmazonsagemaker { + return func(tasktype, amazonsagemakerinferenceid string) *PutAmazonsagemaker { + n := New(tp) + + n._tasktype(tasktype) + + n._amazonsagemakerinferenceid(amazonsagemakerinferenceid) + + return n + } +} + +// Create an Amazon SageMaker inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `amazon_sagemaker` service. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker +func New(tp elastictransport.Interface) *PutAmazonsagemaker { + r := &PutAmazonsagemaker{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutAmazonsagemaker) Raw(raw io.Reader) *PutAmazonsagemaker { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutAmazonsagemaker) Request(req *Request) *PutAmazonsagemaker { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutAmazonsagemaker) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutAmazonsagemaker: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|amazonsagemakerinferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "amazonsagemakerinferenceid", r.amazonsagemakerinferenceid) + } + path.WriteString(r.amazonsagemakerinferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutAmazonsagemaker) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_amazonsagemaker") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_amazonsagemaker") + if reader := instrument.RecordRequestBody(ctx, "inference.put_amazonsagemaker", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_amazonsagemaker") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutAmazonsagemaker query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putamazonsagemaker.Response +func (r PutAmazonsagemaker) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_amazonsagemaker") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutAmazonsagemaker headers map. +func (r *PutAmazonsagemaker) Header(key, value string) *PutAmazonsagemaker { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// API Name: tasktype +func (r *PutAmazonsagemaker) _tasktype(tasktype string) *PutAmazonsagemaker { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// AmazonsagemakerInferenceId The unique identifier of the inference endpoint. +// API Name: amazonsagemakerinferenceid +func (r *PutAmazonsagemaker) _amazonsagemakerinferenceid(amazonsagemakerinferenceid string) *PutAmazonsagemaker { + r.paramSet |= amazonsagemakerinferenceidMask + r.amazonsagemakerinferenceid = amazonsagemakerinferenceid + + return r +} + +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAmazonsagemaker) Timeout(duration string) *PutAmazonsagemaker { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutAmazonsagemaker) ErrorTrace(errortrace bool) *PutAmazonsagemaker { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutAmazonsagemaker) FilterPath(filterpaths ...string) *PutAmazonsagemaker { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutAmazonsagemaker) Human(human bool) *PutAmazonsagemaker { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutAmazonsagemaker) Pretty(pretty bool) *PutAmazonsagemaker { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// ChunkingSettings The chunking configuration object. +// API name: chunking_settings +func (r *PutAmazonsagemaker) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutAmazonsagemaker { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings + + return r +} + +// Service The type of service supported for the specified task type. In this case, +// `amazon_sagemaker`. +// API name: service +func (r *PutAmazonsagemaker) Service(service amazonsagemakerservicetype.AmazonSageMakerServiceType) *PutAmazonsagemaker { + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + + return r +} + +// ServiceSettings Settings used to install the inference model. +// These settings are specific to the `amazon_sagemaker` service and +// `service_settings.api` you specified. +// API name: service_settings +func (r *PutAmazonsagemaker) ServiceSettings(servicesettings *types.AmazonSageMakerServiceSettings) *PutAmazonsagemaker { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings + + return r +} + +// TaskSettings Settings to configure the inference task. +// These settings are specific to the task type and `service_settings.api` you +// specified. +// API name: task_settings +func (r *PutAmazonsagemaker) TaskSettings(tasksettings *types.AmazonSageMakerTaskSettings) *PutAmazonsagemaker { + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings + + return r +} diff --git a/typedapi/inference/putamazonsagemaker/request.go b/typedapi/inference/putamazonsagemaker/request.go new file mode 100644 index 0000000000..b849c5a511 --- /dev/null +++ b/typedapi/inference/putamazonsagemaker/request.go @@ -0,0 +1,68 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package putamazonsagemaker + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/amazonsagemakerservicetype" +) + +// Request holds the request body struct for the package putamazonsagemaker +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts#L31-L86 +type Request struct { + + // ChunkingSettings The chunking configuration object. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // Service The type of service supported for the specified task type. In this case, + // `amazon_sagemaker`. + Service amazonsagemakerservicetype.AmazonSageMakerServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. + // These settings are specific to the `amazon_sagemaker` service and + // `service_settings.api` you specified. + ServiceSettings types.AmazonSageMakerServiceSettings `json:"service_settings"` + // TaskSettings Settings to configure the inference task. + // These settings are specific to the task type and `service_settings.api` you + // specified. + TaskSettings *types.AmazonSageMakerTaskSettings `json:"task_settings,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putamazonsagemaker request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putamazonsagemaker/response.go b/typedapi/inference/putamazonsagemaker/response.go new file mode 100644 index 0000000000..354ab663aa --- /dev/null +++ b/typedapi/inference/putamazonsagemaker/response.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package putamazonsagemaker + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeamazonsagemaker" +) + +// Response holds the response body struct for the package putamazonsagemaker +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts#L22-L25 +type Response struct { + + // ChunkingSettings Chunking configuration object + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypeamazonsagemaker.TaskTypeAmazonSageMaker `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putanthropic/put_anthropic.go b/typedapi/inference/putanthropic/put_anthropic.go index 46bca90777..52b1c8d902 100644 --- a/typedapi/inference/putanthropic/put_anthropic.go +++ b/typedapi/inference/putanthropic/put_anthropic.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an Anthropic inference endpoint. // // Create an inference endpoint to perform an inference task with the // `anthropic` service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putanthropic import ( @@ -105,16 +95,6 @@ func NewPutAnthropicFunc(tp elastictransport.Interface) NewPutAnthropic { // Create an inference endpoint to perform an inference task with the // `anthropic` service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-anthropic.html func New(tp elastictransport.Interface) *PutAnthropic { r := &PutAnthropic{ @@ -359,6 +339,15 @@ func (r *PutAnthropic) _anthropicinferenceid(anthropicinferenceid string) *PutAn return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAnthropic) Timeout(duration string) *PutAnthropic { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -403,55 +392,52 @@ func (r *PutAnthropic) Pretty(pretty bool) *PutAnthropic { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutAnthropic) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAnthropic { - // Initialize the request if it is not already initialized +func (r *PutAnthropic) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutAnthropic { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `anthropic`. // API name: service func (r *PutAnthropic) Service(service anthropicservicetype.AnthropicServiceType) *PutAnthropic { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `watsonxai` service. // API name: service_settings -func (r *PutAnthropic) ServiceSettings(servicesettings types.AnthropicServiceSettingsVariant) *PutAnthropic { - // Initialize the request if it is not already initialized +func (r *PutAnthropic) ServiceSettings(servicesettings *types.AnthropicServiceSettings) *PutAnthropic { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.AnthropicServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutAnthropic) TaskSettings(tasksettings types.AnthropicTaskSettingsVariant) *PutAnthropic { - // Initialize the request if it is not already initialized +func (r *PutAnthropic) TaskSettings(tasksettings *types.AnthropicTaskSettings) *PutAnthropic { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.AnthropicTaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putanthropic/request.go b/typedapi/inference/putanthropic/request.go index 59dcd63bcf..ad6764e1c3 100644 --- a/typedapi/inference/putanthropic/request.go +++ b/typedapi/inference/putanthropic/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putanthropic @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putanthropic // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_anthropic/PutAnthropicRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_anthropic/PutAnthropicRequest.ts#L31-L86 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putanthropic/response.go b/typedapi/inference/putanthropic/response.go index 3f10d54ce6..2535528709 100644 --- a/typedapi/inference/putanthropic/response.go +++ b/typedapi/inference/putanthropic/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putanthropic @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeanthropic" ) // Response holds the response body struct for the package putanthropic // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_anthropic/PutAnthropicResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_anthropic/PutAnthropicResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeanthropic.TaskTypeAnthropic `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putazureaistudio/put_azureaistudio.go b/typedapi/inference/putazureaistudio/put_azureaistudio.go index ef28801ba3..d7dfee9c99 100644 --- a/typedapi/inference/putazureaistudio/put_azureaistudio.go +++ b/typedapi/inference/putazureaistudio/put_azureaistudio.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an Azure AI studio inference endpoint. // // Create an inference endpoint to perform an inference task with the // `azureaistudio` service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putazureaistudio import ( @@ -105,16 +95,6 @@ func NewPutAzureaistudioFunc(tp elastictransport.Interface) NewPutAzureaistudio // Create an inference endpoint to perform an inference task with the // `azureaistudio` service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-ai-studio.html func New(tp elastictransport.Interface) *PutAzureaistudio { r := &PutAzureaistudio{ @@ -358,6 +338,15 @@ func (r *PutAzureaistudio) _azureaistudioinferenceid(azureaistudioinferenceid st return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAzureaistudio) Timeout(duration string) *PutAzureaistudio { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -402,55 +391,52 @@ func (r *PutAzureaistudio) Pretty(pretty bool) *PutAzureaistudio { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutAzureaistudio) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAzureaistudio { - // Initialize the request if it is not already initialized +func (r *PutAzureaistudio) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutAzureaistudio { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `azureaistudio`. // API name: service func (r *PutAzureaistudio) Service(service azureaistudioservicetype.AzureAiStudioServiceType) *PutAzureaistudio { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `openai` service. // API name: service_settings -func (r *PutAzureaistudio) ServiceSettings(servicesettings types.AzureAiStudioServiceSettingsVariant) *PutAzureaistudio { - // Initialize the request if it is not already initialized +func (r *PutAzureaistudio) ServiceSettings(servicesettings *types.AzureAiStudioServiceSettings) *PutAzureaistudio { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.AzureAiStudioServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutAzureaistudio) TaskSettings(tasksettings types.AzureAiStudioTaskSettingsVariant) *PutAzureaistudio { - // Initialize the request if it is not already initialized +func (r *PutAzureaistudio) TaskSettings(tasksettings *types.AzureAiStudioTaskSettings) *PutAzureaistudio { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.AzureAiStudioTaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putazureaistudio/request.go b/typedapi/inference/putazureaistudio/request.go index c03687ec52..7f9f41f355 100644 --- a/typedapi/inference/putazureaistudio/request.go +++ b/typedapi/inference/putazureaistudio/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putazureaistudio @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putazureaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L30-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L31-L85 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putazureaistudio/response.go b/typedapi/inference/putazureaistudio/response.go index fe2035f59a..f8bdc05f62 100644 --- a/typedapi/inference/putazureaistudio/response.go +++ b/typedapi/inference/putazureaistudio/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putazureaistudio @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeazureaistudio" ) // Response holds the response body struct for the package putazureaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_azureaistudio/PutAzureAiStudioResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_azureaistudio/PutAzureAiStudioResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeazureaistudio.TaskTypeAzureAIStudio `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putazureopenai/put_azureopenai.go b/typedapi/inference/putazureopenai/put_azureopenai.go index a7fc313f21..c5cf940990 100644 --- a/typedapi/inference/putazureopenai/put_azureopenai.go +++ b/typedapi/inference/putazureopenai/put_azureopenai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an Azure OpenAI inference endpoint. // @@ -34,16 +34,6 @@ // The list of embeddings models that you can choose from in your deployment can // be found in the [Azure models // documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings). -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putazureopenai import ( @@ -129,16 +119,6 @@ func NewPutAzureopenaiFunc(tp elastictransport.Interface) NewPutAzureopenai { // be found in the [Azure models // documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#embeddings). // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-openai.html func New(tp elastictransport.Interface) *PutAzureopenai { r := &PutAzureopenai{ @@ -384,6 +364,15 @@ func (r *PutAzureopenai) _azureopenaiinferenceid(azureopenaiinferenceid string) return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutAzureopenai) Timeout(duration string) *PutAzureopenai { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -428,55 +417,52 @@ func (r *PutAzureopenai) Pretty(pretty bool) *PutAzureopenai { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutAzureopenai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAzureopenai { - // Initialize the request if it is not already initialized +func (r *PutAzureopenai) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutAzureopenai { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `azureopenai`. // API name: service func (r *PutAzureopenai) Service(service azureopenaiservicetype.AzureOpenAIServiceType) *PutAzureopenai { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `azureopenai` service. // API name: service_settings -func (r *PutAzureopenai) ServiceSettings(servicesettings types.AzureOpenAIServiceSettingsVariant) *PutAzureopenai { - // Initialize the request if it is not already initialized +func (r *PutAzureopenai) ServiceSettings(servicesettings *types.AzureOpenAIServiceSettings) *PutAzureopenai { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.AzureOpenAIServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutAzureopenai) TaskSettings(tasksettings types.AzureOpenAITaskSettingsVariant) *PutAzureopenai { - // Initialize the request if it is not already initialized +func (r *PutAzureopenai) TaskSettings(tasksettings *types.AzureOpenAITaskSettings) *PutAzureopenai { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.AzureOpenAITaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putazureopenai/request.go b/typedapi/inference/putazureopenai/request.go index de5724c156..7d7ddb59d8 100644 --- a/typedapi/inference/putazureopenai/request.go +++ b/typedapi/inference/putazureopenai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putazureopenai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putazureopenai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts#L30-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts#L31-L93 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putazureopenai/response.go b/typedapi/inference/putazureopenai/response.go index 427c455de2..4ad56d414f 100644 --- a/typedapi/inference/putazureopenai/response.go +++ b/typedapi/inference/putazureopenai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putazureopenai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeazureopenai" ) // Response holds the response body struct for the package putazureopenai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_azureopenai/PutAzureOpenAiResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_azureopenai/PutAzureOpenAiResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeazureopenai.TaskTypeAzureOpenAI `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putcohere/put_cohere.go b/typedapi/inference/putcohere/put_cohere.go index 4aafc6bcae..db42a262a6 100644 --- a/typedapi/inference/putcohere/put_cohere.go +++ b/typedapi/inference/putcohere/put_cohere.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a Cohere inference endpoint. // // Create an inference endpoint to perform an inference task with the `cohere` // service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putcohere import ( @@ -105,16 +95,6 @@ func NewPutCohereFunc(tp elastictransport.Interface) NewPutCohere { // Create an inference endpoint to perform an inference task with the `cohere` // service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-cohere.html func New(tp elastictransport.Interface) *PutCohere { r := &PutCohere{ @@ -358,6 +338,15 @@ func (r *PutCohere) _cohereinferenceid(cohereinferenceid string) *PutCohere { return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutCohere) Timeout(duration string) *PutCohere { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -402,55 +391,52 @@ func (r *PutCohere) Pretty(pretty bool) *PutCohere { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutCohere) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutCohere { - // Initialize the request if it is not already initialized +func (r *PutCohere) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutCohere { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `cohere`. // API name: service func (r *PutCohere) Service(service cohereservicetype.CohereServiceType) *PutCohere { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. +// ServiceSettings Settings used to install the inference model. // These settings are specific to the `cohere` service. // API name: service_settings -func (r *PutCohere) ServiceSettings(servicesettings types.CohereServiceSettingsVariant) *PutCohere { - // Initialize the request if it is not already initialized +func (r *PutCohere) ServiceSettings(servicesettings *types.CohereServiceSettings) *PutCohere { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.CohereServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutCohere) TaskSettings(tasksettings types.CohereTaskSettingsVariant) *PutCohere { - // Initialize the request if it is not already initialized +func (r *PutCohere) TaskSettings(tasksettings *types.CohereTaskSettings) *PutCohere { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.CohereTaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putcohere/request.go b/typedapi/inference/putcohere/request.go index 8b9480f6ab..b1c96ec768 100644 --- a/typedapi/inference/putcohere/request.go +++ b/typedapi/inference/putcohere/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcohere @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putcohere // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_cohere/PutCohereRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_cohere/PutCohereRequest.ts#L31-L86 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putcohere/response.go b/typedapi/inference/putcohere/response.go index 4ed6c778c3..a13cebc8bb 100644 --- a/typedapi/inference/putcohere/response.go +++ b/typedapi/inference/putcohere/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcohere @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypecohere" ) // Response holds the response body struct for the package putcohere // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_cohere/PutCohereResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_cohere/PutCohereResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypecohere.TaskTypeCohere `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putcustom/put_custom.go b/typedapi/inference/putcustom/put_custom.go new file mode 100644 index 0000000000..e9504fdec6 --- /dev/null +++ b/typedapi/inference/putcustom/put_custom.go @@ -0,0 +1,537 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Create a custom inference endpoint. +// +// The custom service gives more control over how to interact with external +// inference services that aren't explicitly supported through dedicated +// integrations. +// The custom service gives you the ability to define the headers, url, query +// parameters, request body, and secrets. +// The custom service supports the template replacement functionality, which +// enables you to define a template that can be replaced with the value +// associated with that key. +// Templates are portions of a string that start with `${` and end with `}`. +// The parameters `secret_parameters` and `task_settings` are checked for keys +// for template replacement. Template replacement is supported in the `request`, +// `headers`, `url`, and `query_parameters`. +// If the definition (key) is not found for a template, an error message is +// returned. +// In case of an endpoint definition like the following: +// ``` +// PUT _inference/text_embedding/test-text-embedding +// +// { +// "service": "custom", +// "service_settings": { +// "secret_parameters": { +// "api_key": "" +// }, +// "url": "...endpoints.huggingface.cloud/v1/embeddings", +// "headers": { +// "Authorization": "Bearer ${api_key}", +// "Content-Type": "application/json" +// }, +// "request": "{\"input\": ${input}}", +// "response": { +// "json_parser": { +// "text_embeddings":"$.data[*].embedding[*]" +// } +// } +// } +// } +// +// ``` +// To replace `${api_key}` the `secret_parameters` and `task_settings` are +// checked for a key named `api_key`. +// +// > info +// > Templates should not be surrounded by quotes. +// +// Pre-defined templates: +// * `${input}` refers to the array of input strings that comes from the `input` +// field of the subsequent inference requests. +// * `${input_type}` refers to the input type translation values. +// * `${query}` refers to the query field used specifically for reranking tasks. +// * `${top_n}` refers to the `top_n` field available when performing rerank +// requests. +// * `${return_documents}` refers to the `return_documents` field available when +// performing rerank requests. +package putcustom + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/customservicetype" +) + +const ( + tasktypeMask = iota + 1 + + custominferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutCustom struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + custominferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutCustom type alias for index. +type NewPutCustom func(tasktype, custominferenceid string) *PutCustom + +// NewPutCustomFunc returns a new instance of PutCustom with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutCustomFunc(tp elastictransport.Interface) NewPutCustom { + return func(tasktype, custominferenceid string) *PutCustom { + n := New(tp) + + n._tasktype(tasktype) + + n._custominferenceid(custominferenceid) + + return n + } +} + +// Create a custom inference endpoint. +// +// The custom service gives more control over how to interact with external +// inference services that aren't explicitly supported through dedicated +// integrations. +// The custom service gives you the ability to define the headers, url, query +// parameters, request body, and secrets. +// The custom service supports the template replacement functionality, which +// enables you to define a template that can be replaced with the value +// associated with that key. +// Templates are portions of a string that start with `${` and end with `}`. +// The parameters `secret_parameters` and `task_settings` are checked for keys +// for template replacement. Template replacement is supported in the `request`, +// `headers`, `url`, and `query_parameters`. +// If the definition (key) is not found for a template, an error message is +// returned. +// In case of an endpoint definition like the following: +// ``` +// PUT _inference/text_embedding/test-text-embedding +// +// { +// "service": "custom", +// "service_settings": { +// "secret_parameters": { +// "api_key": "" +// }, +// "url": "...endpoints.huggingface.cloud/v1/embeddings", +// "headers": { +// "Authorization": "Bearer ${api_key}", +// "Content-Type": "application/json" +// }, +// "request": "{\"input\": ${input}}", +// "response": { +// "json_parser": { +// "text_embeddings":"$.data[*].embedding[*]" +// } +// } +// } +// } +// +// ``` +// To replace `${api_key}` the `secret_parameters` and `task_settings` are +// checked for a key named `api_key`. +// +// > info +// > Templates should not be surrounded by quotes. +// +// Pre-defined templates: +// * `${input}` refers to the array of input strings that comes from the `input` +// field of the subsequent inference requests. +// * `${input_type}` refers to the input type translation values. +// * `${query}` refers to the query field used specifically for reranking tasks. +// * `${top_n}` refers to the `top_n` field available when performing rerank +// requests. +// * `${return_documents}` refers to the `return_documents` field available when +// performing rerank requests. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom +func New(tp elastictransport.Interface) *PutCustom { + r := &PutCustom{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutCustom) Raw(raw io.Reader) *PutCustom { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutCustom) Request(req *Request) *PutCustom { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutCustom) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutCustom: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|custominferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "custominferenceid", r.custominferenceid) + } + path.WriteString(r.custominferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutCustom) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_custom") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_custom") + if reader := instrument.RecordRequestBody(ctx, "inference.put_custom", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_custom") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutCustom query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putcustom.Response +func (r PutCustom) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_custom") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutCustom headers map. +func (r *PutCustom) Header(key, value string) *PutCustom { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// API Name: tasktype +func (r *PutCustom) _tasktype(tasktype string) *PutCustom { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// CustomInferenceId The unique identifier of the inference endpoint. +// API Name: custominferenceid +func (r *PutCustom) _custominferenceid(custominferenceid string) *PutCustom { + r.paramSet |= custominferenceidMask + r.custominferenceid = custominferenceid + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutCustom) ErrorTrace(errortrace bool) *PutCustom { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutCustom) FilterPath(filterpaths ...string) *PutCustom { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutCustom) Human(human bool) *PutCustom { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutCustom) Pretty(pretty bool) *PutCustom { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// ChunkingSettings The chunking configuration object. +// API name: chunking_settings +func (r *PutCustom) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutCustom { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings + + return r +} + +// Service The type of service supported for the specified task type. In this case, +// `custom`. +// API name: service +func (r *PutCustom) Service(service customservicetype.CustomServiceType) *PutCustom { + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + + return r +} + +// ServiceSettings Settings used to install the inference model. +// These settings are specific to the `custom` service. +// API name: service_settings +func (r *PutCustom) ServiceSettings(servicesettings *types.CustomServiceSettings) *PutCustom { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings + + return r +} + +// TaskSettings Settings to configure the inference task. +// These settings are specific to the task type you specified. +// API name: task_settings +func (r *PutCustom) TaskSettings(tasksettings *types.CustomTaskSettings) *PutCustom { + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings + + return r +} diff --git a/typedapi/inference/putcustom/request.go b/typedapi/inference/putcustom/request.go new file mode 100644 index 0000000000..c53c99b171 --- /dev/null +++ b/typedapi/inference/putcustom/request.go @@ -0,0 +1,66 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package putcustom + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/customservicetype" +) + +// Request holds the request body struct for the package putcustom +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_custom/PutCustomRequest.ts#L30-L117 +type Request struct { + + // ChunkingSettings The chunking configuration object. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // Service The type of service supported for the specified task type. In this case, + // `custom`. + Service customservicetype.CustomServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. + // These settings are specific to the `custom` service. + ServiceSettings types.CustomServiceSettings `json:"service_settings"` + // TaskSettings Settings to configure the inference task. + // These settings are specific to the task type you specified. + TaskSettings *types.CustomTaskSettings `json:"task_settings,omitempty"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putcustom request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putcustom/response.go b/typedapi/inference/putcustom/response.go new file mode 100644 index 0000000000..a55e1cae4d --- /dev/null +++ b/typedapi/inference/putcustom/response.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package putcustom + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypecustom" +) + +// Response holds the response body struct for the package putcustom +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_custom/PutCustomResponse.ts#L22-L25 +type Response struct { + + // ChunkingSettings Chunking configuration object + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypecustom.TaskTypeCustom `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putdeepseek/put_deepseek.go b/typedapi/inference/putdeepseek/put_deepseek.go new file mode 100644 index 0000000000..39e7a46fa4 --- /dev/null +++ b/typedapi/inference/putdeepseek/put_deepseek.go @@ -0,0 +1,429 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Create a DeepSeek inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `deepseek` +// service. +package putdeepseek + +import ( + gobytes "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/deepseekservicetype" +) + +const ( + tasktypeMask = iota + 1 + + deepseekinferenceidMask +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type PutDeepseek struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + req *Request + deferred []func(request *Request) error + buf *gobytes.Buffer + + paramSet int + + tasktype string + deepseekinferenceid string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutDeepseek type alias for index. +type NewPutDeepseek func(tasktype, deepseekinferenceid string) *PutDeepseek + +// NewPutDeepseekFunc returns a new instance of PutDeepseek with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutDeepseekFunc(tp elastictransport.Interface) NewPutDeepseek { + return func(tasktype, deepseekinferenceid string) *PutDeepseek { + n := New(tp) + + n._tasktype(tasktype) + + n._deepseekinferenceid(deepseekinferenceid) + + return n + } +} + +// Create a DeepSeek inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `deepseek` +// service. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html +func New(tp elastictransport.Interface) *PutDeepseek { + r := &PutDeepseek{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + + buf: gobytes.NewBuffer(nil), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// Raw takes a json payload as input which is then passed to the http.Request +// If specified Raw takes precedence on Request method. +func (r *PutDeepseek) Raw(raw io.Reader) *PutDeepseek { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutDeepseek) Request(req *Request) *PutDeepseek { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutDeepseek) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + if len(r.deferred) > 0 { + for _, f := range r.deferred { + deferredErr := f(r.req) + if deferredErr != nil { + return nil, deferredErr + } + } + } + + if r.raw == nil && r.req != nil { + + data, err := json.Marshal(r.req) + + if err != nil { + return nil, fmt.Errorf("could not serialise request for PutDeepseek: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == tasktypeMask|deepseekinferenceidMask: + path.WriteString("/") + path.WriteString("_inference") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "tasktype", r.tasktype) + } + path.WriteString(r.tasktype) + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "deepseekinferenceid", r.deepseekinferenceid) + } + path.WriteString(r.deepseekinferenceid) + + method = http.MethodPut + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Content-Type") == "" { + if r.raw != nil { + req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r PutDeepseek) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "inference.put_deepseek") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "inference.put_deepseek") + if reader := instrument.RecordRequestBody(ctx, "inference.put_deepseek", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "inference.put_deepseek") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutDeepseek query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a putdeepseek.Response +func (r PutDeepseek) Do(providedCtx context.Context) (*Response, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "inference.put_deepseek") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + response := NewResponse() + + res, err := r.Perform(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + defer res.Body.Close() + + if res.StatusCode < 299 { + err = json.NewDecoder(res.Body).Decode(response) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + return response, nil + } + + errorResponse := types.NewElasticsearchError() + err = json.NewDecoder(res.Body).Decode(errorResponse) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if errorResponse.Status == 0 { + errorResponse.Status = res.StatusCode + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, errorResponse) + } + return nil, errorResponse +} + +// Header set a key, value pair in the PutDeepseek headers map. +func (r *PutDeepseek) Header(key, value string) *PutDeepseek { + r.headers.Set(key, value) + + return r +} + +// TaskType The type of the inference task that the model will perform. +// API Name: tasktype +func (r *PutDeepseek) _tasktype(tasktype string) *PutDeepseek { + r.paramSet |= tasktypeMask + r.tasktype = tasktype + + return r +} + +// DeepseekInferenceId The unique identifier of the inference endpoint. +// API Name: deepseekinferenceid +func (r *PutDeepseek) _deepseekinferenceid(deepseekinferenceid string) *PutDeepseek { + r.paramSet |= deepseekinferenceidMask + r.deepseekinferenceid = deepseekinferenceid + + return r +} + +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutDeepseek) Timeout(duration string) *PutDeepseek { + r.values.Set("timeout", duration) + + return r +} + +// ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors +// when they occur. +// API name: error_trace +func (r *PutDeepseek) ErrorTrace(errortrace bool) *PutDeepseek { + r.values.Set("error_trace", strconv.FormatBool(errortrace)) + + return r +} + +// FilterPath Comma-separated list of filters in dot notation which reduce the response +// returned by Elasticsearch. +// API name: filter_path +func (r *PutDeepseek) FilterPath(filterpaths ...string) *PutDeepseek { + tmp := []string{} + for _, item := range filterpaths { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("filter_path", strings.Join(tmp, ",")) + + return r +} + +// Human When set to `true` will return statistics in a format suitable for humans. +// For example `"exists_time": "1h"` for humans and +// `"eixsts_time_in_millis": 3600000` for computers. When disabled the human +// readable values will be omitted. This makes sense for responses being +// consumed +// only by machines. +// API name: human +func (r *PutDeepseek) Human(human bool) *PutDeepseek { + r.values.Set("human", strconv.FormatBool(human)) + + return r +} + +// Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use +// this option for debugging only. +// API name: pretty +func (r *PutDeepseek) Pretty(pretty bool) *PutDeepseek { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// ChunkingSettings The chunking configuration object. +// API name: chunking_settings +func (r *PutDeepseek) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutDeepseek { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings + + return r +} + +// Service The type of service supported for the specified task type. In this case, +// `deepseek`. +// API name: service +func (r *PutDeepseek) Service(service deepseekservicetype.DeepSeekServiceType) *PutDeepseek { + if r.req == nil { + r.req = NewRequest() + } + r.req.Service = service + + return r +} + +// ServiceSettings Settings used to install the inference model. +// These settings are specific to the `deepseek` service. +// API name: service_settings +func (r *PutDeepseek) ServiceSettings(servicesettings *types.DeepSeekServiceSettings) *PutDeepseek { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings + + return r +} diff --git a/typedapi/inference/putdeepseek/request.go b/typedapi/inference/putdeepseek/request.go new file mode 100644 index 0000000000..ff0bc40947 --- /dev/null +++ b/typedapi/inference/putdeepseek/request.go @@ -0,0 +1,63 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package putdeepseek + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/deepseekservicetype" +) + +// Request holds the request body struct for the package putdeepseek +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_deepseek/PutDeepSeekRequest.ts#L30-L80 +type Request struct { + + // ChunkingSettings The chunking configuration object. + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // Service The type of service supported for the specified task type. In this case, + // `deepseek`. + Service deepseekservicetype.DeepSeekServiceType `json:"service"` + // ServiceSettings Settings used to install the inference model. + // These settings are specific to the `deepseek` service. + ServiceSettings types.DeepSeekServiceSettings `json:"service_settings"` +} + +// NewRequest returns a Request +func NewRequest() *Request { + r := &Request{} + + return r +} + +// FromJSON allows to load an arbitrary json into the request structure +func (r *Request) FromJSON(data string) (*Request, error) { + var req Request + err := json.Unmarshal([]byte(data), &req) + + if err != nil { + return nil, fmt.Errorf("could not deserialise json into Putdeepseek request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/inference/putdeepseek/response.go b/typedapi/inference/putdeepseek/response.go new file mode 100644 index 0000000000..7f7c9f4321 --- /dev/null +++ b/typedapi/inference/putdeepseek/response.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package putdeepseek + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypedeepseek" +) + +// Response holds the response body struct for the package putdeepseek +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_deepseek/PutDeepSeekResponse.ts#L22-L25 +type Response struct { + + // ChunkingSettings Chunking configuration object + ChunkingSettings *types.InferenceChunkingSettings `json:"chunking_settings,omitempty"` + // InferenceId The inference Id + InferenceId string `json:"inference_id"` + // Service The service type + Service string `json:"service"` + // ServiceSettings Settings specific to the service + ServiceSettings json.RawMessage `json:"service_settings"` + // TaskSettings Task settings specific to the service and task type + TaskSettings json.RawMessage `json:"task_settings,omitempty"` + // TaskType The task type + TaskType tasktypedeepseek.TaskTypeDeepSeek `json:"task_type"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/inference/putelasticsearch/put_elasticsearch.go b/typedapi/inference/putelasticsearch/put_elasticsearch.go index b4d865769c..caa23ecc40 100644 --- a/typedapi/inference/putelasticsearch/put_elasticsearch.go +++ b/typedapi/inference/putelasticsearch/put_elasticsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an Elasticsearch inference endpoint. // @@ -387,6 +387,15 @@ func (r *PutElasticsearch) _elasticsearchinferenceid(elasticsearchinferenceid st return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutElasticsearch) Timeout(duration string) *PutElasticsearch { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -431,55 +440,52 @@ func (r *PutElasticsearch) Pretty(pretty bool) *PutElasticsearch { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutElasticsearch) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutElasticsearch { - // Initialize the request if it is not already initialized +func (r *PutElasticsearch) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutElasticsearch { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `elasticsearch`. // API name: service func (r *PutElasticsearch) Service(service elasticsearchservicetype.ElasticsearchServiceType) *PutElasticsearch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `elasticsearch` service. // API name: service_settings -func (r *PutElasticsearch) ServiceSettings(servicesettings types.ElasticsearchServiceSettingsVariant) *PutElasticsearch { - // Initialize the request if it is not already initialized +func (r *PutElasticsearch) ServiceSettings(servicesettings *types.ElasticsearchServiceSettings) *PutElasticsearch { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.ElasticsearchServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutElasticsearch) TaskSettings(tasksettings types.ElasticsearchTaskSettingsVariant) *PutElasticsearch { - // Initialize the request if it is not already initialized +func (r *PutElasticsearch) TaskSettings(tasksettings *types.ElasticsearchTaskSettings) *PutElasticsearch { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.ElasticsearchTaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putelasticsearch/request.go b/typedapi/inference/putelasticsearch/request.go index c10447b5d5..3d397a1fde 100644 --- a/typedapi/inference/putelasticsearch/request.go +++ b/typedapi/inference/putelasticsearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putelasticsearch @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putelasticsearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts#L30-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts#L31-L99 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putelasticsearch/response.go b/typedapi/inference/putelasticsearch/response.go index c22795f0f0..36d52b026f 100644 --- a/typedapi/inference/putelasticsearch/response.go +++ b/typedapi/inference/putelasticsearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putelasticsearch @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeelasticsearch" ) // Response holds the response body struct for the package putelasticsearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_elasticsearch/PutElasticsearchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_elasticsearch/PutElasticsearchResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeelasticsearch.TaskTypeElasticsearch `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putelser/put_elser.go b/typedapi/inference/putelser/put_elser.go index 4263b47ef7..2b4e9078b4 100644 --- a/typedapi/inference/putelser/put_elser.go +++ b/typedapi/inference/putelser/put_elser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an ELSER inference endpoint. // @@ -386,6 +386,15 @@ func (r *PutElser) _elserinferenceid(elserinferenceid string) *PutElser { return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutElser) Timeout(duration string) *PutElser { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -430,41 +439,39 @@ func (r *PutElser) Pretty(pretty bool) *PutElser { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutElser) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutElser { - // Initialize the request if it is not already initialized +func (r *PutElser) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutElser { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `elser`. // API name: service func (r *PutElser) Service(service elserservicetype.ElserServiceType) *PutElser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `elser` service. // API name: service_settings -func (r *PutElser) ServiceSettings(servicesettings types.ElserServiceSettingsVariant) *PutElser { - // Initialize the request if it is not already initialized +func (r *PutElser) ServiceSettings(servicesettings *types.ElserServiceSettings) *PutElser { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.ElserServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } diff --git a/typedapi/inference/putelser/request.go b/typedapi/inference/putelser/request.go index 0f05bda0ed..281c32bc92 100644 --- a/typedapi/inference/putelser/request.go +++ b/typedapi/inference/putelser/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putelser @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putelser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_elser/PutElserRequest.ts#L29-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_elser/PutElserRequest.ts#L30-L94 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putelser/response.go b/typedapi/inference/putelser/response.go index 3a1475fd82..559fba6ab9 100644 --- a/typedapi/inference/putelser/response.go +++ b/typedapi/inference/putelser/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putelser @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeelser" ) // Response holds the response body struct for the package putelser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_elser/PutElserResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_elser/PutElserResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeelser.TaskTypeELSER `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putgoogleaistudio/put_googleaistudio.go b/typedapi/inference/putgoogleaistudio/put_googleaistudio.go index c624b69fba..6eae1e94bd 100644 --- a/typedapi/inference/putgoogleaistudio/put_googleaistudio.go +++ b/typedapi/inference/putgoogleaistudio/put_googleaistudio.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an Google AI Studio inference endpoint. // // Create an inference endpoint to perform an inference task with the // `googleaistudio` service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putgoogleaistudio import ( @@ -105,16 +95,6 @@ func NewPutGoogleaistudioFunc(tp elastictransport.Interface) NewPutGoogleaistudi // Create an inference endpoint to perform an inference task with the // `googleaistudio` service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-ai-studio.html func New(tp elastictransport.Interface) *PutGoogleaistudio { r := &PutGoogleaistudio{ @@ -358,6 +338,15 @@ func (r *PutGoogleaistudio) _googleaistudioinferenceid(googleaistudioinferenceid return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutGoogleaistudio) Timeout(duration string) *PutGoogleaistudio { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -402,41 +391,39 @@ func (r *PutGoogleaistudio) Pretty(pretty bool) *PutGoogleaistudio { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutGoogleaistudio) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutGoogleaistudio { - // Initialize the request if it is not already initialized +func (r *PutGoogleaistudio) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutGoogleaistudio { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `googleaistudio`. // API name: service func (r *PutGoogleaistudio) Service(service googleaiservicetype.GoogleAiServiceType) *PutGoogleaistudio { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `googleaistudio` service. // API name: service_settings -func (r *PutGoogleaistudio) ServiceSettings(servicesettings types.GoogleAiStudioServiceSettingsVariant) *PutGoogleaistudio { - // Initialize the request if it is not already initialized +func (r *PutGoogleaistudio) ServiceSettings(servicesettings *types.GoogleAiStudioServiceSettings) *PutGoogleaistudio { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.GoogleAiStudioServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } diff --git a/typedapi/inference/putgoogleaistudio/request.go b/typedapi/inference/putgoogleaistudio/request.go index 150f02490d..d56b94d557 100644 --- a/typedapi/inference/putgoogleaistudio/request.go +++ b/typedapi/inference/putgoogleaistudio/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putgoogleaistudio @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putgoogleaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L29-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L30-L79 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putgoogleaistudio/response.go b/typedapi/inference/putgoogleaistudio/response.go index e900a72532..1d3f4cacc4 100644 --- a/typedapi/inference/putgoogleaistudio/response.go +++ b/typedapi/inference/putgoogleaistudio/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putgoogleaistudio @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypegoogleaistudio" ) // Response holds the response body struct for the package putgoogleaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_googleaistudio/PutGoogleAiStudioResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_googleaistudio/PutGoogleAiStudioResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypegoogleaistudio.TaskTypeGoogleAIStudio `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putgooglevertexai/put_googlevertexai.go b/typedapi/inference/putgooglevertexai/put_googlevertexai.go index 5ebf2bd866..51dc5c8b68 100644 --- a/typedapi/inference/putgooglevertexai/put_googlevertexai.go +++ b/typedapi/inference/putgooglevertexai/put_googlevertexai.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a Google Vertex AI inference endpoint. // // Create an inference endpoint to perform an inference task with the // `googlevertexai` service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putgooglevertexai import ( @@ -105,16 +95,6 @@ func NewPutGooglevertexaiFunc(tp elastictransport.Interface) NewPutGooglevertexa // Create an inference endpoint to perform an inference task with the // `googlevertexai` service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-vertex-ai.html func New(tp elastictransport.Interface) *PutGooglevertexai { r := &PutGooglevertexai{ @@ -358,6 +338,15 @@ func (r *PutGooglevertexai) _googlevertexaiinferenceid(googlevertexaiinferenceid return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutGooglevertexai) Timeout(duration string) *PutGooglevertexai { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -402,55 +391,52 @@ func (r *PutGooglevertexai) Pretty(pretty bool) *PutGooglevertexai { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutGooglevertexai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutGooglevertexai { - // Initialize the request if it is not already initialized +func (r *PutGooglevertexai) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutGooglevertexai { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `googlevertexai`. // API name: service func (r *PutGooglevertexai) Service(service googlevertexaiservicetype.GoogleVertexAIServiceType) *PutGooglevertexai { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `googlevertexai` service. // API name: service_settings -func (r *PutGooglevertexai) ServiceSettings(servicesettings types.GoogleVertexAIServiceSettingsVariant) *PutGooglevertexai { - // Initialize the request if it is not already initialized +func (r *PutGooglevertexai) ServiceSettings(servicesettings *types.GoogleVertexAIServiceSettings) *PutGooglevertexai { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.GoogleVertexAIServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutGooglevertexai) TaskSettings(tasksettings types.GoogleVertexAITaskSettingsVariant) *PutGooglevertexai { - // Initialize the request if it is not already initialized +func (r *PutGooglevertexai) TaskSettings(tasksettings *types.GoogleVertexAITaskSettings) *PutGooglevertexai { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.GoogleVertexAITaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putgooglevertexai/request.go b/typedapi/inference/putgooglevertexai/request.go index 02d5bc12c9..91a66d6457 100644 --- a/typedapi/inference/putgooglevertexai/request.go +++ b/typedapi/inference/putgooglevertexai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putgooglevertexai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putgooglevertexai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L30-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L31-L85 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putgooglevertexai/response.go b/typedapi/inference/putgooglevertexai/response.go index 7bb372cb06..02f94008e8 100644 --- a/typedapi/inference/putgooglevertexai/response.go +++ b/typedapi/inference/putgooglevertexai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putgooglevertexai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypegooglevertexai" ) // Response holds the response body struct for the package putgooglevertexai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_googlevertexai/PutGoogleVertexAiResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_googlevertexai/PutGoogleVertexAiResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypegooglevertexai.TaskTypeGoogleVertexAI `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/puthuggingface/put_hugging_face.go b/typedapi/inference/puthuggingface/put_hugging_face.go index 4aeacb9474..3e9d031ace 100644 --- a/typedapi/inference/puthuggingface/put_hugging_face.go +++ b/typedapi/inference/puthuggingface/put_hugging_face.go @@ -16,22 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a Hugging Face inference endpoint. // // Create an inference endpoint to perform an inference task with the // `hugging_face` service. +// Supported tasks include: `text_embedding`, `completion`, and +// `chat_completion`. // -// You must first create an inference endpoint on the Hugging Face endpoint page -// to get an endpoint URL. -// Select the model you want to use on the new endpoint creation page (for -// example `intfloat/e5-small-v2`), then select the sentence embeddings task -// under the advanced configuration section. -// Create the endpoint and copy the URL after the endpoint initialization has -// been finished. +// To configure the endpoint, first visit the Hugging Face Inference Endpoints +// page and create a new endpoint. +// Select a model that supports the task you intend to use. // -// The following models are recommended for the Hugging Face service: +// For Elastic's `text_embedding` task: +// The selected model must support the `Sentence Embeddings` task. On the new +// endpoint creation page, select the `Sentence Embeddings` task under the +// `Advanced Configuration` section. +// After the endpoint has initialized, copy the generated endpoint URL. +// Recommended models for `text_embedding` task: // // * `all-MiniLM-L6-v2` // * `all-MiniLM-L12-v2` @@ -41,15 +44,30 @@ // * `multilingual-e5-base` // * `multilingual-e5-small` // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. +// For Elastic's `chat_completion` and `completion` tasks: +// The selected model must support the `Text Generation` task and expose OpenAI +// API. HuggingFace supports both serverless and dedicated endpoints for `Text +// Generation`. When creating dedicated endpoint select the `Text Generation` +// task. +// After the endpoint is initialized (for dedicated) or ready (for serverless), +// ensure it supports the OpenAI API and includes `/v1/chat/completions` part in +// URL. Then, copy the full endpoint URL for use. +// Recommended models for `chat_completion` and `completion` tasks: +// +// * `Mistral-7B-Instruct-v0.2` +// * `QwQ-32B` +// * `Phi-3-mini-128k-instruct` +// +// For Elastic's `rerank` task: +// The selected model must support the `sentence-ranking` task and expose OpenAI +// API. +// HuggingFace supports only dedicated (not serverless) endpoints for `Rerank` +// so far. +// After the endpoint is initialized, copy the full endpoint URL for use. +// Tested models for `rerank` task: +// +// * `bge-reranker-base` +// * `jina-reranker-v1-turbo-en-GGUF` package puthuggingface import ( @@ -122,16 +140,19 @@ func NewPutHuggingFaceFunc(tp elastictransport.Interface) NewPutHuggingFace { // // Create an inference endpoint to perform an inference task with the // `hugging_face` service. +// Supported tasks include: `text_embedding`, `completion`, and +// `chat_completion`. // -// You must first create an inference endpoint on the Hugging Face endpoint page -// to get an endpoint URL. -// Select the model you want to use on the new endpoint creation page (for -// example `intfloat/e5-small-v2`), then select the sentence embeddings task -// under the advanced configuration section. -// Create the endpoint and copy the URL after the endpoint initialization has -// been finished. +// To configure the endpoint, first visit the Hugging Face Inference Endpoints +// page and create a new endpoint. +// Select a model that supports the task you intend to use. // -// The following models are recommended for the Hugging Face service: +// For Elastic's `text_embedding` task: +// The selected model must support the `Sentence Embeddings` task. On the new +// endpoint creation page, select the `Sentence Embeddings` task under the +// `Advanced Configuration` section. +// After the endpoint has initialized, copy the generated endpoint URL. +// Recommended models for `text_embedding` task: // // * `all-MiniLM-L6-v2` // * `all-MiniLM-L12-v2` @@ -141,15 +162,30 @@ func NewPutHuggingFaceFunc(tp elastictransport.Interface) NewPutHuggingFace { // * `multilingual-e5-base` // * `multilingual-e5-small` // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. +// For Elastic's `chat_completion` and `completion` tasks: +// The selected model must support the `Text Generation` task and expose OpenAI +// API. HuggingFace supports both serverless and dedicated endpoints for `Text +// Generation`. When creating dedicated endpoint select the `Text Generation` +// task. +// After the endpoint is initialized (for dedicated) or ready (for serverless), +// ensure it supports the OpenAI API and includes `/v1/chat/completions` part in +// URL. Then, copy the full endpoint URL for use. +// Recommended models for `chat_completion` and `completion` tasks: +// +// * `Mistral-7B-Instruct-v0.2` +// * `QwQ-32B` +// * `Phi-3-mini-128k-instruct` +// +// For Elastic's `rerank` task: +// The selected model must support the `sentence-ranking` task and expose OpenAI +// API. +// HuggingFace supports only dedicated (not serverless) endpoints for `Rerank` +// so far. +// After the endpoint is initialized, copy the full endpoint URL for use. +// Tested models for `rerank` task: +// +// * `bge-reranker-base` +// * `jina-reranker-v1-turbo-en-GGUF` // // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-hugging-face.html func New(tp elastictransport.Interface) *PutHuggingFace { @@ -394,6 +430,15 @@ func (r *PutHuggingFace) _huggingfaceinferenceid(huggingfaceinferenceid string) return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutHuggingFace) Timeout(duration string) *PutHuggingFace { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -438,41 +483,52 @@ func (r *PutHuggingFace) Pretty(pretty bool) *PutHuggingFace { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutHuggingFace) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutHuggingFace { - // Initialize the request if it is not already initialized +func (r *PutHuggingFace) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutHuggingFace { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `hugging_face`. // API name: service func (r *PutHuggingFace) Service(service huggingfaceservicetype.HuggingFaceServiceType) *PutHuggingFace { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `hugging_face` service. // API name: service_settings -func (r *PutHuggingFace) ServiceSettings(servicesettings types.HuggingFaceServiceSettingsVariant) *PutHuggingFace { - // Initialize the request if it is not already initialized +func (r *PutHuggingFace) ServiceSettings(servicesettings *types.HuggingFaceServiceSettings) *PutHuggingFace { + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings + + return r +} + +// TaskSettings Settings to configure the inference task. +// These settings are specific to the task type you specified. +// API name: task_settings +func (r *PutHuggingFace) TaskSettings(tasksettings *types.HuggingFaceTaskSettings) *PutHuggingFace { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.HuggingFaceServiceSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/puthuggingface/request.go b/typedapi/inference/puthuggingface/request.go index 9e8b629fdb..7a239fcbb6 100644 --- a/typedapi/inference/puthuggingface/request.go +++ b/typedapi/inference/puthuggingface/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puthuggingface @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package puthuggingface // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts#L29-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts#L31-L121 type Request struct { // ChunkingSettings The chunking configuration object. @@ -41,6 +41,9 @@ type Request struct { // ServiceSettings Settings used to install the inference model. These settings are specific to // the `hugging_face` service. ServiceSettings types.HuggingFaceServiceSettings `json:"service_settings"` + // TaskSettings Settings to configure the inference task. + // These settings are specific to the task type you specified. + TaskSettings *types.HuggingFaceTaskSettings `json:"task_settings,omitempty"` } // NewRequest returns a Request diff --git a/typedapi/inference/puthuggingface/response.go b/typedapi/inference/puthuggingface/response.go index 8019df698a..7118a1f069 100644 --- a/typedapi/inference/puthuggingface/response.go +++ b/typedapi/inference/puthuggingface/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puthuggingface @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypehuggingface" ) // Response holds the response body struct for the package puthuggingface // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_hugging_face/PutHuggingFaceResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_hugging_face/PutHuggingFaceResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypehuggingface.TaskTypeHuggingFace `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putjinaai/put_jinaai.go b/typedapi/inference/putjinaai/put_jinaai.go index 987910ecff..294528d371 100644 --- a/typedapi/inference/putjinaai/put_jinaai.go +++ b/typedapi/inference/putjinaai/put_jinaai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an JinaAI inference endpoint. // @@ -26,16 +26,6 @@ // To review the available `rerank` models, refer to . // To review the available `text_embedding` models, refer to the // . -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putjinaai import ( @@ -113,16 +103,6 @@ func NewPutJinaaiFunc(tp elastictransport.Interface) NewPutJinaai { // To review the available `text_embedding` models, refer to the // . // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-jinaai.html func New(tp elastictransport.Interface) *PutJinaai { r := &PutJinaai{ @@ -366,6 +346,15 @@ func (r *PutJinaai) _jinaaiinferenceid(jinaaiinferenceid string) *PutJinaai { return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutJinaai) Timeout(duration string) *PutJinaai { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -410,55 +399,52 @@ func (r *PutJinaai) Pretty(pretty bool) *PutJinaai { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutJinaai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutJinaai { - // Initialize the request if it is not already initialized +func (r *PutJinaai) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutJinaai { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `jinaai`. // API name: service func (r *PutJinaai) Service(service jinaaiservicetype.JinaAIServiceType) *PutJinaai { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `jinaai` service. // API name: service_settings -func (r *PutJinaai) ServiceSettings(servicesettings types.JinaAIServiceSettingsVariant) *PutJinaai { - // Initialize the request if it is not already initialized +func (r *PutJinaai) ServiceSettings(servicesettings *types.JinaAIServiceSettings) *PutJinaai { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.JinaAIServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutJinaai) TaskSettings(tasksettings types.JinaAITaskSettingsVariant) *PutJinaai { - // Initialize the request if it is not already initialized +func (r *PutJinaai) TaskSettings(tasksettings *types.JinaAITaskSettings) *PutJinaai { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.JinaAITaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putjinaai/request.go b/typedapi/inference/putjinaai/request.go index 2d3d8d28e0..eae2b82f35 100644 --- a/typedapi/inference/putjinaai/request.go +++ b/typedapi/inference/putjinaai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putjinaai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putjinaai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_jinaai/PutJinaAiRequest.ts#L30-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_jinaai/PutJinaAiRequest.ts#L31-L88 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putjinaai/response.go b/typedapi/inference/putjinaai/response.go index 851a67db7e..29c47cbf8a 100644 --- a/typedapi/inference/putjinaai/response.go +++ b/typedapi/inference/putjinaai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putjinaai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypejinaai" ) // Response holds the response body struct for the package putjinaai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_jinaai/PutJinaAiResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_jinaai/PutJinaAiResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypejinaai.TaskTypeJinaAi `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putmistral/put_mistral.go b/typedapi/inference/putmistral/put_mistral.go index 9628b420ee..1e5f6c2024 100644 --- a/typedapi/inference/putmistral/put_mistral.go +++ b/typedapi/inference/putmistral/put_mistral.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a Mistral inference endpoint. // -// Creates an inference endpoint to perform an inference task with the `mistral` +// Create an inference endpoint to perform an inference task with the `mistral` // service. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putmistral import ( @@ -102,19 +92,9 @@ func NewPutMistralFunc(tp elastictransport.Interface) NewPutMistral { // Create a Mistral inference endpoint. // -// Creates an inference endpoint to perform an inference task with the `mistral` +// Create an inference endpoint to perform an inference task with the `mistral` // service. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-mistral.html func New(tp elastictransport.Interface) *PutMistral { r := &PutMistral{ @@ -340,8 +320,7 @@ func (r *PutMistral) Header(key, value string) *PutMistral { return r } -// TaskType The task type. -// The only valid task type for the model to perform is `text_embedding`. +// TaskType The type of the inference task that the model will perform. // API Name: tasktype func (r *PutMistral) _tasktype(tasktype string) *PutMistral { r.paramSet |= tasktypeMask @@ -359,6 +338,15 @@ func (r *PutMistral) _mistralinferenceid(mistralinferenceid string) *PutMistral return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutMistral) Timeout(duration string) *PutMistral { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -403,41 +391,39 @@ func (r *PutMistral) Pretty(pretty bool) *PutMistral { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutMistral) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutMistral { - // Initialize the request if it is not already initialized +func (r *PutMistral) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutMistral { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `mistral`. // API name: service func (r *PutMistral) Service(service mistralservicetype.MistralServiceType) *PutMistral { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `mistral` service. // API name: service_settings -func (r *PutMistral) ServiceSettings(servicesettings types.MistralServiceSettingsVariant) *PutMistral { - // Initialize the request if it is not already initialized +func (r *PutMistral) ServiceSettings(servicesettings *types.MistralServiceSettings) *PutMistral { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.MistralServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } diff --git a/typedapi/inference/putmistral/request.go b/typedapi/inference/putmistral/request.go index 4ea6f240bd..044fa6ddac 100644 --- a/typedapi/inference/putmistral/request.go +++ b/typedapi/inference/putmistral/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putmistral @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putmistral // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_mistral/PutMistralRequest.ts#L29-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_mistral/PutMistralRequest.ts#L30-L79 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putmistral/response.go b/typedapi/inference/putmistral/response.go index 1e0cad1c6e..546bfaf860 100644 --- a/typedapi/inference/putmistral/response.go +++ b/typedapi/inference/putmistral/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putmistral @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypemistral" ) // Response holds the response body struct for the package putmistral // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_mistral/PutMistralResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_mistral/PutMistralResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypemistral.TaskTypeMistral `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putopenai/put_openai.go b/typedapi/inference/putopenai/put_openai.go index 42bfdbc2c0..f50ca66ce8 100644 --- a/typedapi/inference/putopenai/put_openai.go +++ b/typedapi/inference/putopenai/put_openai.go @@ -16,22 +16,12 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an OpenAI inference endpoint. // // Create an inference endpoint to perform an inference task with the `openai` // service or `openai` compatible APIs. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putopenai import ( @@ -105,16 +95,6 @@ func NewPutOpenaiFunc(tp elastictransport.Interface) NewPutOpenai { // Create an inference endpoint to perform an inference task with the `openai` // service or `openai` compatible APIs. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-openai.html func New(tp elastictransport.Interface) *PutOpenai { r := &PutOpenai{ @@ -360,6 +340,15 @@ func (r *PutOpenai) _openaiinferenceid(openaiinferenceid string) *PutOpenai { return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutOpenai) Timeout(duration string) *PutOpenai { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -404,55 +393,52 @@ func (r *PutOpenai) Pretty(pretty bool) *PutOpenai { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutOpenai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutOpenai { - // Initialize the request if it is not already initialized +func (r *PutOpenai) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutOpenai { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `openai`. // API name: service func (r *PutOpenai) Service(service openaiservicetype.OpenAIServiceType) *PutOpenai { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `openai` service. // API name: service_settings -func (r *PutOpenai) ServiceSettings(servicesettings types.OpenAIServiceSettingsVariant) *PutOpenai { - // Initialize the request if it is not already initialized +func (r *PutOpenai) ServiceSettings(servicesettings *types.OpenAIServiceSettings) *PutOpenai { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.OpenAIServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutOpenai) TaskSettings(tasksettings types.OpenAITaskSettingsVariant) *PutOpenai { - // Initialize the request if it is not already initialized +func (r *PutOpenai) TaskSettings(tasksettings *types.OpenAITaskSettings) *PutOpenai { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.OpenAITaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putopenai/request.go b/typedapi/inference/putopenai/request.go index c6e5fd311b..25e75cba1b 100644 --- a/typedapi/inference/putopenai/request.go +++ b/typedapi/inference/putopenai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putopenai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putopenai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_openai/PutOpenAiRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_openai/PutOpenAiRequest.ts#L31-L86 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putopenai/response.go b/typedapi/inference/putopenai/response.go index 92442e23ab..f4c3f74962 100644 --- a/typedapi/inference/putopenai/response.go +++ b/typedapi/inference/putopenai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putopenai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypeopenai" ) // Response holds the response body struct for the package putopenai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_openai/PutOpenAiResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_openai/PutOpenAiResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypeopenai.TaskTypeOpenAI `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putvoyageai/put_voyageai.go b/typedapi/inference/putvoyageai/put_voyageai.go index 996682e223..38dfc6e144 100644 --- a/typedapi/inference/putvoyageai/put_voyageai.go +++ b/typedapi/inference/putvoyageai/put_voyageai.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a VoyageAI inference endpoint. // @@ -344,6 +344,15 @@ func (r *PutVoyageai) _voyageaiinferenceid(voyageaiinferenceid string) *PutVoyag return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutVoyageai) Timeout(duration string) *PutVoyageai { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -388,55 +397,52 @@ func (r *PutVoyageai) Pretty(pretty bool) *PutVoyageai { return r } -// The chunking configuration object. +// ChunkingSettings The chunking configuration object. // API name: chunking_settings -func (r *PutVoyageai) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutVoyageai { - // Initialize the request if it is not already initialized +func (r *PutVoyageai) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *PutVoyageai { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `voyageai`. // API name: service func (r *PutVoyageai) Service(service voyageaiservicetype.VoyageAIServiceType) *PutVoyageai { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `voyageai` service. // API name: service_settings -func (r *PutVoyageai) ServiceSettings(servicesettings types.VoyageAIServiceSettingsVariant) *PutVoyageai { - // Initialize the request if it is not already initialized +func (r *PutVoyageai) ServiceSettings(servicesettings *types.VoyageAIServiceSettings) *PutVoyageai { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.VoyageAIServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } -// Settings to configure the inference task. +// TaskSettings Settings to configure the inference task. // These settings are specific to the task type you specified. // API name: task_settings -func (r *PutVoyageai) TaskSettings(tasksettings types.VoyageAITaskSettingsVariant) *PutVoyageai { - // Initialize the request if it is not already initialized +func (r *PutVoyageai) TaskSettings(tasksettings *types.VoyageAITaskSettings) *PutVoyageai { if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings.VoyageAITaskSettingsCaster() + r.req.TaskSettings = tasksettings return r } diff --git a/typedapi/inference/putvoyageai/request.go b/typedapi/inference/putvoyageai/request.go index 2d2bd74d63..173cad12b1 100644 --- a/typedapi/inference/putvoyageai/request.go +++ b/typedapi/inference/putvoyageai/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putvoyageai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putvoyageai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_voyageai/PutVoyageAIRequest.ts#L30-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_voyageai/PutVoyageAIRequest.ts#L31-L87 type Request struct { // ChunkingSettings The chunking configuration object. diff --git a/typedapi/inference/putvoyageai/response.go b/typedapi/inference/putvoyageai/response.go index 623d18cf40..14ecf9f016 100644 --- a/typedapi/inference/putvoyageai/response.go +++ b/typedapi/inference/putvoyageai/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putvoyageai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypevoyageai" ) // Response holds the response body struct for the package putvoyageai // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_voyageai/PutVoyageAIResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_voyageai/PutVoyageAIResponse.ts#L22-L25 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypevoyageai.TaskTypeVoyageAI `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/putwatsonx/put_watsonx.go b/typedapi/inference/putwatsonx/put_watsonx.go index 8b40651937..12d5e2d491 100644 --- a/typedapi/inference/putwatsonx/put_watsonx.go +++ b/typedapi/inference/putwatsonx/put_watsonx.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a Watsonx inference endpoint. // @@ -26,16 +26,6 @@ // `watsonxai` inference service. // You can provision one through the IBM catalog, the Cloud Databases CLI // plug-in, the Cloud Databases API, or Terraform. -// -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. package putwatsonx import ( @@ -113,16 +103,6 @@ func NewPutWatsonxFunc(tp elastictransport.Interface) NewPutWatsonx { // You can provision one through the IBM catalog, the Cloud Databases CLI // plug-in, the Cloud Databases API, or Terraform. // -// When you create an inference endpoint, the associated machine learning model -// is automatically deployed if it is not already running. -// After creating the endpoint, wait for the model deployment to complete before -// using it. -// To verify the deployment status, use the get trained model statistics API. -// Look for `"state": "fully_allocated"` in the response and ensure that the -// `"allocation_count"` matches the `"target_allocation_count"`. -// Avoid creating multiple endpoints for the same model unless required, as each -// endpoint consumes significant resources. -// // https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html func New(tp elastictransport.Interface) *PutWatsonx { r := &PutWatsonx{ @@ -367,6 +347,15 @@ func (r *PutWatsonx) _watsonxinferenceid(watsonxinferenceid string) *PutWatsonx return r } +// Timeout Specifies the amount of time to wait for the inference endpoint to be +// created. +// API name: timeout +func (r *PutWatsonx) Timeout(duration string) *PutWatsonx { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -411,28 +400,27 @@ func (r *PutWatsonx) Pretty(pretty bool) *PutWatsonx { return r } -// The type of service supported for the specified task type. In this case, +// Service The type of service supported for the specified task type. In this case, // `watsonxai`. // API name: service func (r *PutWatsonx) Service(service watsonxservicetype.WatsonxServiceType) *PutWatsonx { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Service = service + return r } -// Settings used to install the inference model. These settings are specific to +// ServiceSettings Settings used to install the inference model. These settings are specific to // the `watsonxai` service. // API name: service_settings -func (r *PutWatsonx) ServiceSettings(servicesettings types.WatsonxServiceSettingsVariant) *PutWatsonx { - // Initialize the request if it is not already initialized +func (r *PutWatsonx) ServiceSettings(servicesettings *types.WatsonxServiceSettings) *PutWatsonx { if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = *servicesettings.WatsonxServiceSettingsCaster() + r.req.ServiceSettings = *servicesettings return r } diff --git a/typedapi/inference/putwatsonx/request.go b/typedapi/inference/putwatsonx/request.go index bbee39be37..427321ac1f 100644 --- a/typedapi/inference/putwatsonx/request.go +++ b/typedapi/inference/putwatsonx/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putwatsonx @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putwatsonx // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_watsonx/PutWatsonxRequest.ts#L28-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_watsonx/PutWatsonxRequest.ts#L29-L76 type Request struct { // Service The type of service supported for the specified task type. In this case, diff --git a/typedapi/inference/putwatsonx/response.go b/typedapi/inference/putwatsonx/response.go index 46ef7cf1d6..a6bbb45353 100644 --- a/typedapi/inference/putwatsonx/response.go +++ b/typedapi/inference/putwatsonx/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putwatsonx @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v8/typedapi/types" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tasktypewatsonx" ) // Response holds the response body struct for the package putwatsonx // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/put_watsonx/PutWatsonxResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/put_watsonx/PutWatsonxResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object @@ -43,7 +43,7 @@ type Response struct { // TaskSettings Task settings specific to the service and task type TaskSettings json.RawMessage `json:"task_settings,omitempty"` // TaskType The task type - TaskType tasktype.TaskType `json:"task_type"` + TaskType tasktypewatsonx.TaskTypeWatsonx `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/rerank/request.go b/typedapi/inference/rerank/request.go index 08ebf61bbe..9f24c62cc1 100644 --- a/typedapi/inference/rerank/request.go +++ b/typedapi/inference/rerank/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rerank @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package rerank // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/rerank/RerankRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/rerank/RerankRequest.ts#L25-L72 type Request struct { // Input The text on which you want to perform the inference task. diff --git a/typedapi/inference/rerank/rerank.go b/typedapi/inference/rerank/rerank.go index d04eb33dc9..4a18247905 100644 --- a/typedapi/inference/rerank/rerank.go +++ b/typedapi/inference/rerank/rerank.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 -// Perform rereanking inference on the service +// Perform reranking inference on the service package rerank import ( @@ -81,7 +81,7 @@ func NewRerankFunc(tp elastictransport.Interface) NewRerank { } } -// Perform rereanking inference on the service +// Perform reranking inference on the service // // https://www.elastic.co/guide/en/elasticsearch/reference/current/post-inference-api.html func New(tp elastictransport.Interface) *Rerank { @@ -365,7 +365,7 @@ func (r *Rerank) Pretty(pretty bool) *Rerank { return r } -// The text on which you want to perform the inference task. +// Input The text on which you want to perform the inference task. // It can be a single string or an array. // // > info @@ -373,20 +373,17 @@ func (r *Rerank) Pretty(pretty bool) *Rerank { // single string as input. // API name: input func (r *Rerank) Input(inputs ...string) *Rerank { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) r.req.Input = inputs return r } -// Query input. +// Query Query input. // API name: query func (r *Rerank) Query(query string) *Rerank { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -396,16 +393,14 @@ func (r *Rerank) Query(query string) *Rerank { return r } -// Task settings for the individual inference request. +// TaskSettings Task settings for the individual inference request. // These settings are specific to the task type you specified and override the // task settings specified when initializing the service. // API name: task_settings func (r *Rerank) TaskSettings(tasksettings json.RawMessage) *Rerank { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/rerank/response.go b/typedapi/inference/rerank/response.go index 310224c005..6a115fee27 100644 --- a/typedapi/inference/rerank/response.go +++ b/typedapi/inference/rerank/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rerank @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rerank // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/rerank/RerankResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/rerank/RerankResponse.ts#L22-L24 type Response []types.RankedDocument diff --git a/typedapi/inference/sparseembedding/request.go b/typedapi/inference/sparseembedding/request.go index 9e81654454..31ac78ca63 100644 --- a/typedapi/inference/sparseembedding/request.go +++ b/typedapi/inference/sparseembedding/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package sparseembedding @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package sparseembedding // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/sparse_embedding/SparseEmbeddingRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/sparse_embedding/SparseEmbeddingRequest.ts#L25-L63 type Request struct { // Input Inference input. diff --git a/typedapi/inference/sparseembedding/response.go b/typedapi/inference/sparseembedding/response.go index 1cc116ec58..99360ad7fe 100644 --- a/typedapi/inference/sparseembedding/response.go +++ b/typedapi/inference/sparseembedding/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package sparseembedding @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package sparseembedding // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L24 type Response []types.SparseEmbeddingResult diff --git a/typedapi/inference/sparseembedding/sparse_embedding.go b/typedapi/inference/sparseembedding/sparse_embedding.go index e014035017..6d72b8bf9e 100644 --- a/typedapi/inference/sparseembedding/sparse_embedding.go +++ b/typedapi/inference/sparseembedding/sparse_embedding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Perform sparse embedding inference on the service package sparseembedding @@ -365,28 +365,24 @@ func (r *SparseEmbedding) Pretty(pretty bool) *SparseEmbedding { return r } -// Inference input. +// Input Inference input. // Either a string or an array of strings. // API name: input func (r *SparseEmbedding) Input(inputs ...string) *SparseEmbedding { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) r.req.Input = inputs return r } -// Optional task settings +// TaskSettings Optional task settings // API name: task_settings func (r *SparseEmbedding) TaskSettings(tasksettings json.RawMessage) *SparseEmbedding { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/streamcompletion/request.go b/typedapi/inference/streamcompletion/request.go index 1392a53389..3c6224090e 100644 --- a/typedapi/inference/streamcompletion/request.go +++ b/typedapi/inference/streamcompletion/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package streamcompletion @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package streamcompletion // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/stream_completion/StreamInferenceRequest.ts#L24-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/stream_completion/StreamInferenceRequest.ts#L25-L71 type Request struct { // Input The text on which you want to perform the inference task. diff --git a/typedapi/inference/streamcompletion/response.go b/typedapi/inference/streamcompletion/response.go index e98ab24787..0e68c9a7c4 100644 --- a/typedapi/inference/streamcompletion/response.go +++ b/typedapi/inference/streamcompletion/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package streamcompletion // Response holds the response body struct for the package streamcompletion // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/stream_completion/StreamInferenceResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/stream_completion/StreamInferenceResponse.ts#L22-L24 type Response = []byte diff --git a/typedapi/inference/streamcompletion/stream_completion.go b/typedapi/inference/streamcompletion/stream_completion.go index 6373b43050..49f80b5239 100644 --- a/typedapi/inference/streamcompletion/stream_completion.go +++ b/typedapi/inference/streamcompletion/stream_completion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Perform streaming inference. // Get real-time responses for completion tasks by delivering answers @@ -347,6 +347,14 @@ func (r *StreamCompletion) _inferenceid(inferenceid string) *StreamCompletion { return r } +// Timeout The amount of time to wait for the inference request to complete. +// API name: timeout +func (r *StreamCompletion) Timeout(duration string) *StreamCompletion { + r.values.Set("timeout", duration) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -391,31 +399,27 @@ func (r *StreamCompletion) Pretty(pretty bool) *StreamCompletion { return r } -// The text on which you want to perform the inference task. +// Input The text on which you want to perform the inference task. // It can be a single string or an array. // // NOTE: Inference endpoints for the completion task type currently only support // a single string as input. // API name: input func (r *StreamCompletion) Input(inputs ...string) *StreamCompletion { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) r.req.Input = inputs return r } -// Optional task settings +// TaskSettings Optional task settings // API name: task_settings func (r *StreamCompletion) TaskSettings(tasksettings json.RawMessage) *StreamCompletion { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/textembedding/request.go b/typedapi/inference/textembedding/request.go index 1350a307e7..524159e990 100644 --- a/typedapi/inference/textembedding/request.go +++ b/typedapi/inference/textembedding/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package textembedding @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package textembedding // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/text_embedding/TextEmbeddingRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/text_embedding/TextEmbeddingRequest.ts#L25-L63 type Request struct { // Input Inference input. diff --git a/typedapi/inference/textembedding/response.go b/typedapi/inference/textembedding/response.go index ea07d2c9e6..7f46e1c4e7 100644 --- a/typedapi/inference/textembedding/response.go +++ b/typedapi/inference/textembedding/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package textembedding @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package textembedding // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/text_embedding/TextEmbeddingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/text_embedding/TextEmbeddingResponse.ts#L22-L24 type Response struct { AdditionalTextEmbeddingInferenceResultProperty map[string]json.RawMessage `json:"-"` TextEmbedding []types.TextEmbeddingResult `json:"text_embedding,omitempty"` diff --git a/typedapi/inference/textembedding/text_embedding.go b/typedapi/inference/textembedding/text_embedding.go index 91836da197..6c4cf5ec28 100644 --- a/typedapi/inference/textembedding/text_embedding.go +++ b/typedapi/inference/textembedding/text_embedding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Perform text embedding inference on the service package textembedding @@ -365,28 +365,24 @@ func (r *TextEmbedding) Pretty(pretty bool) *TextEmbedding { return r } -// Inference input. +// Input Inference input. // Either a string or an array of strings. // API name: input func (r *TextEmbedding) Input(inputs ...string) *TextEmbedding { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Input = make([]string, len(inputs)) r.req.Input = inputs return r } -// Optional task settings +// TaskSettings Optional task settings // API name: task_settings func (r *TextEmbedding) TaskSettings(tasksettings json.RawMessage) *TextEmbedding { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/inference/update/request.go b/typedapi/inference/update/request.go index 276ce34444..6020d1b7a2 100644 --- a/typedapi/inference/update/request.go +++ b/typedapi/inference/update/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package update @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/update/UpdateInferenceRequest.ts#L25-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/update/UpdateInferenceRequest.ts#L25-L61 type Request = types.InferenceEndpoint // NewRequest returns a Request diff --git a/typedapi/inference/update/response.go b/typedapi/inference/update/response.go index 878eee8073..d5f9c0c41e 100644 --- a/typedapi/inference/update/response.go +++ b/typedapi/inference/update/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package update @@ -29,7 +29,7 @@ import ( // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/update/UpdateInferenceResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/update/UpdateInferenceResponse.ts#L22-L24 type Response struct { // ChunkingSettings Chunking configuration object diff --git a/typedapi/inference/update/update.go b/typedapi/inference/update/update.go index 511b9c05f5..6919311bce 100644 --- a/typedapi/inference/update/update.go +++ b/typedapi/inference/update/update.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update an inference endpoint. // @@ -416,23 +416,21 @@ func (r *Update) Pretty(pretty bool) *Update { return r } -// Chunking configuration object +// ChunkingSettings Chunking configuration object // API name: chunking_settings -func (r *Update) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *Update { - // Initialize the request if it is not already initialized +func (r *Update) ChunkingSettings(chunkingsettings *types.InferenceChunkingSettings) *Update { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + r.req.ChunkingSettings = chunkingsettings return r } -// The service type +// Service The service type // API name: service func (r *Update) Service(service string) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -442,27 +440,23 @@ func (r *Update) Service(service string) *Update { return r } -// Settings specific to the service +// ServiceSettings Settings specific to the service // API name: service_settings func (r *Update) ServiceSettings(servicesettings json.RawMessage) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ServiceSettings = servicesettings return r } -// Task settings specific to the service and task type +// TaskSettings Task settings specific to the service and task type // API name: task_settings func (r *Update) TaskSettings(tasksettings json.RawMessage) *Update { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TaskSettings = tasksettings return r diff --git a/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go index 319b784fda..0569ddcf9a 100644 --- a/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go +++ b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete GeoIP database configurations. // diff --git a/typedapi/ingest/deletegeoipdatabase/response.go b/typedapi/ingest/deletegeoipdatabase/response.go index 57618f8b6f..72f472fcfa 100644 --- a/typedapi/ingest/deletegeoipdatabase/response.go +++ b/typedapi/ingest/deletegeoipdatabase/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletegeoipdatabase // Response holds the response body struct for the package deletegeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go b/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go index 10ee4b2480..e90c1f8159 100644 --- a/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go +++ b/typedapi/ingest/deleteiplocationdatabase/delete_ip_location_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete IP geolocation database configurations. package deleteiplocationdatabase diff --git a/typedapi/ingest/deleteiplocationdatabase/response.go b/typedapi/ingest/deleteiplocationdatabase/response.go index c8d6f5e0e9..023af862bd 100644 --- a/typedapi/ingest/deleteiplocationdatabase/response.go +++ b/typedapi/ingest/deleteiplocationdatabase/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteiplocationdatabase // Response holds the response body struct for the package deleteiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/deletepipeline/delete_pipeline.go b/typedapi/ingest/deletepipeline/delete_pipeline.go index 4e9f9f8143..4122d997eb 100644 --- a/typedapi/ingest/deletepipeline/delete_pipeline.go +++ b/typedapi/ingest/deletepipeline/delete_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete pipelines. // Delete one or more ingest pipelines. diff --git a/typedapi/ingest/deletepipeline/response.go b/typedapi/ingest/deletepipeline/response.go index 6aeeb4e53e..13b7a4f7a9 100644 --- a/typedapi/ingest/deletepipeline/response.go +++ b/typedapi/ingest/deletepipeline/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletepipeline // Response holds the response body struct for the package deletepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/geoipstats/geo_ip_stats.go b/typedapi/ingest/geoipstats/geo_ip_stats.go index fc52c7cdc2..c3949c123e 100644 --- a/typedapi/ingest/geoipstats/geo_ip_stats.go +++ b/typedapi/ingest/geoipstats/geo_ip_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get GeoIP statistics. // Get download statistics for GeoIP2 databases that are used with the GeoIP diff --git a/typedapi/ingest/geoipstats/response.go b/typedapi/ingest/geoipstats/response.go index 7300a2a614..11d1399bfe 100644 --- a/typedapi/ingest/geoipstats/response.go +++ b/typedapi/ingest/geoipstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package geoipstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package geoipstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31 type Response struct { // Nodes Downloaded GeoIP2 databases for each node. diff --git a/typedapi/ingest/getgeoipdatabase/get_geoip_database.go b/typedapi/ingest/getgeoipdatabase/get_geoip_database.go index 6c39c0f43b..39ec21ce7d 100644 --- a/typedapi/ingest/getgeoipdatabase/get_geoip_database.go +++ b/typedapi/ingest/getgeoipdatabase/get_geoip_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get GeoIP database configurations. // diff --git a/typedapi/ingest/getgeoipdatabase/response.go b/typedapi/ingest/getgeoipdatabase/response.go index d288b05234..0d4a7b5cc2 100644 --- a/typedapi/ingest/getgeoipdatabase/response.go +++ b/typedapi/ingest/getgeoipdatabase/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getgeoipdatabase @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27 type Response struct { Databases []types.GeoipDatabaseConfigurationMetadata `json:"databases"` } diff --git a/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go b/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go index 0194d3a6c8..a48e4ce4f1 100644 --- a/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go +++ b/typedapi/ingest/getiplocationdatabase/get_ip_location_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get IP geolocation database configurations. package getiplocationdatabase @@ -310,17 +310,6 @@ func (r *GetIpLocationDatabase) Id(id string) *GetIpLocationDatabase { return r } -// MasterTimeout The period to wait for a connection to the master node. -// If no response is received before the timeout expires, the request fails and -// returns an error. -// A value of `-1` indicates that the request should never time out. -// API name: master_timeout -func (r *GetIpLocationDatabase) MasterTimeout(duration string) *GetIpLocationDatabase { - r.values.Set("master_timeout", duration) - - return r -} - // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/ingest/getiplocationdatabase/response.go b/typedapi/ingest/getiplocationdatabase/response.go index 2c4d64d4c3..1756df2764 100644 --- a/typedapi/ingest/getiplocationdatabase/response.go +++ b/typedapi/ingest/getiplocationdatabase/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getiplocationdatabase @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L24-L26 type Response struct { Databases []types.IpLocationDatabaseConfigurationMetadata `json:"databases"` } diff --git a/typedapi/ingest/getpipeline/get_pipeline.go b/typedapi/ingest/getpipeline/get_pipeline.go index db821f4a01..01e0ae58cf 100644 --- a/typedapi/ingest/getpipeline/get_pipeline.go +++ b/typedapi/ingest/getpipeline/get_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get pipelines. // diff --git a/typedapi/ingest/getpipeline/response.go b/typedapi/ingest/getpipeline/response.go index c1fdae8a45..6c7b808342 100644 --- a/typedapi/ingest/getpipeline/response.go +++ b/typedapi/ingest/getpipeline/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/get_pipeline/GetPipelineResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/get_pipeline/GetPipelineResponse.ts#L23-L26 type Response map[string]types.IngestPipeline diff --git a/typedapi/ingest/processorgrok/processor_grok.go b/typedapi/ingest/processorgrok/processor_grok.go index 8044fb7096..7b03ed2d42 100644 --- a/typedapi/ingest/processorgrok/processor_grok.go +++ b/typedapi/ingest/processorgrok/processor_grok.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a grok processor. // Extract structured fields out of a single text field within a document. diff --git a/typedapi/ingest/processorgrok/response.go b/typedapi/ingest/processorgrok/response.go index 28b12e1cc6..08a34b26d1 100644 --- a/typedapi/ingest/processorgrok/response.go +++ b/typedapi/ingest/processorgrok/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package processorgrok // Response holds the response body struct for the package processorgrok // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24 type Response struct { Patterns map[string]string `json:"patterns"` } diff --git a/typedapi/ingest/putgeoipdatabase/put_geoip_database.go b/typedapi/ingest/putgeoipdatabase/put_geoip_database.go index 8de4cd8009..825752201f 100644 --- a/typedapi/ingest/putgeoipdatabase/put_geoip_database.go +++ b/typedapi/ingest/putgeoipdatabase/put_geoip_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a GeoIP database configuration. // @@ -382,31 +382,28 @@ func (r *PutGeoipDatabase) Pretty(pretty bool) *PutGeoipDatabase { return r } -// The configuration necessary to identify which IP geolocation provider to use +// Maxmind The configuration necessary to identify which IP geolocation provider to use // to download the database, as well as any provider-specific configuration // necessary for such downloading. // At present, the only supported provider is maxmind, and the maxmind provider // requires that an account_id (string) is configured. // API name: maxmind -func (r *PutGeoipDatabase) Maxmind(maxmind types.MaxmindVariant) *PutGeoipDatabase { - // Initialize the request if it is not already initialized +func (r *PutGeoipDatabase) Maxmind(maxmind *types.Maxmind) *PutGeoipDatabase { if r.req == nil { r.req = NewRequest() } - r.req.Maxmind = *maxmind.MaxmindCaster() + r.req.Maxmind = *maxmind return r } -// The provider-assigned name of the IP geolocation database to download. +// Name The provider-assigned name of the IP geolocation database to download. // API name: name func (r *PutGeoipDatabase) Name(name string) *PutGeoipDatabase { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Name = name return r diff --git a/typedapi/ingest/putgeoipdatabase/request.go b/typedapi/ingest/putgeoipdatabase/request.go index bd73b42277..a74e3970cd 100644 --- a/typedapi/ingest/putgeoipdatabase/request.go +++ b/typedapi/ingest/putgeoipdatabase/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putgeoipdatabase @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L66 type Request struct { // Maxmind The configuration necessary to identify which IP geolocation provider to use diff --git a/typedapi/ingest/putgeoipdatabase/response.go b/typedapi/ingest/putgeoipdatabase/response.go index 34827fca77..f46ba7e5ee 100644 --- a/typedapi/ingest/putgeoipdatabase/response.go +++ b/typedapi/ingest/putgeoipdatabase/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putgeoipdatabase // Response holds the response body struct for the package putgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go b/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go index da74875535..2f17b9376f 100644 --- a/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go +++ b/typedapi/ingest/putiplocationdatabase/put_ip_location_database.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update an IP geolocation database configuration. package putiplocationdatabase @@ -384,54 +384,44 @@ func (r *PutIpLocationDatabase) Pretty(pretty bool) *PutIpLocationDatabase { } // API name: AdditionalDatabaseConfigurationProperty -// AdditionalDatabaseConfigurationProperty is a single key dictionnary. -// It will replace the current value on each call. -func (r *PutIpLocationDatabase) AdditionalDatabaseConfigurationProperty(key string, value json.RawMessage) *PutIpLocationDatabase { - // Initialize the request if it is not already initialized +func (r *PutIpLocationDatabase) AdditionalDatabaseConfigurationProperty(additionaldatabaseconfigurationproperty map[string]json.RawMessage) *PutIpLocationDatabase { if r.req == nil { r.req = NewRequest() } - tmp := make(map[string]json.RawMessage) + r.req.AdditionalDatabaseConfigurationProperty = additionaldatabaseconfigurationproperty - tmp[key] = value - - r.req.AdditionalDatabaseConfigurationProperty = tmp return r } // API name: ipinfo -func (r *PutIpLocationDatabase) Ipinfo(ipinfo types.IpinfoVariant) *PutIpLocationDatabase { - // Initialize the request if it is not already initialized +func (r *PutIpLocationDatabase) Ipinfo(ipinfo *types.Ipinfo) *PutIpLocationDatabase { if r.req == nil { r.req = NewRequest() } - r.req.Ipinfo = ipinfo.IpinfoCaster() + r.req.Ipinfo = ipinfo return r } // API name: maxmind -func (r *PutIpLocationDatabase) Maxmind(maxmind types.MaxmindVariant) *PutIpLocationDatabase { - // Initialize the request if it is not already initialized +func (r *PutIpLocationDatabase) Maxmind(maxmind *types.Maxmind) *PutIpLocationDatabase { if r.req == nil { r.req = NewRequest() } - r.req.Maxmind = maxmind.MaxmindCaster() + r.req.Maxmind = maxmind return r } -// The provider-assigned name of the IP geolocation database to download. +// Name The provider-assigned name of the IP geolocation database to download. // API name: name func (r *PutIpLocationDatabase) Name(name string) *PutIpLocationDatabase { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Name = name return r diff --git a/typedapi/ingest/putiplocationdatabase/request.go b/typedapi/ingest/putiplocationdatabase/request.go index 1403c682db..4288b75429 100644 --- a/typedapi/ingest/putiplocationdatabase/request.go +++ b/typedapi/ingest/putiplocationdatabase/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putiplocationdatabase @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts#L25-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts#L25-L62 type Request = types.DatabaseConfiguration // NewRequest returns a Request diff --git a/typedapi/ingest/putiplocationdatabase/response.go b/typedapi/ingest/putiplocationdatabase/response.go index 2dcdfdead0..eb9b0befae 100644 --- a/typedapi/ingest/putiplocationdatabase/response.go +++ b/typedapi/ingest/putiplocationdatabase/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putiplocationdatabase // Response holds the response body struct for the package putiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/putpipeline/put_pipeline.go b/typedapi/ingest/putpipeline/put_pipeline.go index deecc15fe6..f640936b5a 100644 --- a/typedapi/ingest/putpipeline/put_pipeline.go +++ b/typedapi/ingest/putpipeline/put_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a pipeline. // Changes made using this API take effect immediately. @@ -385,26 +385,23 @@ func (r *PutPipeline) Pretty(pretty bool) *PutPipeline { return r } -// Marks this ingest pipeline as deprecated. +// Deprecated Marks this ingest pipeline as deprecated. // When a deprecated ingest pipeline is referenced as the default or final // pipeline when creating or updating a non-deprecated index template, // Elasticsearch will emit a deprecation warning. // API name: deprecated func (r *PutPipeline) Deprecated(deprecated bool) *PutPipeline { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Deprecated = &deprecated return r } -// Description of the ingest pipeline. +// Description Description of the ingest pipeline. // API name: description func (r *PutPipeline) Description(description string) *PutPipeline { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -414,66 +411,54 @@ func (r *PutPipeline) Description(description string) *PutPipeline { return r } -// Optional metadata about the ingest pipeline. May have any contents. This map +// Meta_ Optional metadata about the ingest pipeline. May have any contents. This map // is not automatically generated by Elasticsearch. // API name: _meta -func (r *PutPipeline) Meta_(metadata types.MetadataVariant) *PutPipeline { - // Initialize the request if it is not already initialized +func (r *PutPipeline) Meta_(metadata types.Metadata) *PutPipeline { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// Processors to run immediately after a processor failure. Each processor +// OnFailure Processors to run immediately after a processor failure. Each processor // supports a processor-level `on_failure` value. If a processor without an // `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as // a fallback. The processors in this parameter run sequentially in the order // specified. Elasticsearch will not attempt to run the pipeline's remaining // processors. // API name: on_failure -func (r *PutPipeline) OnFailure(onfailures ...types.ProcessorContainerVariant) *PutPipeline { - // Initialize the request if it is not already initialized +func (r *PutPipeline) OnFailure(onfailures ...types.ProcessorContainer) *PutPipeline { if r.req == nil { r.req = NewRequest() } - for _, v := range onfailures { + r.req.OnFailure = onfailures - r.req.OnFailure = append(r.req.OnFailure, *v.ProcessorContainerCaster()) - - } return r } -// Processors used to perform transformations on documents before indexing. +// Processors Processors used to perform transformations on documents before indexing. // Processors run sequentially in the order specified. // API name: processors -func (r *PutPipeline) Processors(processors ...types.ProcessorContainerVariant) *PutPipeline { - // Initialize the request if it is not already initialized +func (r *PutPipeline) Processors(processors ...types.ProcessorContainer) *PutPipeline { if r.req == nil { r.req = NewRequest() } - for _, v := range processors { + r.req.Processors = processors - r.req.Processors = append(r.req.Processors, *v.ProcessorContainerCaster()) - - } return r } -// Version number used by external systems to track ingest pipelines. This +// Version Version number used by external systems to track ingest pipelines. This // parameter is intended for external systems only. Elasticsearch does not use // or validate pipeline version numbers. // API name: version func (r *PutPipeline) Version(versionnumber int64) *PutPipeline { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionnumber return r diff --git a/typedapi/ingest/putpipeline/request.go b/typedapi/ingest/putpipeline/request.go index 9e4b713852..2a30032879 100644 --- a/typedapi/ingest/putpipeline/request.go +++ b/typedapi/ingest/putpipeline/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putpipeline @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L90 type Request struct { // Deprecated Marks this ingest pipeline as deprecated. diff --git a/typedapi/ingest/putpipeline/response.go b/typedapi/ingest/putpipeline/response.go index 512766c21f..f0bb91270e 100644 --- a/typedapi/ingest/putpipeline/response.go +++ b/typedapi/ingest/putpipeline/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putpipeline // Response holds the response body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ingest/simulate/request.go b/typedapi/ingest/simulate/request.go index f7ec589cd6..a3d4f9b040 100644 --- a/typedapi/ingest/simulate/request.go +++ b/typedapi/ingest/simulate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package simulate @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L72 type Request struct { // Docs Sample documents to test in the pipeline. diff --git a/typedapi/ingest/simulate/response.go b/typedapi/ingest/simulate/response.go index 896c4afbd7..fe4d2b57e8 100644 --- a/typedapi/ingest/simulate/response.go +++ b/typedapi/ingest/simulate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package simulate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 type Response struct { Docs []types.SimulateDocumentResult `json:"docs"` } diff --git a/typedapi/ingest/simulate/simulate.go b/typedapi/ingest/simulate/simulate.go index 3942f1fe1d..f7a83f371f 100644 --- a/typedapi/ingest/simulate/simulate.go +++ b/typedapi/ingest/simulate/simulate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Simulate a pipeline. // @@ -385,34 +385,29 @@ func (r *Simulate) Pretty(pretty bool) *Simulate { return r } -// Sample documents to test in the pipeline. +// Docs Sample documents to test in the pipeline. // API name: docs -func (r *Simulate) Docs(docs ...types.DocumentVariant) *Simulate { - // Initialize the request if it is not already initialized +func (r *Simulate) Docs(docs ...types.Document) *Simulate { if r.req == nil { r.req = NewRequest() } - for _, v := range docs { + r.req.Docs = docs - r.req.Docs = append(r.req.Docs, *v.DocumentCaster()) - - } return r } -// The pipeline to test. +// Pipeline The pipeline to test. // If you don't specify the `pipeline` request path parameter, this parameter is // required. // If you specify both this and the request path parameter, the API only uses // the request path parameter. // API name: pipeline -func (r *Simulate) Pipeline(pipeline types.IngestPipelineVariant) *Simulate { - // Initialize the request if it is not already initialized +func (r *Simulate) Pipeline(pipeline *types.IngestPipeline) *Simulate { if r.req == nil { r.req = NewRequest() } - r.req.Pipeline = pipeline.IngestPipelineCaster() + r.req.Pipeline = pipeline return r } diff --git a/typedapi/license/delete/delete.go b/typedapi/license/delete/delete.go index d154fda28f..1160d85c48 100644 --- a/typedapi/license/delete/delete.go +++ b/typedapi/license/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete the license. // diff --git a/typedapi/license/delete/response.go b/typedapi/license/delete/response.go index 6437813c66..a75710458d 100644 --- a/typedapi/license/delete/response.go +++ b/typedapi/license/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/delete/DeleteLicenseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/delete/DeleteLicenseResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/license/get/get.go b/typedapi/license/get/get.go index d85ed936c6..b78cecdc7f 100644 --- a/typedapi/license/get/get.go +++ b/typedapi/license/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get license information. // diff --git a/typedapi/license/get/response.go b/typedapi/license/get/response.go index 1d8fb014b7..890ed2b9c1 100644 --- a/typedapi/license/get/response.go +++ b/typedapi/license/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/get/GetLicenseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/get/GetLicenseResponse.ts#L22-L24 type Response struct { License types.LicenseInformation `json:"license"` } diff --git a/typedapi/license/getbasicstatus/get_basic_status.go b/typedapi/license/getbasicstatus/get_basic_status.go index b7c325aba7..f24534d0cb 100644 --- a/typedapi/license/getbasicstatus/get_basic_status.go +++ b/typedapi/license/getbasicstatus/get_basic_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the basic license status. package getbasicstatus diff --git a/typedapi/license/getbasicstatus/response.go b/typedapi/license/getbasicstatus/response.go index 31e2135a80..f276d4443d 100644 --- a/typedapi/license/getbasicstatus/response.go +++ b/typedapi/license/getbasicstatus/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getbasicstatus // Response holds the response body struct for the package getbasicstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/get_basic_status/GetBasicLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/get_basic_status/GetBasicLicenseStatusResponse.ts#L20-L22 type Response struct { EligibleToStartBasic bool `json:"eligible_to_start_basic"` } diff --git a/typedapi/license/gettrialstatus/get_trial_status.go b/typedapi/license/gettrialstatus/get_trial_status.go index 2b60106233..34d637e000 100644 --- a/typedapi/license/gettrialstatus/get_trial_status.go +++ b/typedapi/license/gettrialstatus/get_trial_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the trial status. package gettrialstatus diff --git a/typedapi/license/gettrialstatus/response.go b/typedapi/license/gettrialstatus/response.go index d2ac3fbc81..fb8b971c9d 100644 --- a/typedapi/license/gettrialstatus/response.go +++ b/typedapi/license/gettrialstatus/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettrialstatus // Response holds the response body struct for the package gettrialstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/get_trial_status/GetTrialLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/get_trial_status/GetTrialLicenseStatusResponse.ts#L20-L22 type Response struct { EligibleToStartTrial bool `json:"eligible_to_start_trial"` } diff --git a/typedapi/license/post/post.go b/typedapi/license/post/post.go index 8aeefec7e5..6bf70eef25 100644 --- a/typedapi/license/post/post.go +++ b/typedapi/license/post/post.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update the license. // @@ -386,28 +386,23 @@ func (r *Post) Pretty(pretty bool) *Post { } // API name: license -func (r *Post) License(license types.LicenseVariant) *Post { - // Initialize the request if it is not already initialized +func (r *Post) License(license *types.License) *Post { if r.req == nil { r.req = NewRequest() } - r.req.License = license.LicenseCaster() + r.req.License = license return r } -// A sequence of one or more JSON documents containing the license information. +// Licenses A sequence of one or more JSON documents containing the license information. // API name: licenses -func (r *Post) Licenses(licenses ...types.LicenseVariant) *Post { - // Initialize the request if it is not already initialized +func (r *Post) Licenses(licenses ...types.License) *Post { if r.req == nil { r.req = NewRequest() } - for _, v := range licenses { + r.req.Licenses = licenses - r.req.Licenses = append(r.req.Licenses, *v.LicenseCaster()) - - } return r } diff --git a/typedapi/license/post/request.go b/typedapi/license/post/request.go index 9ae06804dd..c554751aa0 100644 --- a/typedapi/license/post/request.go +++ b/typedapi/license/post/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package post @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/post/PostLicenseRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/post/PostLicenseRequest.ts#L24-L70 type Request struct { License *types.License `json:"license,omitempty"` // Licenses A sequence of one or more JSON documents containing the license information. diff --git a/typedapi/license/post/response.go b/typedapi/license/post/response.go index 5198d644a1..8a4e7def7c 100644 --- a/typedapi/license/post/response.go +++ b/typedapi/license/post/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package post @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/post/PostLicenseResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/post/PostLicenseResponse.ts#L23-L29 type Response struct { Acknowledge *types.Acknowledgement `json:"acknowledge,omitempty"` Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/license/poststartbasic/post_start_basic.go b/typedapi/license/poststartbasic/post_start_basic.go index 9915ad4abd..eb010cb238 100644 --- a/typedapi/license/poststartbasic/post_start_basic.go +++ b/typedapi/license/poststartbasic/post_start_basic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start a basic license. // diff --git a/typedapi/license/poststartbasic/response.go b/typedapi/license/poststartbasic/response.go index 280772ca27..6a48746de5 100644 --- a/typedapi/license/poststartbasic/response.go +++ b/typedapi/license/poststartbasic/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package poststartbasic @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package poststartbasic // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/post_start_basic/StartBasicLicenseResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/post_start_basic/StartBasicLicenseResponse.ts#L23-L31 type Response struct { Acknowledge map[string][]string `json:"acknowledge,omitempty"` Acknowledged bool `json:"acknowledged"` diff --git a/typedapi/license/poststarttrial/post_start_trial.go b/typedapi/license/poststarttrial/post_start_trial.go index 9ebe975684..95a5423fdb 100644 --- a/typedapi/license/poststarttrial/post_start_trial.go +++ b/typedapi/license/poststarttrial/post_start_trial.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start a trial. // Start a 30-day trial, which gives access to all subscription features. @@ -302,9 +302,10 @@ func (r *PostStartTrial) Acknowledge(acknowledge bool) *PostStartTrial { return r } -// API name: type_query_string -func (r *PostStartTrial) TypeQueryString(typequerystring string) *PostStartTrial { - r.values.Set("type_query_string", typequerystring) +// Type The type of trial license to generate (default: "trial") +// API name: type +func (r *PostStartTrial) Type(type_ string) *PostStartTrial { + r.values.Set("type", type_) return r } diff --git a/typedapi/license/poststarttrial/response.go b/typedapi/license/poststarttrial/response.go index 945ec7c979..9f2005a16a 100644 --- a/typedapi/license/poststarttrial/response.go +++ b/typedapi/license/poststarttrial/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package poststarttrial @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package poststarttrial // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/post_start_trial/StartTrialLicenseResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/post_start_trial/StartTrialLicenseResponse.ts#L22-L29 type Response struct { Acknowledged bool `json:"acknowledged"` ErrorMessage *string `json:"error_message,omitempty"` diff --git a/typedapi/logstash/deletepipeline/delete_pipeline.go b/typedapi/logstash/deletepipeline/delete_pipeline.go index 6ed9c60d8d..dbe3315ea5 100644 --- a/typedapi/logstash/deletepipeline/delete_pipeline.go +++ b/typedapi/logstash/deletepipeline/delete_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a Logstash pipeline. // Delete a pipeline that is used for Logstash Central Management. diff --git a/typedapi/logstash/getpipeline/get_pipeline.go b/typedapi/logstash/getpipeline/get_pipeline.go index 63f27ef14e..ff947ddb83 100644 --- a/typedapi/logstash/getpipeline/get_pipeline.go +++ b/typedapi/logstash/getpipeline/get_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get Logstash pipelines. // Get pipelines that are used for Logstash Central Management. diff --git a/typedapi/logstash/getpipeline/response.go b/typedapi/logstash/getpipeline/response.go index 15260ecbca..948f5c0989 100644 --- a/typedapi/logstash/getpipeline/response.go +++ b/typedapi/logstash/getpipeline/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27 type Response map[string]types.LogstashPipeline diff --git a/typedapi/logstash/putpipeline/put_pipeline.go b/typedapi/logstash/putpipeline/put_pipeline.go index 880c46d28e..b57df68d8b 100644 --- a/typedapi/logstash/putpipeline/put_pipeline.go +++ b/typedapi/logstash/putpipeline/put_pipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a Logstash pipeline. // @@ -309,11 +309,10 @@ func (r *PutPipeline) Pretty(pretty bool) *PutPipeline { return r } -// A description of the pipeline. +// Description A description of the pipeline. // This description is not used by Elasticsearch or Logstash. // API name: description func (r *PutPipeline) Description(description string) *PutPipeline { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -323,24 +322,21 @@ func (r *PutPipeline) Description(description string) *PutPipeline { return r } -// The date the pipeline was last updated. +// LastModified The date the pipeline was last updated. // It must be in the `yyyy-MM-dd'T'HH:mm:ss.SSSZZ` strict_date_time format. // API name: last_modified -func (r *PutPipeline) LastModified(datetime types.DateTimeVariant) *PutPipeline { - // Initialize the request if it is not already initialized +func (r *PutPipeline) LastModified(datetime types.DateTime) *PutPipeline { if r.req == nil { r.req = NewRequest() } - - r.req.LastModified = *datetime.DateTimeCaster() + r.req.LastModified = datetime return r } -// The configuration for the pipeline. +// Pipeline The configuration for the pipeline. // API name: pipeline func (r *PutPipeline) Pipeline(pipeline string) *PutPipeline { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -350,38 +346,35 @@ func (r *PutPipeline) Pipeline(pipeline string) *PutPipeline { return r } -// Optional metadata about the pipeline, which can have any contents. +// PipelineMetadata Optional metadata about the pipeline, which can have any contents. // This metadata is not generated or used by Elasticsearch or Logstash. // API name: pipeline_metadata -func (r *PutPipeline) PipelineMetadata(pipelinemetadata types.PipelineMetadataVariant) *PutPipeline { - // Initialize the request if it is not already initialized +func (r *PutPipeline) PipelineMetadata(pipelinemetadata *types.PipelineMetadata) *PutPipeline { if r.req == nil { r.req = NewRequest() } - r.req.PipelineMetadata = *pipelinemetadata.PipelineMetadataCaster() + r.req.PipelineMetadata = *pipelinemetadata return r } -// Settings for the pipeline. +// PipelineSettings Settings for the pipeline. // It supports only flat keys in dot notation. // API name: pipeline_settings -func (r *PutPipeline) PipelineSettings(pipelinesettings types.PipelineSettingsVariant) *PutPipeline { - // Initialize the request if it is not already initialized +func (r *PutPipeline) PipelineSettings(pipelinesettings *types.PipelineSettings) *PutPipeline { if r.req == nil { r.req = NewRequest() } - r.req.PipelineSettings = *pipelinesettings.PipelineSettingsCaster() + r.req.PipelineSettings = *pipelinesettings return r } -// The user who last updated the pipeline. +// Username The user who last updated the pipeline. // API name: username func (r *PutPipeline) Username(username string) *PutPipeline { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/logstash/putpipeline/request.go b/typedapi/logstash/putpipeline/request.go index e0369eda4a..c4a5984d3e 100644 --- a/typedapi/logstash/putpipeline/request.go +++ b/typedapi/logstash/putpipeline/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putpipeline @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L51 type Request = types.LogstashPipeline // NewRequest returns a Request diff --git a/typedapi/migration/deprecations/deprecations.go b/typedapi/migration/deprecations/deprecations.go index fe36cb586a..d444a48b34 100644 --- a/typedapi/migration/deprecations/deprecations.go +++ b/typedapi/migration/deprecations/deprecations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get deprecation information. // Get information about different cluster, node, and index level settings that diff --git a/typedapi/migration/deprecations/response.go b/typedapi/migration/deprecations/response.go index cab095b8dc..583ee5d668 100644 --- a/typedapi/migration/deprecations/response.go +++ b/typedapi/migration/deprecations/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deprecations @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deprecations // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L54 type Response struct { // ClusterSettings Cluster-level deprecation warnings. diff --git a/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go b/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go index 92eed7376e..235e395878 100644 --- a/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go +++ b/typedapi/migration/getfeatureupgradestatus/get_feature_upgrade_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get feature migration information. // Version upgrades sometimes require changes to how features store diff --git a/typedapi/migration/getfeatureupgradestatus/response.go b/typedapi/migration/getfeatureupgradestatus/response.go index fc2e1459e6..452a1ab706 100644 --- a/typedapi/migration/getfeatureupgradestatus/response.go +++ b/typedapi/migration/getfeatureupgradestatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getfeatureupgradestatus @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getfeatureupgradestatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L23-L28 type Response struct { Features []types.GetMigrationFeature `json:"features"` MigrationStatus migrationstatus.MigrationStatus `json:"migration_status"` diff --git a/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go b/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go index cf3de174ee..d2dd6b80e7 100644 --- a/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go +++ b/typedapi/migration/postfeatureupgrade/post_feature_upgrade.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start the feature migration. // Version upgrades sometimes require changes to how features store diff --git a/typedapi/migration/postfeatureupgrade/response.go b/typedapi/migration/postfeatureupgrade/response.go index a79debe1ab..0e7cb8ec12 100644 --- a/typedapi/migration/postfeatureupgrade/response.go +++ b/typedapi/migration/postfeatureupgrade/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postfeatureupgrade @@ -26,10 +26,11 @@ import ( // Response holds the response body struct for the package postfeatureupgrade // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L26 type Response struct { Accepted bool `json:"accepted"` - Features []types.PostMigrationFeature `json:"features"` + Features []types.PostMigrationFeature `json:"features,omitempty"` + Reason *string `json:"reason,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go b/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go index 0b98826a6f..408d3aed61 100644 --- a/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go +++ b/typedapi/ml/cleartrainedmodeldeploymentcache/clear_trained_model_deployment_cache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear trained model deployment cache. // diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/response.go b/typedapi/ml/cleartrainedmodeldeploymentcache/response.go index df050a056c..ee8cecd30a 100644 --- a/typedapi/ml/cleartrainedmodeldeploymentcache/response.go +++ b/typedapi/ml/cleartrainedmodeldeploymentcache/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package cleartrainedmodeldeploymentcache // Response holds the response body struct for the package cleartrainedmodeldeploymentcache // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/clear_trained_model_deployment_cache/MlClearTrainedModelDeploymentCacheResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/clear_trained_model_deployment_cache/MlClearTrainedModelDeploymentCacheResponse.ts#L20-L24 type Response struct { Cleared bool `json:"cleared"` } diff --git a/typedapi/ml/closejob/close_job.go b/typedapi/ml/closejob/close_job.go index 09833110d4..e50d5feda1 100644 --- a/typedapi/ml/closejob/close_job.go +++ b/typedapi/ml/closejob/close_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Close anomaly detection jobs. // @@ -397,41 +397,35 @@ func (r *CloseJob) Pretty(pretty bool) *CloseJob { return r } -// Refer to the description for the `allow_no_match` query parameter. +// AllowNoMatch Refer to the description for the `allow_no_match` query parameter. // API name: allow_no_match func (r *CloseJob) AllowNoMatch(allownomatch bool) *CloseJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowNoMatch = &allownomatch return r } -// Refer to the descriptiion for the `force` query parameter. +// Force Refer to the descriptiion for the `force` query parameter. // API name: force func (r *CloseJob) Force(force bool) *CloseJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Force = &force return r } -// Refer to the description for the `timeout` query parameter. +// Timeout Refer to the description for the `timeout` query parameter. // API name: timeout -func (r *CloseJob) Timeout(duration types.DurationVariant) *CloseJob { - // Initialize the request if it is not already initialized +func (r *CloseJob) Timeout(duration types.Duration) *CloseJob { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/ml/closejob/request.go b/typedapi/ml/closejob/request.go index 45a2326bd2..868b39f120 100644 --- a/typedapi/ml/closejob/request.go +++ b/typedapi/ml/closejob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package closejob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/close_job/MlCloseJobRequest.ts#L24-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/close_job/MlCloseJobRequest.ts#L24-L85 type Request struct { // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. diff --git a/typedapi/ml/closejob/response.go b/typedapi/ml/closejob/response.go index 453dcf6665..47a8f6aef1 100644 --- a/typedapi/ml/closejob/response.go +++ b/typedapi/ml/closejob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package closejob // Response holds the response body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/close_job/MlCloseJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/close_job/MlCloseJobResponse.ts#L20-L22 type Response struct { Closed bool `json:"closed"` } diff --git a/typedapi/ml/deletecalendar/delete_calendar.go b/typedapi/ml/deletecalendar/delete_calendar.go index 25ad864053..76a537d436 100644 --- a/typedapi/ml/deletecalendar/delete_calendar.go +++ b/typedapi/ml/deletecalendar/delete_calendar.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a calendar. // diff --git a/typedapi/ml/deletecalendar/response.go b/typedapi/ml/deletecalendar/response.go index f1f6865272..9026205823 100644 --- a/typedapi/ml/deletecalendar/response.go +++ b/typedapi/ml/deletecalendar/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletecalendar // Response holds the response body struct for the package deletecalendar // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletecalendarevent/delete_calendar_event.go b/typedapi/ml/deletecalendarevent/delete_calendar_event.go index 38fe25d917..b09db9e109 100644 --- a/typedapi/ml/deletecalendarevent/delete_calendar_event.go +++ b/typedapi/ml/deletecalendarevent/delete_calendar_event.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete events from a calendar. package deletecalendarevent diff --git a/typedapi/ml/deletecalendarevent/response.go b/typedapi/ml/deletecalendarevent/response.go index e91546b31b..40394885a8 100644 --- a/typedapi/ml/deletecalendarevent/response.go +++ b/typedapi/ml/deletecalendarevent/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletecalendarevent // Response holds the response body struct for the package deletecalendarevent // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletecalendarjob/delete_calendar_job.go b/typedapi/ml/deletecalendarjob/delete_calendar_job.go index 74e9393b49..05df2a0932 100644 --- a/typedapi/ml/deletecalendarjob/delete_calendar_job.go +++ b/typedapi/ml/deletecalendarjob/delete_calendar_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete anomaly jobs from a calendar. package deletecalendarjob diff --git a/typedapi/ml/deletecalendarjob/response.go b/typedapi/ml/deletecalendarjob/response.go index f0a7b130f8..1ce0d2cbc7 100644 --- a/typedapi/ml/deletecalendarjob/response.go +++ b/typedapi/ml/deletecalendarjob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletecalendarjob @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package deletecalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_calendar_job/MlDeleteCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_calendar_job/MlDeleteCalendarJobResponse.ts#L22-L31 type Response struct { // CalendarId A string that uniquely identifies a calendar. diff --git a/typedapi/ml/deletedatafeed/delete_datafeed.go b/typedapi/ml/deletedatafeed/delete_datafeed.go index 82359b2b36..199e0a232d 100644 --- a/typedapi/ml/deletedatafeed/delete_datafeed.go +++ b/typedapi/ml/deletedatafeed/delete_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a datafeed. package deletedatafeed diff --git a/typedapi/ml/deletedatafeed/response.go b/typedapi/ml/deletedatafeed/response.go index 2ea0687182..d80ef96997 100644 --- a/typedapi/ml/deletedatafeed/response.go +++ b/typedapi/ml/deletedatafeed/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletedatafeed // Response holds the response body struct for the package deletedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go b/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go index 46917ea847..1df91b4c38 100644 --- a/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go +++ b/typedapi/ml/deletedataframeanalytics/delete_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a data frame analytics job. package deletedataframeanalytics diff --git a/typedapi/ml/deletedataframeanalytics/response.go b/typedapi/ml/deletedataframeanalytics/response.go index d2650d16f8..4c0631fbf5 100644 --- a/typedapi/ml/deletedataframeanalytics/response.go +++ b/typedapi/ml/deletedataframeanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletedataframeanalytics // Response holds the response body struct for the package deletedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deleteexpireddata/delete_expired_data.go b/typedapi/ml/deleteexpireddata/delete_expired_data.go index df89bed82e..27e7d2878c 100644 --- a/typedapi/ml/deleteexpireddata/delete_expired_data.go +++ b/typedapi/ml/deleteexpireddata/delete_expired_data.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete expired ML data. // @@ -381,11 +381,10 @@ func (r *DeleteExpiredData) Pretty(pretty bool) *DeleteExpiredData { return r } -// The desired requests per second for the deletion processes. The default +// RequestsPerSecond The desired requests per second for the deletion processes. The default // behavior is no throttling. // API name: requests_per_second func (r *DeleteExpiredData) RequestsPerSecond(requestspersecond float32) *DeleteExpiredData { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -395,15 +394,13 @@ func (r *DeleteExpiredData) RequestsPerSecond(requestspersecond float32) *Delete return r } -// How long can the underlying delete processes run until they are canceled. +// Timeout How long can the underlying delete processes run until they are canceled. // API name: timeout -func (r *DeleteExpiredData) Timeout(duration types.DurationVariant) *DeleteExpiredData { - // Initialize the request if it is not already initialized +func (r *DeleteExpiredData) Timeout(duration types.Duration) *DeleteExpiredData { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/ml/deleteexpireddata/request.go b/typedapi/ml/deleteexpireddata/request.go index 2d328ac093..3442ff8952 100644 --- a/typedapi/ml/deleteexpireddata/request.go +++ b/typedapi/ml/deleteexpireddata/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteexpireddata @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L85 type Request struct { // RequestsPerSecond The desired requests per second for the deletion processes. The default diff --git a/typedapi/ml/deleteexpireddata/response.go b/typedapi/ml/deleteexpireddata/response.go index 1203037173..10191e8cac 100644 --- a/typedapi/ml/deleteexpireddata/response.go +++ b/typedapi/ml/deleteexpireddata/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteexpireddata // Response holds the response body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_expired_data/MlDeleteExpiredDataResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_expired_data/MlDeleteExpiredDataResponse.ts#L20-L22 type Response struct { Deleted bool `json:"deleted"` } diff --git a/typedapi/ml/deletefilter/delete_filter.go b/typedapi/ml/deletefilter/delete_filter.go index f90ca9a16b..6e099c5fe3 100644 --- a/typedapi/ml/deletefilter/delete_filter.go +++ b/typedapi/ml/deletefilter/delete_filter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a filter. // diff --git a/typedapi/ml/deletefilter/response.go b/typedapi/ml/deletefilter/response.go index 9342b6e847..ee3be3bb67 100644 --- a/typedapi/ml/deletefilter/response.go +++ b/typedapi/ml/deletefilter/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletefilter // Response holds the response body struct for the package deletefilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deleteforecast/delete_forecast.go b/typedapi/ml/deleteforecast/delete_forecast.go index 7fc3383f90..d06efc2b65 100644 --- a/typedapi/ml/deleteforecast/delete_forecast.go +++ b/typedapi/ml/deleteforecast/delete_forecast.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete forecasts from a job. // diff --git a/typedapi/ml/deleteforecast/response.go b/typedapi/ml/deleteforecast/response.go index 225845e827..f48231955d 100644 --- a/typedapi/ml/deleteforecast/response.go +++ b/typedapi/ml/deleteforecast/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteforecast // Response holds the response body struct for the package deleteforecast // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletejob/delete_job.go b/typedapi/ml/deletejob/delete_job.go index 584421d0af..2c96f928e6 100644 --- a/typedapi/ml/deletejob/delete_job.go +++ b/typedapi/ml/deletejob/delete_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an anomaly detection job. // diff --git a/typedapi/ml/deletejob/response.go b/typedapi/ml/deletejob/response.go index a897159c97..d084d0206d 100644 --- a/typedapi/ml/deletejob/response.go +++ b/typedapi/ml/deletejob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletejob // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go b/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go index a817a73e2d..f80b8160c4 100644 --- a/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go +++ b/typedapi/ml/deletemodelsnapshot/delete_model_snapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a model snapshot. // diff --git a/typedapi/ml/deletemodelsnapshot/response.go b/typedapi/ml/deletemodelsnapshot/response.go index c54ff51f68..18d2e5b4c5 100644 --- a/typedapi/ml/deletemodelsnapshot/response.go +++ b/typedapi/ml/deletemodelsnapshot/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletemodelsnapshot // Response holds the response body struct for the package deletemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletetrainedmodel/delete_trained_model.go b/typedapi/ml/deletetrainedmodel/delete_trained_model.go index abb8b9881b..aa655c10bf 100644 --- a/typedapi/ml/deletetrainedmodel/delete_trained_model.go +++ b/typedapi/ml/deletetrainedmodel/delete_trained_model.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an unreferenced trained model. // diff --git a/typedapi/ml/deletetrainedmodel/response.go b/typedapi/ml/deletetrainedmodel/response.go index 8483d78f2e..250934d188 100644 --- a/typedapi/ml/deletetrainedmodel/response.go +++ b/typedapi/ml/deletetrainedmodel/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletetrainedmodel // Response holds the response body struct for the package deletetrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go b/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go index be8c2f4973..75d026cf08 100644 --- a/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go +++ b/typedapi/ml/deletetrainedmodelalias/delete_trained_model_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a trained model alias. // diff --git a/typedapi/ml/deletetrainedmodelalias/response.go b/typedapi/ml/deletetrainedmodelalias/response.go index 08cf369e01..15fa2421e4 100644 --- a/typedapi/ml/deletetrainedmodelalias/response.go +++ b/typedapi/ml/deletetrainedmodelalias/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletetrainedmodelalias // Response holds the response body struct for the package deletetrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/estimatemodelmemory/estimate_model_memory.go b/typedapi/ml/estimatemodelmemory/estimate_model_memory.go index 5f6278ad72..701fb3e670 100644 --- a/typedapi/ml/estimatemodelmemory/estimate_model_memory.go +++ b/typedapi/ml/estimatemodelmemory/estimate_model_memory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Estimate job model memory usage. // @@ -346,55 +346,36 @@ func (r *EstimateModelMemory) Pretty(pretty bool) *EstimateModelMemory { return r } -// For a list of the properties that you can specify in the +// AnalysisConfig For a list of the properties that you can specify in the // `analysis_config` component of the body of this API. // API name: analysis_config -func (r *EstimateModelMemory) AnalysisConfig(analysisconfig types.AnalysisConfigVariant) *EstimateModelMemory { - // Initialize the request if it is not already initialized +func (r *EstimateModelMemory) AnalysisConfig(analysisconfig *types.AnalysisConfig) *EstimateModelMemory { if r.req == nil { r.req = NewRequest() } - r.req.AnalysisConfig = analysisconfig.AnalysisConfigCaster() + r.req.AnalysisConfig = analysisconfig return r } -// Estimates of the highest cardinality in a single bucket that is observed +// MaxBucketCardinality Estimates of the highest cardinality in a single bucket that is observed // for influencer fields over the time period that the job analyzes data. // To produce a good answer, values must be provided for all influencer // fields. Providing values for fields that are not listed as `influencers` // has no effect on the estimation. // API name: max_bucket_cardinality func (r *EstimateModelMemory) MaxBucketCardinality(maxbucketcardinality map[string]int64) *EstimateModelMemory { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxBucketCardinality = maxbucketcardinality - return r -} -func (r *EstimateModelMemory) AddMaxBucketCardinality(key string, value int64) *EstimateModelMemory { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]int64 - if r.req.MaxBucketCardinality == nil { - r.req.MaxBucketCardinality = make(map[string]int64) - } else { - tmp = r.req.MaxBucketCardinality - } - - tmp[key] = value + r.req.MaxBucketCardinality = maxbucketcardinality - r.req.MaxBucketCardinality = tmp return r } -// Estimates of the cardinality that is observed for fields over the whole +// OverallCardinality Estimates of the cardinality that is observed for fields over the whole // time period that the job analyzes data. To produce a good answer, values // must be provided for fields referenced in the `by_field_name`, // `over_field_name` and `partition_field_name` of any detectors. Providing @@ -403,29 +384,11 @@ func (r *EstimateModelMemory) AddMaxBucketCardinality(key string, value int64) * // `over_field_name` or `partition_field_name`. // API name: overall_cardinality func (r *EstimateModelMemory) OverallCardinality(overallcardinality map[string]int64) *EstimateModelMemory { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.OverallCardinality = overallcardinality - return r -} -func (r *EstimateModelMemory) AddOverallCardinality(key string, value int64) *EstimateModelMemory { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]int64 - if r.req.OverallCardinality == nil { - r.req.OverallCardinality = make(map[string]int64) - } else { - tmp = r.req.OverallCardinality - } - - tmp[key] = value + r.req.OverallCardinality = overallcardinality - r.req.OverallCardinality = tmp return r } diff --git a/typedapi/ml/estimatemodelmemory/request.go b/typedapi/ml/estimatemodelmemory/request.go index 97e8071898..2152d9c82d 100644 --- a/typedapi/ml/estimatemodelmemory/request.go +++ b/typedapi/ml/estimatemodelmemory/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package estimatemodelmemory @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L71 type Request struct { // AnalysisConfig For a list of the properties that you can specify in the diff --git a/typedapi/ml/estimatemodelmemory/response.go b/typedapi/ml/estimatemodelmemory/response.go index 9f8f5b8b35..103fce631c 100644 --- a/typedapi/ml/estimatemodelmemory/response.go +++ b/typedapi/ml/estimatemodelmemory/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package estimatemodelmemory // Response holds the response body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24 type Response struct { ModelMemoryEstimate string `json:"model_memory_estimate"` } diff --git a/typedapi/ml/evaluatedataframe/evaluate_data_frame.go b/typedapi/ml/evaluatedataframe/evaluate_data_frame.go index 0f668fe293..71f6a99e89 100644 --- a/typedapi/ml/evaluatedataframe/evaluate_data_frame.go +++ b/typedapi/ml/evaluatedataframe/evaluate_data_frame.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Evaluate data frame analytics. // @@ -346,41 +346,37 @@ func (r *EvaluateDataFrame) Pretty(pretty bool) *EvaluateDataFrame { return r } -// Defines the type of evaluation you want to perform. +// Evaluation Defines the type of evaluation you want to perform. // API name: evaluation -func (r *EvaluateDataFrame) Evaluation(evaluation types.DataframeEvaluationContainerVariant) *EvaluateDataFrame { - // Initialize the request if it is not already initialized +func (r *EvaluateDataFrame) Evaluation(evaluation *types.DataframeEvaluationContainer) *EvaluateDataFrame { if r.req == nil { r.req = NewRequest() } - r.req.Evaluation = *evaluation.DataframeEvaluationContainerCaster() + r.req.Evaluation = *evaluation return r } -// Defines the `index` in which the evaluation will be performed. +// Index Defines the `index` in which the evaluation will be performed. // API name: index func (r *EvaluateDataFrame) Index(indexname string) *EvaluateDataFrame { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Index = indexname return r } -// A query clause that retrieves a subset of data from the source index. +// Query A query clause that retrieves a subset of data from the source index. // API name: query -func (r *EvaluateDataFrame) Query(query types.QueryVariant) *EvaluateDataFrame { - // Initialize the request if it is not already initialized +func (r *EvaluateDataFrame) Query(query *types.Query) *EvaluateDataFrame { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } diff --git a/typedapi/ml/evaluatedataframe/request.go b/typedapi/ml/evaluatedataframe/request.go index e8eeb02336..08253a2eff 100644 --- a/typedapi/ml/evaluatedataframe/request.go +++ b/typedapi/ml/evaluatedataframe/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package evaluatedataframe @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L61 type Request struct { // Evaluation Defines the type of evaluation you want to perform. diff --git a/typedapi/ml/evaluatedataframe/response.go b/typedapi/ml/evaluatedataframe/response.go index a379353600..b4e56d55a1 100644 --- a/typedapi/ml/evaluatedataframe/response.go +++ b/typedapi/ml/evaluatedataframe/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package evaluatedataframe @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L44 type Response struct { // Classification Evaluation results for a classification analysis. diff --git a/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go b/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go index 8e5219cfe1..4bf181e21b 100644 --- a/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go +++ b/typedapi/ml/explaindataframeanalytics/explain_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Explain data frame analytics config. // @@ -390,56 +390,51 @@ func (r *ExplainDataFrameAnalytics) Pretty(pretty bool) *ExplainDataFrameAnalyti return r } -// Specifies whether this job can start when there is insufficient machine +// AllowLazyStart Specifies whether this job can start when there is insufficient machine // learning node capacity for it to be immediately assigned to a node. // API name: allow_lazy_start func (r *ExplainDataFrameAnalytics) AllowLazyStart(allowlazystart bool) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowLazyStart = &allowlazystart return r } -// The analysis configuration, which contains the information necessary to +// Analysis The analysis configuration, which contains the information necessary to // perform one of the following types of analysis: classification, outlier // detection, or regression. // API name: analysis -func (r *ExplainDataFrameAnalytics) Analysis(analysis types.DataframeAnalysisContainerVariant) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *ExplainDataFrameAnalytics) Analysis(analysis *types.DataframeAnalysisContainer) *ExplainDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Analysis = analysis.DataframeAnalysisContainerCaster() + r.req.Analysis = analysis return r } -// Specify includes and/or excludes patterns to select which fields will be +// AnalyzedFields Specify includes and/or excludes patterns to select which fields will be // included in the analysis. The patterns specified in excludes are applied // last, therefore excludes takes precedence. In other words, if the same // field is specified in both includes and excludes, then the field will not // be included in the analysis. // API name: analyzed_fields -func (r *ExplainDataFrameAnalytics) AnalyzedFields(analyzedfields types.DataframeAnalysisAnalyzedFieldsVariant) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *ExplainDataFrameAnalytics) AnalyzedFields(analyzedfields *types.DataframeAnalysisAnalyzedFields) *ExplainDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.AnalyzedFields = analyzedfields.DataframeAnalysisAnalyzedFieldsCaster() + r.req.AnalyzedFields = analyzedfields return r } -// A description of the job. +// Description A description of the job. // API name: description func (r *ExplainDataFrameAnalytics) Description(description string) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -449,44 +444,40 @@ func (r *ExplainDataFrameAnalytics) Description(description string) *ExplainData return r } -// The destination configuration, consisting of index and optionally +// Dest The destination configuration, consisting of index and optionally // results_field (ml by default). // API name: dest -func (r *ExplainDataFrameAnalytics) Dest(dest types.DataframeAnalyticsDestinationVariant) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *ExplainDataFrameAnalytics) Dest(dest *types.DataframeAnalyticsDestination) *ExplainDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Dest = dest.DataframeAnalyticsDestinationCaster() + r.req.Dest = dest return r } -// The maximum number of threads to be used by the analysis. Using more +// MaxNumThreads The maximum number of threads to be used by the analysis. Using more // threads may decrease the time necessary to complete the analysis at the // cost of using more CPU. Note that the process may use additional threads // for operational functionality other than the analysis itself. // API name: max_num_threads func (r *ExplainDataFrameAnalytics) MaxNumThreads(maxnumthreads int) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxNumThreads = &maxnumthreads return r } -// The approximate maximum amount of memory resources that are permitted for +// ModelMemoryLimit The approximate maximum amount of memory resources that are permitted for // analytical processing. If your `elasticsearch.yml` file contains an // `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to // create data frame analytics jobs that have `model_memory_limit` values // greater than that setting. // API name: model_memory_limit func (r *ExplainDataFrameAnalytics) ModelMemoryLimit(modelmemorylimit string) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -496,16 +487,15 @@ func (r *ExplainDataFrameAnalytics) ModelMemoryLimit(modelmemorylimit string) *E return r } -// The configuration of how to source the analysis data. It requires an +// Source The configuration of how to source the analysis data. It requires an // index. Optionally, query and _source may be specified. // API name: source -func (r *ExplainDataFrameAnalytics) Source(source types.DataframeAnalyticsSourceVariant) *ExplainDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *ExplainDataFrameAnalytics) Source(source *types.DataframeAnalyticsSource) *ExplainDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Source = source.DataframeAnalyticsSourceCaster() + r.req.Source = source return r } diff --git a/typedapi/ml/explaindataframeanalytics/request.go b/typedapi/ml/explaindataframeanalytics/request.go index da5f09bffd..1173965e7f 100644 --- a/typedapi/ml/explaindataframeanalytics/request.go +++ b/typedapi/ml/explaindataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explaindataframeanalytics @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L120 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L120 type Request struct { // AllowLazyStart Specifies whether this job can start when there is insufficient machine diff --git a/typedapi/ml/explaindataframeanalytics/response.go b/typedapi/ml/explaindataframeanalytics/response.go index 4b469cb07d..9932ea2b5f 100644 --- a/typedapi/ml/explaindataframeanalytics/response.go +++ b/typedapi/ml/explaindataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package explaindataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponse.ts#L25-L32 type Response struct { // FieldSelection An array of objects that explain selection for each field, sorted by the diff --git a/typedapi/ml/flushjob/flush_job.go b/typedapi/ml/flushjob/flush_job.go index 2e67b06c54..0da453bc60 100644 --- a/typedapi/ml/flushjob/flush_job.go +++ b/typedapi/ml/flushjob/flush_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Force buffered data to be processed. // The flush jobs API is only applicable when sending data for analysis using @@ -375,67 +375,57 @@ func (r *FlushJob) Pretty(pretty bool) *FlushJob { return r } -// Refer to the description for the `advance_time` query parameter. +// AdvanceTime Refer to the description for the `advance_time` query parameter. // API name: advance_time -func (r *FlushJob) AdvanceTime(datetime types.DateTimeVariant) *FlushJob { - // Initialize the request if it is not already initialized +func (r *FlushJob) AdvanceTime(datetime types.DateTime) *FlushJob { if r.req == nil { r.req = NewRequest() } - - r.req.AdvanceTime = *datetime.DateTimeCaster() + r.req.AdvanceTime = datetime return r } -// Refer to the description for the `calc_interim` query parameter. +// CalcInterim Refer to the description for the `calc_interim` query parameter. // API name: calc_interim func (r *FlushJob) CalcInterim(calcinterim bool) *FlushJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.CalcInterim = &calcinterim return r } -// Refer to the description for the `end` query parameter. +// End Refer to the description for the `end` query parameter. // API name: end -func (r *FlushJob) End(datetime types.DateTimeVariant) *FlushJob { - // Initialize the request if it is not already initialized +func (r *FlushJob) End(datetime types.DateTime) *FlushJob { if r.req == nil { r.req = NewRequest() } - - r.req.End = *datetime.DateTimeCaster() + r.req.End = datetime return r } -// Refer to the description for the `skip_time` query parameter. +// SkipTime Refer to the description for the `skip_time` query parameter. // API name: skip_time -func (r *FlushJob) SkipTime(datetime types.DateTimeVariant) *FlushJob { - // Initialize the request if it is not already initialized +func (r *FlushJob) SkipTime(datetime types.DateTime) *FlushJob { if r.req == nil { r.req = NewRequest() } - - r.req.SkipTime = *datetime.DateTimeCaster() + r.req.SkipTime = datetime return r } -// Refer to the description for the `start` query parameter. +// Start Refer to the description for the `start` query parameter. // API name: start -func (r *FlushJob) Start(datetime types.DateTimeVariant) *FlushJob { - // Initialize the request if it is not already initialized +func (r *FlushJob) Start(datetime types.DateTime) *FlushJob { if r.req == nil { r.req = NewRequest() } - - r.req.Start = *datetime.DateTimeCaster() + r.req.Start = datetime return r } diff --git a/typedapi/ml/flushjob/request.go b/typedapi/ml/flushjob/request.go index e4c8c4029e..b04ed3c12a 100644 --- a/typedapi/ml/flushjob/request.go +++ b/typedapi/ml/flushjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package flushjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L107 type Request struct { // AdvanceTime Refer to the description for the `advance_time` query parameter. diff --git a/typedapi/ml/flushjob/response.go b/typedapi/ml/flushjob/response.go index 3db5af1420..98a9b3c2b1 100644 --- a/typedapi/ml/flushjob/response.go +++ b/typedapi/ml/flushjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package flushjob // Response holds the response body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31 type Response struct { Flushed bool `json:"flushed"` // LastFinalizedBucketEnd Provides the timestamp (in milliseconds since the epoch) of the end of diff --git a/typedapi/ml/forecast/forecast.go b/typedapi/ml/forecast/forecast.go index 09b45109e4..0ad0519012 100644 --- a/typedapi/ml/forecast/forecast.go +++ b/typedapi/ml/forecast/forecast.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Predict future behavior of a time series. // @@ -370,36 +370,31 @@ func (r *Forecast) Pretty(pretty bool) *Forecast { return r } -// Refer to the description for the `duration` query parameter. +// Duration Refer to the description for the `duration` query parameter. // API name: duration -func (r *Forecast) Duration(duration types.DurationVariant) *Forecast { - // Initialize the request if it is not already initialized +func (r *Forecast) Duration(duration types.Duration) *Forecast { if r.req == nil { r.req = NewRequest() } - - r.req.Duration = *duration.DurationCaster() + r.req.Duration = duration return r } -// Refer to the description for the `expires_in` query parameter. +// ExpiresIn Refer to the description for the `expires_in` query parameter. // API name: expires_in -func (r *Forecast) ExpiresIn(duration types.DurationVariant) *Forecast { - // Initialize the request if it is not already initialized +func (r *Forecast) ExpiresIn(duration types.Duration) *Forecast { if r.req == nil { r.req = NewRequest() } - - r.req.ExpiresIn = *duration.DurationCaster() + r.req.ExpiresIn = duration return r } -// Refer to the description for the `max_model_memory` query parameter. +// MaxModelMemory Refer to the description for the `max_model_memory` query parameter. // API name: max_model_memory func (r *Forecast) MaxModelMemory(maxmodelmemory string) *Forecast { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/ml/forecast/request.go b/typedapi/ml/forecast/request.go index 2bf0ff37d4..9a9e4caa04 100644 --- a/typedapi/ml/forecast/request.go +++ b/typedapi/ml/forecast/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package forecast @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/forecast/MlForecastJobRequest.ts#L24-L95 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/forecast/MlForecastJobRequest.ts#L24-L95 type Request struct { // Duration Refer to the description for the `duration` query parameter. diff --git a/typedapi/ml/forecast/response.go b/typedapi/ml/forecast/response.go index cff342876b..03559004e8 100644 --- a/typedapi/ml/forecast/response.go +++ b/typedapi/ml/forecast/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package forecast // Response holds the response body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/forecast/MlForecastJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/forecast/MlForecastJobResponse.ts#L22-L27 type Response struct { Acknowledged bool `json:"acknowledged"` ForecastId string `json:"forecast_id"` diff --git a/typedapi/ml/getbuckets/get_buckets.go b/typedapi/ml/getbuckets/get_buckets.go index ccf3ecf62d..95097dc849 100644 --- a/typedapi/ml/getbuckets/get_buckets.go +++ b/typedapi/ml/getbuckets/get_buckets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly detection job results for buckets. // The API presents a chronological view of the records, grouped by bucket. @@ -415,10 +415,9 @@ func (r *GetBuckets) Pretty(pretty bool) *GetBuckets { return r } -// Refer to the description for the `anomaly_score` query parameter. +// AnomalyScore Refer to the description for the `anomaly_score` query parameter. // API name: anomaly_score func (r *GetBuckets) AnomalyScore(anomalyscore types.Float64) *GetBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -428,92 +427,79 @@ func (r *GetBuckets) AnomalyScore(anomalyscore types.Float64) *GetBuckets { return r } -// Refer to the description for the `desc` query parameter. +// Desc Refer to the description for the `desc` query parameter. // API name: desc func (r *GetBuckets) Desc(desc bool) *GetBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Desc = &desc return r } -// Refer to the description for the `end` query parameter. +// End Refer to the description for the `end` query parameter. // API name: end -func (r *GetBuckets) End(datetime types.DateTimeVariant) *GetBuckets { - // Initialize the request if it is not already initialized +func (r *GetBuckets) End(datetime types.DateTime) *GetBuckets { if r.req == nil { r.req = NewRequest() } - - r.req.End = *datetime.DateTimeCaster() + r.req.End = datetime return r } -// Refer to the description for the `exclude_interim` query parameter. +// ExcludeInterim Refer to the description for the `exclude_interim` query parameter. // API name: exclude_interim func (r *GetBuckets) ExcludeInterim(excludeinterim bool) *GetBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ExcludeInterim = &excludeinterim return r } -// Refer to the description for the `expand` query parameter. +// Expand Refer to the description for the `expand` query parameter. // API name: expand func (r *GetBuckets) Expand(expand bool) *GetBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Expand = &expand return r } // API name: page -func (r *GetBuckets) Page(page types.PageVariant) *GetBuckets { - // Initialize the request if it is not already initialized +func (r *GetBuckets) Page(page *types.Page) *GetBuckets { if r.req == nil { r.req = NewRequest() } - r.req.Page = page.PageCaster() + r.req.Page = page return r } -// Refer to the desription for the `sort` query parameter. +// Sort Refer to the desription for the `sort` query parameter. // API name: sort func (r *GetBuckets) Sort(field string) *GetBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Sort = &field return r } -// Refer to the description for the `start` query parameter. +// Start Refer to the description for the `start` query parameter. // API name: start -func (r *GetBuckets) Start(datetime types.DateTimeVariant) *GetBuckets { - // Initialize the request if it is not already initialized +func (r *GetBuckets) Start(datetime types.DateTime) *GetBuckets { if r.req == nil { r.req = NewRequest() } - - r.req.Start = *datetime.DateTimeCaster() + r.req.Start = datetime return r } diff --git a/typedapi/ml/getbuckets/request.go b/typedapi/ml/getbuckets/request.go index 1d67c31cb5..49af9ff514 100644 --- a/typedapi/ml/getbuckets/request.go +++ b/typedapi/ml/getbuckets/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getbuckets @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L145 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L145 type Request struct { // AnomalyScore Refer to the description for the `anomaly_score` query parameter. diff --git a/typedapi/ml/getbuckets/response.go b/typedapi/ml/getbuckets/response.go index 8e8eeba3fb..0404ffe074 100644 --- a/typedapi/ml/getbuckets/response.go +++ b/typedapi/ml/getbuckets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_buckets/MlGetBucketsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_buckets/MlGetBucketsResponse.ts#L23-L28 type Response struct { Buckets []types.BucketSummary `json:"buckets"` Count int64 `json:"count"` diff --git a/typedapi/ml/getcalendarevents/get_calendar_events.go b/typedapi/ml/getcalendarevents/get_calendar_events.go index bc8473c092..6a251112f0 100644 --- a/typedapi/ml/getcalendarevents/get_calendar_events.go +++ b/typedapi/ml/getcalendarevents/get_calendar_events.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get info about events in calendars. package getcalendarevents diff --git a/typedapi/ml/getcalendarevents/response.go b/typedapi/ml/getcalendarevents/response.go index 3fee5ff9d6..2540837600 100644 --- a/typedapi/ml/getcalendarevents/response.go +++ b/typedapi/ml/getcalendarevents/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_calendar_events/MlGetCalendarEventsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_calendar_events/MlGetCalendarEventsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Events []types.CalendarEvent `json:"events"` diff --git a/typedapi/ml/getcalendars/get_calendars.go b/typedapi/ml/getcalendars/get_calendars.go index 5bf1959ae5..781d1121e7 100644 --- a/typedapi/ml/getcalendars/get_calendars.go +++ b/typedapi/ml/getcalendars/get_calendars.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get calendar configuration info. package getcalendars @@ -383,15 +383,14 @@ func (r *GetCalendars) Pretty(pretty bool) *GetCalendars { return r } -// This object is supported only when you omit the calendar identifier. +// Page This object is supported only when you omit the calendar identifier. // API name: page -func (r *GetCalendars) Page(page types.PageVariant) *GetCalendars { - // Initialize the request if it is not already initialized +func (r *GetCalendars) Page(page *types.Page) *GetCalendars { if r.req == nil { r.req = NewRequest() } - r.req.Page = page.PageCaster() + r.req.Page = page return r } diff --git a/typedapi/ml/getcalendars/request.go b/typedapi/ml/getcalendars/request.go index 894d4bdb57..f10b57bc9f 100644 --- a/typedapi/ml/getcalendars/request.go +++ b/typedapi/ml/getcalendars/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getcalendars @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L63 type Request struct { // Page This object is supported only when you omit the calendar identifier. diff --git a/typedapi/ml/getcalendars/response.go b/typedapi/ml/getcalendars/response.go index c0b3004e4c..d117b2c223 100644 --- a/typedapi/ml/getcalendars/response.go +++ b/typedapi/ml/getcalendars/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getcalendars @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_calendars/MlGetCalendarsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_calendars/MlGetCalendarsResponse.ts#L23-L25 type Response struct { Calendars []types.Calendar `json:"calendars"` Count int64 `json:"count"` diff --git a/typedapi/ml/getcategories/get_categories.go b/typedapi/ml/getcategories/get_categories.go index 54e54b9ad4..2ae320b4d4 100644 --- a/typedapi/ml/getcategories/get_categories.go +++ b/typedapi/ml/getcategories/get_categories.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly detection job results for categories. package getcategories @@ -424,16 +424,15 @@ func (r *GetCategories) Pretty(pretty bool) *GetCategories { return r } -// Configures pagination. +// Page Configures pagination. // This parameter has the `from` and `size` properties. // API name: page -func (r *GetCategories) Page(page types.PageVariant) *GetCategories { - // Initialize the request if it is not already initialized +func (r *GetCategories) Page(page *types.Page) *GetCategories { if r.req == nil { r.req = NewRequest() } - r.req.Page = page.PageCaster() + r.req.Page = page return r } diff --git a/typedapi/ml/getcategories/request.go b/typedapi/ml/getcategories/request.go index 8adbbe53f7..cf4de3454d 100644 --- a/typedapi/ml/getcategories/request.go +++ b/typedapi/ml/getcategories/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getcategories @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L82 type Request struct { // Page Configures pagination. diff --git a/typedapi/ml/getcategories/response.go b/typedapi/ml/getcategories/response.go index e53a853117..3e513d48d9 100644 --- a/typedapi/ml/getcategories/response.go +++ b/typedapi/ml/getcategories/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getcategories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_categories/MlGetCategoriesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_categories/MlGetCategoriesResponse.ts#L23-L28 type Response struct { Categories []types.Category `json:"categories"` Count int64 `json:"count"` diff --git a/typedapi/ml/getdatafeeds/get_datafeeds.go b/typedapi/ml/getdatafeeds/get_datafeeds.go index 6b07c58bdd..8eaf692d7d 100644 --- a/typedapi/ml/getdatafeeds/get_datafeeds.go +++ b/typedapi/ml/getdatafeeds/get_datafeeds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get datafeeds configuration info. // You can get information for multiple datafeeds in a single API request by diff --git a/typedapi/ml/getdatafeeds/response.go b/typedapi/ml/getdatafeeds/response.go index 16372d91c6..b996c67620 100644 --- a/typedapi/ml/getdatafeeds/response.go +++ b/typedapi/ml/getdatafeeds/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_datafeeds/MlGetDatafeedsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_datafeeds/MlGetDatafeedsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Datafeeds []types.MLDatafeed `json:"datafeeds"` diff --git a/typedapi/ml/getdatafeedstats/get_datafeed_stats.go b/typedapi/ml/getdatafeedstats/get_datafeed_stats.go index a78709d0e5..5d54d77b62 100644 --- a/typedapi/ml/getdatafeedstats/get_datafeed_stats.go +++ b/typedapi/ml/getdatafeedstats/get_datafeed_stats.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 -// Get datafeeds usage info. +// Get datafeed stats. // You can get statistics for multiple datafeeds in a single API request by // using a comma-separated list of datafeeds or a wildcard expression. You can // get statistics for all datafeeds by using `_all`, by specifying `*` as the @@ -80,7 +80,7 @@ func NewGetDatafeedStatsFunc(tp elastictransport.Interface) NewGetDatafeedStats } } -// Get datafeeds usage info. +// Get datafeed stats. // You can get statistics for multiple datafeeds in a single API request by // using a comma-separated list of datafeeds or a wildcard expression. You can // get statistics for all datafeeds by using `_all`, by specifying `*` as the diff --git a/typedapi/ml/getdatafeedstats/response.go b/typedapi/ml/getdatafeedstats/response.go index 7da4ffe13e..8358d565fe 100644 --- a/typedapi/ml/getdatafeedstats/response.go +++ b/typedapi/ml/getdatafeedstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdatafeedstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeedstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Datafeeds []types.DatafeedStats `json:"datafeeds"` diff --git a/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go b/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go index 79ccb1d43e..75c29509ab 100644 --- a/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go +++ b/typedapi/ml/getdataframeanalytics/get_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get data frame analytics job configuration info. // You can get information for multiple data frame analytics jobs in a single diff --git a/typedapi/ml/getdataframeanalytics/response.go b/typedapi/ml/getdataframeanalytics/response.go index 319eed707b..5bd45d2318 100644 --- a/typedapi/ml/getdataframeanalytics/response.go +++ b/typedapi/ml/getdataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29 type Response struct { Count int `json:"count"` // DataFrameAnalytics An array of data frame analytics job resources, which are sorted by the id diff --git a/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go b/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go index b6fe17b2c5..9c9d5abff1 100644 --- a/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go +++ b/typedapi/ml/getdataframeanalyticsstats/get_data_frame_analytics_stats.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 -// Get data frame analytics jobs usage info. +// Get data frame analytics job stats. package getdataframeanalyticsstats import ( @@ -74,7 +74,7 @@ func NewGetDataFrameAnalyticsStatsFunc(tp elastictransport.Interface) NewGetData } } -// Get data frame analytics jobs usage info. +// Get data frame analytics job stats. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html func New(tp elastictransport.Interface) *GetDataFrameAnalyticsStats { diff --git a/typedapi/ml/getdataframeanalyticsstats/response.go b/typedapi/ml/getdataframeanalyticsstats/response.go index d6e43e986c..9ed724ddaa 100644 --- a/typedapi/ml/getdataframeanalyticsstats/response.go +++ b/typedapi/ml/getdataframeanalyticsstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getdataframeanalyticsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalyticsstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L23-L29 type Response struct { Count int64 `json:"count"` // DataFrameAnalytics An array of objects that contain usage information for data frame analytics diff --git a/typedapi/ml/getfilters/get_filters.go b/typedapi/ml/getfilters/get_filters.go index 16abd63c81..34ab6f8984 100644 --- a/typedapi/ml/getfilters/get_filters.go +++ b/typedapi/ml/getfilters/get_filters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get filters. // You can get a single filter or all filters. diff --git a/typedapi/ml/getfilters/response.go b/typedapi/ml/getfilters/response.go index 1bb6b8c43a..85d659e7d8 100644 --- a/typedapi/ml/getfilters/response.go +++ b/typedapi/ml/getfilters/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getfilters @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfilters // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_filters/MlGetFiltersResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_filters/MlGetFiltersResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Filters []types.MLFilter `json:"filters"` diff --git a/typedapi/ml/getinfluencers/get_influencers.go b/typedapi/ml/getinfluencers/get_influencers.go index 2913b0e94b..d1041b98d4 100644 --- a/typedapi/ml/getinfluencers/get_influencers.go +++ b/typedapi/ml/getinfluencers/get_influencers.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly detection job results for influencers. // Influencers are the entities that have contributed to, or are to blame for, @@ -437,16 +437,15 @@ func (r *GetInfluencers) Pretty(pretty bool) *GetInfluencers { return r } -// Configures pagination. +// Page Configures pagination. // This parameter has the `from` and `size` properties. // API name: page -func (r *GetInfluencers) Page(page types.PageVariant) *GetInfluencers { - // Initialize the request if it is not already initialized +func (r *GetInfluencers) Page(page *types.Page) *GetInfluencers { if r.req == nil { r.req = NewRequest() } - r.req.Page = page.PageCaster() + r.req.Page = page return r } diff --git a/typedapi/ml/getinfluencers/request.go b/typedapi/ml/getinfluencers/request.go index 87083e58c0..3054a4f379 100644 --- a/typedapi/ml/getinfluencers/request.go +++ b/typedapi/ml/getinfluencers/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getinfluencers @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L105 type Request struct { // Page Configures pagination. diff --git a/typedapi/ml/getinfluencers/response.go b/typedapi/ml/getinfluencers/response.go index db428e127c..9753a55380 100644 --- a/typedapi/ml/getinfluencers/response.go +++ b/typedapi/ml/getinfluencers/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getinfluencers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_influencers/MlGetInfluencersResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_influencers/MlGetInfluencersResponse.ts#L23-L29 type Response struct { Count int64 `json:"count"` // Influencers Array of influencer objects diff --git a/typedapi/ml/getjobs/get_jobs.go b/typedapi/ml/getjobs/get_jobs.go index 9812059fa1..41e0831b4e 100644 --- a/typedapi/ml/getjobs/get_jobs.go +++ b/typedapi/ml/getjobs/get_jobs.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly detection jobs configuration info. // You can get information for multiple anomaly detection jobs in a single API diff --git a/typedapi/ml/getjobs/response.go b/typedapi/ml/getjobs/response.go index 995c530416..0becad5afe 100644 --- a/typedapi/ml/getjobs/response.go +++ b/typedapi/ml/getjobs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Jobs []types.Job `json:"jobs"` diff --git a/typedapi/ml/getjobstats/get_job_stats.go b/typedapi/ml/getjobstats/get_job_stats.go index f7072698ea..1b73fc201a 100644 --- a/typedapi/ml/getjobstats/get_job_stats.go +++ b/typedapi/ml/getjobstats/get_job_stats.go @@ -16,9 +16,9 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 -// Get anomaly detection jobs usage info. +// Get anomaly detection job stats. package getjobstats import ( @@ -74,7 +74,7 @@ func NewGetJobStatsFunc(tp elastictransport.Interface) NewGetJobStats { } } -// Get anomaly detection jobs usage info. +// Get anomaly detection job stats. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html func New(tp elastictransport.Interface) *GetJobStats { diff --git a/typedapi/ml/getjobstats/response.go b/typedapi/ml/getjobstats/response.go index 6b75208361..6facc7c308 100644 --- a/typedapi/ml/getjobstats/response.go +++ b/typedapi/ml/getjobstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getjobstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Jobs []types.JobStats `json:"jobs"` diff --git a/typedapi/ml/getmemorystats/get_memory_stats.go b/typedapi/ml/getmemorystats/get_memory_stats.go index 307247eab6..c3bc962357 100644 --- a/typedapi/ml/getmemorystats/get_memory_stats.go +++ b/typedapi/ml/getmemorystats/get_memory_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get machine learning memory usage info. // Get information about how machine learning jobs and trained models are using diff --git a/typedapi/ml/getmemorystats/response.go b/typedapi/ml/getmemorystats/response.go index 1260274aca..c02095f5da 100644 --- a/typedapi/ml/getmemorystats/response.go +++ b/typedapi/ml/getmemorystats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getmemorystats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmemorystats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_memory_stats/MlGetMemoryStatsResponse.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_memory_stats/MlGetMemoryStatsResponse.ts#L25-L31 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/ml/getmodelsnapshots/get_model_snapshots.go b/typedapi/ml/getmodelsnapshots/get_model_snapshots.go index bdde64ef4c..26631c9bdc 100644 --- a/typedapi/ml/getmodelsnapshots/get_model_snapshots.go +++ b/typedapi/ml/getmodelsnapshots/get_model_snapshots.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get model snapshots info. package getmodelsnapshots @@ -412,66 +412,57 @@ func (r *GetModelSnapshots) Pretty(pretty bool) *GetModelSnapshots { return r } -// Refer to the description for the `desc` query parameter. +// Desc Refer to the description for the `desc` query parameter. // API name: desc func (r *GetModelSnapshots) Desc(desc bool) *GetModelSnapshots { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Desc = &desc return r } -// Refer to the description for the `end` query parameter. +// End Refer to the description for the `end` query parameter. // API name: end -func (r *GetModelSnapshots) End(datetime types.DateTimeVariant) *GetModelSnapshots { - // Initialize the request if it is not already initialized +func (r *GetModelSnapshots) End(datetime types.DateTime) *GetModelSnapshots { if r.req == nil { r.req = NewRequest() } - - r.req.End = *datetime.DateTimeCaster() + r.req.End = datetime return r } // API name: page -func (r *GetModelSnapshots) Page(page types.PageVariant) *GetModelSnapshots { - // Initialize the request if it is not already initialized +func (r *GetModelSnapshots) Page(page *types.Page) *GetModelSnapshots { if r.req == nil { r.req = NewRequest() } - r.req.Page = page.PageCaster() + r.req.Page = page return r } -// Refer to the description for the `sort` query parameter. +// Sort Refer to the description for the `sort` query parameter. // API name: sort func (r *GetModelSnapshots) Sort(field string) *GetModelSnapshots { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Sort = &field return r } -// Refer to the description for the `start` query parameter. +// Start Refer to the description for the `start` query parameter. // API name: start -func (r *GetModelSnapshots) Start(datetime types.DateTimeVariant) *GetModelSnapshots { - // Initialize the request if it is not already initialized +func (r *GetModelSnapshots) Start(datetime types.DateTime) *GetModelSnapshots { if r.req == nil { r.req = NewRequest() } - - r.req.Start = *datetime.DateTimeCaster() + r.req.Start = datetime return r } diff --git a/typedapi/ml/getmodelsnapshots/request.go b/typedapi/ml/getmodelsnapshots/request.go index bf38c0703c..fc168e98af 100644 --- a/typedapi/ml/getmodelsnapshots/request.go +++ b/typedapi/ml/getmodelsnapshots/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getmodelsnapshots @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L108 type Request struct { // Desc Refer to the description for the `desc` query parameter. diff --git a/typedapi/ml/getmodelsnapshots/response.go b/typedapi/ml/getmodelsnapshots/response.go index f870c57b9c..16db022660 100644 --- a/typedapi/ml/getmodelsnapshots/response.go +++ b/typedapi/ml/getmodelsnapshots/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getmodelsnapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_model_snapshots/MlGetModelSnapshotsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_model_snapshots/MlGetModelSnapshotsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` ModelSnapshots []types.ModelSnapshot `json:"model_snapshots"` diff --git a/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go b/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go index ac67ab6098..390754a552 100644 --- a/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go +++ b/typedapi/ml/getmodelsnapshotupgradestats/get_model_snapshot_upgrade_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly detection job model snapshot upgrade usage info. package getmodelsnapshotupgradestats diff --git a/typedapi/ml/getmodelsnapshotupgradestats/response.go b/typedapi/ml/getmodelsnapshotupgradestats/response.go index 7b4e972884..361d27e17a 100644 --- a/typedapi/ml/getmodelsnapshotupgradestats/response.go +++ b/typedapi/ml/getmodelsnapshotupgradestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getmodelsnapshotupgradestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshotupgradestats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_model_snapshot_upgrade_stats/MlGetModelSnapshotUpgradeStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_model_snapshot_upgrade_stats/MlGetModelSnapshotUpgradeStatsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` ModelSnapshotUpgrades []types.ModelSnapshotUpgrade `json:"model_snapshot_upgrades"` diff --git a/typedapi/ml/getoverallbuckets/get_overall_buckets.go b/typedapi/ml/getoverallbuckets/get_overall_buckets.go index 1ad7e267d9..6311f4f0d7 100644 --- a/typedapi/ml/getoverallbuckets/get_overall_buckets.go +++ b/typedapi/ml/getoverallbuckets/get_overall_buckets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get overall bucket results. // @@ -402,92 +402,78 @@ func (r *GetOverallBuckets) Pretty(pretty bool) *GetOverallBuckets { return r } -// Refer to the description for the `allow_no_match` query parameter. +// AllowNoMatch Refer to the description for the `allow_no_match` query parameter. // API name: allow_no_match func (r *GetOverallBuckets) AllowNoMatch(allownomatch bool) *GetOverallBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowNoMatch = &allownomatch return r } -// Refer to the description for the `bucket_span` query parameter. +// BucketSpan Refer to the description for the `bucket_span` query parameter. // API name: bucket_span -func (r *GetOverallBuckets) BucketSpan(duration types.DurationVariant) *GetOverallBuckets { - // Initialize the request if it is not already initialized +func (r *GetOverallBuckets) BucketSpan(duration types.Duration) *GetOverallBuckets { if r.req == nil { r.req = NewRequest() } - - r.req.BucketSpan = *duration.DurationCaster() + r.req.BucketSpan = duration return r } -// Refer to the description for the `end` query parameter. +// End Refer to the description for the `end` query parameter. // API name: end -func (r *GetOverallBuckets) End(datetime types.DateTimeVariant) *GetOverallBuckets { - // Initialize the request if it is not already initialized +func (r *GetOverallBuckets) End(datetime types.DateTime) *GetOverallBuckets { if r.req == nil { r.req = NewRequest() } - - r.req.End = *datetime.DateTimeCaster() + r.req.End = datetime return r } -// Refer to the description for the `exclude_interim` query parameter. +// ExcludeInterim Refer to the description for the `exclude_interim` query parameter. // API name: exclude_interim func (r *GetOverallBuckets) ExcludeInterim(excludeinterim bool) *GetOverallBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ExcludeInterim = &excludeinterim return r } -// Refer to the description for the `overall_score` query parameter. +// OverallScore Refer to the description for the `overall_score` query parameter. // API name: overall_score func (r *GetOverallBuckets) OverallScore(overallscore string) *GetOverallBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - - r.req.OverallScore = overallscore + r.req.OverallScore = &overallscore return r } -// Refer to the description for the `start` query parameter. +// Start Refer to the description for the `start` query parameter. // API name: start -func (r *GetOverallBuckets) Start(datetime types.DateTimeVariant) *GetOverallBuckets { - // Initialize the request if it is not already initialized +func (r *GetOverallBuckets) Start(datetime types.DateTime) *GetOverallBuckets { if r.req == nil { r.req = NewRequest() } - - r.req.Start = *datetime.DateTimeCaster() + r.req.Start = datetime return r } -// Refer to the description for the `top_n` query parameter. +// TopN Refer to the description for the `top_n` query parameter. // API name: top_n func (r *GetOverallBuckets) TopN(topn int) *GetOverallBuckets { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TopN = &topn return r diff --git a/typedapi/ml/getoverallbuckets/request.go b/typedapi/ml/getoverallbuckets/request.go index 408fc33527..6a2f4228d9 100644 --- a/typedapi/ml/getoverallbuckets/request.go +++ b/typedapi/ml/getoverallbuckets/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getoverallbuckets @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L153 type Request struct { // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. @@ -45,7 +45,7 @@ type Request struct { // ExcludeInterim Refer to the description for the `exclude_interim` query parameter. ExcludeInterim *bool `json:"exclude_interim,omitempty"` // OverallScore Refer to the description for the `overall_score` query parameter. - OverallScore string `json:"overall_score,omitempty"` + OverallScore *string `json:"overall_score,omitempty"` // Start Refer to the description for the `start` query parameter. Start types.DateTime `json:"start,omitempty"` // TopN Refer to the description for the `top_n` query parameter. @@ -133,7 +133,7 @@ func (s *Request) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.OverallScore = o + s.OverallScore = &o case "start": if err := dec.Decode(&s.Start); err != nil { diff --git a/typedapi/ml/getoverallbuckets/response.go b/typedapi/ml/getoverallbuckets/response.go index a4004bb2bb..65ed184ec8 100644 --- a/typedapi/ml/getoverallbuckets/response.go +++ b/typedapi/ml/getoverallbuckets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getoverallbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29 type Response struct { Count int64 `json:"count"` // OverallBuckets Array of overall bucket objects diff --git a/typedapi/ml/getrecords/get_records.go b/typedapi/ml/getrecords/get_records.go index 968e976dac..b32650147e 100644 --- a/typedapi/ml/getrecords/get_records.go +++ b/typedapi/ml/getrecords/get_records.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get anomaly records for an anomaly detection job. // Records contain the detailed analytical results. They describe the anomalous @@ -397,61 +397,53 @@ func (r *GetRecords) Pretty(pretty bool) *GetRecords { return r } -// Refer to the description for the `desc` query parameter. +// Desc Refer to the description for the `desc` query parameter. // API name: desc func (r *GetRecords) Desc(desc bool) *GetRecords { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Desc = &desc return r } -// Refer to the description for the `end` query parameter. +// End Refer to the description for the `end` query parameter. // API name: end -func (r *GetRecords) End(datetime types.DateTimeVariant) *GetRecords { - // Initialize the request if it is not already initialized +func (r *GetRecords) End(datetime types.DateTime) *GetRecords { if r.req == nil { r.req = NewRequest() } - - r.req.End = *datetime.DateTimeCaster() + r.req.End = datetime return r } -// Refer to the description for the `exclude_interim` query parameter. +// ExcludeInterim Refer to the description for the `exclude_interim` query parameter. // API name: exclude_interim func (r *GetRecords) ExcludeInterim(excludeinterim bool) *GetRecords { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ExcludeInterim = &excludeinterim return r } // API name: page -func (r *GetRecords) Page(page types.PageVariant) *GetRecords { - // Initialize the request if it is not already initialized +func (r *GetRecords) Page(page *types.Page) *GetRecords { if r.req == nil { r.req = NewRequest() } - r.req.Page = page.PageCaster() + r.req.Page = page return r } -// Refer to the description for the `record_score` query parameter. +// RecordScore Refer to the description for the `record_score` query parameter. // API name: record_score func (r *GetRecords) RecordScore(recordscore types.Float64) *GetRecords { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -461,28 +453,24 @@ func (r *GetRecords) RecordScore(recordscore types.Float64) *GetRecords { return r } -// Refer to the description for the `sort` query parameter. +// Sort Refer to the description for the `sort` query parameter. // API name: sort func (r *GetRecords) Sort(field string) *GetRecords { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Sort = &field return r } -// Refer to the description for the `start` query parameter. +// Start Refer to the description for the `start` query parameter. // API name: start -func (r *GetRecords) Start(datetime types.DateTimeVariant) *GetRecords { - // Initialize the request if it is not already initialized +func (r *GetRecords) Start(datetime types.DateTime) *GetRecords { if r.req == nil { r.req = NewRequest() } - - r.req.Start = *datetime.DateTimeCaster() + r.req.Start = datetime return r } diff --git a/typedapi/ml/getrecords/request.go b/typedapi/ml/getrecords/request.go index fe2d8646ef..19ac39d56e 100644 --- a/typedapi/ml/getrecords/request.go +++ b/typedapi/ml/getrecords/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrecords @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L135 type Request struct { // Desc Refer to the description for the `desc` query parameter. diff --git a/typedapi/ml/getrecords/response.go b/typedapi/ml/getrecords/response.go index 2c14dca28b..e42deb3621 100644 --- a/typedapi/ml/getrecords/response.go +++ b/typedapi/ml/getrecords/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrecords @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_records/MlGetAnomalyRecordsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_records/MlGetAnomalyRecordsResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Records []types.Anomaly `json:"records"` diff --git a/typedapi/ml/gettrainedmodels/get_trained_models.go b/typedapi/ml/gettrainedmodels/get_trained_models.go index 6d40a81175..3661edc83f 100644 --- a/typedapi/ml/gettrainedmodels/get_trained_models.go +++ b/typedapi/ml/gettrainedmodels/get_trained_models.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get trained model configuration info. package gettrainedmodels diff --git a/typedapi/ml/gettrainedmodels/response.go b/typedapi/ml/gettrainedmodels/response.go index 3529168a8d..96600b746a 100644 --- a/typedapi/ml/gettrainedmodels/response.go +++ b/typedapi/ml/gettrainedmodels/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34 type Response struct { Count int `json:"count"` // TrainedModelConfigs An array of trained model resources, which are sorted by the model_id value diff --git a/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go b/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go index 8d1c47da7c..11a1082ec6 100644 --- a/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go +++ b/typedapi/ml/gettrainedmodelsstats/get_trained_models_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get trained models usage info. // You can get usage information for multiple trained diff --git a/typedapi/ml/gettrainedmodelsstats/response.go b/typedapi/ml/gettrainedmodelsstats/response.go index d3bc89194a..10b8296423 100644 --- a/typedapi/ml/gettrainedmodelsstats/response.go +++ b/typedapi/ml/gettrainedmodelsstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettrainedmodelsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodelsstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33 type Response struct { // Count The total number of trained model statistics that matched the requested ID diff --git a/typedapi/ml/infertrainedmodel/infer_trained_model.go b/typedapi/ml/infertrainedmodel/infer_trained_model.go index df2ed688ac..8b9c06c456 100644 --- a/typedapi/ml/infertrainedmodel/infer_trained_model.go +++ b/typedapi/ml/infertrainedmodel/infer_trained_model.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Evaluate a trained model. package infertrainedmodel @@ -384,32 +384,29 @@ func (r *InferTrainedModel) Pretty(pretty bool) *InferTrainedModel { return r } -// An array of objects to pass to the model for inference. The objects should +// Docs An array of objects to pass to the model for inference. The objects should // contain a fields matching your // configured trained model input. Typically, for NLP models, the field name is // `text_field`. // Currently, for NLP models, only a single value is allowed. // API name: docs -func (r *InferTrainedModel) Docs(docs []map[string]json.RawMessage) *InferTrainedModel { - // Initialize the request if it is not already initialized +func (r *InferTrainedModel) Docs(docs ...map[string]json.RawMessage) *InferTrainedModel { if r.req == nil { r.req = NewRequest() } - r.req.Docs = docs return r } -// The inference configuration updates to apply on the API call +// InferenceConfig The inference configuration updates to apply on the API call // API name: inference_config -func (r *InferTrainedModel) InferenceConfig(inferenceconfig types.InferenceConfigUpdateContainerVariant) *InferTrainedModel { - // Initialize the request if it is not already initialized +func (r *InferTrainedModel) InferenceConfig(inferenceconfig *types.InferenceConfigUpdateContainer) *InferTrainedModel { if r.req == nil { r.req = NewRequest() } - r.req.InferenceConfig = inferenceconfig.InferenceConfigUpdateContainerCaster() + r.req.InferenceConfig = inferenceconfig return r } diff --git a/typedapi/ml/infertrainedmodel/request.go b/typedapi/ml/infertrainedmodel/request.go index e14d6b085f..9a9836c92a 100644 --- a/typedapi/ml/infertrainedmodel/request.go +++ b/typedapi/ml/infertrainedmodel/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package infertrainedmodel @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L72 type Request struct { // Docs An array of objects to pass to the model for inference. The objects should diff --git a/typedapi/ml/infertrainedmodel/response.go b/typedapi/ml/infertrainedmodel/response.go index d2cf69d9d1..2001da2d6b 100644 --- a/typedapi/ml/infertrainedmodel/response.go +++ b/typedapi/ml/infertrainedmodel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package infertrainedmodel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26 type Response struct { InferenceResults []types.InferenceResponseResult `json:"inference_results"` } diff --git a/typedapi/ml/info/info.go b/typedapi/ml/info/info.go index 4d5f9f6e46..a720f6c29a 100644 --- a/typedapi/ml/info/info.go +++ b/typedapi/ml/info/info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get machine learning information. // Get defaults and limits used by machine learning. diff --git a/typedapi/ml/info/response.go b/typedapi/ml/info/response.go index 7d9cd03ef3..e59e6196cd 100644 --- a/typedapi/ml/info/response.go +++ b/typedapi/ml/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/info/MlInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/info/MlInfoResponse.ts#L22-L29 type Response struct { Defaults types.Defaults `json:"defaults"` Limits types.Limits `json:"limits"` diff --git a/typedapi/ml/openjob/open_job.go b/typedapi/ml/openjob/open_job.go index 4c778b09f2..d6a24c5bc5 100644 --- a/typedapi/ml/openjob/open_job.go +++ b/typedapi/ml/openjob/open_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Open anomaly detection jobs. // @@ -373,15 +373,13 @@ func (r *OpenJob) Pretty(pretty bool) *OpenJob { return r } -// Refer to the description for the `timeout` query parameter. +// Timeout Refer to the description for the `timeout` query parameter. // API name: timeout -func (r *OpenJob) Timeout(duration types.DurationVariant) *OpenJob { - // Initialize the request if it is not already initialized +func (r *OpenJob) Timeout(duration types.Duration) *OpenJob { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/ml/openjob/request.go b/typedapi/ml/openjob/request.go index ca78af69c6..ac01d454f8 100644 --- a/typedapi/ml/openjob/request.go +++ b/typedapi/ml/openjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package openjob @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/open_job/MlOpenJobRequest.ts#L24-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/open_job/MlOpenJobRequest.ts#L24-L67 type Request struct { // Timeout Refer to the description for the `timeout` query parameter. diff --git a/typedapi/ml/openjob/response.go b/typedapi/ml/openjob/response.go index 45219ae6f4..7fa04087b7 100644 --- a/typedapi/ml/openjob/response.go +++ b/typedapi/ml/openjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package openjob // Response holds the response body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/open_job/MlOpenJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/open_job/MlOpenJobResponse.ts#L22-L31 type Response struct { // Node The ID of the node that the job was started on. In serverless this will be diff --git a/typedapi/ml/postcalendarevents/post_calendar_events.go b/typedapi/ml/postcalendarevents/post_calendar_events.go index 88b94df7ef..d266a75df4 100644 --- a/typedapi/ml/postcalendarevents/post_calendar_events.go +++ b/typedapi/ml/postcalendarevents/post_calendar_events.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Add scheduled events to the calendar. package postcalendarevents @@ -359,19 +359,15 @@ func (r *PostCalendarEvents) Pretty(pretty bool) *PostCalendarEvents { return r } -// A list of one of more scheduled events. The event’s start and end times can +// Events A list of one of more scheduled events. The event’s start and end times can // be specified as integer milliseconds since the epoch or as a string in ISO // 8601 format. // API name: events -func (r *PostCalendarEvents) Events(events ...types.CalendarEventVariant) *PostCalendarEvents { - // Initialize the request if it is not already initialized +func (r *PostCalendarEvents) Events(events ...types.CalendarEvent) *PostCalendarEvents { if r.req == nil { r.req = NewRequest() } - for _, v := range events { + r.req.Events = events - r.req.Events = append(r.req.Events, *v.CalendarEventCaster()) - - } return r } diff --git a/typedapi/ml/postcalendarevents/request.go b/typedapi/ml/postcalendarevents/request.go index 1496c20354..bac9613c53 100644 --- a/typedapi/ml/postcalendarevents/request.go +++ b/typedapi/ml/postcalendarevents/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postcalendarevents @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L48 type Request struct { // Events A list of one of more scheduled events. The event’s start and end times can diff --git a/typedapi/ml/postcalendarevents/response.go b/typedapi/ml/postcalendarevents/response.go index 0438157676..9a2ab3165f 100644 --- a/typedapi/ml/postcalendarevents/response.go +++ b/typedapi/ml/postcalendarevents/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24 type Response struct { Events []types.CalendarEvent `json:"events"` } diff --git a/typedapi/ml/postdata/post_data.go b/typedapi/ml/postdata/post_data.go index a5964deac9..c179ed404a 100644 --- a/typedapi/ml/postdata/post_data.go +++ b/typedapi/ml/postdata/post_data.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Send data to an anomaly detection job for analysis. // diff --git a/typedapi/ml/postdata/request.go b/typedapi/ml/postdata/request.go index cc85b2b72f..4e5ea49124 100644 --- a/typedapi/ml/postdata/request.go +++ b/typedapi/ml/postdata/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postdata @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L76 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/ml/postdata/response.go b/typedapi/ml/postdata/response.go index da36819f6f..1ee19268de 100644 --- a/typedapi/ml/postdata/response.go +++ b/typedapi/ml/postdata/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postdata // Response holds the response body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/post_data/MlPostJobDataResponse.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/post_data/MlPostJobDataResponse.ts#L24-L45 type Response struct { BucketCount int64 `json:"bucket_count"` EarliestRecordTimestamp *int64 `json:"earliest_record_timestamp,omitempty"` diff --git a/typedapi/ml/previewdatafeed/preview_datafeed.go b/typedapi/ml/previewdatafeed/preview_datafeed.go index 4b1fbcea5d..7862dddb6d 100644 --- a/typedapi/ml/previewdatafeed/preview_datafeed.go +++ b/typedapi/ml/previewdatafeed/preview_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Preview a datafeed. // This API returns the first "page" of search results from a datafeed. @@ -414,20 +414,19 @@ func (r *PreviewDatafeed) Pretty(pretty bool) *PreviewDatafeed { return r } -// The datafeed definition to preview. +// DatafeedConfig The datafeed definition to preview. // API name: datafeed_config -func (r *PreviewDatafeed) DatafeedConfig(datafeedconfig types.DatafeedConfigVariant) *PreviewDatafeed { - // Initialize the request if it is not already initialized +func (r *PreviewDatafeed) DatafeedConfig(datafeedconfig *types.DatafeedConfig) *PreviewDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.DatafeedConfig = datafeedconfig.DatafeedConfigCaster() + r.req.DatafeedConfig = datafeedconfig return r } -// The configuration details for the anomaly detection job that is associated +// JobConfig The configuration details for the anomaly detection job that is associated // with the datafeed. If the // `datafeed_config` object does not include a `job_id` that references an // existing anomaly detection job, you must @@ -436,13 +435,12 @@ func (r *PreviewDatafeed) DatafeedConfig(datafeedconfig types.DatafeedConfigVari // used. You cannot specify a `job_config` object unless you also supply a // `datafeed_config` object. // API name: job_config -func (r *PreviewDatafeed) JobConfig(jobconfig types.JobConfigVariant) *PreviewDatafeed { - // Initialize the request if it is not already initialized +func (r *PreviewDatafeed) JobConfig(jobconfig *types.JobConfig) *PreviewDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.JobConfig = jobconfig.JobConfigCaster() + r.req.JobConfig = jobconfig return r } diff --git a/typedapi/ml/previewdatafeed/request.go b/typedapi/ml/previewdatafeed/request.go index 7467515e70..c382050c82 100644 --- a/typedapi/ml/previewdatafeed/request.go +++ b/typedapi/ml/previewdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package previewdatafeed @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L81 type Request struct { // DatafeedConfig The datafeed definition to preview. diff --git a/typedapi/ml/previewdatafeed/response.go b/typedapi/ml/previewdatafeed/response.go index 11843e4486..90c5d8467a 100644 --- a/typedapi/ml/previewdatafeed/response.go +++ b/typedapi/ml/previewdatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package previewdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23 type Response []json.RawMessage diff --git a/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go b/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go index a376576f99..d27c769d05 100644 --- a/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go +++ b/typedapi/ml/previewdataframeanalytics/preview_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Preview features used by data frame analytics. // Preview the extracted features used by a data frame analytics config. @@ -372,17 +372,16 @@ func (r *PreviewDataFrameAnalytics) Pretty(pretty bool) *PreviewDataFrameAnalyti return r } -// A data frame analytics config as described in create data frame analytics +// Config A data frame analytics config as described in create data frame analytics // jobs. Note that `id` and `dest` don’t need to be provided in the context of // this API. // API name: config -func (r *PreviewDataFrameAnalytics) Config(config types.DataframePreviewConfigVariant) *PreviewDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PreviewDataFrameAnalytics) Config(config *types.DataframePreviewConfig) *PreviewDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Config = config.DataframePreviewConfigCaster() + r.req.Config = config return r } diff --git a/typedapi/ml/previewdataframeanalytics/request.go b/typedapi/ml/previewdataframeanalytics/request.go index 855a20492c..dc05f7d22a 100644 --- a/typedapi/ml/previewdataframeanalytics/request.go +++ b/typedapi/ml/previewdataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package previewdataframeanalytics @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L60 type Request struct { // Config A data frame analytics config as described in create data frame analytics diff --git a/typedapi/ml/previewdataframeanalytics/response.go b/typedapi/ml/previewdataframeanalytics/response.go index b8ecffca84..6ab0a50e8c 100644 --- a/typedapi/ml/previewdataframeanalytics/response.go +++ b/typedapi/ml/previewdataframeanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package previewdataframeanalytics // Response holds the response body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28 type Response struct { // FeatureValues An array of objects that contain feature name and value pairs. The features diff --git a/typedapi/ml/putcalendar/put_calendar.go b/typedapi/ml/putcalendar/put_calendar.go index d252fcb97f..32031431df 100644 --- a/typedapi/ml/putcalendar/put_calendar.go +++ b/typedapi/ml/putcalendar/put_calendar.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a calendar. package putcalendar @@ -357,10 +357,9 @@ func (r *PutCalendar) Pretty(pretty bool) *PutCalendar { return r } -// A description of the calendar. +// Description A description of the calendar. // API name: description func (r *PutCalendar) Description(description string) *PutCalendar { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -370,17 +369,13 @@ func (r *PutCalendar) Description(description string) *PutCalendar { return r } -// An array of anomaly detection job identifiers. +// JobIds An array of anomaly detection job identifiers. // API name: job_ids func (r *PutCalendar) JobIds(jobids ...string) *PutCalendar { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range jobids { + r.req.JobIds = jobids - r.req.JobIds = append(r.req.JobIds, v) - - } return r } diff --git a/typedapi/ml/putcalendar/request.go b/typedapi/ml/putcalendar/request.go index f0b5313b27..ce1c70bac7 100644 --- a/typedapi/ml/putcalendar/request.go +++ b/typedapi/ml/putcalendar/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcalendar @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L51 type Request struct { // Description A description of the calendar. diff --git a/typedapi/ml/putcalendar/response.go b/typedapi/ml/putcalendar/response.go index f8e2343de0..6ef4f2272c 100644 --- a/typedapi/ml/putcalendar/response.go +++ b/typedapi/ml/putcalendar/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcalendar @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_calendar/MlPutCalendarResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_calendar/MlPutCalendarResponse.ts#L22-L31 type Response struct { // CalendarId A string that uniquely identifies a calendar. diff --git a/typedapi/ml/putcalendarjob/put_calendar_job.go b/typedapi/ml/putcalendarjob/put_calendar_job.go index c5851cde72..ae88965175 100644 --- a/typedapi/ml/putcalendarjob/put_calendar_job.go +++ b/typedapi/ml/putcalendarjob/put_calendar_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Add anomaly detection job to calendar. package putcalendarjob diff --git a/typedapi/ml/putcalendarjob/response.go b/typedapi/ml/putcalendarjob/response.go index 23e6e7d32b..3fc7f9acfe 100644 --- a/typedapi/ml/putcalendarjob/response.go +++ b/typedapi/ml/putcalendarjob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putcalendarjob @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package putcalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31 type Response struct { // CalendarId A string that uniquely identifies a calendar. diff --git a/typedapi/ml/putdatafeed/put_datafeed.go b/typedapi/ml/putdatafeed/put_datafeed.go index 4e85c5c9f8..e2025deeb8 100644 --- a/typedapi/ml/putdatafeed/put_datafeed.go +++ b/typedapi/ml/putdatafeed/put_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a datafeed. // Datafeeds retrieve data from Elasticsearch for analysis by an anomaly @@ -438,39 +438,21 @@ func (r *PutDatafeed) Pretty(pretty bool) *PutDatafeed { return r } -// If set, the datafeed performs aggregation searches. +// Aggregations If set, the datafeed performs aggregation searches. // Support for aggregations is limited and should be used only with low // cardinality data. // API name: aggregations func (r *PutDatafeed) Aggregations(aggregations map[string]types.Aggregations) *PutDatafeed { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Aggregations = aggregations - return r -} - -func (r *PutDatafeed) AddAggregation(key string, value types.AggregationsVariant) *PutDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.Aggregations - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggregations - } - - tmp[key] = *value.AggregationsCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } -// Datafeeds might be required to search over long time periods, for several +// ChunkingConfig Datafeeds might be required to search over long time periods, for several // months or years. // This search is split into time chunks in order to ensure the load on // Elasticsearch is managed. @@ -478,18 +460,17 @@ func (r *PutDatafeed) AddAggregation(key string, value types.AggregationsVariant // calculated; // it is an advanced configuration option. // API name: chunking_config -func (r *PutDatafeed) ChunkingConfig(chunkingconfig types.ChunkingConfigVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) ChunkingConfig(chunkingconfig *types.ChunkingConfig) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingConfig = chunkingconfig.ChunkingConfigCaster() + r.req.ChunkingConfig = chunkingconfig return r } -// Specifies whether the datafeed checks for missing data and the size of the +// DelayedDataCheckConfig Specifies whether the datafeed checks for missing data and the size of the // window. // The datafeed can optionally search over indices that have already been read // in an effort to determine whether @@ -499,18 +480,17 @@ func (r *PutDatafeed) ChunkingConfig(chunkingconfig types.ChunkingConfigVariant) // has passed that moment in time. // This check runs only on real-time datafeeds. // API name: delayed_data_check_config -func (r *PutDatafeed) DelayedDataCheckConfig(delayeddatacheckconfig types.DelayedDataCheckConfigVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) DelayedDataCheckConfig(delayeddatacheckconfig *types.DelayedDataCheckConfig) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.DelayedDataCheckConfig = delayeddatacheckconfig.DelayedDataCheckConfigCaster() + r.req.DelayedDataCheckConfig = delayeddatacheckconfig return r } -// The interval at which scheduled queries are made while the datafeed runs in +// Frequency The interval at which scheduled queries are made while the datafeed runs in // real time. // The default value is either the bucket span for short bucket spans, or, for // longer bucket spans, a sensible @@ -521,72 +501,63 @@ func (r *PutDatafeed) DelayedDataCheckConfig(delayeddatacheckconfig types.Delaye // aggregations, this value must be divisible by the interval of the date // histogram aggregation. // API name: frequency -func (r *PutDatafeed) Frequency(duration types.DurationVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) Frequency(duration types.Duration) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.Frequency = *duration.DurationCaster() + r.req.Frequency = duration return r } // API name: headers -func (r *PutDatafeed) Headers(httpheaders types.HttpHeadersVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) Headers(httpheaders types.HttpHeaders) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.Headers = *httpheaders.HttpHeadersCaster() + r.req.Headers = httpheaders return r } -// An array of index names. Wildcards are supported. If any of the indices are +// Indices An array of index names. Wildcards are supported. If any of the indices are // in remote clusters, the master // nodes and the machine learning nodes must have the `remote_cluster_client` // role. // API name: indices func (r *PutDatafeed) Indices(indices ...string) *PutDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Indices = indices return r } -// Specifies index expansion options that are used during search +// IndicesOptions Specifies index expansion options that are used during search // API name: indices_options -func (r *PutDatafeed) IndicesOptions(indicesoptions types.IndicesOptionsVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) IndicesOptions(indicesoptions *types.IndicesOptions) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.IndicesOptions = indicesoptions.IndicesOptionsCaster() + r.req.IndicesOptions = indicesoptions return r } -// Identifier for the anomaly detection job. +// JobId Identifier for the anomaly detection job. // API name: job_id func (r *PutDatafeed) JobId(id string) *PutDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.JobId = &id return r } -// If a real-time datafeed has never seen any data (including during any initial +// MaxEmptySearches If a real-time datafeed has never seen any data (including during any initial // training period), it automatically // stops and closes the associated job after this many real-time searches return // no documents. In other words, @@ -596,34 +567,31 @@ func (r *PutDatafeed) JobId(id string) *PutDatafeed { // default, it is not set. // API name: max_empty_searches func (r *PutDatafeed) MaxEmptySearches(maxemptysearches int) *PutDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxEmptySearches = &maxemptysearches return r } -// The Elasticsearch query domain-specific language (DSL). This value +// Query The Elasticsearch query domain-specific language (DSL). This value // corresponds to the query object in an // Elasticsearch search POST body. All the options that are supported by // Elasticsearch can be used, as this // object is passed verbatim to Elasticsearch. // API name: query -func (r *PutDatafeed) Query(query types.QueryVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) Query(query *types.Query) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// The number of seconds behind real time that data is queried. For example, if +// QueryDelay The number of seconds behind real time that data is queried. For example, if // data from 10:04 a.m. might // not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 // seconds. The default @@ -631,74 +599,50 @@ func (r *PutDatafeed) Query(query types.QueryVariant) *PutDatafeed { // the query performance // when there are multiple jobs running on the same node. // API name: query_delay -func (r *PutDatafeed) QueryDelay(duration types.DurationVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) QueryDelay(duration types.Duration) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.QueryDelay = *duration.DurationCaster() + r.req.QueryDelay = duration return r } -// Specifies runtime fields for the datafeed search. +// RuntimeMappings Specifies runtime fields for the datafeed search. // API name: runtime_mappings -func (r *PutDatafeed) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *PutDatafeed { - // Initialize the request if it is not already initialized +func (r *PutDatafeed) RuntimeMappings(runtimefields types.RuntimeFields) *PutDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// Specifies scripts that evaluate custom expressions and returns script fields +// ScriptFields Specifies scripts that evaluate custom expressions and returns script fields // to the datafeed. // The detector configuration objects in a job can contain functions that use // these script fields. // API name: script_fields func (r *PutDatafeed) ScriptFields(scriptfields map[string]types.ScriptField) *PutDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScriptFields = scriptfields - return r -} -func (r *PutDatafeed) AddScriptField(key string, value types.ScriptFieldVariant) *PutDatafeed { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.ScriptField - if r.req.ScriptFields == nil { - r.req.ScriptFields = make(map[string]types.ScriptField) - } else { - tmp = r.req.ScriptFields - } - - tmp[key] = *value.ScriptFieldCaster() + r.req.ScriptFields = scriptfields - r.req.ScriptFields = tmp return r } -// The size parameter that is used in Elasticsearch searches when the datafeed +// ScrollSize The size parameter that is used in Elasticsearch searches when the datafeed // does not use aggregations. // The maximum value is the value of `index.max_result_window`, which is 10,000 // by default. // API name: scroll_size func (r *PutDatafeed) ScrollSize(scrollsize int) *PutDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScrollSize = &scrollsize return r diff --git a/typedapi/ml/putdatafeed/request.go b/typedapi/ml/putdatafeed/request.go index f347161061..b74da0c206 100644 --- a/typedapi/ml/putdatafeed/request.go +++ b/typedapi/ml/putdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putdatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L184 type Request struct { // Aggregations If set, the datafeed performs aggregation searches. diff --git a/typedapi/ml/putdatafeed/response.go b/typedapi/ml/putdatafeed/response.go index 0e3c12f19c..8abc4a225b 100644 --- a/typedapi/ml/putdatafeed/response.go +++ b/typedapi/ml/putdatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49 type Response struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Authorization *types.DatafeedAuthorization `json:"authorization,omitempty"` diff --git a/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go b/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go index 847a16a09e..b56293b7b2 100644 --- a/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go +++ b/typedapi/ml/putdataframeanalytics/put_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a data frame analytics job. // This API creates a data frame analytics job that performs an analysis on the @@ -383,7 +383,7 @@ func (r *PutDataFrameAnalytics) Pretty(pretty bool) *PutDataFrameAnalytics { return r } -// Specifies whether this job can start when there is insufficient machine +// AllowLazyStart Specifies whether this job can start when there is insufficient machine // learning node capacity for it to be immediately assigned to a node. If // set to `false` and a machine learning node with capacity to run the job // cannot be immediately found, the API returns an error. If set to `true`, @@ -393,32 +393,29 @@ func (r *PutDataFrameAnalytics) Pretty(pretty bool) *PutDataFrameAnalytics { // `xpack.ml.max_lazy_ml_nodes` setting. // API name: allow_lazy_start func (r *PutDataFrameAnalytics) AllowLazyStart(allowlazystart bool) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowLazyStart = &allowlazystart return r } -// The analysis configuration, which contains the information necessary to +// Analysis The analysis configuration, which contains the information necessary to // perform one of the following types of analysis: classification, outlier // detection, or regression. // API name: analysis -func (r *PutDataFrameAnalytics) Analysis(analysis types.DataframeAnalysisContainerVariant) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PutDataFrameAnalytics) Analysis(analysis *types.DataframeAnalysisContainer) *PutDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Analysis = *analysis.DataframeAnalysisContainerCaster() + r.req.Analysis = *analysis return r } -// Specifies `includes` and/or `excludes` patterns to select which fields +// AnalyzedFields Specifies `includes` and/or `excludes` patterns to select which fields // will be included in the analysis. The patterns specified in `excludes` // are applied last, therefore `excludes` takes precedence. In other words, // if the same field is specified in both `includes` and `excludes`, then @@ -447,21 +444,19 @@ func (r *PutDataFrameAnalytics) Analysis(analysis types.DataframeAnalysisContain // values to a single number. For example, in case of age ranges, you can // model the values as `0-14 = 0`, `15-24 = 1`, `25-34 = 2`, and so on. // API name: analyzed_fields -func (r *PutDataFrameAnalytics) AnalyzedFields(analyzedfields types.DataframeAnalysisAnalyzedFieldsVariant) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PutDataFrameAnalytics) AnalyzedFields(analyzedfields *types.DataframeAnalysisAnalyzedFields) *PutDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.AnalyzedFields = analyzedfields.DataframeAnalysisAnalyzedFieldsCaster() + r.req.AnalyzedFields = analyzedfields return r } -// A description of the job. +// Description A description of the job. // API name: description func (r *PutDataFrameAnalytics) Description(description string) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -471,67 +466,59 @@ func (r *PutDataFrameAnalytics) Description(description string) *PutDataFrameAna return r } -// The destination configuration. +// Dest The destination configuration. // API name: dest -func (r *PutDataFrameAnalytics) Dest(dest types.DataframeAnalyticsDestinationVariant) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PutDataFrameAnalytics) Dest(dest *types.DataframeAnalyticsDestination) *PutDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Dest = *dest.DataframeAnalyticsDestinationCaster() + r.req.Dest = *dest return r } // API name: headers -func (r *PutDataFrameAnalytics) Headers(httpheaders types.HttpHeadersVariant) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PutDataFrameAnalytics) Headers(httpheaders types.HttpHeaders) *PutDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - - r.req.Headers = *httpheaders.HttpHeadersCaster() + r.req.Headers = httpheaders return r } -// The maximum number of threads to be used by the analysis. Using more +// MaxNumThreads The maximum number of threads to be used by the analysis. Using more // threads may decrease the time necessary to complete the analysis at the // cost of using more CPU. Note that the process may use additional threads // for operational functionality other than the analysis itself. // API name: max_num_threads func (r *PutDataFrameAnalytics) MaxNumThreads(maxnumthreads int) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxNumThreads = &maxnumthreads return r } // API name: _meta -func (r *PutDataFrameAnalytics) Meta_(metadata types.MetadataVariant) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PutDataFrameAnalytics) Meta_(metadata types.Metadata) *PutDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// The approximate maximum amount of memory resources that are permitted for +// ModelMemoryLimit The approximate maximum amount of memory resources that are permitted for // analytical processing. If your `elasticsearch.yml` file contains an // `xpack.ml.max_model_memory_limit` setting, an error occurs when you try // to create data frame analytics jobs that have `model_memory_limit` values // greater than that setting. // API name: model_memory_limit func (r *PutDataFrameAnalytics) ModelMemoryLimit(modelmemorylimit string) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -541,26 +528,23 @@ func (r *PutDataFrameAnalytics) ModelMemoryLimit(modelmemorylimit string) *PutDa return r } -// The configuration of how to source the analysis data. +// Source The configuration of how to source the analysis data. // API name: source -func (r *PutDataFrameAnalytics) Source(source types.DataframeAnalyticsSourceVariant) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized +func (r *PutDataFrameAnalytics) Source(source *types.DataframeAnalyticsSource) *PutDataFrameAnalytics { if r.req == nil { r.req = NewRequest() } - r.req.Source = *source.DataframeAnalyticsSourceCaster() + r.req.Source = *source return r } // API name: version func (r *PutDataFrameAnalytics) Version(versionstring string) *PutDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Version = &versionstring return r diff --git a/typedapi/ml/putdataframeanalytics/request.go b/typedapi/ml/putdataframeanalytics/request.go index 50fd45e95d..7642745f9e 100644 --- a/typedapi/ml/putdataframeanalytics/request.go +++ b/typedapi/ml/putdataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putdataframeanalytics @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L155 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L155 type Request struct { // AllowLazyStart Specifies whether this job can start when there is insufficient machine diff --git a/typedapi/ml/putdataframeanalytics/response.go b/typedapi/ml/putdataframeanalytics/response.go index dc584b013d..dbbaa64d52 100644 --- a/typedapi/ml/putdataframeanalytics/response.go +++ b/typedapi/ml/putdataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47 type Response struct { AllowLazyStart bool `json:"allow_lazy_start"` Analysis types.DataframeAnalysisContainer `json:"analysis"` diff --git a/typedapi/ml/putfilter/put_filter.go b/typedapi/ml/putfilter/put_filter.go index f2d7220fe2..81e667d5fe 100644 --- a/typedapi/ml/putfilter/put_filter.go +++ b/typedapi/ml/putfilter/put_filter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a filter. // A filter contains a list of strings. It can be used by one or more anomaly @@ -365,10 +365,9 @@ func (r *PutFilter) Pretty(pretty bool) *PutFilter { return r } -// A description of the filter. +// Description A description of the filter. // API name: description func (r *PutFilter) Description(description string) *PutFilter { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -378,19 +377,15 @@ func (r *PutFilter) Description(description string) *PutFilter { return r } -// The items of the filter. A wildcard `*` can be used at the beginning or the +// Items The items of the filter. A wildcard `*` can be used at the beginning or the // end of an item. // Up to 10000 items are allowed in each filter. // API name: items func (r *PutFilter) Items(items ...string) *PutFilter { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range items { + r.req.Items = items - r.req.Items = append(r.req.Items, v) - - } return r } diff --git a/typedapi/ml/putfilter/request.go b/typedapi/ml/putfilter/request.go index 19e14f3149..5bba85a145 100644 --- a/typedapi/ml/putfilter/request.go +++ b/typedapi/ml/putfilter/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putfilter @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L58 type Request struct { // Description A description of the filter. diff --git a/typedapi/ml/putfilter/response.go b/typedapi/ml/putfilter/response.go index 87e79f48ce..0000fdb0aa 100644 --- a/typedapi/ml/putfilter/response.go +++ b/typedapi/ml/putfilter/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putfilter // Response holds the response body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_filter/MlPutFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_filter/MlPutFilterResponse.ts#L22-L28 type Response struct { Description string `json:"description"` FilterId string `json:"filter_id"` diff --git a/typedapi/ml/putjob/put_job.go b/typedapi/ml/putjob/put_job.go index 4401cd1267..aa388f228f 100644 --- a/typedapi/ml/putjob/put_job.go +++ b/typedapi/ml/putjob/put_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an anomaly detection job. // @@ -339,16 +339,7 @@ func (r *PutJob) AllowNoIndices(allownoindices bool) *PutJob { // ExpandWildcards Type of index that wildcard patterns can match. If the request can target // data streams, this argument determines // whether wildcard expressions match hidden data streams. Supports -// comma-separated values. Valid values are: -// -// * `all`: Match any data stream or index, including hidden ones. -// * `closed`: Match closed, non-hidden indices. Also matches any non-hidden -// data stream. Data streams cannot be closed. -// * `hidden`: Match hidden data streams and hidden indices. Must be combined -// with `open`, `closed`, or both. -// * `none`: Wildcard patterns are not accepted. -// * `open`: Match open, non-hidden indices. Also matches any non-hidden data -// stream. +// comma-separated values. // API name: expand_wildcards func (r *PutJob) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutJob { tmp := []string{} @@ -420,7 +411,7 @@ func (r *PutJob) Pretty(pretty bool) *PutJob { return r } -// Advanced configuration option. Specifies whether this job can open when there +// AllowLazyOpen Advanced configuration option. Specifies whether this job can open when there // is insufficient machine learning node capacity for it to be immediately // assigned to a node. By default, if a machine learning node with capacity to // run the job cannot immediately be found, the open anomaly detection jobs API @@ -430,85 +421,76 @@ func (r *PutJob) Pretty(pretty bool) *PutJob { // opening state until sufficient machine learning node capacity is available. // API name: allow_lazy_open func (r *PutJob) AllowLazyOpen(allowlazyopen bool) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowLazyOpen = &allowlazyopen return r } -// Specifies how to analyze the data. After you create a job, you cannot change +// AnalysisConfig Specifies how to analyze the data. After you create a job, you cannot change // the analysis configuration; all the properties are informational. // API name: analysis_config -func (r *PutJob) AnalysisConfig(analysisconfig types.AnalysisConfigVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) AnalysisConfig(analysisconfig *types.AnalysisConfig) *PutJob { if r.req == nil { r.req = NewRequest() } - r.req.AnalysisConfig = *analysisconfig.AnalysisConfigCaster() + r.req.AnalysisConfig = *analysisconfig return r } -// Limits can be applied for the resources required to hold the mathematical +// AnalysisLimits Limits can be applied for the resources required to hold the mathematical // models in memory. These limits are approximate and can be set per job. They // do not control the memory used by other processes, for example the // Elasticsearch Java processes. // API name: analysis_limits -func (r *PutJob) AnalysisLimits(analysislimits types.AnalysisLimitsVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) AnalysisLimits(analysislimits *types.AnalysisLimits) *PutJob { if r.req == nil { r.req = NewRequest() } - r.req.AnalysisLimits = analysislimits.AnalysisLimitsCaster() + r.req.AnalysisLimits = analysislimits return r } -// Advanced configuration option. The time between each periodic persistence of +// BackgroundPersistInterval Advanced configuration option. The time between each periodic persistence of // the model. The default value is a randomized value between 3 to 4 hours, // which avoids all jobs persisting at exactly the same time. The smallest // allowed value is 1 hour. For very large models (several GB), persistence // could take 10-20 minutes, so do not set the `background_persist_interval` // value too low. // API name: background_persist_interval -func (r *PutJob) BackgroundPersistInterval(duration types.DurationVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) BackgroundPersistInterval(duration types.Duration) *PutJob { if r.req == nil { r.req = NewRequest() } - - r.req.BackgroundPersistInterval = *duration.DurationCaster() + r.req.BackgroundPersistInterval = duration return r } -// Advanced configuration option. Contains custom meta data about the job. +// CustomSettings Advanced configuration option. Contains custom meta data about the job. // API name: custom_settings func (r *PutJob) CustomSettings(customsettings json.RawMessage) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.CustomSettings = customsettings return r } -// Advanced configuration option, which affects the automatic removal of old +// DailyModelSnapshotRetentionAfterDays Advanced configuration option, which affects the automatic removal of old // model snapshots for this job. It specifies a period of time (in days) after // which only the first snapshot per day is retained. This period is relative to // the timestamp of the most recent snapshot for this job. Valid values range // from 0 to `model_snapshot_retention_days`. // API name: daily_model_snapshot_retention_after_days func (r *PutJob) DailyModelSnapshotRetentionAfterDays(dailymodelsnapshotretentionafterdays int64) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -518,43 +500,40 @@ func (r *PutJob) DailyModelSnapshotRetentionAfterDays(dailymodelsnapshotretentio return r } -// Defines the format of the input data when you send data to the job by using +// DataDescription Defines the format of the input data when you send data to the job by using // the post data API. Note that when configure a datafeed, these properties are // automatically set. When data is received via the post data API, it is not // stored in Elasticsearch. Only the results for anomaly detection are retained. // API name: data_description -func (r *PutJob) DataDescription(datadescription types.DataDescriptionVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) DataDescription(datadescription *types.DataDescription) *PutJob { if r.req == nil { r.req = NewRequest() } - r.req.DataDescription = *datadescription.DataDescriptionCaster() + r.req.DataDescription = *datadescription return r } -// Defines a datafeed for the anomaly detection job. If Elasticsearch security +// DatafeedConfig Defines a datafeed for the anomaly detection job. If Elasticsearch security // features are enabled, your datafeed remembers which roles the user who // created it had at the time of creation and runs the query using those same // roles. If you provide secondary authorization headers, those credentials are // used instead. // API name: datafeed_config -func (r *PutJob) DatafeedConfig(datafeedconfig types.DatafeedConfigVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) DatafeedConfig(datafeedconfig *types.DatafeedConfig) *PutJob { if r.req == nil { r.req = NewRequest() } - r.req.DatafeedConfig = datafeedconfig.DatafeedConfigCaster() + r.req.DatafeedConfig = datafeedconfig return r } -// A description of the job. +// Description A description of the job. // API name: description func (r *PutJob) Description(description string) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -564,22 +543,18 @@ func (r *PutJob) Description(description string) *PutJob { return r } -// A list of job groups. A job can belong to no groups or many. +// Groups A list of job groups. A job can belong to no groups or many. // API name: groups func (r *PutJob) Groups(groups ...string) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range groups { + r.req.Groups = groups - r.req.Groups = append(r.req.Groups, v) - - } return r } -// This advanced configuration option stores model information along with the +// ModelPlotConfig This advanced configuration option stores model information along with the // results. It provides a more detailed view into anomaly detection. If you // enable model plot it can add considerable overhead to the performance of the // system; it is not feasible for jobs with many entities. Model plot provides a @@ -589,25 +564,23 @@ func (r *PutJob) Groups(groups ...string) *PutJob { // the model plot. Model plot config can be configured when the job is created // or updated later. It must be disabled if performance issues are experienced. // API name: model_plot_config -func (r *PutJob) ModelPlotConfig(modelplotconfig types.ModelPlotConfigVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) ModelPlotConfig(modelplotconfig *types.ModelPlotConfig) *PutJob { if r.req == nil { r.req = NewRequest() } - r.req.ModelPlotConfig = modelplotconfig.ModelPlotConfigCaster() + r.req.ModelPlotConfig = modelplotconfig return r } -// Advanced configuration option, which affects the automatic removal of old +// ModelSnapshotRetentionDays Advanced configuration option, which affects the automatic removal of old // model snapshots for this job. It specifies the maximum period of time (in // days) that snapshots are retained. This period is relative to the timestamp // of the most recent snapshot for this job. By default, snapshots ten days // older than the newest snapshot are deleted. // API name: model_snapshot_retention_days func (r *PutJob) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -617,12 +590,11 @@ func (r *PutJob) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) *P return r } -// Advanced configuration option. The period over which adjustments to the score +// RenormalizationWindowDays Advanced configuration option. The period over which adjustments to the score // are applied, as new data is seen. The default value is the longer of 30 days // or 100 bucket spans. // API name: renormalization_window_days func (r *PutJob) RenormalizationWindowDays(renormalizationwindowdays int64) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -632,21 +604,19 @@ func (r *PutJob) RenormalizationWindowDays(renormalizationwindowdays int64) *Put return r } -// A text string that affects the name of the machine learning results index. By +// ResultsIndexName A text string that affects the name of the machine learning results index. By // default, the job generates an index named `.ml-anomalies-shared`. // API name: results_index_name func (r *PutJob) ResultsIndexName(indexname string) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ResultsIndexName = &indexname return r } -// Advanced configuration option. The period of time (in days) that results are +// ResultsRetentionDays Advanced configuration option. The period of time (in days) that results are // retained. Age is calculated relative to the timestamp of the latest bucket // result. If this property has a non-null value, once per day at 00:30 (server // time), results that are the specified number of days older than the latest @@ -656,7 +626,6 @@ func (r *PutJob) ResultsIndexName(indexname string) *PutJob { // number of days as results. Annotations added by users are retained forever. // API name: results_retention_days func (r *PutJob) ResultsRetentionDays(resultsretentiondays int64) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/ml/putjob/request.go b/typedapi/ml/putjob/request.go index 22e95b291f..e8d0473977 100644 --- a/typedapi/ml/putjob/request.go +++ b/typedapi/ml/putjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_job/MlPutJobRequest.ts#L30-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_job/MlPutJobRequest.ts#L30-L151 type Request struct { // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when there diff --git a/typedapi/ml/putjob/response.go b/typedapi/ml/putjob/response.go index 7be75665e5..67c210a91d 100644 --- a/typedapi/ml/putjob/response.go +++ b/typedapi/ml/putjob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putjob @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_job/MlPutJobResponse.ts#L29-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_job/MlPutJobResponse.ts#L29-L52 type Response struct { AllowLazyOpen bool `json:"allow_lazy_open"` AnalysisConfig types.AnalysisConfigRead `json:"analysis_config"` diff --git a/typedapi/ml/puttrainedmodel/put_trained_model.go b/typedapi/ml/puttrainedmodel/put_trained_model.go index bf45ff2a65..3155da85ac 100644 --- a/typedapi/ml/puttrainedmodel/put_trained_model.go +++ b/typedapi/ml/puttrainedmodel/put_trained_model.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a trained model. // Enable you to supply a trained model that is not created by data frame @@ -381,12 +381,11 @@ func (r *PutTrainedModel) Pretty(pretty bool) *PutTrainedModel { return r } -// The compressed (GZipped and Base64 encoded) inference definition of the +// CompressedDefinition The compressed (GZipped and Base64 encoded) inference definition of the // model. If compressed_definition is specified, then definition cannot be // specified. // API name: compressed_definition func (r *PutTrainedModel) CompressedDefinition(compresseddefinition string) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -396,24 +395,22 @@ func (r *PutTrainedModel) CompressedDefinition(compresseddefinition string) *Put return r } -// The inference definition for the model. If definition is specified, then +// Definition The inference definition for the model. If definition is specified, then // compressed_definition cannot be specified. // API name: definition -func (r *PutTrainedModel) Definition(definition types.DefinitionVariant) *PutTrainedModel { - // Initialize the request if it is not already initialized +func (r *PutTrainedModel) Definition(definition *types.Definition) *PutTrainedModel { if r.req == nil { r.req = NewRequest() } - r.req.Definition = definition.DefinitionCaster() + r.req.Definition = definition return r } -// A human-readable description of the inference trained model. +// Description A human-readable description of the inference trained model. // API name: description func (r *PutTrainedModel) Description(description string) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -423,39 +420,40 @@ func (r *PutTrainedModel) Description(description string) *PutTrainedModel { return r } -// The default configuration for inference. This can be either a regression +// InferenceConfig The default configuration for inference. This can be either a regression // or classification configuration. It must match the underlying // definition.trained_model's target_type. For pre-packaged models such as // ELSER the config is not required. // API name: inference_config -func (r *PutTrainedModel) InferenceConfig(inferenceconfig types.InferenceConfigCreateContainerVariant) *PutTrainedModel { - // Initialize the request if it is not already initialized +func (r *PutTrainedModel) InferenceConfig(inferenceconfig *types.InferenceConfigCreateContainer) *PutTrainedModel { if r.req == nil { r.req = NewRequest() } - r.req.InferenceConfig = inferenceconfig.InferenceConfigCreateContainerCaster() + r.req.InferenceConfig = inferenceconfig return r } -// The input field names for the model definition. +// Input The input field names for the model definition. // API name: input -func (r *PutTrainedModel) Input(input types.InputVariant) *PutTrainedModel { - // Initialize the request if it is not already initialized +func (r *PutTrainedModel) Input(input *types.Input) *PutTrainedModel { if r.req == nil { r.req = NewRequest() } - r.req.Input = input.InputCaster() + r.req.Input = input return r } -// An object map that contains metadata about the model. +// Metadata An object map that contains metadata about the model. // API name: metadata +// +// metadata should be a json.RawMessage or a structure +// if a structure is provided, the client will defer a json serialization +// prior to sending the payload to Elasticsearch. func (r *PutTrainedModel) Metadata(metadata any) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -472,15 +470,15 @@ func (r *PutTrainedModel) Metadata(metadata any) *PutTrainedModel { return nil }) } + return r } -// The estimated memory usage in bytes to keep the trained model in memory. +// ModelSizeBytes The estimated memory usage in bytes to keep the trained model in memory. // This property is supported only if defer_definition_decompression is true // or the model definition is not supplied. // API name: model_size_bytes func (r *PutTrainedModel) ModelSizeBytes(modelsizebytes int64) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -490,18 +488,18 @@ func (r *PutTrainedModel) ModelSizeBytes(modelsizebytes int64) *PutTrainedModel return r } -// The model type. +// ModelType The model type. // API name: model_type func (r *PutTrainedModel) ModelType(modeltype trainedmodeltype.TrainedModelType) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.ModelType = &modeltype + return r } -// The platform architecture (if applicable) of the trained mode. If the model +// PlatformArchitecture The platform architecture (if applicable) of the trained mode. If the model // only works on one platform, because it is heavily optimized for a particular // processor architecture and OS combination, then this field specifies which. // The format of the string must match the platform identifiers used by @@ -513,7 +511,6 @@ func (r *PutTrainedModel) ModelType(modeltype trainedmodeltype.TrainedModelType) // architecture or OS features), leave this field unset. // API name: platform_architecture func (r *PutTrainedModel) PlatformArchitecture(platformarchitecture string) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -523,30 +520,25 @@ func (r *PutTrainedModel) PlatformArchitecture(platformarchitecture string) *Put return r } -// Optional prefix strings applied at inference +// PrefixStrings Optional prefix strings applied at inference // API name: prefix_strings -func (r *PutTrainedModel) PrefixStrings(prefixstrings types.TrainedModelPrefixStringsVariant) *PutTrainedModel { - // Initialize the request if it is not already initialized +func (r *PutTrainedModel) PrefixStrings(prefixstrings *types.TrainedModelPrefixStrings) *PutTrainedModel { if r.req == nil { r.req = NewRequest() } - r.req.PrefixStrings = prefixstrings.TrainedModelPrefixStringsCaster() + r.req.PrefixStrings = prefixstrings return r } -// An array of tags to organize the model. +// Tags An array of tags to organize the model. // API name: tags func (r *PutTrainedModel) Tags(tags ...string) *PutTrainedModel { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range tags { + r.req.Tags = tags - r.req.Tags = append(r.req.Tags, v) - - } return r } diff --git a/typedapi/ml/puttrainedmodel/request.go b/typedapi/ml/puttrainedmodel/request.go index b84a165578..7ac87a24b6 100644 --- a/typedapi/ml/puttrainedmodel/request.go +++ b/typedapi/ml/puttrainedmodel/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodel @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L135 type Request struct { // CompressedDefinition The compressed (GZipped and Base64 encoded) inference definition of the diff --git a/typedapi/ml/puttrainedmodel/response.go b/typedapi/ml/puttrainedmodel/response.go index 55fa341c84..1d9ed572a9 100644 --- a/typedapi/ml/puttrainedmodel/response.go +++ b/typedapi/ml/puttrainedmodel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodel @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L24 type Response struct { CompressedDefinition *string `json:"compressed_definition,omitempty"` // CreateTime The time when the trained model was created. diff --git a/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go b/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go index d1cd4cfd7e..bb9c02d377 100644 --- a/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go +++ b/typedapi/ml/puttrainedmodelalias/put_trained_model_alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a trained model alias. // A trained model alias is a logical name used to reference a single trained diff --git a/typedapi/ml/puttrainedmodelalias/response.go b/typedapi/ml/puttrainedmodelalias/response.go index c96c2cd415..9d5fa6274d 100644 --- a/typedapi/ml/puttrainedmodelalias/response.go +++ b/typedapi/ml/puttrainedmodelalias/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodelalias // Response holds the response body struct for the package puttrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go b/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go index f7992f4323..c98d5a2957 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/put_trained_model_definition_part.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create part of a trained model definition. package puttrainedmodeldefinitionpart @@ -382,10 +382,9 @@ func (r *PutTrainedModelDefinitionPart) Pretty(pretty bool) *PutTrainedModelDefi return r } -// The definition part for the model. Must be a base64 encoded string. +// Definition The definition part for the model. Must be a base64 encoded string. // API name: definition func (r *PutTrainedModelDefinitionPart) Definition(definition string) *PutTrainedModelDefinitionPart { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -395,10 +394,9 @@ func (r *PutTrainedModelDefinitionPart) Definition(definition string) *PutTraine return r } -// The total uncompressed definition length in bytes. Not base64 encoded. +// TotalDefinitionLength The total uncompressed definition length in bytes. Not base64 encoded. // API name: total_definition_length func (r *PutTrainedModelDefinitionPart) TotalDefinitionLength(totaldefinitionlength int64) *PutTrainedModelDefinitionPart { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -408,14 +406,12 @@ func (r *PutTrainedModelDefinitionPart) TotalDefinitionLength(totaldefinitionlen return r } -// The total number of parts that will be uploaded. Must be greater than 0. +// TotalParts The total number of parts that will be uploaded. Must be greater than 0. // API name: total_parts func (r *PutTrainedModelDefinitionPart) TotalParts(totalparts int) *PutTrainedModelDefinitionPart { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TotalParts = totalparts return r diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/request.go b/typedapi/ml/puttrainedmodeldefinitionpart/request.go index ad7436d18e..d7d0cbe973 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/request.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodeldefinitionpart @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L65 type Request struct { // Definition The definition part for the model. Must be a base64 encoded string. diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/response.go b/typedapi/ml/puttrainedmodeldefinitionpart/response.go index 9dce1f4e15..f5dea713b3 100644 --- a/typedapi/ml/puttrainedmodeldefinitionpart/response.go +++ b/typedapi/ml/puttrainedmodeldefinitionpart/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodeldefinitionpart // Response holds the response body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go b/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go index ef50c753f5..f28eac35bd 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go +++ b/typedapi/ml/puttrainedmodelvocabulary/put_trained_model_vocabulary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a trained model vocabulary. // This API is supported only for natural language processing (NLP) models. @@ -365,47 +365,35 @@ func (r *PutTrainedModelVocabulary) Pretty(pretty bool) *PutTrainedModelVocabula return r } -// The optional model merges if required by the tokenizer. +// Merges The optional model merges if required by the tokenizer. // API name: merges func (r *PutTrainedModelVocabulary) Merges(merges ...string) *PutTrainedModelVocabulary { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range merges { + r.req.Merges = merges - r.req.Merges = append(r.req.Merges, v) - - } return r } -// The optional vocabulary value scores if required by the tokenizer. +// Scores The optional vocabulary value scores if required by the tokenizer. // API name: scores func (r *PutTrainedModelVocabulary) Scores(scores ...types.Float64) *PutTrainedModelVocabulary { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range scores { - - r.req.Scores = append(r.req.Scores, v) + r.req.Scores = scores - } return r } -// The model vocabulary, which must not be empty. +// Vocabulary The model vocabulary, which must not be empty. // API name: vocabulary func (r *PutTrainedModelVocabulary) Vocabulary(vocabularies ...string) *PutTrainedModelVocabulary { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range vocabularies { - - r.req.Vocabulary = append(r.req.Vocabulary, v) + r.req.Vocabulary = vocabularies - } return r } diff --git a/typedapi/ml/puttrainedmodelvocabulary/request.go b/typedapi/ml/puttrainedmodelvocabulary/request.go index 9b466854a8..6f3ef32ac8 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/request.go +++ b/typedapi/ml/puttrainedmodelvocabulary/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodelvocabulary @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L68 type Request struct { // Merges The optional model merges if required by the tokenizer. diff --git a/typedapi/ml/puttrainedmodelvocabulary/response.go b/typedapi/ml/puttrainedmodelvocabulary/response.go index 896f460955..08d89a9f6f 100644 --- a/typedapi/ml/puttrainedmodelvocabulary/response.go +++ b/typedapi/ml/puttrainedmodelvocabulary/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttrainedmodelvocabulary // Response holds the response body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/resetjob/reset_job.go b/typedapi/ml/resetjob/reset_job.go index a8baa79bea..44fb76d2b4 100644 --- a/typedapi/ml/resetjob/reset_job.go +++ b/typedapi/ml/resetjob/reset_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reset an anomaly detection job. // All model state and results are deleted. The job is ready to start over as if diff --git a/typedapi/ml/resetjob/response.go b/typedapi/ml/resetjob/response.go index f9b55c8245..c34903fb05 100644 --- a/typedapi/ml/resetjob/response.go +++ b/typedapi/ml/resetjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resetjob // Response holds the response body struct for the package resetjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/reset_job/MlResetJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/reset_job/MlResetJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/revertmodelsnapshot/request.go b/typedapi/ml/revertmodelsnapshot/request.go index ce522ce1d0..5bf03f49d5 100644 --- a/typedapi/ml/revertmodelsnapshot/request.go +++ b/typedapi/ml/revertmodelsnapshot/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package revertmodelsnapshot @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L77 type Request struct { // DeleteInterveningResults Refer to the description for the `delete_intervening_results` query diff --git a/typedapi/ml/revertmodelsnapshot/response.go b/typedapi/ml/revertmodelsnapshot/response.go index ded170b8d0..80dfb0e0e2 100644 --- a/typedapi/ml/revertmodelsnapshot/response.go +++ b/typedapi/ml/revertmodelsnapshot/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package revertmodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/revert_model_snapshot/MlRevertModelSnapshotResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/revert_model_snapshot/MlRevertModelSnapshotResponse.ts#L22-L24 type Response struct { Model types.ModelSnapshot `json:"model"` } diff --git a/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go b/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go index 227a4049ae..a5692aef7f 100644 --- a/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go +++ b/typedapi/ml/revertmodelsnapshot/revert_model_snapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Revert to a snapshot. // The machine learning features react quickly to anomalous input, learning new @@ -397,15 +397,13 @@ func (r *RevertModelSnapshot) Pretty(pretty bool) *RevertModelSnapshot { return r } -// Refer to the description for the `delete_intervening_results` query +// DeleteInterveningResults Refer to the description for the `delete_intervening_results` query // parameter. // API name: delete_intervening_results func (r *RevertModelSnapshot) DeleteInterveningResults(deleteinterveningresults bool) *RevertModelSnapshot { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.DeleteInterveningResults = &deleteinterveningresults return r diff --git a/typedapi/ml/setupgrademode/response.go b/typedapi/ml/setupgrademode/response.go index 19093117b9..93159ab269 100644 --- a/typedapi/ml/setupgrademode/response.go +++ b/typedapi/ml/setupgrademode/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package setupgrademode // Response holds the response body struct for the package setupgrademode // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/setupgrademode/set_upgrade_mode.go b/typedapi/ml/setupgrademode/set_upgrade_mode.go index ebf451372c..500fa8690e 100644 --- a/typedapi/ml/setupgrademode/set_upgrade_mode.go +++ b/typedapi/ml/setupgrademode/set_upgrade_mode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Set upgrade_mode for ML indices. // Sets a cluster wide upgrade_mode setting that prepares machine learning diff --git a/typedapi/ml/startdatafeed/request.go b/typedapi/ml/startdatafeed/request.go index 8b6daa32e3..e321cfee86 100644 --- a/typedapi/ml/startdatafeed/request.go +++ b/typedapi/ml/startdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package startdatafeed @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L99 type Request struct { // End Refer to the description for the `end` query parameter. diff --git a/typedapi/ml/startdatafeed/response.go b/typedapi/ml/startdatafeed/response.go index b4c5b63f5b..c8ec02e5ec 100644 --- a/typedapi/ml/startdatafeed/response.go +++ b/typedapi/ml/startdatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package startdatafeed @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34 type Response struct { // Node The ID of the node that the job was started on. In serverless this will be diff --git a/typedapi/ml/startdatafeed/start_datafeed.go b/typedapi/ml/startdatafeed/start_datafeed.go index 45cf5fd3ff..573da69c15 100644 --- a/typedapi/ml/startdatafeed/start_datafeed.go +++ b/typedapi/ml/startdatafeed/start_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start datafeeds. // @@ -401,41 +401,35 @@ func (r *StartDatafeed) Pretty(pretty bool) *StartDatafeed { return r } -// Refer to the description for the `end` query parameter. +// End Refer to the description for the `end` query parameter. // API name: end -func (r *StartDatafeed) End(datetime types.DateTimeVariant) *StartDatafeed { - // Initialize the request if it is not already initialized +func (r *StartDatafeed) End(datetime types.DateTime) *StartDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.End = *datetime.DateTimeCaster() + r.req.End = datetime return r } -// Refer to the description for the `start` query parameter. +// Start Refer to the description for the `start` query parameter. // API name: start -func (r *StartDatafeed) Start(datetime types.DateTimeVariant) *StartDatafeed { - // Initialize the request if it is not already initialized +func (r *StartDatafeed) Start(datetime types.DateTime) *StartDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.Start = *datetime.DateTimeCaster() + r.req.Start = datetime return r } -// Refer to the description for the `timeout` query parameter. +// Timeout Refer to the description for the `timeout` query parameter. // API name: timeout -func (r *StartDatafeed) Timeout(duration types.DurationVariant) *StartDatafeed { - // Initialize the request if it is not already initialized +func (r *StartDatafeed) Timeout(duration types.Duration) *StartDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/ml/startdataframeanalytics/response.go b/typedapi/ml/startdataframeanalytics/response.go index 7566f7e817..973d94d3a6 100644 --- a/typedapi/ml/startdataframeanalytics/response.go +++ b/typedapi/ml/startdataframeanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package startdataframeanalytics // Response holds the response body struct for the package startdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34 type Response struct { Acknowledged bool `json:"acknowledged"` // Node The ID of the node that the job was started on. If the job is allowed to open diff --git a/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go b/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go index 10cbf1579b..c07e61dabd 100644 --- a/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go +++ b/typedapi/ml/startdataframeanalytics/start_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start a data frame analytics job. // A data frame analytics job can be started and stopped multiple times diff --git a/typedapi/ml/starttrainedmodeldeployment/request.go b/typedapi/ml/starttrainedmodeldeployment/request.go index f4d7aa7de3..4354393f3a 100644 --- a/typedapi/ml/starttrainedmodeldeployment/request.go +++ b/typedapi/ml/starttrainedmodeldeployment/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package starttrainedmodeldeployment @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L30-L111 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L30-L111 type Request struct { // AdaptiveAllocations Adaptive allocations configuration. When enabled, the number of allocations diff --git a/typedapi/ml/starttrainedmodeldeployment/response.go b/typedapi/ml/starttrainedmodeldeployment/response.go index c0014413d6..39cd340ee6 100644 --- a/typedapi/ml/starttrainedmodeldeployment/response.go +++ b/typedapi/ml/starttrainedmodeldeployment/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package starttrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26 type Response struct { Assignment types.TrainedModelAssignment `json:"assignment"` } diff --git a/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go b/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go index 553a064a40..8f4ce9099a 100644 --- a/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go +++ b/typedapi/ml/starttrainedmodeldeployment/start_trained_model_deployment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start a trained model deployment. // It allocates the model to every machine learning node. @@ -453,18 +453,17 @@ func (r *StartTrainedModelDeployment) Pretty(pretty bool) *StartTrainedModelDepl return r } -// Adaptive allocations configuration. When enabled, the number of allocations +// AdaptiveAllocations Adaptive allocations configuration. When enabled, the number of allocations // is set based on the current load. // If adaptive_allocations is enabled, do not set the number of allocations // manually. // API name: adaptive_allocations -func (r *StartTrainedModelDeployment) AdaptiveAllocations(adaptiveallocations types.AdaptiveAllocationsSettingsVariant) *StartTrainedModelDeployment { - // Initialize the request if it is not already initialized +func (r *StartTrainedModelDeployment) AdaptiveAllocations(adaptiveallocations *types.AdaptiveAllocationsSettings) *StartTrainedModelDeployment { if r.req == nil { r.req = NewRequest() } - r.req.AdaptiveAllocations = adaptiveallocations.AdaptiveAllocationsSettingsCaster() + r.req.AdaptiveAllocations = adaptiveallocations return r } diff --git a/typedapi/ml/stopdatafeed/request.go b/typedapi/ml/stopdatafeed/request.go index acaaeb8e32..055c2c1607 100644 --- a/typedapi/ml/stopdatafeed/request.go +++ b/typedapi/ml/stopdatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stopdatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L86 type Request struct { // AllowNoMatch Refer to the description for the `allow_no_match` query parameter. diff --git a/typedapi/ml/stopdatafeed/response.go b/typedapi/ml/stopdatafeed/response.go index 99be073246..f862bd58ca 100644 --- a/typedapi/ml/stopdatafeed/response.go +++ b/typedapi/ml/stopdatafeed/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stopdatafeed // Response holds the response body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/stop_datafeed/MlStopDatafeedResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/stop_datafeed/MlStopDatafeedResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/ml/stopdatafeed/stop_datafeed.go b/typedapi/ml/stopdatafeed/stop_datafeed.go index dcfd008e5a..c948e4cec4 100644 --- a/typedapi/ml/stopdatafeed/stop_datafeed.go +++ b/typedapi/ml/stopdatafeed/stop_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop datafeeds. // A datafeed that is stopped ceases to retrieve data from Elasticsearch. A @@ -369,41 +369,35 @@ func (r *StopDatafeed) Pretty(pretty bool) *StopDatafeed { return r } -// Refer to the description for the `allow_no_match` query parameter. +// AllowNoMatch Refer to the description for the `allow_no_match` query parameter. // API name: allow_no_match func (r *StopDatafeed) AllowNoMatch(allownomatch bool) *StopDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowNoMatch = &allownomatch return r } -// Refer to the description for the `force` query parameter. +// Force Refer to the description for the `force` query parameter. // API name: force func (r *StopDatafeed) Force(force bool) *StopDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Force = &force return r } -// Refer to the description for the `timeout` query parameter. +// Timeout Refer to the description for the `timeout` query parameter. // API name: timeout -func (r *StopDatafeed) Timeout(duration types.DurationVariant) *StopDatafeed { - // Initialize the request if it is not already initialized +func (r *StopDatafeed) Timeout(duration types.Duration) *StopDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/ml/stopdataframeanalytics/response.go b/typedapi/ml/stopdataframeanalytics/response.go index ae1a64ec6b..45a884b511 100644 --- a/typedapi/ml/stopdataframeanalytics/response.go +++ b/typedapi/ml/stopdataframeanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stopdataframeanalytics // Response holds the response body struct for the package stopdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go b/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go index afb3f56fc9..0c87e41ac8 100644 --- a/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go +++ b/typedapi/ml/stopdataframeanalytics/stop_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop data frame analytics jobs. // A data frame analytics job can be started and stopped multiple times diff --git a/typedapi/ml/stoptrainedmodeldeployment/response.go b/typedapi/ml/stoptrainedmodeldeployment/response.go index 8da4c0d41c..430a60acf9 100644 --- a/typedapi/ml/stoptrainedmodeldeployment/response.go +++ b/typedapi/ml/stoptrainedmodeldeployment/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stoptrainedmodeldeployment // Response holds the response body struct for the package stoptrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go b/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go index f20d8e21ec..2c4ec36ad3 100644 --- a/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go +++ b/typedapi/ml/stoptrainedmodeldeployment/stop_trained_model_deployment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop a trained model deployment. package stoptrainedmodeldeployment diff --git a/typedapi/ml/updatedatafeed/request.go b/typedapi/ml/updatedatafeed/request.go index 37ccf1cc6b..f5958709b8 100644 --- a/typedapi/ml/updatedatafeed/request.go +++ b/typedapi/ml/updatedatafeed/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatedatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L170 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L164 type Request struct { // Aggregations If set, the datafeed performs aggregation searches. Support for aggregations diff --git a/typedapi/ml/updatedatafeed/response.go b/typedapi/ml/updatedatafeed/response.go index efd95b7ada..41ee39b555 100644 --- a/typedapi/ml/updatedatafeed/response.go +++ b/typedapi/ml/updatedatafeed/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatedatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49 type Response struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Authorization *types.DatafeedAuthorization `json:"authorization,omitempty"` diff --git a/typedapi/ml/updatedatafeed/update_datafeed.go b/typedapi/ml/updatedatafeed/update_datafeed.go index 434a8f526a..9937b832ae 100644 --- a/typedapi/ml/updatedatafeed/update_datafeed.go +++ b/typedapi/ml/updatedatafeed/update_datafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a datafeed. // You must stop and start the datafeed for the changes to be applied. @@ -344,16 +344,7 @@ func (r *UpdateDatafeed) AllowNoIndices(allownoindices bool) *UpdateDatafeed { // ExpandWildcards Type of index that wildcard patterns can match. If the request can target // data streams, this argument determines // whether wildcard expressions match hidden data streams. Supports -// comma-separated values. Valid values are: -// -// * `all`: Match any data stream or index, including hidden ones. -// * `closed`: Match closed, non-hidden indices. Also matches any non-hidden -// data stream. Data streams cannot be closed. -// * `hidden`: Match hidden data streams and hidden indices. Must be combined -// with `open`, `closed`, or both. -// * `none`: Wildcard patterns are not accepted. -// * `open`: Match open, non-hidden indices. Also matches any non-hidden data -// stream. +// comma-separated values. // API name: expand_wildcards func (r *UpdateDatafeed) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *UpdateDatafeed { tmp := []string{} @@ -425,56 +416,37 @@ func (r *UpdateDatafeed) Pretty(pretty bool) *UpdateDatafeed { return r } -// If set, the datafeed performs aggregation searches. Support for aggregations +// Aggregations If set, the datafeed performs aggregation searches. Support for aggregations // is limited and should be used only // with low cardinality data. // API name: aggregations func (r *UpdateDatafeed) Aggregations(aggregations map[string]types.Aggregations) *UpdateDatafeed { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Aggregations = aggregations - return r -} - -func (r *UpdateDatafeed) AddAggregation(key string, value types.AggregationsVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.Aggregations - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggregations - } - - tmp[key] = *value.AggregationsCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } -// Datafeeds might search over long time periods, for several months or years. +// ChunkingConfig Datafeeds might search over long time periods, for several months or years. // This search is split into time // chunks in order to ensure the load on Elasticsearch is managed. Chunking // configuration controls how the size of // these time chunks are calculated; it is an advanced configuration option. // API name: chunking_config -func (r *UpdateDatafeed) ChunkingConfig(chunkingconfig types.ChunkingConfigVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) ChunkingConfig(chunkingconfig *types.ChunkingConfig) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.ChunkingConfig = chunkingconfig.ChunkingConfigCaster() + r.req.ChunkingConfig = chunkingconfig return r } -// Specifies whether the datafeed checks for missing data and the size of the +// DelayedDataCheckConfig Specifies whether the datafeed checks for missing data and the size of the // window. The datafeed can optionally // search over indices that have already been read in an effort to determine // whether any data has subsequently been @@ -484,18 +456,17 @@ func (r *UpdateDatafeed) ChunkingConfig(chunkingconfig types.ChunkingConfigVaria // This check runs only on real-time // datafeeds. // API name: delayed_data_check_config -func (r *UpdateDatafeed) DelayedDataCheckConfig(delayeddatacheckconfig types.DelayedDataCheckConfigVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) DelayedDataCheckConfig(delayeddatacheckconfig *types.DelayedDataCheckConfig) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.DelayedDataCheckConfig = delayeddatacheckconfig.DelayedDataCheckConfigCaster() + r.req.DelayedDataCheckConfig = delayeddatacheckconfig return r } -// The interval at which scheduled queries are made while the datafeed runs in +// Frequency The interval at which scheduled queries are made while the datafeed runs in // real time. The default value is // either the bucket span for short bucket spans, or, for longer bucket spans, a // sensible fraction of the bucket @@ -505,60 +476,51 @@ func (r *UpdateDatafeed) DelayedDataCheckConfig(delayeddatacheckconfig types.Del // datafeed uses aggregations, this value // must be divisible by the interval of the date histogram aggregation. // API name: frequency -func (r *UpdateDatafeed) Frequency(duration types.DurationVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) Frequency(duration types.Duration) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.Frequency = *duration.DurationCaster() + r.req.Frequency = duration return r } -// An array of index names. Wildcards are supported. If any of the indices are +// Indices An array of index names. Wildcards are supported. If any of the indices are // in remote clusters, the machine // learning nodes must have the `remote_cluster_client` role. // API name: indices func (r *UpdateDatafeed) Indices(indices ...string) *UpdateDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range indices { - - r.req.Indices = append(r.req.Indices, v) + r.req.Indices = indices - } return r } -// Specifies index expansion options that are used during search. +// IndicesOptions Specifies index expansion options that are used during search. // API name: indices_options -func (r *UpdateDatafeed) IndicesOptions(indicesoptions types.IndicesOptionsVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) IndicesOptions(indicesoptions *types.IndicesOptions) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.IndicesOptions = indicesoptions.IndicesOptionsCaster() + r.req.IndicesOptions = indicesoptions return r } // API name: job_id func (r *UpdateDatafeed) JobId(id string) *UpdateDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.JobId = &id return r } -// If a real-time datafeed has never seen any data (including during any initial +// MaxEmptySearches If a real-time datafeed has never seen any data (including during any initial // training period), it automatically // stops and closes the associated job after this many real-time searches return // no documents. In other words, @@ -568,17 +530,15 @@ func (r *UpdateDatafeed) JobId(id string) *UpdateDatafeed { // default, it is not set. // API name: max_empty_searches func (r *UpdateDatafeed) MaxEmptySearches(maxemptysearches int) *UpdateDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxEmptySearches = &maxemptysearches return r } -// The Elasticsearch query domain-specific language (DSL). This value +// Query The Elasticsearch query domain-specific language (DSL). This value // corresponds to the query object in an // Elasticsearch search POST body. All the options that are supported by // Elasticsearch can be used, as this @@ -592,18 +552,17 @@ func (r *UpdateDatafeed) MaxEmptySearches(maxemptysearches int) *UpdateDatafeed // in parallel and close one // when you are satisfied with the results of the job. // API name: query -func (r *UpdateDatafeed) Query(query types.QueryVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) Query(query *types.Query) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// The number of seconds behind real time that data is queried. For example, if +// QueryDelay The number of seconds behind real time that data is queried. For example, if // data from 10:04 a.m. might // not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 // seconds. The default @@ -611,73 +570,49 @@ func (r *UpdateDatafeed) Query(query types.QueryVariant) *UpdateDatafeed { // the query performance // when there are multiple jobs running on the same node. // API name: query_delay -func (r *UpdateDatafeed) QueryDelay(duration types.DurationVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) QueryDelay(duration types.Duration) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.QueryDelay = *duration.DurationCaster() + r.req.QueryDelay = duration return r } -// Specifies runtime fields for the datafeed search. +// RuntimeMappings Specifies runtime fields for the datafeed search. // API name: runtime_mappings -func (r *UpdateDatafeed) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized +func (r *UpdateDatafeed) RuntimeMappings(runtimefields types.RuntimeFields) *UpdateDatafeed { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// Specifies scripts that evaluate custom expressions and returns script fields +// ScriptFields Specifies scripts that evaluate custom expressions and returns script fields // to the datafeed. // The detector configuration objects in a job can contain functions that use // these script fields. // API name: script_fields func (r *UpdateDatafeed) ScriptFields(scriptfields map[string]types.ScriptField) *UpdateDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScriptFields = scriptfields - return r -} -func (r *UpdateDatafeed) AddScriptField(key string, value types.ScriptFieldVariant) *UpdateDatafeed { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.ScriptField - if r.req.ScriptFields == nil { - r.req.ScriptFields = make(map[string]types.ScriptField) - } else { - tmp = r.req.ScriptFields - } - - tmp[key] = *value.ScriptFieldCaster() + r.req.ScriptFields = scriptfields - r.req.ScriptFields = tmp return r } -// The size parameter that is used in Elasticsearch searches when the datafeed +// ScrollSize The size parameter that is used in Elasticsearch searches when the datafeed // does not use aggregations. // The maximum value is the value of `index.max_result_window`. // API name: scroll_size func (r *UpdateDatafeed) ScrollSize(scrollsize int) *UpdateDatafeed { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ScrollSize = &scrollsize return r diff --git a/typedapi/ml/updatedataframeanalytics/request.go b/typedapi/ml/updatedataframeanalytics/request.go index 9477baf744..45141cd8ca 100644 --- a/typedapi/ml/updatedataframeanalytics/request.go +++ b/typedapi/ml/updatedataframeanalytics/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatedataframeanalytics @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L80 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L80 type Request struct { // AllowLazyStart Specifies whether this job can start when there is insufficient machine diff --git a/typedapi/ml/updatedataframeanalytics/response.go b/typedapi/ml/updatedataframeanalytics/response.go index b3daec00d4..3dd8ee00b2 100644 --- a/typedapi/ml/updatedataframeanalytics/response.go +++ b/typedapi/ml/updatedataframeanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatedataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45 type Response struct { AllowLazyStart bool `json:"allow_lazy_start"` Analysis types.DataframeAnalysisContainer `json:"analysis"` diff --git a/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go b/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go index d7754473f6..6c259c7848 100644 --- a/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go +++ b/typedapi/ml/updatedataframeanalytics/update_data_frame_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a data frame analytics job. package updatedataframeanalytics @@ -363,24 +363,21 @@ func (r *UpdateDataFrameAnalytics) Pretty(pretty bool) *UpdateDataFrameAnalytics return r } -// Specifies whether this job can start when there is insufficient machine +// AllowLazyStart Specifies whether this job can start when there is insufficient machine // learning node capacity for it to be immediately assigned to a node. // API name: allow_lazy_start func (r *UpdateDataFrameAnalytics) AllowLazyStart(allowlazystart bool) *UpdateDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowLazyStart = &allowlazystart return r } -// A description of the job. +// Description A description of the job. // API name: description func (r *UpdateDataFrameAnalytics) Description(description string) *UpdateDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -390,30 +387,27 @@ func (r *UpdateDataFrameAnalytics) Description(description string) *UpdateDataFr return r } -// The maximum number of threads to be used by the analysis. Using more +// MaxNumThreads The maximum number of threads to be used by the analysis. Using more // threads may decrease the time necessary to complete the analysis at the // cost of using more CPU. Note that the process may use additional threads // for operational functionality other than the analysis itself. // API name: max_num_threads func (r *UpdateDataFrameAnalytics) MaxNumThreads(maxnumthreads int) *UpdateDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MaxNumThreads = &maxnumthreads return r } -// The approximate maximum amount of memory resources that are permitted for +// ModelMemoryLimit The approximate maximum amount of memory resources that are permitted for // analytical processing. If your `elasticsearch.yml` file contains an // `xpack.ml.max_model_memory_limit` setting, an error occurs when you try // to create data frame analytics jobs that have `model_memory_limit` values // greater than that setting. // API name: model_memory_limit func (r *UpdateDataFrameAnalytics) ModelMemoryLimit(modelmemorylimit string) *UpdateDataFrameAnalytics { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/ml/updatefilter/request.go b/typedapi/ml/updatefilter/request.go index 1e085c26e6..47aeeacbb1 100644 --- a/typedapi/ml/updatefilter/request.go +++ b/typedapi/ml/updatefilter/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefilter @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L60 type Request struct { // AddItems The items to add to the filter. diff --git a/typedapi/ml/updatefilter/response.go b/typedapi/ml/updatefilter/response.go index 203af00f88..f5b4ddfa40 100644 --- a/typedapi/ml/updatefilter/response.go +++ b/typedapi/ml/updatefilter/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatefilter // Response holds the response body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_filter/MlUpdateFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_filter/MlUpdateFilterResponse.ts#L22-L28 type Response struct { Description string `json:"description"` FilterId string `json:"filter_id"` diff --git a/typedapi/ml/updatefilter/update_filter.go b/typedapi/ml/updatefilter/update_filter.go index 6e3c431f15..8779304ab5 100644 --- a/typedapi/ml/updatefilter/update_filter.go +++ b/typedapi/ml/updatefilter/update_filter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a filter. // Updates the description of a filter, adds items, or removes items from the @@ -363,25 +363,20 @@ func (r *UpdateFilter) Pretty(pretty bool) *UpdateFilter { return r } -// The items to add to the filter. +// AddItems The items to add to the filter. // API name: add_items func (r *UpdateFilter) AddItems(additems ...string) *UpdateFilter { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range additems { + r.req.AddItems = additems - r.req.AddItems = append(r.req.AddItems, v) - - } return r } -// A description for the filter. +// Description A description for the filter. // API name: description func (r *UpdateFilter) Description(description string) *UpdateFilter { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -391,17 +386,13 @@ func (r *UpdateFilter) Description(description string) *UpdateFilter { return r } -// The items to remove from the filter. +// RemoveItems The items to remove from the filter. // API name: remove_items func (r *UpdateFilter) RemoveItems(removeitems ...string) *UpdateFilter { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range removeitems { + r.req.RemoveItems = removeitems - r.req.RemoveItems = append(r.req.RemoveItems, v) - - } return r } diff --git a/typedapi/ml/updatejob/request.go b/typedapi/ml/updatejob/request.go index 3c100cb4db..f212d681e2 100644 --- a/typedapi/ml/updatejob/request.go +++ b/typedapi/ml/updatejob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatejob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L147 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L147 type Request struct { // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when diff --git a/typedapi/ml/updatejob/response.go b/typedapi/ml/updatejob/response.go index 113a5457c1..970f4d7e6e 100644 --- a/typedapi/ml/updatejob/response.go +++ b/typedapi/ml/updatejob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_job/MlUpdateJobResponse.ts#L29-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_job/MlUpdateJobResponse.ts#L29-L53 type Response struct { AllowLazyOpen bool `json:"allow_lazy_open"` AnalysisConfig types.AnalysisConfigRead `json:"analysis_config"` diff --git a/typedapi/ml/updatejob/update_job.go b/typedapi/ml/updatejob/update_job.go index 7581a719c8..0874975d94 100644 --- a/typedapi/ml/updatejob/update_job.go +++ b/typedapi/ml/updatejob/update_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update an anomaly detection job. // Updates certain properties of an anomaly detection job. @@ -361,7 +361,7 @@ func (r *UpdateJob) Pretty(pretty bool) *UpdateJob { return r } -// Advanced configuration option. Specifies whether this job can open when +// AllowLazyOpen Advanced configuration option. Specifies whether this job can open when // there is insufficient machine learning node capacity for it to be // immediately assigned to a node. If `false` and a machine learning node // with capacity to run the job cannot immediately be found, the open @@ -372,29 +372,26 @@ func (r *UpdateJob) Pretty(pretty bool) *UpdateJob { // machine learning node capacity is available. // API name: allow_lazy_open func (r *UpdateJob) AllowLazyOpen(allowlazyopen bool) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowLazyOpen = &allowlazyopen return r } // API name: analysis_limits -func (r *UpdateJob) AnalysisLimits(analysislimits types.AnalysisMemoryLimitVariant) *UpdateJob { - // Initialize the request if it is not already initialized +func (r *UpdateJob) AnalysisLimits(analysislimits *types.AnalysisMemoryLimit) *UpdateJob { if r.req == nil { r.req = NewRequest() } - r.req.AnalysisLimits = analysislimits.AnalysisMemoryLimitCaster() + r.req.AnalysisLimits = analysislimits return r } -// Advanced configuration option. The time between each periodic persistence +// BackgroundPersistInterval Advanced configuration option. The time between each periodic persistence // of the model. // The default value is a randomized value between 3 to 4 hours, which // avoids all jobs persisting at exactly the same time. The smallest allowed @@ -405,64 +402,40 @@ func (r *UpdateJob) AnalysisLimits(analysislimits types.AnalysisMemoryLimitVaria // close the job, then reopen the job and restart the datafeed for the // changes to take effect. // API name: background_persist_interval -func (r *UpdateJob) BackgroundPersistInterval(duration types.DurationVariant) *UpdateJob { - // Initialize the request if it is not already initialized +func (r *UpdateJob) BackgroundPersistInterval(duration types.Duration) *UpdateJob { if r.req == nil { r.req = NewRequest() } - - r.req.BackgroundPersistInterval = *duration.DurationCaster() + r.req.BackgroundPersistInterval = duration return r } // API name: categorization_filters func (r *UpdateJob) CategorizationFilters(categorizationfilters ...string) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range categorizationfilters { - - r.req.CategorizationFilters = append(r.req.CategorizationFilters, v) + r.req.CategorizationFilters = categorizationfilters - } return r } -// Advanced configuration option. Contains custom meta data about the job. +// CustomSettings Advanced configuration option. Contains custom meta data about the job. // For example, it can contain custom URL information as shown in Adding // custom URLs to machine learning results. // API name: custom_settings func (r *UpdateJob) CustomSettings(customsettings map[string]json.RawMessage) *UpdateJob { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.CustomSettings = customsettings - return r -} - -func (r *UpdateJob) AddCustomSetting(key string, value json.RawMessage) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.CustomSettings == nil { - r.req.CustomSettings = make(map[string]json.RawMessage) - } else { - tmp = r.req.CustomSettings - } - - tmp[key] = value + r.req.CustomSettings = customsettings - r.req.CustomSettings = tmp return r } -// Advanced configuration option, which affects the automatic removal of old +// DailyModelSnapshotRetentionAfterDays Advanced configuration option, which affects the automatic removal of old // model snapshots for this job. It specifies a period of time (in days) // after which only the first snapshot per day is retained. This period is // relative to the timestamp of the most recent snapshot for this job. Valid @@ -471,7 +444,6 @@ func (r *UpdateJob) AddCustomSetting(key string, value json.RawMessage) *UpdateJ // `model_snapshot_retention_days`. // API name: daily_model_snapshot_retention_after_days func (r *UpdateJob) DailyModelSnapshotRetentionAfterDays(dailymodelsnapshotretentionafterdays int64) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -481,10 +453,9 @@ func (r *UpdateJob) DailyModelSnapshotRetentionAfterDays(dailymodelsnapshotreten return r } -// A description of the job. +// Description A description of the job. // API name: description func (r *UpdateJob) Description(description string) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -494,67 +465,55 @@ func (r *UpdateJob) Description(description string) *UpdateJob { return r } -// An array of detector update objects. +// Detectors An array of detector update objects. // API name: detectors -func (r *UpdateJob) Detectors(detectors ...types.DetectorUpdateVariant) *UpdateJob { - // Initialize the request if it is not already initialized +func (r *UpdateJob) Detectors(detectors ...types.DetectorUpdate) *UpdateJob { if r.req == nil { r.req = NewRequest() } - for _, v := range detectors { + r.req.Detectors = detectors - r.req.Detectors = append(r.req.Detectors, *v.DetectorUpdateCaster()) - - } return r } -// A list of job groups. A job can belong to no groups or many. +// Groups A list of job groups. A job can belong to no groups or many. // API name: groups func (r *UpdateJob) Groups(groups ...string) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range groups { - - r.req.Groups = append(r.req.Groups, v) + r.req.Groups = groups - } return r } // API name: model_plot_config -func (r *UpdateJob) ModelPlotConfig(modelplotconfig types.ModelPlotConfigVariant) *UpdateJob { - // Initialize the request if it is not already initialized +func (r *UpdateJob) ModelPlotConfig(modelplotconfig *types.ModelPlotConfig) *UpdateJob { if r.req == nil { r.req = NewRequest() } - r.req.ModelPlotConfig = modelplotconfig.ModelPlotConfigCaster() + r.req.ModelPlotConfig = modelplotconfig return r } // API name: model_prune_window -func (r *UpdateJob) ModelPruneWindow(duration types.DurationVariant) *UpdateJob { - // Initialize the request if it is not already initialized +func (r *UpdateJob) ModelPruneWindow(duration types.Duration) *UpdateJob { if r.req == nil { r.req = NewRequest() } - - r.req.ModelPruneWindow = *duration.DurationCaster() + r.req.ModelPruneWindow = duration return r } -// Advanced configuration option, which affects the automatic removal of old +// ModelSnapshotRetentionDays Advanced configuration option, which affects the automatic removal of old // model snapshots for this job. It specifies the maximum period of time (in // days) that snapshots are retained. This period is relative to the // timestamp of the most recent snapshot for this job. // API name: model_snapshot_retention_days func (r *UpdateJob) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -564,24 +523,22 @@ func (r *UpdateJob) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) return r } -// Settings related to how categorization interacts with partition fields. +// PerPartitionCategorization Settings related to how categorization interacts with partition fields. // API name: per_partition_categorization -func (r *UpdateJob) PerPartitionCategorization(perpartitioncategorization types.PerPartitionCategorizationVariant) *UpdateJob { - // Initialize the request if it is not already initialized +func (r *UpdateJob) PerPartitionCategorization(perpartitioncategorization *types.PerPartitionCategorization) *UpdateJob { if r.req == nil { r.req = NewRequest() } - r.req.PerPartitionCategorization = perpartitioncategorization.PerPartitionCategorizationCaster() + r.req.PerPartitionCategorization = perpartitioncategorization return r } -// Advanced configuration option. The period over which adjustments to the +// RenormalizationWindowDays Advanced configuration option. The period over which adjustments to the // score are applied, as new data is seen. // API name: renormalization_window_days func (r *UpdateJob) RenormalizationWindowDays(renormalizationwindowdays int64) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -591,7 +548,7 @@ func (r *UpdateJob) RenormalizationWindowDays(renormalizationwindowdays int64) * return r } -// Advanced configuration option. The period of time (in days) that results +// ResultsRetentionDays Advanced configuration option. The period of time (in days) that results // are retained. Age is calculated relative to the timestamp of the latest // bucket result. If this property has a non-null value, once per day at // 00:30 (server time), results that are the specified number of days older @@ -599,7 +556,6 @@ func (r *UpdateJob) RenormalizationWindowDays(renormalizationwindowdays int64) * // value is null, which means all results are retained. // API name: results_retention_days func (r *UpdateJob) ResultsRetentionDays(resultsretentiondays int64) *UpdateJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/ml/updatemodelsnapshot/request.go b/typedapi/ml/updatemodelsnapshot/request.go index 94dff58ec6..2ec72d20c7 100644 --- a/typedapi/ml/updatemodelsnapshot/request.go +++ b/typedapi/ml/updatemodelsnapshot/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatemodelsnapshot @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L63 type Request struct { // Description A description of the model snapshot. diff --git a/typedapi/ml/updatemodelsnapshot/response.go b/typedapi/ml/updatemodelsnapshot/response.go index 2a3f2a5e4d..fa65a9a3bd 100644 --- a/typedapi/ml/updatemodelsnapshot/response.go +++ b/typedapi/ml/updatemodelsnapshot/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatemodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_model_snapshot/MlUpdateModelSnapshotResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_model_snapshot/MlUpdateModelSnapshotResponse.ts#L22-L27 type Response struct { Acknowledged bool `json:"acknowledged"` Model types.ModelSnapshot `json:"model"` diff --git a/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go b/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go index 1f6278ca20..85912cdaea 100644 --- a/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go +++ b/typedapi/ml/updatemodelsnapshot/update_model_snapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a snapshot. // Updates certain properties of a snapshot. @@ -383,10 +383,9 @@ func (r *UpdateModelSnapshot) Pretty(pretty bool) *UpdateModelSnapshot { return r } -// A description of the model snapshot. +// Description A description of the model snapshot. // API name: description func (r *UpdateModelSnapshot) Description(description string) *UpdateModelSnapshot { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -396,16 +395,14 @@ func (r *UpdateModelSnapshot) Description(description string) *UpdateModelSnapsh return r } -// If `true`, this snapshot will not be deleted during automatic cleanup of +// Retain If `true`, this snapshot will not be deleted during automatic cleanup of // snapshots older than `model_snapshot_retention_days`. However, this // snapshot will be deleted when the job is deleted. // API name: retain func (r *UpdateModelSnapshot) Retain(retain bool) *UpdateModelSnapshot { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Retain = &retain return r diff --git a/typedapi/ml/updatetrainedmodeldeployment/request.go b/typedapi/ml/updatetrainedmodeldeployment/request.go index a6abf951d2..c0be17ef8f 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/request.go +++ b/typedapi/ml/updatetrainedmodeldeployment/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatetrainedmodeldeployment @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L25-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L25-L78 type Request struct { // AdaptiveAllocations Adaptive allocations configuration. When enabled, the number of allocations diff --git a/typedapi/ml/updatetrainedmodeldeployment/response.go b/typedapi/ml/updatetrainedmodeldeployment/response.go index f8d3367a67..8f2c40e96c 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/response.go +++ b/typedapi/ml/updatetrainedmodeldeployment/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatetrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26 type Response struct { Assignment types.TrainedModelAssignment `json:"assignment"` } diff --git a/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go b/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go index f638bc297c..9d9457e8fd 100644 --- a/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go +++ b/typedapi/ml/updatetrainedmodeldeployment/update_trained_model_deployment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a trained model deployment. package updatetrainedmodeldeployment @@ -362,23 +362,22 @@ func (r *UpdateTrainedModelDeployment) Pretty(pretty bool) *UpdateTrainedModelDe return r } -// Adaptive allocations configuration. When enabled, the number of allocations +// AdaptiveAllocations Adaptive allocations configuration. When enabled, the number of allocations // is set based on the current load. // If adaptive_allocations is enabled, do not set the number of allocations // manually. // API name: adaptive_allocations -func (r *UpdateTrainedModelDeployment) AdaptiveAllocations(adaptiveallocations types.AdaptiveAllocationsSettingsVariant) *UpdateTrainedModelDeployment { - // Initialize the request if it is not already initialized +func (r *UpdateTrainedModelDeployment) AdaptiveAllocations(adaptiveallocations *types.AdaptiveAllocationsSettings) *UpdateTrainedModelDeployment { if r.req == nil { r.req = NewRequest() } - r.req.AdaptiveAllocations = adaptiveallocations.AdaptiveAllocationsSettingsCaster() + r.req.AdaptiveAllocations = adaptiveallocations return r } -// The number of model allocations on each node where the model is deployed. +// NumberOfAllocations The number of model allocations on each node where the model is deployed. // All allocations on a node share the same copy of the model in memory but use // a separate set of threads to evaluate the model. // Increasing this value generally increases the throughput. @@ -389,11 +388,9 @@ func (r *UpdateTrainedModelDeployment) AdaptiveAllocations(adaptiveallocations t // automatically set. // API name: number_of_allocations func (r *UpdateTrainedModelDeployment) NumberOfAllocations(numberofallocations int) *UpdateTrainedModelDeployment { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.NumberOfAllocations = &numberofallocations return r diff --git a/typedapi/ml/upgradejobsnapshot/response.go b/typedapi/ml/upgradejobsnapshot/response.go index 38028c4ef7..d52db27b5f 100644 --- a/typedapi/ml/upgradejobsnapshot/response.go +++ b/typedapi/ml/upgradejobsnapshot/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package upgradejobsnapshot // Response holds the response body struct for the package upgradejobsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31 type Response struct { // Completed When true, this means the task is complete. When false, it is still running. diff --git a/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go b/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go index c2bb729e09..9d3dfd1bbb 100644 --- a/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go +++ b/typedapi/ml/upgradejobsnapshot/upgrade_job_snapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Upgrade a snapshot. // Upgrade an anomaly detection model snapshot to the latest major version. diff --git a/typedapi/ml/validate/request.go b/typedapi/ml/validate/request.go index 1731cced54..54548e0613 100644 --- a/typedapi/ml/validate/request.go +++ b/typedapi/ml/validate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package validate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/validate/MlValidateJobRequest.ts#L27-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/validate/MlValidateJobRequest.ts#L27-L52 type Request struct { AnalysisConfig *types.AnalysisConfig `json:"analysis_config,omitempty"` AnalysisLimits *types.AnalysisLimits `json:"analysis_limits,omitempty"` diff --git a/typedapi/ml/validate/response.go b/typedapi/ml/validate/response.go index 7077a2b426..885642a312 100644 --- a/typedapi/ml/validate/response.go +++ b/typedapi/ml/validate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package validate // Response holds the response body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/validate/MlValidateJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/validate/MlValidateJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/validate/validate.go b/typedapi/ml/validate/validate.go index 06f3e41f68..64f7c9f27e 100644 --- a/typedapi/ml/validate/validate.go +++ b/typedapi/ml/validate/validate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Validate an anomaly detection job. package validate @@ -337,44 +337,40 @@ func (r *Validate) Pretty(pretty bool) *Validate { } // API name: analysis_config -func (r *Validate) AnalysisConfig(analysisconfig types.AnalysisConfigVariant) *Validate { - // Initialize the request if it is not already initialized +func (r *Validate) AnalysisConfig(analysisconfig *types.AnalysisConfig) *Validate { if r.req == nil { r.req = NewRequest() } - r.req.AnalysisConfig = analysisconfig.AnalysisConfigCaster() + r.req.AnalysisConfig = analysisconfig return r } // API name: analysis_limits -func (r *Validate) AnalysisLimits(analysislimits types.AnalysisLimitsVariant) *Validate { - // Initialize the request if it is not already initialized +func (r *Validate) AnalysisLimits(analysislimits *types.AnalysisLimits) *Validate { if r.req == nil { r.req = NewRequest() } - r.req.AnalysisLimits = analysislimits.AnalysisLimitsCaster() + r.req.AnalysisLimits = analysislimits return r } // API name: data_description -func (r *Validate) DataDescription(datadescription types.DataDescriptionVariant) *Validate { - // Initialize the request if it is not already initialized +func (r *Validate) DataDescription(datadescription *types.DataDescription) *Validate { if r.req == nil { r.req = NewRequest() } - r.req.DataDescription = datadescription.DataDescriptionCaster() + r.req.DataDescription = datadescription return r } // API name: description func (r *Validate) Description(description string) *Validate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -386,35 +382,30 @@ func (r *Validate) Description(description string) *Validate { // API name: job_id func (r *Validate) JobId(id string) *Validate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.JobId = &id return r } // API name: model_plot -func (r *Validate) ModelPlot(modelplot types.ModelPlotConfigVariant) *Validate { - // Initialize the request if it is not already initialized +func (r *Validate) ModelPlot(modelplot *types.ModelPlotConfig) *Validate { if r.req == nil { r.req = NewRequest() } - r.req.ModelPlot = modelplot.ModelPlotConfigCaster() + r.req.ModelPlot = modelplot return r } // API name: model_snapshot_id func (r *Validate) ModelSnapshotId(id string) *Validate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ModelSnapshotId = &id return r @@ -422,7 +413,6 @@ func (r *Validate) ModelSnapshotId(id string) *Validate { // API name: model_snapshot_retention_days func (r *Validate) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) *Validate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -434,11 +424,9 @@ func (r *Validate) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) // API name: results_index_name func (r *Validate) ResultsIndexName(indexname string) *Validate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ResultsIndexName = &indexname return r diff --git a/typedapi/ml/validatedetector/request.go b/typedapi/ml/validatedetector/request.go index 172090eb4b..cb491edb2b 100644 --- a/typedapi/ml/validatedetector/request.go +++ b/typedapi/ml/validatedetector/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package validatedetector @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L40 type Request = types.Detector // NewRequest returns a Request diff --git a/typedapi/ml/validatedetector/response.go b/typedapi/ml/validatedetector/response.go index 159e9d7af4..bd8112b7cc 100644 --- a/typedapi/ml/validatedetector/response.go +++ b/typedapi/ml/validatedetector/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package validatedetector // Response holds the response body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/ml/validatedetector/validate_detector.go b/typedapi/ml/validatedetector/validate_detector.go index cd06487bac..be25e5ca8b 100644 --- a/typedapi/ml/validatedetector/validate_detector.go +++ b/typedapi/ml/validatedetector/validate_detector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Validate an anomaly detection job. package validatedetector @@ -339,42 +339,35 @@ func (r *ValidateDetector) Pretty(pretty bool) *ValidateDetector { return r } -// The field used to split the data. In particular, this property is used for +// ByFieldName The field used to split the data. In particular, this property is used for // analyzing the splits with respect to their own history. It is used for // finding unusual values in the context of the split. // API name: by_field_name func (r *ValidateDetector) ByFieldName(field string) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ByFieldName = &field return r } -// Custom rules enable you to customize the way detectors operate. For example, +// CustomRules Custom rules enable you to customize the way detectors operate. For example, // a rule may dictate conditions under which results should be skipped. Kibana // refers to custom rules as job rules. // API name: custom_rules -func (r *ValidateDetector) CustomRules(customrules ...types.DetectionRuleVariant) *ValidateDetector { - // Initialize the request if it is not already initialized +func (r *ValidateDetector) CustomRules(customrules ...types.DetectionRule) *ValidateDetector { if r.req == nil { r.req = NewRequest() } - for _, v := range customrules { - - r.req.CustomRules = append(r.req.CustomRules, *v.DetectionRuleCaster()) + r.req.CustomRules = customrules - } return r } -// A description of the detector. +// DetectorDescription A description of the detector. // API name: detector_description func (r *ValidateDetector) DetectorDescription(detectordescription string) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -384,55 +377,50 @@ func (r *ValidateDetector) DetectorDescription(detectordescription string) *Vali return r } -// A unique identifier for the detector. This identifier is based on the order +// DetectorIndex A unique identifier for the detector. This identifier is based on the order // of the detectors in the `analysis_config`, starting at zero. If you specify a // value for this property, it is ignored. // API name: detector_index func (r *ValidateDetector) DetectorIndex(detectorindex int) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.DetectorIndex = &detectorindex return r } -// If set, frequent entities are excluded from influencing the anomaly results. +// ExcludeFrequent If set, frequent entities are excluded from influencing the anomaly results. // Entities can be considered frequent over time or frequent in a population. If // you are working with both over and by fields, you can set `exclude_frequent` // to `all` for both fields, or to `by` or `over` for those specific fields. // API name: exclude_frequent func (r *ValidateDetector) ExcludeFrequent(excludefrequent excludefrequent.ExcludeFrequent) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.ExcludeFrequent = &excludefrequent + return r } -// The field that the detector uses in the function. If you use an event rate +// FieldName The field that the detector uses in the function. If you use an event rate // function such as count or rare, do not specify this field. The `field_name` // cannot contain double quotes or backslashes. // API name: field_name func (r *ValidateDetector) FieldName(field string) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FieldName = &field return r } -// The analysis function that is used. For example, `count`, `rare`, `mean`, +// Function The analysis function that is used. For example, `count`, `rare`, `mean`, // `min`, `max`, or `sum`. // API name: function func (r *ValidateDetector) Function(function string) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -442,44 +430,38 @@ func (r *ValidateDetector) Function(function string) *ValidateDetector { return r } -// The field used to split the data. In particular, this property is used for +// OverFieldName The field used to split the data. In particular, this property is used for // analyzing the splits with respect to the history of all splits. It is used // for finding unusual values in the population of all splits. // API name: over_field_name func (r *ValidateDetector) OverFieldName(field string) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.OverFieldName = &field return r } -// The field used to segment the analysis. When you use this property, you have +// PartitionFieldName The field used to segment the analysis. When you use this property, you have // completely independent baselines for each value of this field. // API name: partition_field_name func (r *ValidateDetector) PartitionFieldName(field string) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.PartitionFieldName = &field return r } -// Defines whether a new series is used as the null series when there is no +// UseNull Defines whether a new series is used as the null series when there is no // value for the by or partition fields. // API name: use_null func (r *ValidateDetector) UseNull(usenull bool) *ValidateDetector { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.UseNull = &usenull return r diff --git a/typedapi/monitoring/bulk/bulk.go b/typedapi/monitoring/bulk/bulk.go index 354e5de32b..5ec893efcf 100644 --- a/typedapi/monitoring/bulk/bulk.go +++ b/typedapi/monitoring/bulk/bulk.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Send monitoring data. // This API is used by the monitoring features to send monitoring data. diff --git a/typedapi/monitoring/bulk/request.go b/typedapi/monitoring/bulk/request.go index f7f143798e..b62aa1af60 100644 --- a/typedapi/monitoring/bulk/request.go +++ b/typedapi/monitoring/bulk/request.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L73 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L73 type Request = []any diff --git a/typedapi/monitoring/bulk/response.go b/typedapi/monitoring/bulk/response.go index be769dbb60..a1075b1b87 100644 --- a/typedapi/monitoring/bulk/response.go +++ b/typedapi/monitoring/bulk/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulk @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/monitoring/bulk/BulkMonitoringResponse.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/monitoring/bulk/BulkMonitoringResponse.ts#L23-L32 type Response struct { Error *types.ErrorCause `json:"error,omitempty"` // Errors True if there is was an error diff --git a/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go b/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go index f90539518e..6c10c436eb 100644 --- a/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go +++ b/typedapi/nodes/clearrepositoriesmeteringarchive/clear_repositories_metering_archive.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the archived repositories metering. // Clear the archived repositories metering information in the cluster. diff --git a/typedapi/nodes/clearrepositoriesmeteringarchive/response.go b/typedapi/nodes/clearrepositoriesmeteringarchive/response.go index 222258fdbd..9bd12e3068 100644 --- a/typedapi/nodes/clearrepositoriesmeteringarchive/response.go +++ b/typedapi/nodes/clearrepositoriesmeteringarchive/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearrepositoriesmeteringarchive @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearrepositoriesmeteringarchive // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L37-L39 type Response struct { // ClusterName Name of the cluster. Based on the `cluster.name` setting. diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go b/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go index 5325f581b4..23b2d71d11 100644 --- a/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go +++ b/typedapi/nodes/getrepositoriesmeteringinfo/get_repositories_metering_info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cluster repositories metering. // Get repositories metering information for a cluster. @@ -303,8 +303,8 @@ func (r *GetRepositoriesMeteringInfo) Header(key, value string) *GetRepositories } // NodeId Comma-separated list of node IDs or names used to limit returned information. -// All the nodes selective options are explained -// [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes). +// For more information about the nodes selective options, refer to the node +// specification documentation. // API Name: nodeid func (r *GetRepositoriesMeteringInfo) _nodeid(nodeid string) *GetRepositoriesMeteringInfo { r.paramSet |= nodeidMask diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/response.go b/typedapi/nodes/getrepositoriesmeteringinfo/response.go index d4bf5892b9..75df9b6c33 100644 --- a/typedapi/nodes/getrepositoriesmeteringinfo/response.go +++ b/typedapi/nodes/getrepositoriesmeteringinfo/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrepositoriesmeteringinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrepositoriesmeteringinfo // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L38 type Response struct { // ClusterName Name of the cluster. Based on the `cluster.name` setting. diff --git a/typedapi/nodes/hotthreads/hot_threads.go b/typedapi/nodes/hotthreads/hot_threads.go index 543c957451..99458e824b 100644 --- a/typedapi/nodes/hotthreads/hot_threads.go +++ b/typedapi/nodes/hotthreads/hot_threads.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the hot threads for nodes. // Get a breakdown of the hot threads on each selected node in the cluster. diff --git a/typedapi/nodes/hotthreads/response.go b/typedapi/nodes/hotthreads/response.go index 507105df10..e2ace67a9f 100644 --- a/typedapi/nodes/hotthreads/response.go +++ b/typedapi/nodes/hotthreads/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package hotthreads // Response holds the response body struct for the package hotthreads // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/nodes/info/info.go b/typedapi/nodes/info/info.go index 1d80c9bc6e..5a17d10855 100644 --- a/typedapi/nodes/info/info.go +++ b/typedapi/nodes/info/info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get node information. // diff --git a/typedapi/nodes/info/response.go b/typedapi/nodes/info/response.go index 706d4caaf0..f6892168bd 100644 --- a/typedapi/nodes/info/response.go +++ b/typedapi/nodes/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/NodesInfoResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/NodesInfoResponse.ts#L30-L32 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go b/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go index 6d40f0d72b..4df43650f9 100644 --- a/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go +++ b/typedapi/nodes/reloadsecuresettings/reload_secure_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reload the keystore on nodes in the cluster. // @@ -406,14 +406,12 @@ func (r *ReloadSecureSettings) Pretty(pretty bool) *ReloadSecureSettings { return r } -// The password for the Elasticsearch keystore. +// SecureSettingsPassword The password for the Elasticsearch keystore. // API name: secure_settings_password func (r *ReloadSecureSettings) SecureSettingsPassword(password string) *ReloadSecureSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.SecureSettingsPassword = &password return r diff --git a/typedapi/nodes/reloadsecuresettings/request.go b/typedapi/nodes/reloadsecuresettings/request.go index 8117364353..347cbea663 100644 --- a/typedapi/nodes/reloadsecuresettings/request.go +++ b/typedapi/nodes/reloadsecuresettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reloadsecuresettings @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L70 type Request struct { // SecureSettingsPassword The password for the Elasticsearch keystore. diff --git a/typedapi/nodes/reloadsecuresettings/response.go b/typedapi/nodes/reloadsecuresettings/response.go index c4a1009948..a5779162ab 100644 --- a/typedapi/nodes/reloadsecuresettings/response.go +++ b/typedapi/nodes/reloadsecuresettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package reloadsecuresettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L32 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/stats/response.go b/typedapi/nodes/stats/response.go index 13e3636c3f..3b3e32d3d6 100644 --- a/typedapi/nodes/stats/response.go +++ b/typedapi/nodes/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/stats/NodesStatsResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/stats/NodesStatsResponse.ts#L30-L32 type Response struct { ClusterName *string `json:"cluster_name,omitempty"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/stats/stats.go b/typedapi/nodes/stats/stats.go index 686fd4aff7..fe1bac7491 100644 --- a/typedapi/nodes/stats/stats.go +++ b/typedapi/nodes/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get node statistics. // Get statistics for nodes in a cluster. diff --git a/typedapi/nodes/usage/response.go b/typedapi/nodes/usage/response.go index 311da2cfab..5c556e40b3 100644 --- a/typedapi/nodes/usage/response.go +++ b/typedapi/nodes/usage/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/usage/NodesUsageResponse.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/usage/NodesUsageResponse.ts#L30-L32 type Response struct { ClusterName string `json:"cluster_name"` // NodeStats Contains statistics about the number of nodes selected by the request’s node diff --git a/typedapi/nodes/usage/usage.go b/typedapi/nodes/usage/usage.go index 6dbaa12a6d..74c40d2afd 100644 --- a/typedapi/nodes/usage/usage.go +++ b/typedapi/nodes/usage/usage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get feature usage information. package usage diff --git a/typedapi/profiling/flamegraph/flamegraph.go b/typedapi/profiling/flamegraph/flamegraph.go index 7d429ac9f0..5ca6a76cc4 100644 --- a/typedapi/profiling/flamegraph/flamegraph.go +++ b/typedapi/profiling/flamegraph/flamegraph.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Extracts a UI-optimized structure to render flamegraphs from Universal // Profiling. diff --git a/typedapi/profiling/stacktraces/stacktraces.go b/typedapi/profiling/stacktraces/stacktraces.go index 567e911cb8..d7ef801f2f 100644 --- a/typedapi/profiling/stacktraces/stacktraces.go +++ b/typedapi/profiling/stacktraces/stacktraces.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Extracts raw stacktrace information from Universal Profiling. package stacktraces diff --git a/typedapi/profiling/status/status.go b/typedapi/profiling/status/status.go index 9dd93f304e..06dd759642 100644 --- a/typedapi/profiling/status/status.go +++ b/typedapi/profiling/status/status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Returns basic information about the status of Universal Profiling. package status diff --git a/typedapi/profiling/topnfunctions/topn_functions.go b/typedapi/profiling/topnfunctions/topn_functions.go index 6653c91494..fa82e7a900 100644 --- a/typedapi/profiling/topnfunctions/topn_functions.go +++ b/typedapi/profiling/topnfunctions/topn_functions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Extracts a list of topN functions from Universal Profiling. package topnfunctions diff --git a/typedapi/queryrules/deleterule/delete_rule.go b/typedapi/queryrules/deleterule/delete_rule.go index b8e25ba5db..662ecda7a1 100644 --- a/typedapi/queryrules/deleterule/delete_rule.go +++ b/typedapi/queryrules/deleterule/delete_rule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a query rule. // Delete a query rule within a query ruleset. diff --git a/typedapi/queryrules/deleterule/response.go b/typedapi/queryrules/deleterule/response.go index 9b97834390..7c2084a436 100644 --- a/typedapi/queryrules/deleterule/response.go +++ b/typedapi/queryrules/deleterule/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleterule // Response holds the response body struct for the package deleterule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/queryrules/deleteruleset/delete_ruleset.go b/typedapi/queryrules/deleteruleset/delete_ruleset.go index 459e33e024..d45f94894a 100644 --- a/typedapi/queryrules/deleteruleset/delete_ruleset.go +++ b/typedapi/queryrules/deleteruleset/delete_ruleset.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a query ruleset. // Remove a query ruleset and its associated data. diff --git a/typedapi/queryrules/deleteruleset/response.go b/typedapi/queryrules/deleteruleset/response.go index 048688fa2a..e18085136a 100644 --- a/typedapi/queryrules/deleteruleset/response.go +++ b/typedapi/queryrules/deleteruleset/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteruleset // Response holds the response body struct for the package deleteruleset // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/queryrules/getrule/get_rule.go b/typedapi/queryrules/getrule/get_rule.go index 0856219aff..299547a148 100644 --- a/typedapi/queryrules/getrule/get_rule.go +++ b/typedapi/queryrules/getrule/get_rule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a query rule. // Get details about a query rule within a query ruleset. diff --git a/typedapi/queryrules/getrule/response.go b/typedapi/queryrules/getrule/response.go index b1506dd3d2..5e16f4698f 100644 --- a/typedapi/queryrules/getrule/response.go +++ b/typedapi/queryrules/getrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L24 type Response struct { // Actions The actions to take when the rule is matched. diff --git a/typedapi/queryrules/getruleset/get_ruleset.go b/typedapi/queryrules/getruleset/get_ruleset.go index 29faea7372..69d01ea395 100644 --- a/typedapi/queryrules/getruleset/get_ruleset.go +++ b/typedapi/queryrules/getruleset/get_ruleset.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a query ruleset. // Get details about a query ruleset. diff --git a/typedapi/queryrules/getruleset/response.go b/typedapi/queryrules/getruleset/response.go index ec7f2465c8..b66e2144ed 100644 --- a/typedapi/queryrules/getruleset/response.go +++ b/typedapi/queryrules/getruleset/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getruleset // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L24 type Response struct { // Rules Rules associated with the query ruleset. diff --git a/typedapi/queryrules/listrulesets/list_rulesets.go b/typedapi/queryrules/listrulesets/list_rulesets.go index 1fa6f9c927..17f879a31a 100644 --- a/typedapi/queryrules/listrulesets/list_rulesets.go +++ b/typedapi/queryrules/listrulesets/list_rulesets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get all query rulesets. // Get summarized information about the query rulesets. diff --git a/typedapi/queryrules/listrulesets/response.go b/typedapi/queryrules/listrulesets/response.go index 7367e5c8fc..33cd3469d3 100644 --- a/typedapi/queryrules/listrulesets/response.go +++ b/typedapi/queryrules/listrulesets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package listrulesets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listrulesets // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.QueryRulesetListItem `json:"results"` diff --git a/typedapi/queryrules/putrule/put_rule.go b/typedapi/queryrules/putrule/put_rule.go index 55f68bfa24..90b8218876 100644 --- a/typedapi/queryrules/putrule/put_rule.go +++ b/typedapi/queryrules/putrule/put_rule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a query rule. // Create or update a query rule within a query ruleset. @@ -396,56 +396,49 @@ func (r *PutRule) Pretty(pretty bool) *PutRule { return r } -// The actions to take when the rule is matched. +// Actions The actions to take when the rule is matched. // The format of this action depends on the rule type. // API name: actions -func (r *PutRule) Actions(actions types.QueryRuleActionsVariant) *PutRule { - // Initialize the request if it is not already initialized +func (r *PutRule) Actions(actions *types.QueryRuleActions) *PutRule { if r.req == nil { r.req = NewRequest() } - r.req.Actions = *actions.QueryRuleActionsCaster() + r.req.Actions = *actions return r } -// The criteria that must be met for the rule to be applied. +// Criteria The criteria that must be met for the rule to be applied. // If multiple criteria are specified for a rule, all criteria must be met for // the rule to be applied. // API name: criteria -func (r *PutRule) Criteria(criteria ...types.QueryRuleCriteriaVariant) *PutRule { - // Initialize the request if it is not already initialized +func (r *PutRule) Criteria(criteria ...types.QueryRuleCriteria) *PutRule { if r.req == nil { r.req = NewRequest() } - r.req.Criteria = make([]types.QueryRuleCriteria, len(criteria)) - for i, v := range criteria { - r.req.Criteria[i] = *v.QueryRuleCriteriaCaster() - } + r.req.Criteria = criteria return r } // API name: priority func (r *PutRule) Priority(priority int) *PutRule { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Priority = &priority return r } -// The type of rule. +// Type The type of rule. // API name: type func (r *PutRule) Type(type_ queryruletype.QueryRuleType) *PutRule { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Type = type_ + return r } diff --git a/typedapi/queryrules/putrule/request.go b/typedapi/queryrules/putrule/request.go index a4e26b3218..eae27dc0fa 100644 --- a/typedapi/queryrules/putrule/request.go +++ b/typedapi/queryrules/putrule/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putrule @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L79 type Request struct { // Actions The actions to take when the rule is matched. diff --git a/typedapi/queryrules/putrule/response.go b/typedapi/queryrules/putrule/response.go index b8c481689a..e75cf73fc1 100644 --- a/typedapi/queryrules/putrule/response.go +++ b/typedapi/queryrules/putrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putrule @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/put_rule/QueryRulePutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/put_rule/QueryRulePutResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/queryrules/putruleset/put_ruleset.go b/typedapi/queryrules/putruleset/put_ruleset.go index b2c984c161..7bc7b632db 100644 --- a/typedapi/queryrules/putruleset/put_ruleset.go +++ b/typedapi/queryrules/putruleset/put_ruleset.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a query ruleset. // There is a limit of 100 rules per ruleset. @@ -376,15 +376,11 @@ func (r *PutRuleset) Pretty(pretty bool) *PutRuleset { } // API name: rules -func (r *PutRuleset) Rules(rules ...types.QueryRuleVariant) *PutRuleset { - // Initialize the request if it is not already initialized +func (r *PutRuleset) Rules(rules ...types.QueryRule) *PutRuleset { if r.req == nil { r.req = NewRequest() } - r.req.Rules = make([]types.QueryRule, len(rules)) - for i, v := range rules { - r.req.Rules[i] = *v.QueryRuleCaster() - } + r.req.Rules = rules return r } diff --git a/typedapi/queryrules/putruleset/request.go b/typedapi/queryrules/putruleset/request.go index a451dd32ba..a67aac63d3 100644 --- a/typedapi/queryrules/putruleset/request.go +++ b/typedapi/queryrules/putruleset/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putruleset @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L59 type Request struct { Rules []types.QueryRule `json:"rules"` } diff --git a/typedapi/queryrules/putruleset/response.go b/typedapi/queryrules/putruleset/response.go index 6021376a98..e85c42e7a9 100644 --- a/typedapi/queryrules/putruleset/response.go +++ b/typedapi/queryrules/putruleset/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/queryrules/test/request.go b/typedapi/queryrules/test/request.go index 2d818a9ff7..50b4a86630 100644 --- a/typedapi/queryrules/test/request.go +++ b/typedapi/queryrules/test/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package test @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package test // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/test/QueryRulesetTestRequest.ts#L24-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/test/QueryRulesetTestRequest.ts#L24-L57 type Request struct { // MatchCriteria The match criteria to apply to rules in the given query ruleset. diff --git a/typedapi/queryrules/test/response.go b/typedapi/queryrules/test/response.go index 45eb46b65c..8f755c6b0f 100644 --- a/typedapi/queryrules/test/response.go +++ b/typedapi/queryrules/test/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package test @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package test // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/test/QueryRulesetTestResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/test/QueryRulesetTestResponse.ts#L23-L28 type Response struct { MatchedRules []types.QueryRulesetMatchedRule `json:"matched_rules"` TotalMatchedRules int `json:"total_matched_rules"` diff --git a/typedapi/queryrules/test/test.go b/typedapi/queryrules/test/test.go index 88cd39686b..824824173a 100644 --- a/typedapi/queryrules/test/test.go +++ b/typedapi/queryrules/test/test.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Test a query ruleset. // Evaluate match criteria against a query ruleset to identify the rules that @@ -361,34 +361,16 @@ func (r *Test) Pretty(pretty bool) *Test { return r } -// The match criteria to apply to rules in the given query ruleset. +// MatchCriteria The match criteria to apply to rules in the given query ruleset. // Match criteria should match the keys defined in the `criteria.metadata` field // of the rule. // API name: match_criteria func (r *Test) MatchCriteria(matchcriteria map[string]json.RawMessage) *Test { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.MatchCriteria = matchcriteria - return r -} -func (r *Test) AddMatchCriterion(key string, value json.RawMessage) *Test { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.MatchCriteria == nil { - r.req.MatchCriteria = make(map[string]json.RawMessage) - } else { - tmp = r.req.MatchCriteria - } - - tmp[key] = value + r.req.MatchCriteria = matchcriteria - r.req.MatchCriteria = tmp return r } diff --git a/typedapi/rollup/deletejob/delete_job.go b/typedapi/rollup/deletejob/delete_job.go index d42249dc7f..b4fbb04869 100644 --- a/typedapi/rollup/deletejob/delete_job.go +++ b/typedapi/rollup/deletejob/delete_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a rollup job. // diff --git a/typedapi/rollup/deletejob/response.go b/typedapi/rollup/deletejob/response.go index 87ba12b508..46a0cbcf91 100644 --- a/typedapi/rollup/deletejob/response.go +++ b/typedapi/rollup/deletejob/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/delete_job/DeleteRollupJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/delete_job/DeleteRollupJobResponse.ts#L22-L27 type Response struct { Acknowledged bool `json:"acknowledged"` TaskFailures []types.TaskFailure `json:"task_failures,omitempty"` diff --git a/typedapi/rollup/getjobs/get_jobs.go b/typedapi/rollup/getjobs/get_jobs.go index cc3eb7ab53..a14f176b4b 100644 --- a/typedapi/rollup/getjobs/get_jobs.go +++ b/typedapi/rollup/getjobs/get_jobs.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get rollup job information. // Get the configuration, stats, and status of rollup jobs. diff --git a/typedapi/rollup/getjobs/response.go b/typedapi/rollup/getjobs/response.go index 9bc2ba2a7f..37249f55b0 100644 --- a/typedapi/rollup/getjobs/response.go +++ b/typedapi/rollup/getjobs/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_jobs/GetRollupJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_jobs/GetRollupJobResponse.ts#L22-L24 type Response struct { Jobs []types.RollupJob `json:"jobs"` } diff --git a/typedapi/rollup/getrollupcaps/get_rollup_caps.go b/typedapi/rollup/getrollupcaps/get_rollup_caps.go index 327e164670..9e15085d7d 100644 --- a/typedapi/rollup/getrollupcaps/get_rollup_caps.go +++ b/typedapi/rollup/getrollupcaps/get_rollup_caps.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the rollup job capabilities. // Get the capabilities of any rollup jobs that have been configured for a diff --git a/typedapi/rollup/getrollupcaps/response.go b/typedapi/rollup/getrollupcaps/response.go index b94f7150cc..3e692d4aae 100644 --- a/typedapi/rollup/getrollupcaps/response.go +++ b/typedapi/rollup/getrollupcaps/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrollupcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupcaps // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_caps/GetRollupCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_caps/GetRollupCapabilitiesResponse.ts#L24-L27 type Response map[string]types.RollupCapabilities diff --git a/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go b/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go index fdf82082b2..a6254f9b99 100644 --- a/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go +++ b/typedapi/rollup/getrollupindexcaps/get_rollup_index_caps.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the rollup index capabilities. // Get the rollup capabilities of all jobs inside of a rollup index. diff --git a/typedapi/rollup/getrollupindexcaps/response.go b/typedapi/rollup/getrollupindexcaps/response.go index 57b5fd88b3..13dcac3e32 100644 --- a/typedapi/rollup/getrollupindexcaps/response.go +++ b/typedapi/rollup/getrollupindexcaps/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrollupindexcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupindexcaps // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_index_caps/GetRollupIndexCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_index_caps/GetRollupIndexCapabilitiesResponse.ts#L24-L27 type Response map[string]types.IndexCapabilities diff --git a/typedapi/rollup/putjob/put_job.go b/typedapi/rollup/putjob/put_job.go index 6ce28bd90f..daa155159b 100644 --- a/typedapi/rollup/putjob/put_job.go +++ b/typedapi/rollup/putjob/put_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a rollup job. // @@ -397,7 +397,7 @@ func (r *PutJob) Pretty(pretty bool) *PutJob { return r } -// A cron string which defines the intervals when the rollup job should be +// Cron A cron string which defines the intervals when the rollup job should be // executed. When the interval // triggers, the indexer attempts to rollup the data in the index pattern. The // cron pattern is unrelated @@ -408,7 +408,6 @@ func (r *PutJob) Pretty(pretty bool) *PutJob { // cron pattern is defined just like a Watcher cron schedule. // API name: cron func (r *PutJob) Cron(cron string) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -418,7 +417,7 @@ func (r *PutJob) Cron(cron string) *PutJob { return r } -// Defines the grouping fields and aggregations that are defined for this rollup +// Groups Defines the grouping fields and aggregations that are defined for this rollup // job. These fields will then be // available later for aggregating into buckets. These aggs and fields can be // used in any combination. Think of @@ -429,35 +428,31 @@ func (r *PutJob) Cron(cron string) *PutJob { // enough flexibility that you simply need to determine which fields are needed, // not in what order they are needed. // API name: groups -func (r *PutJob) Groups(groups types.GroupingsVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) Groups(groups *types.Groupings) *PutJob { if r.req == nil { r.req = NewRequest() } - r.req.Groups = *groups.GroupingsCaster() + r.req.Groups = *groups return r } // API name: headers -func (r *PutJob) Headers(httpheaders types.HttpHeadersVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) Headers(httpheaders types.HttpHeaders) *PutJob { if r.req == nil { r.req = NewRequest() } - - r.req.Headers = *httpheaders.HttpHeadersCaster() + r.req.Headers = httpheaders return r } -// The index or index pattern to roll up. Supports wildcard-style patterns +// IndexPattern The index or index pattern to roll up. Supports wildcard-style patterns // (`logstash-*`). The job attempts to // rollup the entire index or index-pattern. // API name: index_pattern func (r *PutJob) IndexPattern(indexpattern string) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -467,27 +462,23 @@ func (r *PutJob) IndexPattern(indexpattern string) *PutJob { return r } -// Defines the metrics to collect for each grouping tuple. By default, only the +// Metrics Defines the metrics to collect for each grouping tuple. By default, only the // doc_counts are collected for each // group. To make rollup useful, you will often add metrics like averages, mins, // maxes, etc. Metrics are defined // on a per-field basis and for each field you configure which metric should be // collected. // API name: metrics -func (r *PutJob) Metrics(metrics ...types.FieldMetricVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) Metrics(metrics ...types.FieldMetric) *PutJob { if r.req == nil { r.req = NewRequest() } - for _, v := range metrics { - - r.req.Metrics = append(r.req.Metrics, *v.FieldMetricCaster()) + r.req.Metrics = metrics - } return r } -// The number of bucket results that are processed on each iteration of the +// PageSize The number of bucket results that are processed on each iteration of the // rollup indexer. A larger value tends // to execute faster, but requires more memory during processing. This value has // no effect on how the data is @@ -495,40 +486,34 @@ func (r *PutJob) Metrics(metrics ...types.FieldMetricVariant) *PutJob { // indexer. // API name: page_size func (r *PutJob) PageSize(pagesize int) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.PageSize = pagesize return r } -// The index that contains the rollup results. The index can be shared with +// RollupIndex The index that contains the rollup results. The index can be shared with // other rollup jobs. The data is stored so that it doesn’t interfere with // unrelated jobs. // API name: rollup_index func (r *PutJob) RollupIndex(indexname string) *PutJob { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RollupIndex = indexname return r } -// Time to wait for the request to complete. +// Timeout Time to wait for the request to complete. // API name: timeout -func (r *PutJob) Timeout(duration types.DurationVariant) *PutJob { - // Initialize the request if it is not already initialized +func (r *PutJob) Timeout(duration types.Duration) *PutJob { if r.req == nil { r.req = NewRequest() } - - r.req.Timeout = *duration.DurationCaster() + r.req.Timeout = duration return r } diff --git a/typedapi/rollup/putjob/request.go b/typedapi/rollup/putjob/request.go index 49997d4a74..a6374704a6 100644 --- a/typedapi/rollup/putjob/request.go +++ b/typedapi/rollup/putjob/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L105 type Request struct { // Cron A cron string which defines the intervals when the rollup job should be diff --git a/typedapi/rollup/putjob/response.go b/typedapi/rollup/putjob/response.go index ad65152bd5..96c5619b79 100644 --- a/typedapi/rollup/putjob/response.go +++ b/typedapi/rollup/putjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putjob // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/rollup/rollupsearch/request.go b/typedapi/rollup/rollupsearch/request.go index c3c00e148b..52bac2472a 100644 --- a/typedapi/rollup/rollupsearch/request.go +++ b/typedapi/rollup/rollupsearch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rollupsearch @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L109 type Request struct { // Aggregations Specifies aggregations. diff --git a/typedapi/rollup/rollupsearch/response.go b/typedapi/rollup/rollupsearch/response.go index c28eb57218..8fbf43782a 100644 --- a/typedapi/rollup/rollupsearch/response.go +++ b/typedapi/rollup/rollupsearch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package rollupsearch @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Hits types.HitsMetadata `json:"hits"` diff --git a/typedapi/rollup/rollupsearch/rollup_search.go b/typedapi/rollup/rollupsearch/rollup_search.go index 02a133fc90..82c64cce20 100644 --- a/typedapi/rollup/rollupsearch/rollup_search.go +++ b/typedapi/rollup/rollupsearch/rollup_search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Search rolled-up data. // The rollup search endpoint is needed because, internally, rolled-up documents @@ -477,57 +477,36 @@ func (r *RollupSearch) Pretty(pretty bool) *RollupSearch { return r } -// Specifies aggregations. +// Aggregations Specifies aggregations. // API name: aggregations func (r *RollupSearch) Aggregations(aggregations map[string]types.Aggregations) *RollupSearch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aggregations = aggregations - return r -} - -func (r *RollupSearch) AddAggregation(key string, value types.AggregationsVariant) *RollupSearch { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.Aggregations - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.Aggregations) - } else { - tmp = r.req.Aggregations - } - tmp[key] = *value.AggregationsCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } -// Specifies a DSL query that is subject to some limitations. +// Query Specifies a DSL query that is subject to some limitations. // API name: query -func (r *RollupSearch) Query(query types.QueryVariant) *RollupSearch { - // Initialize the request if it is not already initialized +func (r *RollupSearch) Query(query *types.Query) *RollupSearch { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// Must be zero if set, as rollups work on pre-aggregated data. +// Size Must be zero if set, as rollups work on pre-aggregated data. // API name: size func (r *RollupSearch) Size(size int) *RollupSearch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r diff --git a/typedapi/rollup/startjob/response.go b/typedapi/rollup/startjob/response.go index e13c0b0ff5..36e65b9dcb 100644 --- a/typedapi/rollup/startjob/response.go +++ b/typedapi/rollup/startjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package startjob // Response holds the response body struct for the package startjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/start_job/StartRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/start_job/StartRollupJobResponse.ts#L20-L22 type Response struct { Started bool `json:"started"` } diff --git a/typedapi/rollup/startjob/start_job.go b/typedapi/rollup/startjob/start_job.go index a7d0275dfc..9356c08b25 100644 --- a/typedapi/rollup/startjob/start_job.go +++ b/typedapi/rollup/startjob/start_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start rollup jobs. // If you try to start a job that does not exist, an exception occurs. diff --git a/typedapi/rollup/stopjob/response.go b/typedapi/rollup/stopjob/response.go index 739a43dd9b..4e9dc282bc 100644 --- a/typedapi/rollup/stopjob/response.go +++ b/typedapi/rollup/stopjob/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stopjob // Response holds the response body struct for the package stopjob // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/stop_job/StopRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/stop_job/StopRollupJobResponse.ts#L20-L22 type Response struct { Stopped bool `json:"stopped"` } diff --git a/typedapi/rollup/stopjob/stop_job.go b/typedapi/rollup/stopjob/stop_job.go index f5f1a948bc..5e7ba97d9c 100644 --- a/typedapi/rollup/stopjob/stop_job.go +++ b/typedapi/rollup/stopjob/stop_job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop rollup jobs. // If you try to stop a job that does not exist, an exception occurs. diff --git a/typedapi/searchablesnapshots/cachestats/cache_stats.go b/typedapi/searchablesnapshots/cachestats/cache_stats.go index b7a0d1836f..d4dd9db1e3 100644 --- a/typedapi/searchablesnapshots/cachestats/cache_stats.go +++ b/typedapi/searchablesnapshots/cachestats/cache_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get cache statistics. // Get statistics about the shared cache for partially mounted indices. diff --git a/typedapi/searchablesnapshots/cachestats/response.go b/typedapi/searchablesnapshots/cachestats/response.go index b087c9c04a..9c9fcfe9f6 100644 --- a/typedapi/searchablesnapshots/cachestats/response.go +++ b/typedapi/searchablesnapshots/cachestats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package cachestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cachestats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/cache_stats/Response.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/cache_stats/Response.ts#L24-L28 type Response struct { Nodes map[string]types.Node `json:"nodes"` } diff --git a/typedapi/searchablesnapshots/clearcache/clear_cache.go b/typedapi/searchablesnapshots/clearcache/clear_cache.go index 7bf01e73ac..3c4c1ebf56 100644 --- a/typedapi/searchablesnapshots/clearcache/clear_cache.go +++ b/typedapi/searchablesnapshots/clearcache/clear_cache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the cache. // Clear indices and data streams from the shared cache for partially mounted diff --git a/typedapi/searchablesnapshots/clearcache/response.go b/typedapi/searchablesnapshots/clearcache/response.go index 69c03cde5b..e7fc0c190a 100644 --- a/typedapi/searchablesnapshots/clearcache/response.go +++ b/typedapi/searchablesnapshots/clearcache/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/searchablesnapshots/mount/mount.go b/typedapi/searchablesnapshots/mount/mount.go index b92eb2b3da..9499f3cb27 100644 --- a/typedapi/searchablesnapshots/mount/mount.go +++ b/typedapi/searchablesnapshots/mount/mount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Mount a snapshot. // Mount a snapshot as a searchable snapshot index. @@ -412,75 +412,49 @@ func (r *Mount) Pretty(pretty bool) *Mount { return r } -// The names of settings that should be removed from the index when it is +// IgnoreIndexSettings The names of settings that should be removed from the index when it is // mounted. // API name: ignore_index_settings func (r *Mount) IgnoreIndexSettings(ignoreindexsettings ...string) *Mount { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range ignoreindexsettings { + r.req.IgnoreIndexSettings = ignoreindexsettings - r.req.IgnoreIndexSettings = append(r.req.IgnoreIndexSettings, v) - - } return r } -// The name of the index contained in the snapshot whose data is to be mounted. +// Index The name of the index contained in the snapshot whose data is to be mounted. // If no `renamed_index` is specified, this name will also be used to create the // new index. // API name: index func (r *Mount) Index(indexname string) *Mount { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Index = indexname return r } -// The settings that should be added to the index when it is mounted. +// IndexSettings The settings that should be added to the index when it is mounted. // API name: index_settings func (r *Mount) IndexSettings(indexsettings map[string]json.RawMessage) *Mount { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexSettings = indexsettings - return r -} -func (r *Mount) AddIndexSetting(key string, value json.RawMessage) *Mount { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.IndexSettings == nil { - r.req.IndexSettings = make(map[string]json.RawMessage) - } else { - tmp = r.req.IndexSettings - } - - tmp[key] = value + r.req.IndexSettings = indexsettings - r.req.IndexSettings = tmp return r } -// The name of the index that will be created. +// RenamedIndex The name of the index that will be created. // API name: renamed_index func (r *Mount) RenamedIndex(indexname string) *Mount { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RenamedIndex = &indexname return r diff --git a/typedapi/searchablesnapshots/mount/request.go b/typedapi/searchablesnapshots/mount/request.go index 20cfebf703..e5cedbdbe1 100644 --- a/typedapi/searchablesnapshots/mount/request.go +++ b/typedapi/searchablesnapshots/mount/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mount @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L92 type Request struct { // IgnoreIndexSettings The names of settings that should be removed from the index when it is diff --git a/typedapi/searchablesnapshots/mount/response.go b/typedapi/searchablesnapshots/mount/response.go index 6d1df32c5d..4207474273 100644 --- a/typedapi/searchablesnapshots/mount/response.go +++ b/typedapi/searchablesnapshots/mount/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package mount @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26 type Response struct { Snapshot types.MountedSnapshot `json:"snapshot"` } diff --git a/typedapi/searchablesnapshots/stats/response.go b/typedapi/searchablesnapshots/stats/response.go index 4f9e816e31..cc3d7d246b 100644 --- a/typedapi/searchablesnapshots/stats/response.go +++ b/typedapi/searchablesnapshots/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27 type Response struct { Stats json.RawMessage `json:"stats,omitempty"` Total json.RawMessage `json:"total,omitempty"` diff --git a/typedapi/searchablesnapshots/stats/stats.go b/typedapi/searchablesnapshots/stats/stats.go index 1cf91e66a4..8dd6a96163 100644 --- a/typedapi/searchablesnapshots/stats/stats.go +++ b/typedapi/searchablesnapshots/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get searchable snapshot statistics. package stats diff --git a/typedapi/searchapplication/delete/delete.go b/typedapi/searchapplication/delete/delete.go index 723766a0c9..838f671b9c 100644 --- a/typedapi/searchapplication/delete/delete.go +++ b/typedapi/searchapplication/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a search application. // diff --git a/typedapi/searchapplication/delete/response.go b/typedapi/searchapplication/delete/response.go index eb6e2c22be..5c7911a11a 100644 --- a/typedapi/searchapplication/delete/response.go +++ b/typedapi/searchapplication/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go b/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go index 6c9744cf60..8988bb0339 100644 --- a/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go +++ b/typedapi/searchapplication/deletebehavioralanalytics/delete_behavioral_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a behavioral analytics collection. // The associated data stream is also deleted. diff --git a/typedapi/searchapplication/deletebehavioralanalytics/response.go b/typedapi/searchapplication/deletebehavioralanalytics/response.go index 05ea1f327d..e793022a98 100644 --- a/typedapi/searchapplication/deletebehavioralanalytics/response.go +++ b/typedapi/searchapplication/deletebehavioralanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletebehavioralanalytics // Response holds the response body struct for the package deletebehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/searchapplication/get/get.go b/typedapi/searchapplication/get/get.go index 12c0359aff..849e330707 100644 --- a/typedapi/searchapplication/get/get.go +++ b/typedapi/searchapplication/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get search application details. package get diff --git a/typedapi/searchapplication/get/response.go b/typedapi/searchapplication/get/response.go index ec0f9ba954..0ca6b3da7d 100644 --- a/typedapi/searchapplication/get/response.go +++ b/typedapi/searchapplication/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L24 type Response struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. diff --git a/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go b/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go index 417e39fdb9..11fbeee25c 100644 --- a/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go +++ b/typedapi/searchapplication/getbehavioralanalytics/get_behavioral_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get behavioral analytics collections. package getbehavioralanalytics diff --git a/typedapi/searchapplication/getbehavioralanalytics/response.go b/typedapi/searchapplication/getbehavioralanalytics/response.go index a457076f38..319be6d1d3 100644 --- a/typedapi/searchapplication/getbehavioralanalytics/response.go +++ b/typedapi/searchapplication/getbehavioralanalytics/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getbehavioralanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponse.ts#L24-L27 type Response map[string]types.AnalyticsCollection diff --git a/typedapi/searchapplication/list/list.go b/typedapi/searchapplication/list/list.go index f304903298..a94a74ae3d 100644 --- a/typedapi/searchapplication/list/list.go +++ b/typedapi/searchapplication/list/list.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get search applications. // Get information about search applications. diff --git a/typedapi/searchapplication/list/response.go b/typedapi/searchapplication/list/response.go index cac0a3c265..73fb7dff63 100644 --- a/typedapi/searchapplication/list/response.go +++ b/typedapi/searchapplication/list/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/list/SearchApplicationsListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/list/SearchApplicationsListResponse.ts#L23-L28 type Response struct { Count int64 `json:"count"` Results []types.SearchApplication `json:"results"` diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go b/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go index 27c19039bd..b635e7deb0 100644 --- a/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go +++ b/typedapi/searchapplication/postbehavioralanalyticsevent/post_behavioral_analytics_event.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a behavioral analytics collection event. package postbehavioralanalyticsevent @@ -30,6 +30,7 @@ import ( "io" "net/http" "net/url" + "slices" "strconv" "strings" @@ -286,7 +287,8 @@ func (r PostBehavioralAnalyticsEvent) Do(providedCtx context.Context) (*Response } defer res.Body.Close() - if res.StatusCode < 299 { + if res.StatusCode < 299 || slices.Contains([]int{202, 400, 404}, res.StatusCode) { + err = json.NewDecoder(res.Body).Decode(response) if err != nil { if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { @@ -298,42 +300,6 @@ func (r PostBehavioralAnalyticsEvent) Do(providedCtx context.Context) (*Response return response, nil } - if res.StatusCode == 404 { - data, err := io.ReadAll(res.Body) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - errorResponse := types.NewElasticsearchError() - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&errorResponse) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - if errorResponse.Status == 0 { - err = json.NewDecoder(gobytes.NewReader(data)).Decode(&response) - if err != nil { - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, err) - } - return nil, err - } - - return response, nil - } - - if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { - instrument.RecordError(ctx, errorResponse) - } - return nil, errorResponse - } - errorResponse := types.NewElasticsearchError() err = json.NewDecoder(res.Body).Decode(errorResponse) if err != nil { diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/request.go b/typedapi/searchapplication/postbehavioralanalyticsevent/request.go index 82abf12f41..a9dac7ffe6 100644 --- a/typedapi/searchapplication/postbehavioralanalyticsevent/request.go +++ b/typedapi/searchapplication/postbehavioralanalyticsevent/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postbehavioralanalyticsevent @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postbehavioralanalyticsevent // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequest.ts#L24-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequest.ts#L24-L57 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/response.go b/typedapi/searchapplication/postbehavioralanalyticsevent/response.go index 492cb4b1cf..4bbedcf8b6 100644 --- a/typedapi/searchapplication/postbehavioralanalyticsevent/response.go +++ b/typedapi/searchapplication/postbehavioralanalyticsevent/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package postbehavioralanalyticsevent @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postbehavioralanalyticsevent // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostResponse.ts#L22-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostResponse.ts#L22-L47 type Response struct { Accepted bool `json:"accepted"` Event json.RawMessage `json:"event,omitempty"` diff --git a/typedapi/searchapplication/put/put.go b/typedapi/searchapplication/put/put.go index ee7fa42dd2..34c5bf01f6 100644 --- a/typedapi/searchapplication/put/put.go +++ b/typedapi/searchapplication/put/put.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a search application. package put @@ -366,43 +366,36 @@ func (r *Put) Pretty(pretty bool) *Put { return r } -// Analytics collection associated to the Search Application. +// AnalyticsCollectionName Analytics collection associated to the Search Application. // API name: analytics_collection_name func (r *Put) AnalyticsCollectionName(name string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AnalyticsCollectionName = &name return r } -// Indices that are part of the Search Application. +// Indices Indices that are part of the Search Application. // API name: indices func (r *Put) Indices(indices ...string) *Put { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range indices { - - r.req.Indices = append(r.req.Indices, v) + r.req.Indices = indices - } return r } -// Search template to use on search operations. +// Template Search template to use on search operations. // API name: template -func (r *Put) Template(template types.SearchApplicationTemplateVariant) *Put { - // Initialize the request if it is not already initialized +func (r *Put) Template(template *types.SearchApplicationTemplate) *Put { if r.req == nil { r.req = NewRequest() } - r.req.Template = template.SearchApplicationTemplateCaster() + r.req.Template = template return r } diff --git a/typedapi/searchapplication/put/request.go b/typedapi/searchapplication/put/request.go index 1b975aca3a..28024ba9d6 100644 --- a/typedapi/searchapplication/put/request.go +++ b/typedapi/searchapplication/put/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L57 type Request = types.SearchApplicationParameters // NewRequest returns a Request diff --git a/typedapi/searchapplication/put/response.go b/typedapi/searchapplication/put/response.go index 07d8292f1f..af98cb8ccf 100644 --- a/typedapi/searchapplication/put/response.go +++ b/typedapi/searchapplication/put/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/put/SearchApplicationsPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/put/SearchApplicationsPutResponse.ts#L22-L26 type Response struct { Result result.Result `json:"result"` } diff --git a/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go b/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go index fd22c7b53f..9bef7090b0 100644 --- a/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go +++ b/typedapi/searchapplication/putbehavioralanalytics/put_behavioral_analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a behavioral analytics collection. package putbehavioralanalytics diff --git a/typedapi/searchapplication/putbehavioralanalytics/response.go b/typedapi/searchapplication/putbehavioralanalytics/response.go index 47c8187ced..8c8c09e374 100644 --- a/typedapi/searchapplication/putbehavioralanalytics/response.go +++ b/typedapi/searchapplication/putbehavioralanalytics/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putbehavioralanalytics // Response holds the response body struct for the package putbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L25 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/searchapplication/renderquery/render_query.go b/typedapi/searchapplication/renderquery/render_query.go index 401bf6ad1f..1ca188bc4c 100644 --- a/typedapi/searchapplication/renderquery/render_query.go +++ b/typedapi/searchapplication/renderquery/render_query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Render a search application query. // Generate an Elasticsearch query using the specified query parameters and the @@ -381,29 +381,11 @@ func (r *RenderQuery) Pretty(pretty bool) *RenderQuery { // API name: params func (r *RenderQuery) Params(params map[string]json.RawMessage) *RenderQuery { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Params = params - return r -} -func (r *RenderQuery) AddParam(key string, value json.RawMessage) *RenderQuery { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Params == nil { - r.req.Params = make(map[string]json.RawMessage) - } else { - tmp = r.req.Params - } - - tmp[key] = value + r.req.Params = params - r.req.Params = tmp return r } diff --git a/typedapi/searchapplication/renderquery/request.go b/typedapi/searchapplication/renderquery/request.go index 212b4b3f7b..cd8ead26ca 100644 --- a/typedapi/searchapplication/renderquery/request.go +++ b/typedapi/searchapplication/renderquery/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package renderquery @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package renderquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/render_query/SearchApplicationsRenderQueryRequest.ts#L24-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/render_query/SearchApplicationsRenderQueryRequest.ts#L24-L54 type Request struct { Params map[string]json.RawMessage `json:"params,omitempty"` } diff --git a/typedapi/searchapplication/renderquery/response.go b/typedapi/searchapplication/renderquery/response.go index 6cf9e25876..e14bc43af3 100644 --- a/typedapi/searchapplication/renderquery/response.go +++ b/typedapi/searchapplication/renderquery/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package renderquery // Response holds the response body struct for the package renderquery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/render_query/SearchApplicationsRenderQueryResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/render_query/SearchApplicationsRenderQueryResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/searchapplication/search/request.go b/typedapi/searchapplication/search/request.go index 70678ef62b..4fe620bc5b 100644 --- a/typedapi/searchapplication/search/request.go +++ b/typedapi/searchapplication/search/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L61 type Request struct { // Params Query parameters specific to this request, which will override any defaults diff --git a/typedapi/searchapplication/search/response.go b/typedapi/searchapplication/search/response.go index 80b82c23a0..610fb07020 100644 --- a/typedapi/searchapplication/search/response.go +++ b/typedapi/searchapplication/search/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L24 type Response struct { Aggregations map[string]types.Aggregate `json:"aggregations,omitempty"` Clusters_ *types.ClusterStatistics `json:"_clusters,omitempty"` diff --git a/typedapi/searchapplication/search/search.go b/typedapi/searchapplication/search/search.go index 7e1242db97..87835e732f 100644 --- a/typedapi/searchapplication/search/search.go +++ b/typedapi/searchapplication/search/search.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a search application search. // Generate and run an Elasticsearch query that uses the specified query @@ -380,33 +380,15 @@ func (r *Search) Pretty(pretty bool) *Search { return r } -// Query parameters specific to this request, which will override any defaults +// Params Query parameters specific to this request, which will override any defaults // specified in the template. // API name: params func (r *Search) Params(params map[string]json.RawMessage) *Search { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Params = params - return r -} -func (r *Search) AddParam(key string, value json.RawMessage) *Search { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Params == nil { - r.req.Params = make(map[string]json.RawMessage) - } else { - tmp = r.req.Params - } - - tmp[key] = value + r.req.Params = params - r.req.Params = tmp return r } diff --git a/typedapi/security/activateuserprofile/activate_user_profile.go b/typedapi/security/activateuserprofile/activate_user_profile.go index 873bc966a7..83708d6ca6 100644 --- a/typedapi/security/activateuserprofile/activate_user_profile.go +++ b/typedapi/security/activateuserprofile/activate_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Activate a user profile. // @@ -383,14 +383,13 @@ func (r *ActivateUserProfile) Pretty(pretty bool) *ActivateUserProfile { return r } -// The user's Elasticsearch access token or JWT. +// AccessToken The user's Elasticsearch access token or JWT. // Both `access` and `id` JWT token types are supported and they depend on the // underlying JWT realm configuration. // If you specify the `access_token` grant type, this parameter is required. // It is not valid with other grant types. // API name: access_token func (r *ActivateUserProfile) AccessToken(accesstoken string) *ActivateUserProfile { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -400,23 +399,22 @@ func (r *ActivateUserProfile) AccessToken(accesstoken string) *ActivateUserProfi return r } -// The type of grant. +// GrantType The type of grant. // API name: grant_type func (r *ActivateUserProfile) GrantType(granttype granttype.GrantType) *ActivateUserProfile { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.GrantType = granttype + return r } -// The user's password. +// Password The user's password. // If you specify the `password` grant type, this parameter is required. // It is not valid with other grant types. // API name: password func (r *ActivateUserProfile) Password(password string) *ActivateUserProfile { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -426,12 +424,11 @@ func (r *ActivateUserProfile) Password(password string) *ActivateUserProfile { return r } -// The username that identifies the user. +// Username The username that identifies the user. // If you specify the `password` grant type, this parameter is required. // It is not valid with other grant types. // API name: username func (r *ActivateUserProfile) Username(username string) *ActivateUserProfile { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/activateuserprofile/request.go b/typedapi/security/activateuserprofile/request.go index 8bfc3765d6..ea79bef8e3 100644 --- a/typedapi/security/activateuserprofile/request.go +++ b/typedapi/security/activateuserprofile/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package activateuserprofile @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/activate_user_profile/Request.ts#L23-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/activate_user_profile/Request.ts#L23-L76 type Request struct { // AccessToken The user's Elasticsearch access token or JWT. diff --git a/typedapi/security/activateuserprofile/response.go b/typedapi/security/activateuserprofile/response.go index 4418c2099d..dcb65d651e 100644 --- a/typedapi/security/activateuserprofile/response.go +++ b/typedapi/security/activateuserprofile/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package activateuserprofile @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/activate_user_profile/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/activate_user_profile/Response.ts#L22-L24 type Response struct { Data map[string]json.RawMessage `json:"data"` Doc_ types.UserProfileHitMetadata `json:"_doc"` diff --git a/typedapi/security/authenticate/authenticate.go b/typedapi/security/authenticate/authenticate.go index 3be63e67ee..0e918dac71 100644 --- a/typedapi/security/authenticate/authenticate.go +++ b/typedapi/security/authenticate/authenticate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Authenticate a user. // diff --git a/typedapi/security/authenticate/response.go b/typedapi/security/authenticate/response.go index 3ea215f37d..4861d95635 100644 --- a/typedapi/security/authenticate/response.go +++ b/typedapi/security/authenticate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package authenticate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package authenticate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/authenticate/SecurityAuthenticateResponse.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/authenticate/SecurityAuthenticateResponse.ts#L24-L42 type Response struct { ApiKey *types.AuthenticateApiKey `json:"api_key,omitempty"` AuthenticationRealm types.RealmInfo `json:"authentication_realm"` diff --git a/typedapi/security/bulkdeleterole/bulk_delete_role.go b/typedapi/security/bulkdeleterole/bulk_delete_role.go index 5890f9c6ee..e99e591803 100644 --- a/typedapi/security/bulkdeleterole/bulk_delete_role.go +++ b/typedapi/security/bulkdeleterole/bulk_delete_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Bulk delete roles. // @@ -355,17 +355,13 @@ func (r *BulkDeleteRole) Pretty(pretty bool) *BulkDeleteRole { return r } -// An array of role names to delete +// Names An array of role names to delete // API name: names func (r *BulkDeleteRole) Names(names ...string) *BulkDeleteRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range names { + r.req.Names = names - r.req.Names = append(r.req.Names, v) - - } return r } diff --git a/typedapi/security/bulkdeleterole/request.go b/typedapi/security/bulkdeleterole/request.go index a798c3727a..c601dc54f9 100644 --- a/typedapi/security/bulkdeleterole/request.go +++ b/typedapi/security/bulkdeleterole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulkdeleterole @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L50 type Request struct { // Names An array of role names to delete diff --git a/typedapi/security/bulkdeleterole/response.go b/typedapi/security/bulkdeleterole/response.go index 9954ed6e76..288372a02f 100644 --- a/typedapi/security/bulkdeleterole/response.go +++ b/typedapi/security/bulkdeleterole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulkdeleterole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37 type Response struct { // Deleted Array of deleted roles diff --git a/typedapi/security/bulkputrole/bulk_put_role.go b/typedapi/security/bulkputrole/bulk_put_role.go index d0053b2f6d..ee0db05b8a 100644 --- a/typedapi/security/bulkputrole/bulk_put_role.go +++ b/typedapi/security/bulkputrole/bulk_put_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Bulk create or update roles. // @@ -355,32 +355,14 @@ func (r *BulkPutRole) Pretty(pretty bool) *BulkPutRole { return r } -// A dictionary of role name to RoleDescriptor objects to add or update +// Roles A dictionary of role name to RoleDescriptor objects to add or update // API name: roles func (r *BulkPutRole) Roles(roles map[string]types.RoleDescriptor) *BulkPutRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Roles = roles - return r -} -func (r *BulkPutRole) AddRole(key string, value types.RoleDescriptorVariant) *BulkPutRole { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.RoleDescriptor - if r.req.Roles == nil { - r.req.Roles = make(map[string]types.RoleDescriptor) - } else { - tmp = r.req.Roles - } - - tmp[key] = *value.RoleDescriptorCaster() + r.req.Roles = roles - r.req.Roles = tmp return r } diff --git a/typedapi/security/bulkputrole/request.go b/typedapi/security/bulkputrole/request.go index 862a3b8b37..5cb0b818ce 100644 --- a/typedapi/security/bulkputrole/request.go +++ b/typedapi/security/bulkputrole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulkputrole @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L52 type Request struct { // Roles A dictionary of role name to RoleDescriptor objects to add or update diff --git a/typedapi/security/bulkputrole/response.go b/typedapi/security/bulkputrole/response.go index 573f6ce5e4..db67b68d60 100644 --- a/typedapi/security/bulkputrole/response.go +++ b/typedapi/security/bulkputrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulkputrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/bulk_put_role/SecurityBulkPutRoleResponse.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/bulk_put_role/SecurityBulkPutRoleResponse.ts#L22-L41 type Response struct { // Created Array of created roles diff --git a/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go b/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go index 8f863b8686..3f650c8589 100644 --- a/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go +++ b/typedapi/security/bulkupdateapikeys/bulk_update_api_keys.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Bulk update API keys. // Update the attributes for multiple API keys. @@ -390,52 +390,46 @@ func (r *BulkUpdateApiKeys) Pretty(pretty bool) *BulkUpdateApiKeys { return r } -// Expiration time for the API keys. +// Expiration Expiration time for the API keys. // By default, API keys never expire. // This property can be omitted to leave the value unchanged. // API name: expiration -func (r *BulkUpdateApiKeys) Expiration(duration types.DurationVariant) *BulkUpdateApiKeys { - // Initialize the request if it is not already initialized +func (r *BulkUpdateApiKeys) Expiration(duration types.Duration) *BulkUpdateApiKeys { if r.req == nil { r.req = NewRequest() } - - r.req.Expiration = *duration.DurationCaster() + r.req.Expiration = duration return r } -// The API key identifiers. +// Ids The API key identifiers. // API name: ids func (r *BulkUpdateApiKeys) Ids(ids ...string) *BulkUpdateApiKeys { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Ids = make([]string, len(ids)) r.req.Ids = ids return r } -// Arbitrary nested metadata to associate with the API keys. +// Metadata Arbitrary nested metadata to associate with the API keys. // Within the `metadata` object, top-level keys beginning with an underscore // (`_`) are reserved for system usage. // Any information specified with this parameter fully replaces metadata // previously associated with the API key. // API name: metadata -func (r *BulkUpdateApiKeys) Metadata(metadata types.MetadataVariant) *BulkUpdateApiKeys { - // Initialize the request if it is not already initialized +func (r *BulkUpdateApiKeys) Metadata(metadata types.Metadata) *BulkUpdateApiKeys { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// The role descriptors to assign to the API keys. +// RoleDescriptors The role descriptors to assign to the API keys. // An API key's effective permissions are an intersection of its assigned // privileges and the point-in-time snapshot of permissions of the owner user. // You can assign new privileges by specifying them in this parameter. @@ -449,29 +443,11 @@ func (r *BulkUpdateApiKeys) Metadata(metadata types.MetadataVariant) *BulkUpdate // API keys API. // API name: role_descriptors func (r *BulkUpdateApiKeys) RoleDescriptors(roledescriptors map[string]types.RoleDescriptor) *BulkUpdateApiKeys { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RoleDescriptors = roledescriptors - return r -} -func (r *BulkUpdateApiKeys) AddRoleDescriptor(key string, value types.RoleDescriptorVariant) *BulkUpdateApiKeys { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.RoleDescriptor - if r.req.RoleDescriptors == nil { - r.req.RoleDescriptors = make(map[string]types.RoleDescriptor) - } else { - tmp = r.req.RoleDescriptors - } - - tmp[key] = *value.RoleDescriptorCaster() + r.req.RoleDescriptors = roledescriptors - r.req.RoleDescriptors = tmp return r } diff --git a/typedapi/security/bulkupdateapikeys/request.go b/typedapi/security/bulkupdateapikeys/request.go index ace4c9d5b5..7bcc958aa8 100644 --- a/typedapi/security/bulkupdateapikeys/request.go +++ b/typedapi/security/bulkupdateapikeys/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulkupdateapikeys @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package bulkupdateapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysRequest.ts#L26-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysRequest.ts#L26-L83 type Request struct { // Expiration Expiration time for the API keys. diff --git a/typedapi/security/bulkupdateapikeys/response.go b/typedapi/security/bulkupdateapikeys/response.go index 6b4022272c..850d51eda5 100644 --- a/typedapi/security/bulkupdateapikeys/response.go +++ b/typedapi/security/bulkupdateapikeys/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package bulkupdateapikeys @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkupdateapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysResponse.ts#L22-L28 type Response struct { Errors *types.BulkError `json:"errors,omitempty"` Noops []string `json:"noops"` diff --git a/typedapi/security/changepassword/change_password.go b/typedapi/security/changepassword/change_password.go index c6409cba05..b1d786ec52 100644 --- a/typedapi/security/changepassword/change_password.go +++ b/typedapi/security/changepassword/change_password.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Change passwords. // @@ -382,27 +382,24 @@ func (r *ChangePassword) Pretty(pretty bool) *ChangePassword { return r } -// The new password value. Passwords must be at least 6 characters long. +// Password The new password value. Passwords must be at least 6 characters long. // API name: password func (r *ChangePassword) Password(password string) *ChangePassword { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Password = &password return r } -// A hash of the new password value. This must be produced using the same +// PasswordHash A hash of the new password value. This must be produced using the same // hashing algorithm as has been configured for password storage. For more // details, // see the explanation of the `xpack.security.authc.password_hashing.algorithm` // setting. // API name: password_hash func (r *ChangePassword) PasswordHash(passwordhash string) *ChangePassword { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/changepassword/request.go b/typedapi/security/changepassword/request.go index 9acb3c2e33..fed65eec56 100644 --- a/typedapi/security/changepassword/request.go +++ b/typedapi/security/changepassword/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package changepassword @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L65 type Request struct { // Password The new password value. Passwords must be at least 6 characters long. diff --git a/typedapi/security/changepassword/response.go b/typedapi/security/changepassword/response.go index 14713f0942..9f092757f1 100644 --- a/typedapi/security/changepassword/response.go +++ b/typedapi/security/changepassword/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package changepassword // Response holds the response body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/change_password/SecurityChangePasswordResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/change_password/SecurityChangePasswordResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/security/clearapikeycache/clear_api_key_cache.go b/typedapi/security/clearapikeycache/clear_api_key_cache.go index a4003ac5e4..fd2a6ccc35 100644 --- a/typedapi/security/clearapikeycache/clear_api_key_cache.go +++ b/typedapi/security/clearapikeycache/clear_api_key_cache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the API key cache. // diff --git a/typedapi/security/clearapikeycache/response.go b/typedapi/security/clearapikeycache/response.go index 8839438d61..5c2241da30 100644 --- a/typedapi/security/clearapikeycache/response.go +++ b/typedapi/security/clearapikeycache/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearapikeycache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearapikeycache // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/clear_api_key_cache/SecurityClearApiKeyCacheResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/clear_api_key_cache/SecurityClearApiKeyCacheResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedprivileges/clear_cached_privileges.go b/typedapi/security/clearcachedprivileges/clear_cached_privileges.go index ec2212c68b..2bd59f558d 100644 --- a/typedapi/security/clearcachedprivileges/clear_cached_privileges.go +++ b/typedapi/security/clearcachedprivileges/clear_cached_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the privileges cache. // diff --git a/typedapi/security/clearcachedprivileges/response.go b/typedapi/security/clearcachedprivileges/response.go index 4f470b1489..820eb66483 100644 --- a/typedapi/security/clearcachedprivileges/response.go +++ b/typedapi/security/clearcachedprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcachedprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedrealms/clear_cached_realms.go b/typedapi/security/clearcachedrealms/clear_cached_realms.go index 59ec121e00..46030321bc 100644 --- a/typedapi/security/clearcachedrealms/clear_cached_realms.go +++ b/typedapi/security/clearcachedrealms/clear_cached_realms.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the user cache. // diff --git a/typedapi/security/clearcachedrealms/response.go b/typedapi/security/clearcachedrealms/response.go index 621a17c856..64ef21d310 100644 --- a/typedapi/security/clearcachedrealms/response.go +++ b/typedapi/security/clearcachedrealms/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcachedrealms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedrealms // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/clear_cached_realms/SecurityClearCachedRealmsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/clear_cached_realms/SecurityClearCachedRealmsResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedroles/clear_cached_roles.go b/typedapi/security/clearcachedroles/clear_cached_roles.go index 8d7715d0b1..34e272fd14 100644 --- a/typedapi/security/clearcachedroles/clear_cached_roles.go +++ b/typedapi/security/clearcachedroles/clear_cached_roles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear the roles cache. // diff --git a/typedapi/security/clearcachedroles/response.go b/typedapi/security/clearcachedroles/response.go index 6f82e7916f..d5e910b2c9 100644 --- a/typedapi/security/clearcachedroles/response.go +++ b/typedapi/security/clearcachedroles/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcachedroles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedroles // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go b/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go index ad54a92bc6..4d180bd614 100644 --- a/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go +++ b/typedapi/security/clearcachedservicetokens/clear_cached_service_tokens.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear service account token caches. // diff --git a/typedapi/security/clearcachedservicetokens/response.go b/typedapi/security/clearcachedservicetokens/response.go index e8d319b3b5..854e04f82b 100644 --- a/typedapi/security/clearcachedservicetokens/response.go +++ b/typedapi/security/clearcachedservicetokens/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcachedservicetokens @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedservicetokens // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32 type Response struct { ClusterName string `json:"cluster_name"` NodeStats types.NodeStatistics `json:"_nodes"` diff --git a/typedapi/security/createapikey/create_api_key.go b/typedapi/security/createapikey/create_api_key.go index 306bf588b0..740268d5d1 100644 --- a/typedapi/security/createapikey/create_api_key.go +++ b/typedapi/security/createapikey/create_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create an API key. // @@ -383,49 +383,43 @@ func (r *CreateApiKey) Pretty(pretty bool) *CreateApiKey { return r } -// The expiration time for the API key. +// Expiration The expiration time for the API key. // By default, API keys never expire. // API name: expiration -func (r *CreateApiKey) Expiration(duration types.DurationVariant) *CreateApiKey { - // Initialize the request if it is not already initialized +func (r *CreateApiKey) Expiration(duration types.Duration) *CreateApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Expiration = *duration.DurationCaster() + r.req.Expiration = duration return r } -// Arbitrary metadata that you want to associate with the API key. It supports +// Metadata Arbitrary metadata that you want to associate with the API key. It supports // nested data structure. Within the metadata object, keys beginning with `_` // are reserved for system usage. // API name: metadata -func (r *CreateApiKey) Metadata(metadata types.MetadataVariant) *CreateApiKey { - // Initialize the request if it is not already initialized +func (r *CreateApiKey) Metadata(metadata types.Metadata) *CreateApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// A name for the API key. +// Name A name for the API key. // API name: name func (r *CreateApiKey) Name(name string) *CreateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Name = &name return r } -// An array of role descriptors for this API key. +// RoleDescriptors An array of role descriptors for this API key. // When it is not specified or it is an empty array, the API key will have a // point in time snapshot of permissions of the authenticated user. // If you supply role descriptors, the resultant permissions are an intersection @@ -444,29 +438,11 @@ func (r *CreateApiKey) Name(name string) *CreateApiKey { // authority to call Elasticsearch APIs. // API name: role_descriptors func (r *CreateApiKey) RoleDescriptors(roledescriptors map[string]types.RoleDescriptor) *CreateApiKey { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.RoleDescriptors = roledescriptors - return r -} - -func (r *CreateApiKey) AddRoleDescriptor(key string, value types.RoleDescriptorVariant) *CreateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.RoleDescriptor - if r.req.RoleDescriptors == nil { - r.req.RoleDescriptors = make(map[string]types.RoleDescriptor) - } else { - tmp = r.req.RoleDescriptors - } - - tmp[key] = *value.RoleDescriptorCaster() + r.req.RoleDescriptors = roledescriptors - r.req.RoleDescriptors = tmp return r } diff --git a/typedapi/security/createapikey/request.go b/typedapi/security/createapikey/request.go index 6abb362c19..227b5888f6 100644 --- a/typedapi/security/createapikey/request.go +++ b/typedapi/security/createapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L86 type Request struct { // Expiration The expiration time for the API key. diff --git a/typedapi/security/createapikey/response.go b/typedapi/security/createapikey/response.go index 2b33f40dae..86b088b327 100644 --- a/typedapi/security/createapikey/response.go +++ b/typedapi/security/createapikey/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createapikey // Response holds the response body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50 type Response struct { // ApiKey Generated API key. diff --git a/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go b/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go index e9c1b87fd3..efd20fb528 100644 --- a/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go +++ b/typedapi/security/createcrossclusterapikey/create_cross_cluster_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a cross-cluster API key. // @@ -392,7 +392,7 @@ func (r *CreateCrossClusterApiKey) Pretty(pretty bool) *CreateCrossClusterApiKey return r } -// The access to be granted to this API key. +// Access The access to be granted to this API key. // The access is composed of permissions for cross-cluster search and // cross-cluster replication. // At least one of them must be specified. @@ -402,55 +402,48 @@ func (r *CreateCrossClusterApiKey) Pretty(pretty bool) *CreateCrossClusterApiKey // The creation process automatically converts the access specification to a // role descriptor which has relevant privileges assigned accordingly. // API name: access -func (r *CreateCrossClusterApiKey) Access(access types.AccessVariant) *CreateCrossClusterApiKey { - // Initialize the request if it is not already initialized +func (r *CreateCrossClusterApiKey) Access(access *types.Access) *CreateCrossClusterApiKey { if r.req == nil { r.req = NewRequest() } - r.req.Access = *access.AccessCaster() + r.req.Access = *access return r } -// Expiration time for the API key. +// Expiration Expiration time for the API key. // By default, API keys never expire. // API name: expiration -func (r *CreateCrossClusterApiKey) Expiration(duration types.DurationVariant) *CreateCrossClusterApiKey { - // Initialize the request if it is not already initialized +func (r *CreateCrossClusterApiKey) Expiration(duration types.Duration) *CreateCrossClusterApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Expiration = *duration.DurationCaster() + r.req.Expiration = duration return r } -// Arbitrary metadata that you want to associate with the API key. +// Metadata Arbitrary metadata that you want to associate with the API key. // It supports nested data structure. // Within the metadata object, keys beginning with `_` are reserved for system // usage. // API name: metadata -func (r *CreateCrossClusterApiKey) Metadata(metadata types.MetadataVariant) *CreateCrossClusterApiKey { - // Initialize the request if it is not already initialized +func (r *CreateCrossClusterApiKey) Metadata(metadata types.Metadata) *CreateCrossClusterApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// Specifies the name for this API key. +// Name Specifies the name for this API key. // API name: name func (r *CreateCrossClusterApiKey) Name(name string) *CreateCrossClusterApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Name = name return r diff --git a/typedapi/security/createcrossclusterapikey/request.go b/typedapi/security/createcrossclusterapikey/request.go index e2a447a95f..10d687bcad 100644 --- a/typedapi/security/createcrossclusterapikey/request.go +++ b/typedapi/security/createcrossclusterapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createcrossclusterapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package createcrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L80 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L80 type Request struct { // Access The access to be granted to this API key. diff --git a/typedapi/security/createcrossclusterapikey/response.go b/typedapi/security/createcrossclusterapikey/response.go index 8c4eda4914..82d0836798 100644 --- a/typedapi/security/createcrossclusterapikey/response.go +++ b/typedapi/security/createcrossclusterapikey/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createcrossclusterapikey // Response holds the response body struct for the package createcrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48 type Response struct { // ApiKey Generated API key. diff --git a/typedapi/security/createservicetoken/create_service_token.go b/typedapi/security/createservicetoken/create_service_token.go index cccc706f5a..99ee44481f 100644 --- a/typedapi/security/createservicetoken/create_service_token.go +++ b/typedapi/security/createservicetoken/create_service_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a service account token. // diff --git a/typedapi/security/createservicetoken/response.go b/typedapi/security/createservicetoken/response.go index cf7721fbff..0d80549362 100644 --- a/typedapi/security/createservicetoken/response.go +++ b/typedapi/security/createservicetoken/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createservicetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package createservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L30 type Response struct { Created bool `json:"created"` Token types.ServiceToken `json:"token"` diff --git a/typedapi/security/delegatepki/delegate_pki.go b/typedapi/security/delegatepki/delegate_pki.go index a995a0cd38..d62376e27b 100644 --- a/typedapi/security/delegatepki/delegate_pki.go +++ b/typedapi/security/delegatepki/delegate_pki.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delegate PKI authentication. // @@ -368,7 +368,7 @@ func (r *DelegatePki) Pretty(pretty bool) *DelegatePki { return r } -// The X509Certificate chain, which is represented as an ordered string array. +// X509CertificateChain The X509Certificate chain, which is represented as an ordered string array. // Each string in the array is a base64-encoded (Section 4 of RFC4648 - not // base64url-encoded) of the certificate's DER encoding. // @@ -378,14 +378,10 @@ func (r *DelegatePki) Pretty(pretty bool) *DelegatePki { // is used to certify the previous one. // API name: x509_certificate_chain func (r *DelegatePki) X509CertificateChain(x509certificatechains ...string) *DelegatePki { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range x509certificatechains { + r.req.X509CertificateChain = x509certificatechains - r.req.X509CertificateChain = append(r.req.X509CertificateChain, v) - - } return r } diff --git a/typedapi/security/delegatepki/request.go b/typedapi/security/delegatepki/request.go index 9e2efb9144..f7710223b5 100644 --- a/typedapi/security/delegatepki/request.go +++ b/typedapi/security/delegatepki/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delegatepki @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package delegatepki // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delegate_pki/SecurityDelegatePkiRequest.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delegate_pki/SecurityDelegatePkiRequest.ts#L22-L57 type Request struct { // X509CertificateChain The X509Certificate chain, which is represented as an ordered string array. diff --git a/typedapi/security/delegatepki/response.go b/typedapi/security/delegatepki/response.go index ffde2646e9..0d1a3efe3c 100644 --- a/typedapi/security/delegatepki/response.go +++ b/typedapi/security/delegatepki/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delegatepki @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package delegatepki // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L24-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L24-L41 type Response struct { // AccessToken An access token associated with the subject distinguished name of the diff --git a/typedapi/security/deleteprivileges/delete_privileges.go b/typedapi/security/deleteprivileges/delete_privileges.go index 1998b32005..48a04d4d7e 100644 --- a/typedapi/security/deleteprivileges/delete_privileges.go +++ b/typedapi/security/deleteprivileges/delete_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete application privileges. // diff --git a/typedapi/security/deleteprivileges/response.go b/typedapi/security/deleteprivileges/response.go index 48c757cd51..ddc0a61412 100644 --- a/typedapi/security/deleteprivileges/response.go +++ b/typedapi/security/deleteprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deleteprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delete_privileges/SecurityDeletePrivilegesResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delete_privileges/SecurityDeletePrivilegesResponse.ts#L23-L26 type Response map[string]map[string]types.FoundStatus diff --git a/typedapi/security/deleterole/delete_role.go b/typedapi/security/deleterole/delete_role.go index d3cc7586ee..b089fe60ae 100644 --- a/typedapi/security/deleterole/delete_role.go +++ b/typedapi/security/deleterole/delete_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete roles. // diff --git a/typedapi/security/deleterole/response.go b/typedapi/security/deleterole/response.go index f586b9be8b..0e1669d7b0 100644 --- a/typedapi/security/deleterole/response.go +++ b/typedapi/security/deleterole/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleterole // Response holds the response body struct for the package deleterole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L28 type Response struct { // Found If the role is successfully deleted, `found` is `true`. diff --git a/typedapi/security/deleterolemapping/delete_role_mapping.go b/typedapi/security/deleterolemapping/delete_role_mapping.go index dec4d38e11..dda99e78b2 100644 --- a/typedapi/security/deleterolemapping/delete_role_mapping.go +++ b/typedapi/security/deleterolemapping/delete_role_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete role mappings. // diff --git a/typedapi/security/deleterolemapping/response.go b/typedapi/security/deleterolemapping/response.go index 45d712c927..69cd906864 100644 --- a/typedapi/security/deleterolemapping/response.go +++ b/typedapi/security/deleterolemapping/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleterolemapping // Response holds the response body struct for the package deleterolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L28 type Response struct { // Found If the mapping is successfully deleted, `found` is `true`. diff --git a/typedapi/security/deleteservicetoken/delete_service_token.go b/typedapi/security/deleteservicetoken/delete_service_token.go index 765349b3ca..bb06b40ebb 100644 --- a/typedapi/security/deleteservicetoken/delete_service_token.go +++ b/typedapi/security/deleteservicetoken/delete_service_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete service account tokens. // diff --git a/typedapi/security/deleteservicetoken/response.go b/typedapi/security/deleteservicetoken/response.go index 05740ad0ee..aea2c13458 100644 --- a/typedapi/security/deleteservicetoken/response.go +++ b/typedapi/security/deleteservicetoken/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteservicetoken // Response holds the response body struct for the package deleteservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L28 type Response struct { // Found If the service account token is successfully deleted, the request returns diff --git a/typedapi/security/deleteuser/delete_user.go b/typedapi/security/deleteuser/delete_user.go index 577cc09c8d..513416754e 100644 --- a/typedapi/security/deleteuser/delete_user.go +++ b/typedapi/security/deleteuser/delete_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete users. // diff --git a/typedapi/security/deleteuser/response.go b/typedapi/security/deleteuser/response.go index 5b29d38782..1db622a829 100644 --- a/typedapi/security/deleteuser/response.go +++ b/typedapi/security/deleteuser/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteuser // Response holds the response body struct for the package deleteuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L28 type Response struct { // Found If the user is successfully deleted, the request returns `{"found": true}`. diff --git a/typedapi/security/disableuser/disable_user.go b/typedapi/security/disableuser/disable_user.go index 046a5ea1fa..2ef94ace11 100644 --- a/typedapi/security/disableuser/disable_user.go +++ b/typedapi/security/disableuser/disable_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Disable users. // diff --git a/typedapi/security/disableuser/response.go b/typedapi/security/disableuser/response.go index b6a73a80b5..564e6d1bfb 100644 --- a/typedapi/security/disableuser/response.go +++ b/typedapi/security/disableuser/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package disableuser // Response holds the response body struct for the package disableuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/disable_user/SecurityDisableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/disable_user/SecurityDisableUserResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/security/disableuserprofile/disable_user_profile.go b/typedapi/security/disableuserprofile/disable_user_profile.go index d01d5fddf8..55946db398 100644 --- a/typedapi/security/disableuserprofile/disable_user_profile.go +++ b/typedapi/security/disableuserprofile/disable_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Disable a user profile. // diff --git a/typedapi/security/disableuserprofile/response.go b/typedapi/security/disableuserprofile/response.go index 4ef7bd5e22..6b188d1af7 100644 --- a/typedapi/security/disableuserprofile/response.go +++ b/typedapi/security/disableuserprofile/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package disableuserprofile // Response holds the response body struct for the package disableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/disable_user_profile/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/disable_user_profile/Response.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/security/enableuser/enable_user.go b/typedapi/security/enableuser/enable_user.go index dbd7c79070..a83d8d0af5 100644 --- a/typedapi/security/enableuser/enable_user.go +++ b/typedapi/security/enableuser/enable_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Enable users. // diff --git a/typedapi/security/enableuser/response.go b/typedapi/security/enableuser/response.go index 96da1be668..ef08b207df 100644 --- a/typedapi/security/enableuser/response.go +++ b/typedapi/security/enableuser/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package enableuser // Response holds the response body struct for the package enableuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/enable_user/SecurityEnableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/enable_user/SecurityEnableUserResponse.ts#L20-L22 type Response struct { } diff --git a/typedapi/security/enableuserprofile/enable_user_profile.go b/typedapi/security/enableuserprofile/enable_user_profile.go index 594497a91d..3febe0e768 100644 --- a/typedapi/security/enableuserprofile/enable_user_profile.go +++ b/typedapi/security/enableuserprofile/enable_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Enable a user profile. // diff --git a/typedapi/security/enableuserprofile/response.go b/typedapi/security/enableuserprofile/response.go index 21c68dec29..3366ec22de 100644 --- a/typedapi/security/enableuserprofile/response.go +++ b/typedapi/security/enableuserprofile/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package enableuserprofile // Response holds the response body struct for the package enableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/enable_user_profile/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/enable_user_profile/Response.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/security/enrollkibana/enroll_kibana.go b/typedapi/security/enrollkibana/enroll_kibana.go index 7468a33f3a..14bf058cb3 100644 --- a/typedapi/security/enrollkibana/enroll_kibana.go +++ b/typedapi/security/enrollkibana/enroll_kibana.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Enroll Kibana. // diff --git a/typedapi/security/enrollkibana/response.go b/typedapi/security/enrollkibana/response.go index 92b9fc75b0..7b731a88af 100644 --- a/typedapi/security/enrollkibana/response.go +++ b/typedapi/security/enrollkibana/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package enrollkibana @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package enrollkibana // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/enroll_kibana/Response.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/enroll_kibana/Response.ts#L20-L29 type Response struct { // HttpCa The CA certificate used to sign the node certificates that Elasticsearch uses diff --git a/typedapi/security/enrollnode/enroll_node.go b/typedapi/security/enrollnode/enroll_node.go index 7cad468e36..0dc8c51d67 100644 --- a/typedapi/security/enrollnode/enroll_node.go +++ b/typedapi/security/enrollnode/enroll_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Enroll a node. // diff --git a/typedapi/security/enrollnode/response.go b/typedapi/security/enrollnode/response.go index 421bb60bec..7ff8bdbd1b 100644 --- a/typedapi/security/enrollnode/response.go +++ b/typedapi/security/enrollnode/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package enrollnode // Response holds the response body struct for the package enrollnode // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/enroll_node/Response.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/enroll_node/Response.ts#L20-L47 type Response struct { // HttpCaCert The CA certificate that can be used by the new node in order to sign its diff --git a/typedapi/security/getapikey/get_api_key.go b/typedapi/security/getapikey/get_api_key.go index ea848f7d93..0695a769e8 100644 --- a/typedapi/security/getapikey/get_api_key.go +++ b/typedapi/security/getapikey/get_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get API key information. // diff --git a/typedapi/security/getapikey/response.go b/typedapi/security/getapikey/response.go index 39f5c975af..0761f4a32e 100644 --- a/typedapi/security/getapikey/response.go +++ b/typedapi/security/getapikey/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24 type Response struct { ApiKeys []types.ApiKey `json:"api_keys"` } diff --git a/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go b/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go index 5bc2586298..56e7cf7a6e 100644 --- a/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go +++ b/typedapi/security/getbuiltinprivileges/get_builtin_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get builtin privileges. // diff --git a/typedapi/security/getbuiltinprivileges/response.go b/typedapi/security/getbuiltinprivileges/response.go index a80a7253ff..0d527f1186 100644 --- a/typedapi/security/getbuiltinprivileges/response.go +++ b/typedapi/security/getbuiltinprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getbuiltinprivileges @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getbuiltinprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L42 type Response struct { // Cluster The list of cluster privileges that are understood by this version of diff --git a/typedapi/security/getprivileges/get_privileges.go b/typedapi/security/getprivileges/get_privileges.go index 9686fe60fa..72284bcb59 100644 --- a/typedapi/security/getprivileges/get_privileges.go +++ b/typedapi/security/getprivileges/get_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get application privileges. // diff --git a/typedapi/security/getprivileges/response.go b/typedapi/security/getprivileges/response.go index ddbe78f6f9..1031a47778 100644 --- a/typedapi/security/getprivileges/response.go +++ b/typedapi/security/getprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29 type Response map[string]map[string]types.PrivilegesActions diff --git a/typedapi/security/getrole/get_role.go b/typedapi/security/getrole/get_role.go index 511cf24c73..e4823e6948 100644 --- a/typedapi/security/getrole/get_role.go +++ b/typedapi/security/getrole/get_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get roles. // diff --git a/typedapi/security/getrole/response.go b/typedapi/security/getrole/response.go index e9657e168b..fb04c3f64a 100644 --- a/typedapi/security/getrole/response.go +++ b/typedapi/security/getrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L31 type Response map[string]types.Role diff --git a/typedapi/security/getrolemapping/get_role_mapping.go b/typedapi/security/getrolemapping/get_role_mapping.go index ff5b8acfe1..9fa88c23c9 100644 --- a/typedapi/security/getrolemapping/get_role_mapping.go +++ b/typedapi/security/getrolemapping/get_role_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get role mappings. // diff --git a/typedapi/security/getrolemapping/response.go b/typedapi/security/getrolemapping/response.go index 41398f410f..e8900778b3 100644 --- a/typedapi/security/getrolemapping/response.go +++ b/typedapi/security/getrolemapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29 type Response map[string]types.SecurityRoleMapping diff --git a/typedapi/security/getserviceaccounts/get_service_accounts.go b/typedapi/security/getserviceaccounts/get_service_accounts.go index 7518ee5f67..f2f1783e1d 100644 --- a/typedapi/security/getserviceaccounts/get_service_accounts.go +++ b/typedapi/security/getserviceaccounts/get_service_accounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get service accounts. // diff --git a/typedapi/security/getserviceaccounts/response.go b/typedapi/security/getserviceaccounts/response.go index 6e4f5bda57..85d6e0bad2 100644 --- a/typedapi/security/getserviceaccounts/response.go +++ b/typedapi/security/getserviceaccounts/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getserviceaccounts @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getserviceaccounts // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L29 type Response map[string]types.RoleDescriptorWrapper diff --git a/typedapi/security/getservicecredentials/get_service_credentials.go b/typedapi/security/getservicecredentials/get_service_credentials.go index 0607a924f7..ad25603d74 100644 --- a/typedapi/security/getservicecredentials/get_service_credentials.go +++ b/typedapi/security/getservicecredentials/get_service_credentials.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get service account credentials. // diff --git a/typedapi/security/getservicecredentials/response.go b/typedapi/security/getservicecredentials/response.go index fcedc3deb6..c8a40fb6f1 100644 --- a/typedapi/security/getservicecredentials/response.go +++ b/typedapi/security/getservicecredentials/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getservicecredentials @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getservicecredentials // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L34 type Response struct { Count int `json:"count"` // NodesCredentials Service account credentials collected from all nodes of the cluster. diff --git a/typedapi/security/getsettings/get_settings.go b/typedapi/security/getsettings/get_settings.go index 213e716771..4e84fcad42 100644 --- a/typedapi/security/getsettings/get_settings.go +++ b/typedapi/security/getsettings/get_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get security index settings. // diff --git a/typedapi/security/getsettings/response.go b/typedapi/security/getsettings/response.go index b51268f98e..a284642adc 100644 --- a/typedapi/security/getsettings/response.go +++ b/typedapi/security/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_settings/SecurityGetSettingsResponse.ts#L21-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_settings/SecurityGetSettingsResponse.ts#L21-L36 type Response struct { // Security Settings for the index used for most security configuration, including native diff --git a/typedapi/security/gettoken/get_token.go b/typedapi/security/gettoken/get_token.go index 50e8ae664a..bb1a316f2a 100644 --- a/typedapi/security/gettoken/get_token.go +++ b/typedapi/security/gettoken/get_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a token. // @@ -381,25 +381,24 @@ func (r *GetToken) Pretty(pretty bool) *GetToken { return r } -// The type of grant. +// GrantType The type of grant. // Supported grant types are: `password`, `_kerberos`, `client_credentials`, and // `refresh_token`. // API name: grant_type func (r *GetToken) GrantType(granttype accesstokengranttype.AccessTokenGrantType) *GetToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.GrantType = &granttype + return r } -// The base64 encoded kerberos ticket. +// KerberosTicket The base64 encoded kerberos ticket. // If you specify the `_kerberos` grant type, this parameter is required. // This parameter is not valid with any other supported grant type. // API name: kerberos_ticket func (r *GetToken) KerberosTicket(kerberosticket string) *GetToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -409,28 +408,25 @@ func (r *GetToken) KerberosTicket(kerberosticket string) *GetToken { return r } -// The user's password. +// Password The user's password. // If you specify the `password` grant type, this parameter is required. // This parameter is not valid with any other supported grant type. // API name: password func (r *GetToken) Password(password string) *GetToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Password = &password return r } -// The string that was returned when you created the token, which enables you to +// RefreshToken The string that was returned when you created the token, which enables you to // extend its life. // If you specify the `refresh_token` grant type, this parameter is required. // This parameter is not valid with any other supported grant type. // API name: refresh_token func (r *GetToken) RefreshToken(refreshtoken string) *GetToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -440,12 +436,11 @@ func (r *GetToken) RefreshToken(refreshtoken string) *GetToken { return r } -// The scope of the token. +// Scope The scope of the token. // Currently tokens are only issued for a scope of FULL regardless of the value // sent with the request. // API name: scope func (r *GetToken) Scope(scope string) *GetToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -455,16 +450,14 @@ func (r *GetToken) Scope(scope string) *GetToken { return r } -// The username that identifies the user. +// Username The username that identifies the user. // If you specify the `password` grant type, this parameter is required. // This parameter is not valid with any other supported grant type. // API name: username func (r *GetToken) Username(username string) *GetToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Username = &username return r diff --git a/typedapi/security/gettoken/request.go b/typedapi/security/gettoken/request.go index 7388ae5457..f42bdfe9b8 100644 --- a/typedapi/security/gettoken/request.go +++ b/typedapi/security/gettoken/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettoken @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L90 type Request struct { // GrantType The type of grant. diff --git a/typedapi/security/gettoken/response.go b/typedapi/security/gettoken/response.go index 7ddb462b5d..66e025cd2c 100644 --- a/typedapi/security/gettoken/response.go +++ b/typedapi/security/gettoken/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_token/GetUserAccessTokenResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_token/GetUserAccessTokenResponse.ts#L23-L33 type Response struct { AccessToken string `json:"access_token"` Authentication types.AuthenticatedUser `json:"authentication"` diff --git a/typedapi/security/getuser/get_user.go b/typedapi/security/getuser/get_user.go index bf6b7b43ba..bf540fe4fa 100644 --- a/typedapi/security/getuser/get_user.go +++ b/typedapi/security/getuser/get_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get users. // diff --git a/typedapi/security/getuser/response.go b/typedapi/security/getuser/response.go index a5d482a76b..9f0204714d 100644 --- a/typedapi/security/getuser/response.go +++ b/typedapi/security/getuser/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_user/SecurityGetUserResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_user/SecurityGetUserResponse.ts#L23-L30 type Response map[string]types.User diff --git a/typedapi/security/getuserprivileges/get_user_privileges.go b/typedapi/security/getuserprivileges/get_user_privileges.go index 984773c03a..e1e6274a99 100644 --- a/typedapi/security/getuserprivileges/get_user_privileges.go +++ b/typedapi/security/getuserprivileges/get_user_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get user privileges. // @@ -290,32 +290,6 @@ func (r *GetUserPrivileges) Header(key, value string) *GetUserPrivileges { return r } -// Application The name of the application. Application privileges are always associated -// with exactly one application. If you do not specify this parameter, the API -// returns information about all privileges for all applications. -// API name: application -func (r *GetUserPrivileges) Application(name string) *GetUserPrivileges { - r.values.Set("application", name) - - return r -} - -// Priviledge The name of the privilege. If you do not specify this parameter, the API -// returns information about all privileges for the requested application. -// API name: priviledge -func (r *GetUserPrivileges) Priviledge(name string) *GetUserPrivileges { - r.values.Set("priviledge", name) - - return r -} - -// API name: username -func (r *GetUserPrivileges) Username(username string) *GetUserPrivileges { - r.values.Set("username", username) - - return r -} - // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/security/getuserprivileges/response.go b/typedapi/security/getuserprivileges/response.go index dbb51cb19a..fdac4f4e58 100644 --- a/typedapi/security/getuserprivileges/response.go +++ b/typedapi/security/getuserprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getuserprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L28-L38 type Response struct { Applications []types.ApplicationPrivileges `json:"applications"` Cluster []string `json:"cluster"` diff --git a/typedapi/security/getuserprofile/get_user_profile.go b/typedapi/security/getuserprofile/get_user_profile.go index 1d058bd659..da4e6ed2d5 100644 --- a/typedapi/security/getuserprofile/get_user_profile.go +++ b/typedapi/security/getuserprofile/get_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a user profile. // diff --git a/typedapi/security/getuserprofile/response.go b/typedapi/security/getuserprofile/response.go index 66826b604c..ea068ad5b9 100644 --- a/typedapi/security/getuserprofile/response.go +++ b/typedapi/security/getuserprofile/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_user_profile/Response.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_user_profile/Response.ts#L23-L33 type Response struct { Errors *types.GetUserProfileErrors `json:"errors,omitempty"` // Profiles A successful call returns the JSON representation of the user profile and its diff --git a/typedapi/security/grantapikey/grant_api_key.go b/typedapi/security/grantapikey/grant_api_key.go index b163b9a8b1..54fc061819 100644 --- a/typedapi/security/grantapikey/grant_api_key.go +++ b/typedapi/security/grantapikey/grant_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Grant an API key. // @@ -67,6 +67,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v8/typedapi/types" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/apikeygranttype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/refresh" ) // ErrBuildPath is returned in case of missing parameters within the build of the request. @@ -355,6 +356,18 @@ func (r *GrantApiKey) Header(key, value string) *GrantApiKey { return r } +// Refresh If 'true', Elasticsearch refreshes the affected shards to make this operation +// visible to search. +// If 'wait_for', it waits for a refresh to make this operation visible to +// search. +// If 'false', nothing is done with refreshes. +// API name: refresh +func (r *GrantApiKey) Refresh(refresh refresh.Refresh) *GrantApiKey { + r.values.Set("refresh", refresh.String()) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -399,12 +412,11 @@ func (r *GrantApiKey) Pretty(pretty bool) *GrantApiKey { return r } -// The user's access token. +// AccessToken The user's access token. // If you specify the `access_token` grant type, this parameter is required. // It is not valid with other grant types. // API name: access_token func (r *GrantApiKey) AccessToken(accesstoken string) *GrantApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -414,68 +426,61 @@ func (r *GrantApiKey) AccessToken(accesstoken string) *GrantApiKey { return r } -// The API key. +// ApiKey The API key. // API name: api_key -func (r *GrantApiKey) ApiKey(apikey types.GrantApiKeyVariant) *GrantApiKey { - // Initialize the request if it is not already initialized +func (r *GrantApiKey) ApiKey(apikey *types.GrantApiKey) *GrantApiKey { if r.req == nil { r.req = NewRequest() } - r.req.ApiKey = *apikey.GrantApiKeyCaster() + r.req.ApiKey = *apikey return r } -// The type of grant. Supported grant types are: `access_token`, `password`. +// GrantType The type of grant. Supported grant types are: `access_token`, `password`. // API name: grant_type func (r *GrantApiKey) GrantType(granttype apikeygranttype.ApiKeyGrantType) *GrantApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.GrantType = granttype + return r } -// The user's password. +// Password The user's password. // If you specify the `password` grant type, this parameter is required. // It is not valid with other grant types. // API name: password func (r *GrantApiKey) Password(password string) *GrantApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Password = &password return r } -// The name of the user to be impersonated. +// RunAs The name of the user to be impersonated. // API name: run_as func (r *GrantApiKey) RunAs(username string) *GrantApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RunAs = &username return r } -// The user name that identifies the user. +// Username The user name that identifies the user. // If you specify the `password` grant type, this parameter is required. // It is not valid with other grant types. // API name: username func (r *GrantApiKey) Username(username string) *GrantApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Username = &username return r diff --git a/typedapi/security/grantapikey/request.go b/typedapi/security/grantapikey/request.go index e66bd0ae59..6b6d5c751f 100644 --- a/typedapi/security/grantapikey/request.go +++ b/typedapi/security/grantapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package grantapikey @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L102 type Request struct { // AccessToken The user's access token. diff --git a/typedapi/security/grantapikey/response.go b/typedapi/security/grantapikey/response.go index d981f6559f..2dfd7964af 100644 --- a/typedapi/security/grantapikey/response.go +++ b/typedapi/security/grantapikey/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package grantapikey // Response holds the response body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/grant_api_key/SecurityGrantApiKeyResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/grant_api_key/SecurityGrantApiKeyResponse.ts#L23-L31 type Response struct { ApiKey string `json:"api_key"` Encoded string `json:"encoded"` diff --git a/typedapi/security/hasprivileges/has_privileges.go b/typedapi/security/hasprivileges/has_privileges.go index 2b7a761d96..9c887f26fa 100644 --- a/typedapi/security/hasprivileges/has_privileges.go +++ b/typedapi/security/hasprivileges/has_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check user privileges. // @@ -376,44 +376,32 @@ func (r *HasPrivileges) Pretty(pretty bool) *HasPrivileges { } // API name: application -func (r *HasPrivileges) Application(applications ...types.ApplicationPrivilegesCheckVariant) *HasPrivileges { - // Initialize the request if it is not already initialized +func (r *HasPrivileges) Application(applications ...types.ApplicationPrivilegesCheck) *HasPrivileges { if r.req == nil { r.req = NewRequest() } - for _, v := range applications { + r.req.Application = applications - r.req.Application = append(r.req.Application, *v.ApplicationPrivilegesCheckCaster()) - - } return r } -// A list of the cluster privileges that you want to check. +// Cluster A list of the cluster privileges that you want to check. // API name: cluster func (r *HasPrivileges) Cluster(clusters ...clusterprivilege.ClusterPrivilege) *HasPrivileges { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range clusters { - - r.req.Cluster = append(r.req.Cluster, v) + r.req.Cluster = clusters - } return r } // API name: index -func (r *HasPrivileges) Index(indices ...types.IndexPrivilegesCheckVariant) *HasPrivileges { - // Initialize the request if it is not already initialized +func (r *HasPrivileges) Index(indices ...types.IndexPrivilegesCheck) *HasPrivileges { if r.req == nil { r.req = NewRequest() } - for _, v := range indices { - - r.req.Index = append(r.req.Index, *v.IndexPrivilegesCheckCaster()) + r.req.Index = indices - } return r } diff --git a/typedapi/security/hasprivileges/request.go b/typedapi/security/hasprivileges/request.go index a54b42164c..2f117b464b 100644 --- a/typedapi/security/hasprivileges/request.go +++ b/typedapi/security/hasprivileges/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package hasprivileges @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L59 type Request struct { Application []types.ApplicationPrivilegesCheck `json:"application,omitempty"` // Cluster A list of the cluster privileges that you want to check. diff --git a/typedapi/security/hasprivileges/response.go b/typedapi/security/hasprivileges/response.go index f906a39283..63e1ef83a1 100644 --- a/typedapi/security/hasprivileges/response.go +++ b/typedapi/security/hasprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package hasprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L35 type Response struct { Application types.ApplicationsPrivileges `json:"application"` Cluster map[string]bool `json:"cluster"` diff --git a/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go b/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go index 1471288d79..5f4b5a6d97 100644 --- a/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go +++ b/typedapi/security/hasprivilegesuserprofile/has_privileges_user_profile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Check user profile privileges. // @@ -354,31 +354,26 @@ func (r *HasPrivilegesUserProfile) Pretty(pretty bool) *HasPrivilegesUserProfile return r } -// An object containing all the privileges to be checked. +// Privileges An object containing all the privileges to be checked. // API name: privileges -func (r *HasPrivilegesUserProfile) Privileges(privileges types.PrivilegesCheckVariant) *HasPrivilegesUserProfile { - // Initialize the request if it is not already initialized +func (r *HasPrivilegesUserProfile) Privileges(privileges *types.PrivilegesCheck) *HasPrivilegesUserProfile { if r.req == nil { r.req = NewRequest() } - r.req.Privileges = *privileges.PrivilegesCheckCaster() + r.req.Privileges = *privileges return r } -// A list of profile IDs. The privileges are checked for associated users of the +// Uids A list of profile IDs. The privileges are checked for associated users of the // profiles. // API name: uids func (r *HasPrivilegesUserProfile) Uids(uids ...string) *HasPrivilegesUserProfile { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range uids { + r.req.Uids = uids - r.req.Uids = append(r.req.Uids, v) - - } return r } diff --git a/typedapi/security/hasprivilegesuserprofile/request.go b/typedapi/security/hasprivilegesuserprofile/request.go index bd17d20270..cc0c8717ae 100644 --- a/typedapi/security/hasprivilegesuserprofile/request.go +++ b/typedapi/security/hasprivilegesuserprofile/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package hasprivilegesuserprofile @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges_user_profile/Request.ts#L24-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges_user_profile/Request.ts#L24-L55 type Request struct { // Privileges An object containing all the privileges to be checked. diff --git a/typedapi/security/hasprivilegesuserprofile/response.go b/typedapi/security/hasprivilegesuserprofile/response.go index f917d1b956..419d0f67e4 100644 --- a/typedapi/security/hasprivilegesuserprofile/response.go +++ b/typedapi/security/hasprivilegesuserprofile/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package hasprivilegesuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges_user_profile/Response.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges_user_profile/Response.ts#L23-L38 type Response struct { // Errors The subset of the requested profile IDs for which an error diff --git a/typedapi/security/invalidateapikey/invalidate_api_key.go b/typedapi/security/invalidateapikey/invalidate_api_key.go index 733cc6937f..c34c14c1ba 100644 --- a/typedapi/security/invalidateapikey/invalidate_api_key.go +++ b/typedapi/security/invalidateapikey/invalidate_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Invalidate API keys. // @@ -380,48 +380,40 @@ func (r *InvalidateApiKey) Pretty(pretty bool) *InvalidateApiKey { // API name: id func (r *InvalidateApiKey) Id(id string) *InvalidateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Id = &id return r } -// A list of API key ids. +// Ids A list of API key ids. // This parameter cannot be used with any of `name`, `realm_name`, or // `username`. // API name: ids func (r *InvalidateApiKey) Ids(ids ...string) *InvalidateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range ids { - - r.req.Ids = append(r.req.Ids, v) + r.req.Ids = ids - } return r } -// An API key name. +// Name An API key name. // This parameter cannot be used with any of `ids`, `realm_name` or `username`. // API name: name func (r *InvalidateApiKey) Name(name string) *InvalidateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Name = &name return r } -// Query API keys owned by the currently authenticated user. +// Owner Query API keys owned by the currently authenticated user. // The `realm_name` or `username` parameters cannot be specified when this // parameter is set to `true` as they are assumed to be the currently // authenticated ones. @@ -430,22 +422,19 @@ func (r *InvalidateApiKey) Name(name string) *InvalidateApiKey { // specified if `owner` is `false`. // API name: owner func (r *InvalidateApiKey) Owner(owner bool) *InvalidateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Owner = &owner return r } -// The name of an authentication realm. +// RealmName The name of an authentication realm. // This parameter cannot be used with either `ids` or `name`, or when `owner` // flag is set to `true`. // API name: realm_name func (r *InvalidateApiKey) RealmName(realmname string) *InvalidateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -455,16 +444,14 @@ func (r *InvalidateApiKey) RealmName(realmname string) *InvalidateApiKey { return r } -// The username of a user. +// Username The username of a user. // This parameter cannot be used with either `ids` or `name` or when `owner` // flag is set to `true`. // API name: username func (r *InvalidateApiKey) Username(username string) *InvalidateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Username = &username return r diff --git a/typedapi/security/invalidateapikey/request.go b/typedapi/security/invalidateapikey/request.go index 895cfc4ce5..5ab234764e 100644 --- a/typedapi/security/invalidateapikey/request.go +++ b/typedapi/security/invalidateapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package invalidateapikey @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L82 type Request struct { Id *string `json:"id,omitempty"` // Ids A list of API key ids. diff --git a/typedapi/security/invalidateapikey/response.go b/typedapi/security/invalidateapikey/response.go index 8d424d6ccb..6429d2b980 100644 --- a/typedapi/security/invalidateapikey/response.go +++ b/typedapi/security/invalidateapikey/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package invalidateapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L46 type Response struct { // ErrorCount The number of errors that were encountered when invalidating the API keys. diff --git a/typedapi/security/invalidatetoken/invalidate_token.go b/typedapi/security/invalidatetoken/invalidate_token.go index 10493cf841..b758730a82 100644 --- a/typedapi/security/invalidatetoken/invalidate_token.go +++ b/typedapi/security/invalidatetoken/invalidate_token.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Invalidate a token. // @@ -370,26 +370,23 @@ func (r *InvalidateToken) Pretty(pretty bool) *InvalidateToken { return r } -// The name of an authentication realm. +// RealmName The name of an authentication realm. // This parameter cannot be used with either `refresh_token` or `token`. // API name: realm_name func (r *InvalidateToken) RealmName(name string) *InvalidateToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RealmName = &name return r } -// A refresh token. +// RefreshToken A refresh token. // This parameter cannot be used if any of `refresh_token`, `realm_name`, or // `username` are used. // API name: refresh_token func (r *InvalidateToken) RefreshToken(refreshtoken string) *InvalidateToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -399,12 +396,11 @@ func (r *InvalidateToken) RefreshToken(refreshtoken string) *InvalidateToken { return r } -// An access token. +// Token An access token. // This parameter cannot be used if any of `refresh_token`, `realm_name`, or // `username` are used. // API name: token func (r *InvalidateToken) Token(token string) *InvalidateToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -414,15 +410,13 @@ func (r *InvalidateToken) Token(token string) *InvalidateToken { return r } -// The username of a user. +// Username The username of a user. // This parameter cannot be used with either `refresh_token` or `token`. // API name: username func (r *InvalidateToken) Username(username string) *InvalidateToken { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Username = &username return r diff --git a/typedapi/security/invalidatetoken/request.go b/typedapi/security/invalidatetoken/request.go index 43d3cc3f5a..c009b90de3 100644 --- a/typedapi/security/invalidatetoken/request.go +++ b/typedapi/security/invalidatetoken/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package invalidatetoken @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L71 type Request struct { // RealmName The name of an authentication realm. diff --git a/typedapi/security/invalidatetoken/response.go b/typedapi/security/invalidatetoken/response.go index 8bb9e0dfea..93355d7906 100644 --- a/typedapi/security/invalidatetoken/response.go +++ b/typedapi/security/invalidatetoken/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package invalidatetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L46 type Response struct { // ErrorCount The number of errors that were encountered when invalidating the tokens. diff --git a/typedapi/security/oidcauthenticate/oidc_authenticate.go b/typedapi/security/oidcauthenticate/oidc_authenticate.go index 95179237e5..9f131ec30e 100644 --- a/typedapi/security/oidcauthenticate/oidc_authenticate.go +++ b/typedapi/security/oidcauthenticate/oidc_authenticate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Authenticate OpenID Connect. // @@ -356,13 +356,12 @@ func (r *OidcAuthenticate) Pretty(pretty bool) *OidcAuthenticate { return r } -// Associate a client session with an ID token and mitigate replay attacks. +// Nonce Associate a client session with an ID token and mitigate replay attacks. // This value needs to be the same as the one that was provided to the // `/_security/oidc/prepare` API or the one that was generated by Elasticsearch // and included in the response to that call. // API name: nonce func (r *OidcAuthenticate) Nonce(nonce string) *OidcAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -372,11 +371,10 @@ func (r *OidcAuthenticate) Nonce(nonce string) *OidcAuthenticate { return r } -// The name of the OpenID Connect realm. +// Realm The name of the OpenID Connect realm. // This property is useful in cases where multiple realms are defined. // API name: realm func (r *OidcAuthenticate) Realm(realm string) *OidcAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -386,14 +384,13 @@ func (r *OidcAuthenticate) Realm(realm string) *OidcAuthenticate { return r } -// The URL to which the OpenID Connect Provider redirected the User Agent in +// RedirectUri The URL to which the OpenID Connect Provider redirected the User Agent in // response to an authentication request after a successful authentication. // This URL must be provided as-is (URL encoded), taken from the body of the // response or as the value of a location header in the response from the OpenID // Connect Provider. // API name: redirect_uri func (r *OidcAuthenticate) RedirectUri(redirecturi string) *OidcAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -403,13 +400,12 @@ func (r *OidcAuthenticate) RedirectUri(redirecturi string) *OidcAuthenticate { return r } -// Maintain state between the authentication request and the response. +// State Maintain state between the authentication request and the response. // This value needs to be the same as the one that was provided to the // `/_security/oidc/prepare` API or the one that was generated by Elasticsearch // and included in the response to that call. // API name: state func (r *OidcAuthenticate) State(state string) *OidcAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/oidcauthenticate/request.go b/typedapi/security/oidcauthenticate/request.go index d2188d3c3c..fbaa4d7d00 100644 --- a/typedapi/security/oidcauthenticate/request.go +++ b/typedapi/security/oidcauthenticate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package oidcauthenticate @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package oidcauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/oidc_authenticate/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/oidc_authenticate/Request.ts#L22-L61 type Request struct { // Nonce Associate a client session with an ID token and mitigate replay attacks. diff --git a/typedapi/security/oidcauthenticate/response.go b/typedapi/security/oidcauthenticate/response.go index 5ca3e32467..69a2719ab6 100644 --- a/typedapi/security/oidcauthenticate/response.go +++ b/typedapi/security/oidcauthenticate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package oidcauthenticate // Response holds the response body struct for the package oidcauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/oidc_authenticate/Response.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/oidc_authenticate/Response.ts#L22-L41 type Response struct { // AccessToken The Elasticsearch access token. diff --git a/typedapi/security/oidclogout/oidc_logout.go b/typedapi/security/oidclogout/oidc_logout.go index a9a6d62256..33046afaa2 100644 --- a/typedapi/security/oidclogout/oidc_logout.go +++ b/typedapi/security/oidclogout/oidc_logout.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Logout of OpenID Connect. // @@ -364,10 +364,9 @@ func (r *OidcLogout) Pretty(pretty bool) *OidcLogout { return r } -// The refresh token to be invalidated. +// RefreshToken The refresh token to be invalidated. // API name: refresh_token func (r *OidcLogout) RefreshToken(refreshtoken string) *OidcLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -377,10 +376,9 @@ func (r *OidcLogout) RefreshToken(refreshtoken string) *OidcLogout { return r } -// The access token to be invalidated. +// Token The access token to be invalidated. // API name: token func (r *OidcLogout) Token(token string) *OidcLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/oidclogout/request.go b/typedapi/security/oidclogout/request.go index 8b3044fe71..7826acbee7 100644 --- a/typedapi/security/oidclogout/request.go +++ b/typedapi/security/oidclogout/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package oidclogout @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package oidclogout // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/oidc_logout/Request.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/oidc_logout/Request.ts#L22-L52 type Request struct { // RefreshToken The refresh token to be invalidated. diff --git a/typedapi/security/oidclogout/response.go b/typedapi/security/oidclogout/response.go index 1b48e088eb..9b98316e45 100644 --- a/typedapi/security/oidclogout/response.go +++ b/typedapi/security/oidclogout/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package oidclogout // Response holds the response body struct for the package oidclogout // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/oidc_logout/Response.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/oidc_logout/Response.ts#L20-L27 type Response struct { // Redirect A URI that points to the end session endpoint of the OpenID Connect Provider diff --git a/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go b/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go index a53fd05b52..7cfd4f4ba4 100644 --- a/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go +++ b/typedapi/security/oidcprepareauthentication/oidc_prepare_authentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Prepare OpenID connect authentication. // @@ -362,13 +362,12 @@ func (r *OidcPrepareAuthentication) Pretty(pretty bool) *OidcPrepareAuthenticati return r } -// In the case of a third party initiated single sign on, this is the issuer +// Iss In the case of a third party initiated single sign on, this is the issuer // identifier for the OP that the RP is to send the authentication request to. // It cannot be specified when *realm* is specified. // One of *realm* or *iss* is required. // API name: iss func (r *OidcPrepareAuthentication) Iss(iss string) *OidcPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -378,12 +377,11 @@ func (r *OidcPrepareAuthentication) Iss(iss string) *OidcPrepareAuthentication { return r } -// In the case of a third party initiated single sign on, it is a string value +// LoginHint In the case of a third party initiated single sign on, it is a string value // that is included in the authentication request as the *login_hint* parameter. // This parameter is not valid when *realm* is specified. // API name: login_hint func (r *OidcPrepareAuthentication) LoginHint(loginhint string) *OidcPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -393,13 +391,12 @@ func (r *OidcPrepareAuthentication) LoginHint(loginhint string) *OidcPrepareAuth return r } -// The value used to associate a client session with an ID token and to mitigate +// Nonce The value used to associate a client session with an ID token and to mitigate // replay attacks. // If the caller of the API does not provide a value, Elasticsearch will // generate one with sufficient entropy and return it in the response. // API name: nonce func (r *OidcPrepareAuthentication) Nonce(nonce string) *OidcPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -409,13 +406,12 @@ func (r *OidcPrepareAuthentication) Nonce(nonce string) *OidcPrepareAuthenticati return r } -// The name of the OpenID Connect realm in Elasticsearch the configuration of +// Realm The name of the OpenID Connect realm in Elasticsearch the configuration of // which should be used in order to generate the authentication request. // It cannot be specified when *iss* is specified. // One of *realm* or *iss* is required. // API name: realm func (r *OidcPrepareAuthentication) Realm(realm string) *OidcPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -425,13 +421,12 @@ func (r *OidcPrepareAuthentication) Realm(realm string) *OidcPrepareAuthenticati return r } -// The value used to maintain state between the authentication request and the +// State The value used to maintain state between the authentication request and the // response, typically used as a Cross-Site Request Forgery mitigation. // If the caller of the API does not provide a value, Elasticsearch will // generate one with sufficient entropy and return it in the response. // API name: state func (r *OidcPrepareAuthentication) State(state string) *OidcPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/oidcprepareauthentication/request.go b/typedapi/security/oidcprepareauthentication/request.go index 0f0c05d72a..84e0e4c4fc 100644 --- a/typedapi/security/oidcprepareauthentication/request.go +++ b/typedapi/security/oidcprepareauthentication/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package oidcprepareauthentication @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package oidcprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/oidc_prepare_authentication/Request.ts#L22-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/oidc_prepare_authentication/Request.ts#L22-L71 type Request struct { // Iss In the case of a third party initiated single sign on, this is the issuer diff --git a/typedapi/security/oidcprepareauthentication/response.go b/typedapi/security/oidcprepareauthentication/response.go index a4c4b41eb5..ee8bb3fd9f 100644 --- a/typedapi/security/oidcprepareauthentication/response.go +++ b/typedapi/security/oidcprepareauthentication/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package oidcprepareauthentication // Response holds the response body struct for the package oidcprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/oidc_prepare_authentication/Response.ts#L20-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/oidc_prepare_authentication/Response.ts#L20-L30 type Response struct { Nonce string `json:"nonce"` Realm string `json:"realm"` diff --git a/typedapi/security/putprivileges/put_privileges.go b/typedapi/security/putprivileges/put_privileges.go index 00a7ad5c4b..e953d058f4 100644 --- a/typedapi/security/putprivileges/put_privileges.go +++ b/typedapi/security/putprivileges/put_privileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update application privileges. // diff --git a/typedapi/security/putprivileges/request.go b/typedapi/security/putprivileges/request.go index d211df218d..c1b7f6dd67 100644 --- a/typedapi/security/putprivileges/request.go +++ b/typedapi/security/putprivileges/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putprivileges @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L67 type Request = map[string]map[string]types.PrivilegesActions // NewRequest returns a Request diff --git a/typedapi/security/putprivileges/response.go b/typedapi/security/putprivileges/response.go index 63f0c60cd7..6de69918e4 100644 --- a/typedapi/security/putprivileges/response.go +++ b/typedapi/security/putprivileges/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L28 type Response map[string]map[string]types.CreatedStatus diff --git a/typedapi/security/putrole/put_role.go b/typedapi/security/putrole/put_role.go index f8a1d896ac..fbd4ad073d 100644 --- a/typedapi/security/putrole/put_role.go +++ b/typedapi/security/putrole/put_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update roles. // @@ -381,41 +381,32 @@ func (r *PutRole) Pretty(pretty bool) *PutRole { return r } -// A list of application privilege entries. +// Applications A list of application privilege entries. // API name: applications -func (r *PutRole) Applications(applications ...types.ApplicationPrivilegesVariant) *PutRole { - // Initialize the request if it is not already initialized +func (r *PutRole) Applications(applications ...types.ApplicationPrivileges) *PutRole { if r.req == nil { r.req = NewRequest() } - for _, v := range applications { + r.req.Applications = applications - r.req.Applications = append(r.req.Applications, *v.ApplicationPrivilegesCaster()) - - } return r } -// A list of cluster privileges. These privileges define the cluster-level +// Cluster A list of cluster privileges. These privileges define the cluster-level // actions for users with this role. // API name: cluster func (r *PutRole) Cluster(clusters ...clusterprivilege.ClusterPrivilege) *PutRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range clusters { - - r.req.Cluster = append(r.req.Cluster, v) + r.req.Cluster = clusters - } return r } -// Optional description of the role descriptor +// Description Optional description of the role descriptor // API name: description func (r *PutRole) Description(description string) *PutRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -425,120 +416,84 @@ func (r *PutRole) Description(description string) *PutRole { return r } -// An object defining global privileges. A global privilege is a form of cluster +// Global An object defining global privileges. A global privilege is a form of cluster // privilege that is request-aware. Support for global privileges is currently // limited to the management of application privileges. // API name: global func (r *PutRole) Global(global map[string]json.RawMessage) *PutRole { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Global = global - return r -} - -func (r *PutRole) AddGlobal(key string, value json.RawMessage) *PutRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.Global == nil { - r.req.Global = make(map[string]json.RawMessage) - } else { - tmp = r.req.Global - } - - tmp[key] = value + r.req.Global = global - r.req.Global = tmp return r } -// A list of indices permissions entries. +// Indices A list of indices permissions entries. // API name: indices -func (r *PutRole) Indices(indices ...types.IndicesPrivilegesVariant) *PutRole { - // Initialize the request if it is not already initialized +func (r *PutRole) Indices(indices ...types.IndicesPrivileges) *PutRole { if r.req == nil { r.req = NewRequest() } - for _, v := range indices { - - r.req.Indices = append(r.req.Indices, *v.IndicesPrivilegesCaster()) + r.req.Indices = indices - } return r } -// Optional metadata. Within the metadata object, keys that begin with an +// Metadata Optional metadata. Within the metadata object, keys that begin with an // underscore (`_`) are reserved for system use. // API name: metadata -func (r *PutRole) Metadata(metadata types.MetadataVariant) *PutRole { - // Initialize the request if it is not already initialized +func (r *PutRole) Metadata(metadata types.Metadata) *PutRole { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// A list of remote cluster permissions entries. +// RemoteCluster A list of remote cluster permissions entries. // API name: remote_cluster -func (r *PutRole) RemoteCluster(remoteclusters ...types.RemoteClusterPrivilegesVariant) *PutRole { - // Initialize the request if it is not already initialized +func (r *PutRole) RemoteCluster(remoteclusters ...types.RemoteClusterPrivileges) *PutRole { if r.req == nil { r.req = NewRequest() } - for _, v := range remoteclusters { + r.req.RemoteCluster = remoteclusters - r.req.RemoteCluster = append(r.req.RemoteCluster, *v.RemoteClusterPrivilegesCaster()) - - } return r } -// A list of remote indices permissions entries. +// RemoteIndices A list of remote indices permissions entries. // // NOTE: Remote indices are effective for remote clusters configured with the // API key based model. // They have no effect for remote clusters configured with the certificate based // model. // API name: remote_indices -func (r *PutRole) RemoteIndices(remoteindices ...types.RemoteIndicesPrivilegesVariant) *PutRole { - // Initialize the request if it is not already initialized +func (r *PutRole) RemoteIndices(remoteindices ...types.RemoteIndicesPrivileges) *PutRole { if r.req == nil { r.req = NewRequest() } - for _, v := range remoteindices { - - r.req.RemoteIndices = append(r.req.RemoteIndices, *v.RemoteIndicesPrivilegesCaster()) + r.req.RemoteIndices = remoteindices - } return r } -// A list of users that the owners of this role can impersonate. *Note*: in +// RunAs A list of users that the owners of this role can impersonate. *Note*: in // Serverless, the run-as feature is disabled. For API compatibility, you can // still specify an empty `run_as` field, but a non-empty list will be rejected. // API name: run_as func (r *PutRole) RunAs(runas ...string) *PutRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range runas { - - r.req.RunAs = append(r.req.RunAs, v) + r.req.RunAs = runas - } return r } -// Indicates roles that might be incompatible with the current cluster license, +// TransientMetadata Indicates roles that might be incompatible with the current cluster license, // specifically roles with document and field level security. When the cluster // license doesn’t allow certain features for a given role, this parameter is // updated dynamically to list the incompatible features. If `enabled` is @@ -546,29 +501,11 @@ func (r *PutRole) RunAs(runas ...string) *PutRole { // authenticate API. // API name: transient_metadata func (r *PutRole) TransientMetadata(transientmetadata map[string]json.RawMessage) *PutRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TransientMetadata = transientmetadata - return r -} -func (r *PutRole) AddTransientMetadatum(key string, value json.RawMessage) *PutRole { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.TransientMetadata == nil { - r.req.TransientMetadata = make(map[string]json.RawMessage) - } else { - tmp = r.req.TransientMetadata - } - - tmp[key] = value + r.req.TransientMetadata = transientmetadata - r.req.TransientMetadata = tmp return r } diff --git a/typedapi/security/putrole/request.go b/typedapi/security/putrole/request.go index c0e2efba12..baff85779b 100644 --- a/typedapi/security/putrole/request.go +++ b/typedapi/security/putrole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putrole @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_role/SecurityPutRoleRequest.ts#L32-L111 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_role/SecurityPutRoleRequest.ts#L32-L111 type Request struct { // Applications A list of application privilege entries. diff --git a/typedapi/security/putrole/response.go b/typedapi/security/putrole/response.go index 6747b7986b..c5706bd529 100644 --- a/typedapi/security/putrole/response.go +++ b/typedapi/security/putrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L29 type Response struct { // Role When an existing role is updated, `created` is set to `false`. diff --git a/typedapi/security/putrolemapping/put_role_mapping.go b/typedapi/security/putrolemapping/put_role_mapping.go index 2ad4e04843..d903437bb5 100644 --- a/typedapi/security/putrolemapping/put_role_mapping.go +++ b/typedapi/security/putrolemapping/put_role_mapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update role mappings. // @@ -446,93 +446,76 @@ func (r *PutRoleMapping) Pretty(pretty bool) *PutRoleMapping { return r } -// Mappings that have `enabled` set to `false` are ignored when role mapping is +// Enabled Mappings that have `enabled` set to `false` are ignored when role mapping is // performed. // API name: enabled func (r *PutRoleMapping) Enabled(enabled bool) *PutRoleMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Enabled = &enabled return r } -// Additional metadata that helps define which roles are assigned to each user. +// Metadata Additional metadata that helps define which roles are assigned to each user. // Within the metadata object, keys beginning with `_` are reserved for system // usage. // API name: metadata -func (r *PutRoleMapping) Metadata(metadata types.MetadataVariant) *PutRoleMapping { - // Initialize the request if it is not already initialized +func (r *PutRoleMapping) Metadata(metadata types.Metadata) *PutRoleMapping { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// A list of Mustache templates that will be evaluated to determine the roles +// RoleTemplates A list of Mustache templates that will be evaluated to determine the roles // names that should granted to the users that match the role mapping rules. // Exactly one of `roles` or `role_templates` must be specified. // API name: role_templates -func (r *PutRoleMapping) RoleTemplates(roletemplates ...types.RoleTemplateVariant) *PutRoleMapping { - // Initialize the request if it is not already initialized +func (r *PutRoleMapping) RoleTemplates(roletemplates ...types.RoleTemplate) *PutRoleMapping { if r.req == nil { r.req = NewRequest() } - for _, v := range roletemplates { + r.req.RoleTemplates = roletemplates - r.req.RoleTemplates = append(r.req.RoleTemplates, *v.RoleTemplateCaster()) - - } return r } -// A list of role names that are granted to the users that match the role +// Roles A list of role names that are granted to the users that match the role // mapping rules. // Exactly one of `roles` or `role_templates` must be specified. // API name: roles func (r *PutRoleMapping) Roles(roles ...string) *PutRoleMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range roles { + r.req.Roles = roles - r.req.Roles = append(r.req.Roles, v) - - } return r } -// The rules that determine which users should be matched by the mapping. +// Rules The rules that determine which users should be matched by the mapping. // A rule is a logical condition that is expressed by using a JSON DSL. // API name: rules -func (r *PutRoleMapping) Rules(rules types.RoleMappingRuleVariant) *PutRoleMapping { - // Initialize the request if it is not already initialized +func (r *PutRoleMapping) Rules(rules *types.RoleMappingRule) *PutRoleMapping { if r.req == nil { r.req = NewRequest() } - r.req.Rules = rules.RoleMappingRuleCaster() + r.req.Rules = rules return r } // API name: run_as func (r *PutRoleMapping) RunAs(runas ...string) *PutRoleMapping { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range runas { + r.req.RunAs = runas - r.req.RunAs = append(r.req.RunAs, v) - - } return r } diff --git a/typedapi/security/putrolemapping/request.go b/typedapi/security/putrolemapping/request.go index 9ab5e4cc20..40fe93ab46 100644 --- a/typedapi/security/putrolemapping/request.go +++ b/typedapi/security/putrolemapping/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putrolemapping @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L103 type Request struct { // Enabled Mappings that have `enabled` set to `false` are ignored when role mapping is diff --git a/typedapi/security/putrolemapping/response.go b/typedapi/security/putrolemapping/response.go index b7289be362..917bb79bea 100644 --- a/typedapi/security/putrolemapping/response.go +++ b/typedapi/security/putrolemapping/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24 type Response struct { Created *bool `json:"created,omitempty"` RoleMapping types.CreatedStatus `json:"role_mapping"` diff --git a/typedapi/security/putuser/put_user.go b/typedapi/security/putuser/put_user.go index d16baef2e2..353bc6c236 100644 --- a/typedapi/security/putuser/put_user.go +++ b/typedapi/security/putuser/put_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update users. // @@ -385,59 +385,51 @@ func (r *PutUser) Pretty(pretty bool) *PutUser { return r } -// The email of the user. +// Email The email of the user. // API name: email func (r *PutUser) Email(email string) *PutUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Email = &email return r } -// Specifies whether the user is enabled. +// Enabled Specifies whether the user is enabled. // API name: enabled func (r *PutUser) Enabled(enabled bool) *PutUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Enabled = &enabled return r } -// The full name of the user. +// FullName The full name of the user. // API name: full_name func (r *PutUser) FullName(fullname string) *PutUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FullName = &fullname return r } -// Arbitrary metadata that you want to associate with the user. +// Metadata Arbitrary metadata that you want to associate with the user. // API name: metadata -func (r *PutUser) Metadata(metadata types.MetadataVariant) *PutUser { - // Initialize the request if it is not already initialized +func (r *PutUser) Metadata(metadata types.Metadata) *PutUser { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// The user's password. +// Password The user's password. // Passwords must be at least 6 characters long. // When adding a user, one of `password` or `password_hash` is required. // When updating an existing user, the password is optional, so that other @@ -445,17 +437,15 @@ func (r *PutUser) Metadata(metadata types.MetadataVariant) *PutUser { // user's password // API name: password func (r *PutUser) Password(password string) *PutUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Password = &password return r } -// A hash of the user's password. +// PasswordHash A hash of the user's password. // This must be produced using the same hashing algorithm as has been configured // for password storage. // For more details, see the explanation of the @@ -467,7 +457,6 @@ func (r *PutUser) Password(password string) *PutUser { // the same request. // API name: password_hash func (r *PutUser) PasswordHash(passwordhash string) *PutUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -477,19 +466,15 @@ func (r *PutUser) PasswordHash(passwordhash string) *PutUser { return r } -// A set of roles the user has. +// Roles A set of roles the user has. // The roles determine the user's access permissions. // To create a user without any roles, specify an empty list (`[]`). // API name: roles func (r *PutUser) Roles(roles ...string) *PutUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range roles { - - r.req.Roles = append(r.req.Roles, v) + r.req.Roles = roles - } return r } diff --git a/typedapi/security/putuser/request.go b/typedapi/security/putuser/request.go index c7a1bddfac..2b474a1a39 100644 --- a/typedapi/security/putuser/request.go +++ b/typedapi/security/putuser/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putuser @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_user/SecurityPutUserRequest.ts#L23-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_user/SecurityPutUserRequest.ts#L23-L101 type Request struct { // Email The email of the user. diff --git a/typedapi/security/putuser/response.go b/typedapi/security/putuser/response.go index 6e2f82fbe7..172d409648 100644 --- a/typedapi/security/putuser/response.go +++ b/typedapi/security/putuser/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putuser // Response holds the response body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_user/SecurityPutUserResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_user/SecurityPutUserResponse.ts#L20-L28 type Response struct { // Created A successful call returns a JSON structure that shows whether the user has diff --git a/typedapi/security/queryapikeys/query_api_keys.go b/typedapi/security/queryapikeys/query_api_keys.go index 803f84c990..ba2efe8e5a 100644 --- a/typedapi/security/queryapikeys/query_api_keys.go +++ b/typedapi/security/queryapikeys/query_api_keys.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Find API keys with a query. // @@ -394,7 +394,7 @@ func (r *QueryApiKeys) Pretty(pretty bool) *QueryApiKeys { return r } -// Any aggregations to run over the corpus of returned API keys. +// Aggregations Any aggregations to run over the corpus of returned API keys. // Aggregations and queries work together. Aggregations are computed only on the // API keys that match the query. // This supports only a subset of aggregation types, namely: `terms`, `range`, @@ -404,51 +404,31 @@ func (r *QueryApiKeys) Pretty(pretty bool) *QueryApiKeys { // works with. // API name: aggregations func (r *QueryApiKeys) Aggregations(aggregations map[string]types.ApiKeyAggregationContainer) *QueryApiKeys { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Aggregations = aggregations - return r -} -func (r *QueryApiKeys) AddAggregation(key string, value types.ApiKeyAggregationContainerVariant) *QueryApiKeys { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.ApiKeyAggregationContainer - if r.req.Aggregations == nil { - r.req.Aggregations = make(map[string]types.ApiKeyAggregationContainer) - } else { - tmp = r.req.Aggregations - } - - tmp[key] = *value.ApiKeyAggregationContainerCaster() + r.req.Aggregations = aggregations - r.req.Aggregations = tmp return r } -// The starting document offset. +// From The starting document offset. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` parameter. // API name: from func (r *QueryApiKeys) From(from int) *QueryApiKeys { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } -// A query to filter which API keys to return. +// Query A query to filter which API keys to return. // If the query parameter is missing, it is equivalent to a `match_all` query. // The query supports a subset of query types, including `match_all`, `bool`, // `term`, `terms`, `match`, @@ -465,33 +445,28 @@ func (r *QueryApiKeys) From(from int) *QueryApiKeys { // value. // Such a match query is hence equivalent to a `term` query. // API name: query -func (r *QueryApiKeys) Query(query types.ApiKeyQueryContainerVariant) *QueryApiKeys { - // Initialize the request if it is not already initialized +func (r *QueryApiKeys) Query(query *types.ApiKeyQueryContainer) *QueryApiKeys { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.ApiKeyQueryContainerCaster() + r.req.Query = query return r } -// The search after definition. +// SearchAfter The search after definition. // API name: search_after -func (r *QueryApiKeys) SearchAfter(sortresults ...types.FieldValueVariant) *QueryApiKeys { - // Initialize the request if it is not already initialized +func (r *QueryApiKeys) SearchAfter(sortresults ...types.FieldValue) *QueryApiKeys { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// The number of hits to return. +// Size The number of hits to return. // It must not be negative. // The `size` parameter can be set to `0`, in which case no API key matches are // returned, only the aggregation results. @@ -500,30 +475,24 @@ func (r *QueryApiKeys) SearchAfter(sortresults ...types.FieldValueVariant) *Quer // To page through more hits, use the `search_after` parameter. // API name: size func (r *QueryApiKeys) Size(size int) *QueryApiKeys { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// The sort definition. +// Sort The sort definition. // Other than `id`, all public fields of an API key are eligible for sorting. // In addition, sort can also be applied to the `_doc` field to sort by index // order. // API name: sort -func (r *QueryApiKeys) Sort(sorts ...types.SortCombinationsVariant) *QueryApiKeys { - // Initialize the request if it is not already initialized +func (r *QueryApiKeys) Sort(sorts ...types.SortCombinations) *QueryApiKeys { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } diff --git a/typedapi/security/queryapikeys/request.go b/typedapi/security/queryapikeys/request.go index beaffb6f87..d66c2ab582 100644 --- a/typedapi/security/queryapikeys/request.go +++ b/typedapi/security/queryapikeys/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package queryapikeys @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L124 type Request struct { // Aggregations Any aggregations to run over the corpus of returned API keys. diff --git a/typedapi/security/queryapikeys/response.go b/typedapi/security/queryapikeys/response.go index f16f27ffbe..04edd6f35a 100644 --- a/typedapi/security/queryapikeys/response.go +++ b/typedapi/security/queryapikeys/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package queryapikeys @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_api_keys/QueryApiKeysResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_api_keys/QueryApiKeysResponse.ts#L26-L45 type Response struct { // Aggregations The aggregations result, if requested. diff --git a/typedapi/security/queryrole/query_role.go b/typedapi/security/queryrole/query_role.go index c47cbbdce0..9b03f38191 100644 --- a/typedapi/security/queryrole/query_role.go +++ b/typedapi/security/queryrole/query_role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Find roles with a query. // @@ -352,24 +352,22 @@ func (r *QueryRole) Pretty(pretty bool) *QueryRole { return r } -// The starting document offset. +// From The starting document offset. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` parameter. // API name: from func (r *QueryRole) From(from int) *QueryRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } -// A query to filter which roles to return. +// Query A query to filter which roles to return. // If the query parameter is missing, it is equivalent to a `match_all` query. // The query supports a subset of query types, including `match_all`, `bool`, // `term`, `terms`, `match`, @@ -379,63 +377,52 @@ func (r *QueryRole) From(from int) *QueryRole { // `applications.application`, `applications.privileges`, and // `applications.resources`. // API name: query -func (r *QueryRole) Query(query types.RoleQueryContainerVariant) *QueryRole { - // Initialize the request if it is not already initialized +func (r *QueryRole) Query(query *types.RoleQueryContainer) *QueryRole { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.RoleQueryContainerCaster() + r.req.Query = query return r } -// The search after definition. +// SearchAfter The search after definition. // API name: search_after -func (r *QueryRole) SearchAfter(sortresults ...types.FieldValueVariant) *QueryRole { - // Initialize the request if it is not already initialized +func (r *QueryRole) SearchAfter(sortresults ...types.FieldValue) *QueryRole { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// The number of hits to return. +// Size The number of hits to return. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` parameter. // API name: size func (r *QueryRole) Size(size int) *QueryRole { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// The sort definition. +// Sort The sort definition. // You can sort on `username`, `roles`, or `enabled`. // In addition, sort can also be applied to the `_doc` field to sort by index // order. // API name: sort -func (r *QueryRole) Sort(sorts ...types.SortCombinationsVariant) *QueryRole { - // Initialize the request if it is not already initialized +func (r *QueryRole) Sort(sorts ...types.SortCombinations) *QueryRole { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } diff --git a/typedapi/security/queryrole/request.go b/typedapi/security/queryrole/request.go index 14ed55e636..e5bbaf0c93 100644 --- a/typedapi/security/queryrole/request.go +++ b/typedapi/security/queryrole/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package queryrole @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_role/QueryRolesRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_role/QueryRolesRequest.ts#L25-L85 type Request struct { // From The starting document offset. diff --git a/typedapi/security/queryrole/response.go b/typedapi/security/queryrole/response.go index a5d62f15b4..3ec86eaf89 100644 --- a/typedapi/security/queryrole/response.go +++ b/typedapi/security/queryrole/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package queryrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_role/QueryRolesResponse.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_role/QueryRolesResponse.ts#L23-L43 type Response struct { // Count The number of roles returned in the response. diff --git a/typedapi/security/queryuser/query_user.go b/typedapi/security/queryuser/query_user.go index 60d289aade..93f68db13f 100644 --- a/typedapi/security/queryuser/query_user.go +++ b/typedapi/security/queryuser/query_user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Find users with a query. // @@ -359,24 +359,22 @@ func (r *QueryUser) Pretty(pretty bool) *QueryUser { return r } -// The starting document offset. +// From The starting document offset. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` parameter. // API name: from func (r *QueryUser) From(from int) *QueryUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } -// A query to filter which users to return. +// Query A query to filter which users to return. // If the query parameter is missing, it is equivalent to a `match_all` query. // The query supports a subset of query types, including `match_all`, `bool`, // `term`, `terms`, `match`, @@ -384,63 +382,52 @@ func (r *QueryUser) From(from int) *QueryUser { // You can query the following information associated with user: `username`, // `roles`, `enabled`, `full_name`, and `email`. // API name: query -func (r *QueryUser) Query(query types.UserQueryContainerVariant) *QueryUser { - // Initialize the request if it is not already initialized +func (r *QueryUser) Query(query *types.UserQueryContainer) *QueryUser { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.UserQueryContainerCaster() + r.req.Query = query return r } -// The search after definition +// SearchAfter The search after definition // API name: search_after -func (r *QueryUser) SearchAfter(sortresults ...types.FieldValueVariant) *QueryUser { - // Initialize the request if it is not already initialized +func (r *QueryUser) SearchAfter(sortresults ...types.FieldValue) *QueryUser { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// The number of hits to return. +// Size The number of hits to return. // It must not be negative. // By default, you cannot page through more than 10,000 hits using the `from` // and `size` parameters. // To page through more hits, use the `search_after` parameter. // API name: size func (r *QueryUser) Size(size int) *QueryUser { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// The sort definition. +// Sort The sort definition. // Fields eligible for sorting are: `username`, `roles`, `enabled`. // In addition, sort can also be applied to the `_doc` field to sort by index // order. // API name: sort -func (r *QueryUser) Sort(sorts ...types.SortCombinationsVariant) *QueryUser { - // Initialize the request if it is not already initialized +func (r *QueryUser) Sort(sorts ...types.SortCombinations) *QueryUser { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } diff --git a/typedapi/security/queryuser/request.go b/typedapi/security/queryuser/request.go index 02232e3672..437656ce25 100644 --- a/typedapi/security/queryuser/request.go +++ b/typedapi/security/queryuser/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package queryuser @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L91 type Request struct { // From The starting document offset. diff --git a/typedapi/security/queryuser/response.go b/typedapi/security/queryuser/response.go index ba5acb56e6..452fcfa447 100644 --- a/typedapi/security/queryuser/response.go +++ b/typedapi/security/queryuser/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package queryuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_user/SecurityQueryUserResponse.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_user/SecurityQueryUserResponse.ts#L23-L38 type Response struct { // Count The number of users returned in the response. diff --git a/typedapi/security/samlauthenticate/request.go b/typedapi/security/samlauthenticate/request.go index 42a68e0daa..9051c41379 100644 --- a/typedapi/security/samlauthenticate/request.go +++ b/typedapi/security/samlauthenticate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlauthenticate @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_authenticate/Request.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_authenticate/Request.ts#L23-L61 type Request struct { // Content The SAML response as it was sent by the user's browser, usually a Base64 diff --git a/typedapi/security/samlauthenticate/response.go b/typedapi/security/samlauthenticate/response.go index 07c341b512..ea2e10a7a4 100644 --- a/typedapi/security/samlauthenticate/response.go +++ b/typedapi/security/samlauthenticate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlauthenticate // Response holds the response body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_authenticate/Response.ts#L22-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_authenticate/Response.ts#L22-L45 type Response struct { // AccessToken The access token that was generated by Elasticsearch. diff --git a/typedapi/security/samlauthenticate/saml_authenticate.go b/typedapi/security/samlauthenticate/saml_authenticate.go index c743209cd3..32c7f4cbf2 100644 --- a/typedapi/security/samlauthenticate/saml_authenticate.go +++ b/typedapi/security/samlauthenticate/saml_authenticate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Authenticate SAML. // @@ -384,11 +384,10 @@ func (r *SamlAuthenticate) Pretty(pretty bool) *SamlAuthenticate { return r } -// The SAML response as it was sent by the user's browser, usually a Base64 +// Content The SAML response as it was sent by the user's browser, usually a Base64 // encoded XML document. // API name: content func (r *SamlAuthenticate) Content(content string) *SamlAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -398,25 +397,22 @@ func (r *SamlAuthenticate) Content(content string) *SamlAuthenticate { return r } -// A JSON array with all the valid SAML Request Ids that the caller of the API +// Ids A JSON array with all the valid SAML Request Ids that the caller of the API // has for the current user. // API name: ids func (r *SamlAuthenticate) Ids(ids ...string) *SamlAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Ids = ids return r } -// The name of the realm that should authenticate the SAML response. Useful in +// Realm The name of the realm that should authenticate the SAML response. Useful in // cases where many SAML realms are defined. // API name: realm func (r *SamlAuthenticate) Realm(realm string) *SamlAuthenticate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/samlcompletelogout/request.go b/typedapi/security/samlcompletelogout/request.go index adcbede396..beaf5dc767 100644 --- a/typedapi/security/samlcompletelogout/request.go +++ b/typedapi/security/samlcompletelogout/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlcompletelogout @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package samlcompletelogout // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_complete_logout/Request.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_complete_logout/Request.ts#L23-L61 type Request struct { // Content If the SAML IdP sends the logout response with the HTTP-Post binding, this diff --git a/typedapi/security/samlcompletelogout/saml_complete_logout.go b/typedapi/security/samlcompletelogout/saml_complete_logout.go index acf1a89694..b68cb84b6e 100644 --- a/typedapi/security/samlcompletelogout/saml_complete_logout.go +++ b/typedapi/security/samlcompletelogout/saml_complete_logout.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Logout of SAML completely. // @@ -315,12 +315,11 @@ func (r *SamlCompleteLogout) Pretty(pretty bool) *SamlCompleteLogout { return r } -// If the SAML IdP sends the logout response with the HTTP-Post binding, this +// Content If the SAML IdP sends the logout response with the HTTP-Post binding, this // field must be set to the value of the SAMLResponse form parameter from the // logout response. // API name: content func (r *SamlCompleteLogout) Content(content string) *SamlCompleteLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -330,25 +329,22 @@ func (r *SamlCompleteLogout) Content(content string) *SamlCompleteLogout { return r } -// A JSON array with all the valid SAML Request Ids that the caller of the API +// Ids A JSON array with all the valid SAML Request Ids that the caller of the API // has for the current user. // API name: ids func (r *SamlCompleteLogout) Ids(ids ...string) *SamlCompleteLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Ids = ids return r } -// If the SAML IdP sends the logout response with the HTTP-Redirect binding, +// QueryString If the SAML IdP sends the logout response with the HTTP-Redirect binding, // this field must be set to the query string of the redirect URI. // API name: query_string func (r *SamlCompleteLogout) QueryString(querystring string) *SamlCompleteLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -358,11 +354,10 @@ func (r *SamlCompleteLogout) QueryString(querystring string) *SamlCompleteLogout return r } -// The name of the SAML realm in Elasticsearch for which the configuration is +// Realm The name of the SAML realm in Elasticsearch for which the configuration is // used to verify the logout response. // API name: realm func (r *SamlCompleteLogout) Realm(realm string) *SamlCompleteLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/samlinvalidate/request.go b/typedapi/security/samlinvalidate/request.go index 7351bc88d6..74d7796570 100644 --- a/typedapi/security/samlinvalidate/request.go +++ b/typedapi/security/samlinvalidate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlinvalidate @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_invalidate/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_invalidate/Request.ts#L22-L61 type Request struct { // Acs The Assertion Consumer Service URL that matches the one of the SAML realm in diff --git a/typedapi/security/samlinvalidate/response.go b/typedapi/security/samlinvalidate/response.go index 06487a4743..09570ca4bb 100644 --- a/typedapi/security/samlinvalidate/response.go +++ b/typedapi/security/samlinvalidate/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlinvalidate // Response holds the response body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_invalidate/Response.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_invalidate/Response.ts#L22-L37 type Response struct { // Invalidated The number of tokens that were invalidated as part of this logout. diff --git a/typedapi/security/samlinvalidate/saml_invalidate.go b/typedapi/security/samlinvalidate/saml_invalidate.go index b734a6d640..955b8d6989 100644 --- a/typedapi/security/samlinvalidate/saml_invalidate.go +++ b/typedapi/security/samlinvalidate/saml_invalidate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Invalidate SAML. // @@ -368,12 +368,11 @@ func (r *SamlInvalidate) Pretty(pretty bool) *SamlInvalidate { return r } -// The Assertion Consumer Service URL that matches the one of the SAML realm in +// Acs The Assertion Consumer Service URL that matches the one of the SAML realm in // Elasticsearch that should be used. You must specify either this parameter or // the `realm` parameter. // API name: acs func (r *SamlInvalidate) Acs(acs string) *SamlInvalidate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -383,7 +382,7 @@ func (r *SamlInvalidate) Acs(acs string) *SamlInvalidate { return r } -// The query part of the URL that the user was redirected to by the SAML IdP to +// QueryString The query part of the URL that the user was redirected to by the SAML IdP to // initiate the Single Logout. // This query should include a single parameter named `SAMLRequest` that // contains a SAML logout request that is deflated and Base64 encoded. @@ -397,7 +396,6 @@ func (r *SamlInvalidate) Acs(acs string) *SamlInvalidate { // way. // API name: query_string func (r *SamlInvalidate) QueryString(querystring string) *SamlInvalidate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -407,11 +405,10 @@ func (r *SamlInvalidate) QueryString(querystring string) *SamlInvalidate { return r } -// The name of the SAML realm in Elasticsearch the configuration. You must +// Realm The name of the SAML realm in Elasticsearch the configuration. You must // specify either this parameter or the `acs` parameter. // API name: realm func (r *SamlInvalidate) Realm(realm string) *SamlInvalidate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/samllogout/request.go b/typedapi/security/samllogout/request.go index 04fe24b7ae..1f8f3ce0f1 100644 --- a/typedapi/security/samllogout/request.go +++ b/typedapi/security/samllogout/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samllogout @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_logout/Request.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_logout/Request.ts#L22-L57 type Request struct { // RefreshToken The refresh token that was returned as a response to calling the SAML diff --git a/typedapi/security/samllogout/response.go b/typedapi/security/samllogout/response.go index 8c1d028622..96f80ca8b3 100644 --- a/typedapi/security/samllogout/response.go +++ b/typedapi/security/samllogout/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samllogout // Response holds the response body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_logout/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_logout/Response.ts#L20-L28 type Response struct { // Redirect A URL that contains a SAML logout request as a parameter. diff --git a/typedapi/security/samllogout/saml_logout.go b/typedapi/security/samllogout/saml_logout.go index d75ebdfcb3..4644d46ef8 100644 --- a/typedapi/security/samllogout/saml_logout.go +++ b/typedapi/security/samllogout/saml_logout.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Logout of SAML. // @@ -364,13 +364,12 @@ func (r *SamlLogout) Pretty(pretty bool) *SamlLogout { return r } -// The refresh token that was returned as a response to calling the SAML +// RefreshToken The refresh token that was returned as a response to calling the SAML // authenticate API. // Alternatively, the most recent refresh token that was received after // refreshing the original access token. // API name: refresh_token func (r *SamlLogout) RefreshToken(refreshtoken string) *SamlLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -380,13 +379,12 @@ func (r *SamlLogout) RefreshToken(refreshtoken string) *SamlLogout { return r } -// The access token that was returned as a response to calling the SAML +// Token The access token that was returned as a response to calling the SAML // authenticate API. // Alternatively, the most recent token that was received after refreshing the // original one by using a `refresh_token`. // API name: token func (r *SamlLogout) Token(token string) *SamlLogout { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/samlprepareauthentication/request.go b/typedapi/security/samlprepareauthentication/request.go index b040d306ea..1a2ad95edb 100644 --- a/typedapi/security/samlprepareauthentication/request.go +++ b/typedapi/security/samlprepareauthentication/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlprepareauthentication @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_prepare_authentication/Request.ts#L22-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_prepare_authentication/Request.ts#L22-L67 type Request struct { // Acs The Assertion Consumer Service URL that matches the one of the SAML realms in diff --git a/typedapi/security/samlprepareauthentication/response.go b/typedapi/security/samlprepareauthentication/response.go index b10b6e6724..ab3ba020d9 100644 --- a/typedapi/security/samlprepareauthentication/response.go +++ b/typedapi/security/samlprepareauthentication/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlprepareauthentication // Response holds the response body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_prepare_authentication/Response.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_prepare_authentication/Response.ts#L22-L37 type Response struct { // Id A unique identifier for the SAML Request to be stored by the caller of the diff --git a/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go b/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go index 44f862eb83..cb996b8bf7 100644 --- a/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go +++ b/typedapi/security/samlprepareauthentication/saml_prepare_authentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Prepare SAML authentication. // @@ -380,13 +380,12 @@ func (r *SamlPrepareAuthentication) Pretty(pretty bool) *SamlPrepareAuthenticati return r } -// The Assertion Consumer Service URL that matches the one of the SAML realms in +// Acs The Assertion Consumer Service URL that matches the one of the SAML realms in // Elasticsearch. // The realm is used to generate the authentication request. You must specify // either this parameter or the `realm` parameter. // API name: acs func (r *SamlPrepareAuthentication) Acs(acs string) *SamlPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -396,12 +395,11 @@ func (r *SamlPrepareAuthentication) Acs(acs string) *SamlPrepareAuthentication { return r } -// The name of the SAML realm in Elasticsearch for which the configuration is +// Realm The name of the SAML realm in Elasticsearch for which the configuration is // used to generate the authentication request. // You must specify either this parameter or the `acs` parameter. // API name: realm func (r *SamlPrepareAuthentication) Realm(realm string) *SamlPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -411,13 +409,12 @@ func (r *SamlPrepareAuthentication) Realm(realm string) *SamlPrepareAuthenticati return r } -// A string that will be included in the redirect URL that this API returns as +// RelayState A string that will be included in the redirect URL that this API returns as // the `RelayState` query parameter. // If the Authentication Request is signed, this value is used as part of the // signature computation. // API name: relay_state func (r *SamlPrepareAuthentication) RelayState(relaystate string) *SamlPrepareAuthentication { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/samlserviceprovidermetadata/response.go b/typedapi/security/samlserviceprovidermetadata/response.go index c86c55ca9f..a31e58c44f 100644 --- a/typedapi/security/samlserviceprovidermetadata/response.go +++ b/typedapi/security/samlserviceprovidermetadata/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package samlserviceprovidermetadata // Response holds the response body struct for the package samlserviceprovidermetadata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/saml_service_provider_metadata/Response.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/saml_service_provider_metadata/Response.ts#L20-L27 type Response struct { // Metadata An XML string that contains a SAML Service Provider's metadata for the realm. diff --git a/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go b/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go index 3775804259..9da1355c30 100644 --- a/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go +++ b/typedapi/security/samlserviceprovidermetadata/saml_service_provider_metadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create SAML service provider metadata. // diff --git a/typedapi/security/suggestuserprofiles/request.go b/typedapi/security/suggestuserprofiles/request.go index 628b091c71..7fd8c7f4de 100644 --- a/typedapi/security/suggestuserprofiles/request.go +++ b/typedapi/security/suggestuserprofiles/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package suggestuserprofiles @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/suggest_user_profiles/Request.ts#L24-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/suggest_user_profiles/Request.ts#L24-L81 type Request struct { // Data A comma-separated list of filters for the `data` field of the profile diff --git a/typedapi/security/suggestuserprofiles/response.go b/typedapi/security/suggestuserprofiles/response.go index d0e293fd68..55fee90f2c 100644 --- a/typedapi/security/suggestuserprofiles/response.go +++ b/typedapi/security/suggestuserprofiles/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package suggestuserprofiles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/suggest_user_profiles/Response.ts#L29-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/suggest_user_profiles/Response.ts#L29-L44 type Response struct { // Profiles A list of profile documents, ordered by relevance, that match the search diff --git a/typedapi/security/suggestuserprofiles/suggest_user_profiles.go b/typedapi/security/suggestuserprofiles/suggest_user_profiles.go index f2b534fd72..456e2d5e7d 100644 --- a/typedapi/security/suggestuserprofiles/suggest_user_profiles.go +++ b/typedapi/security/suggestuserprofiles/suggest_user_profiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Suggest a user profile. // @@ -352,7 +352,7 @@ func (r *SuggestUserProfiles) Pretty(pretty bool) *SuggestUserProfiles { return r } -// A comma-separated list of filters for the `data` field of the profile +// Data A comma-separated list of filters for the `data` field of the profile // document. // To return all content use `data=*`. // To return a subset of content, use `data=` to retrieve content nested @@ -362,37 +362,33 @@ func (r *SuggestUserProfiles) Pretty(pretty bool) *SuggestUserProfiles { // body field. // API name: data func (r *SuggestUserProfiles) Data(data ...string) *SuggestUserProfiles { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Data = make([]string, len(data)) r.req.Data = data return r } -// Extra search criteria to improve relevance of the suggestion result. +// Hint Extra search criteria to improve relevance of the suggestion result. // Profiles matching the spcified hint are ranked higher in the response. // Profiles not matching the hint aren't excluded from the response as long as // the profile matches the `name` field query. // API name: hint -func (r *SuggestUserProfiles) Hint(hint types.HintVariant) *SuggestUserProfiles { - // Initialize the request if it is not already initialized +func (r *SuggestUserProfiles) Hint(hint *types.Hint) *SuggestUserProfiles { if r.req == nil { r.req = NewRequest() } - r.req.Hint = hint.HintCaster() + r.req.Hint = hint return r } -// A query string used to match name-related fields in user profile documents. +// Name A query string used to match name-related fields in user profile documents. // Name-related fields are the user's `username`, `full_name`, and `email`. // API name: name func (r *SuggestUserProfiles) Name(name string) *SuggestUserProfiles { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -402,10 +398,9 @@ func (r *SuggestUserProfiles) Name(name string) *SuggestUserProfiles { return r } -// The number of profiles to return. +// Size The number of profiles to return. // API name: size func (r *SuggestUserProfiles) Size(size int64) *SuggestUserProfiles { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/security/updateapikey/request.go b/typedapi/security/updateapikey/request.go index 2b895f4d70..20efc6d09b 100644 --- a/typedapi/security/updateapikey/request.go +++ b/typedapi/security/updateapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_api_key/Request.ts#L26-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_api_key/Request.ts#L26-L91 type Request struct { // Expiration The expiration time for the API key. diff --git a/typedapi/security/updateapikey/response.go b/typedapi/security/updateapikey/response.go index 6f33fe17b2..b01ea36dd8 100644 --- a/typedapi/security/updateapikey/response.go +++ b/typedapi/security/updateapikey/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateapikey // Response holds the response body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_api_key/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_api_key/Response.ts#L20-L28 type Response struct { // Updated If `true`, the API key was updated. diff --git a/typedapi/security/updateapikey/update_api_key.go b/typedapi/security/updateapikey/update_api_key.go index d57881c488..a0be860873 100644 --- a/typedapi/security/updateapikey/update_api_key.go +++ b/typedapi/security/updateapikey/update_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update an API key. // @@ -421,40 +421,36 @@ func (r *UpdateApiKey) Pretty(pretty bool) *UpdateApiKey { return r } -// The expiration time for the API key. +// Expiration The expiration time for the API key. // By default, API keys never expire. // This property can be omitted to leave the expiration unchanged. // API name: expiration -func (r *UpdateApiKey) Expiration(duration types.DurationVariant) *UpdateApiKey { - // Initialize the request if it is not already initialized +func (r *UpdateApiKey) Expiration(duration types.Duration) *UpdateApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Expiration = *duration.DurationCaster() + r.req.Expiration = duration return r } -// Arbitrary metadata that you want to associate with the API key. +// Metadata Arbitrary metadata that you want to associate with the API key. // It supports a nested data structure. // Within the metadata object, keys beginning with `_` are reserved for system // usage. // When specified, this value fully replaces the metadata previously associated // with the API key. // API name: metadata -func (r *UpdateApiKey) Metadata(metadata types.MetadataVariant) *UpdateApiKey { - // Initialize the request if it is not already initialized +func (r *UpdateApiKey) Metadata(metadata types.Metadata) *UpdateApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// The role descriptors to assign to this API key. +// RoleDescriptors The role descriptors to assign to this API key. // The API key's effective permissions are an intersection of its assigned // privileges and the point in time snapshot of permissions of the owner user. // You can assign new privileges by specifying them in this parameter. @@ -468,29 +464,11 @@ func (r *UpdateApiKey) Metadata(metadata types.MetadataVariant) *UpdateApiKey { // API keys API. // API name: role_descriptors func (r *UpdateApiKey) RoleDescriptors(roledescriptors map[string]types.RoleDescriptor) *UpdateApiKey { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RoleDescriptors = roledescriptors - return r -} -func (r *UpdateApiKey) AddRoleDescriptor(key string, value types.RoleDescriptorVariant) *UpdateApiKey { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.RoleDescriptor - if r.req.RoleDescriptors == nil { - r.req.RoleDescriptors = make(map[string]types.RoleDescriptor) - } else { - tmp = r.req.RoleDescriptors - } - - tmp[key] = *value.RoleDescriptorCaster() + r.req.RoleDescriptors = roledescriptors - r.req.RoleDescriptors = tmp return r } diff --git a/typedapi/security/updatecrossclusterapikey/request.go b/typedapi/security/updatecrossclusterapikey/request.go index f27d2edd09..5e9d120c75 100644 --- a/typedapi/security/updatecrossclusterapikey/request.go +++ b/typedapi/security/updatecrossclusterapikey/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatecrossclusterapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updatecrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L83 type Request struct { // Access The access to be granted to this API key. diff --git a/typedapi/security/updatecrossclusterapikey/response.go b/typedapi/security/updatecrossclusterapikey/response.go index 28c965de34..22c9998233 100644 --- a/typedapi/security/updatecrossclusterapikey/response.go +++ b/typedapi/security/updatecrossclusterapikey/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatecrossclusterapikey // Response holds the response body struct for the package updatecrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28 type Response struct { // Updated If `true`, the API key was updated. diff --git a/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go b/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go index 362b2b6908..249803c4a2 100644 --- a/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go +++ b/typedapi/security/updatecrossclusterapikey/update_cross_cluster_api_key.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a cross-cluster API key. // @@ -407,53 +407,48 @@ func (r *UpdateCrossClusterApiKey) Pretty(pretty bool) *UpdateCrossClusterApiKey return r } -// The access to be granted to this API key. +// Access The access to be granted to this API key. // The access is composed of permissions for cross cluster search and cross // cluster replication. // At least one of them must be specified. // When specified, the new access assignment fully replaces the previously // assigned access. // API name: access -func (r *UpdateCrossClusterApiKey) Access(access types.AccessVariant) *UpdateCrossClusterApiKey { - // Initialize the request if it is not already initialized +func (r *UpdateCrossClusterApiKey) Access(access *types.Access) *UpdateCrossClusterApiKey { if r.req == nil { r.req = NewRequest() } - r.req.Access = *access.AccessCaster() + r.req.Access = *access return r } -// The expiration time for the API key. +// Expiration The expiration time for the API key. // By default, API keys never expire. This property can be omitted to leave the // value unchanged. // API name: expiration -func (r *UpdateCrossClusterApiKey) Expiration(duration types.DurationVariant) *UpdateCrossClusterApiKey { - // Initialize the request if it is not already initialized +func (r *UpdateCrossClusterApiKey) Expiration(duration types.Duration) *UpdateCrossClusterApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Expiration = *duration.DurationCaster() + r.req.Expiration = duration return r } -// Arbitrary metadata that you want to associate with the API key. +// Metadata Arbitrary metadata that you want to associate with the API key. // It supports nested data structure. // Within the metadata object, keys beginning with `_` are reserved for system // usage. // When specified, this information fully replaces metadata previously // associated with the API key. // API name: metadata -func (r *UpdateCrossClusterApiKey) Metadata(metadata types.MetadataVariant) *UpdateCrossClusterApiKey { - // Initialize the request if it is not already initialized +func (r *UpdateCrossClusterApiKey) Metadata(metadata types.Metadata) *UpdateCrossClusterApiKey { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } diff --git a/typedapi/security/updatesettings/request.go b/typedapi/security/updatesettings/request.go index ef74e2716a..035df0156d 100644 --- a/typedapi/security/updatesettings/request.go +++ b/typedapi/security/updatesettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatesettings @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_settings/SecurityUpdateSettingsRequest.ts#L24-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_settings/SecurityUpdateSettingsRequest.ts#L24-L71 type Request struct { // Security Settings for the index used for most security configuration, including native diff --git a/typedapi/security/updatesettings/response.go b/typedapi/security/updatesettings/response.go index e541f352d4..42ba78589c 100644 --- a/typedapi/security/updatesettings/response.go +++ b/typedapi/security/updatesettings/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatesettings // Response holds the response body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_settings/SecurityUpdateSettingsResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_settings/SecurityUpdateSettingsResponse.ts#L20-L24 type Response struct { Acknowledged bool `json:"acknowledged"` } diff --git a/typedapi/security/updatesettings/update_settings.go b/typedapi/security/updatesettings/update_settings.go index 0fc22233b6..8fdd0fce5b 100644 --- a/typedapi/security/updatesettings/update_settings.go +++ b/typedapi/security/updatesettings/update_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update security index settings. // @@ -380,42 +380,39 @@ func (r *UpdateSettings) Pretty(pretty bool) *UpdateSettings { return r } -// Settings for the index used for most security configuration, including native +// Security Settings for the index used for most security configuration, including native // realm users and roles configured with the API. // API name: security -func (r *UpdateSettings) Security(security types.SecuritySettingsVariant) *UpdateSettings { - // Initialize the request if it is not already initialized +func (r *UpdateSettings) Security(security *types.SecuritySettings) *UpdateSettings { if r.req == nil { r.req = NewRequest() } - r.req.Security = security.SecuritySettingsCaster() + r.req.Security = security return r } -// Settings for the index used to store profile information. +// SecurityProfile Settings for the index used to store profile information. // API name: security-profile -func (r *UpdateSettings) SecurityProfile(securityprofile types.SecuritySettingsVariant) *UpdateSettings { - // Initialize the request if it is not already initialized +func (r *UpdateSettings) SecurityProfile(securityprofile *types.SecuritySettings) *UpdateSettings { if r.req == nil { r.req = NewRequest() } - r.req.SecurityProfile = securityprofile.SecuritySettingsCaster() + r.req.SecurityProfile = securityprofile return r } -// Settings for the index used to store tokens. +// SecurityTokens Settings for the index used to store tokens. // API name: security-tokens -func (r *UpdateSettings) SecurityTokens(securitytokens types.SecuritySettingsVariant) *UpdateSettings { - // Initialize the request if it is not already initialized +func (r *UpdateSettings) SecurityTokens(securitytokens *types.SecuritySettings) *UpdateSettings { if r.req == nil { r.req = NewRequest() } - r.req.SecurityTokens = securitytokens.SecuritySettingsCaster() + r.req.SecurityTokens = securitytokens return r } diff --git a/typedapi/security/updateuserprofiledata/request.go b/typedapi/security/updateuserprofiledata/request.go index 3bc4a1f974..3fe73ff5a0 100644 --- a/typedapi/security/updateuserprofiledata/request.go +++ b/typedapi/security/updateuserprofiledata/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateuserprofiledata @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_user_profile_data/Request.ts#L27-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_user_profile_data/Request.ts#L27-L98 type Request struct { // Data Non-searchable data that you want to associate with the user profile. diff --git a/typedapi/security/updateuserprofiledata/response.go b/typedapi/security/updateuserprofiledata/response.go index 3df40a7c07..9268ffd9c7 100644 --- a/typedapi/security/updateuserprofiledata/response.go +++ b/typedapi/security/updateuserprofiledata/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updateuserprofiledata // Response holds the response body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/update_user_profile_data/Response.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/update_user_profile_data/Response.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/security/updateuserprofiledata/update_user_profile_data.go b/typedapi/security/updateuserprofiledata/update_user_profile_data.go index 2ad6189b80..8e7aa78798 100644 --- a/typedapi/security/updateuserprofiledata/update_user_profile_data.go +++ b/typedapi/security/updateuserprofiledata/update_user_profile_data.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update user profile data. // @@ -436,7 +436,7 @@ func (r *UpdateUserProfileData) Pretty(pretty bool) *UpdateUserProfileData { return r } -// Non-searchable data that you want to associate with the user profile. +// Data Non-searchable data that you want to associate with the user profile. // This field supports a nested data structure. // Within the `data` object, top-level keys cannot begin with an underscore // (`_`) or contain a period (`.`). @@ -444,62 +444,26 @@ func (r *UpdateUserProfileData) Pretty(pretty bool) *UpdateUserProfileData { // profile API. // API name: data func (r *UpdateUserProfileData) Data(data map[string]json.RawMessage) *UpdateUserProfileData { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Data = data - return r -} -func (r *UpdateUserProfileData) AddDatum(key string, value json.RawMessage) *UpdateUserProfileData { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Data == nil { - r.req.Data = make(map[string]json.RawMessage) - } else { - tmp = r.req.Data - } - - tmp[key] = value + r.req.Data = data - r.req.Data = tmp return r } -// Searchable data that you want to associate with the user profile. +// Labels Searchable data that you want to associate with the user profile. // This field supports a nested data structure. // Within the labels object, top-level keys cannot begin with an underscore // (`_`) or contain a period (`.`). // API name: labels func (r *UpdateUserProfileData) Labels(labels map[string]json.RawMessage) *UpdateUserProfileData { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Labels = labels - return r -} -func (r *UpdateUserProfileData) AddLabel(key string, value json.RawMessage) *UpdateUserProfileData { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Labels == nil { - r.req.Labels = make(map[string]json.RawMessage) - } else { - tmp = r.req.Labels - } - - tmp[key] = value + r.req.Labels = labels - r.req.Labels = tmp return r } diff --git a/typedapi/shutdown/deletenode/delete_node.go b/typedapi/shutdown/deletenode/delete_node.go index a98d76e5ee..cab2895a72 100644 --- a/typedapi/shutdown/deletenode/delete_node.go +++ b/typedapi/shutdown/deletenode/delete_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Cancel node shutdown preparations. // Remove a node from the shutdown list so it can resume normal operations. diff --git a/typedapi/shutdown/deletenode/response.go b/typedapi/shutdown/deletenode/response.go index 2f8ebbbbb5..3c17d22e73 100644 --- a/typedapi/shutdown/deletenode/response.go +++ b/typedapi/shutdown/deletenode/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletenode // Response holds the response body struct for the package deletenode // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/shutdown/getnode/get_node.go b/typedapi/shutdown/getnode/get_node.go index d3943f8d85..10caad5ad7 100644 --- a/typedapi/shutdown/getnode/get_node.go +++ b/typedapi/shutdown/getnode/get_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the shutdown status. // diff --git a/typedapi/shutdown/getnode/response.go b/typedapi/shutdown/getnode/response.go index aa77732531..4944d0f664 100644 --- a/typedapi/shutdown/getnode/response.go +++ b/typedapi/shutdown/getnode/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getnode @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getnode // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L23-L27 type Response struct { Nodes []types.NodeShutdownStatus `json:"nodes"` } diff --git a/typedapi/shutdown/putnode/put_node.go b/typedapi/shutdown/putnode/put_node.go index 6607262c5d..5fa5fa0b16 100644 --- a/typedapi/shutdown/putnode/put_node.go +++ b/typedapi/shutdown/putnode/put_node.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Prepare a node to be shut down. // @@ -428,7 +428,7 @@ func (r *PutNode) Pretty(pretty bool) *PutNode { return r } -// Only valid if type is restart. +// AllocationDelay Only valid if type is restart. // Controls how long Elasticsearch will wait for the node to restart and join // the cluster before reassigning its shards to other nodes. // This works the same as delaying allocation with the @@ -437,7 +437,6 @@ func (r *PutNode) Pretty(pretty bool) *PutNode { // delay, the longer of the two is used. // API name: allocation_delay func (r *PutNode) AllocationDelay(allocationdelay string) *PutNode { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -447,12 +446,11 @@ func (r *PutNode) AllocationDelay(allocationdelay string) *PutNode { return r } -// A human-readable reason that the node is being shut down. +// Reason A human-readable reason that the node is being shut down. // This field provides information for other cluster operators; it does not // affect the shut down process. // API name: reason func (r *PutNode) Reason(reason string) *PutNode { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -462,7 +460,7 @@ func (r *PutNode) Reason(reason string) *PutNode { return r } -// Only valid if type is replace. +// TargetNodeName Only valid if type is replace. // Specifies the name of the node that is replacing the node being shut down. // Shards from the shut down node are only allowed to be allocated to the target // node, and no other data will be allocated to the target node. @@ -470,7 +468,6 @@ func (r *PutNode) Reason(reason string) *PutNode { // watermarks or user attribute filtering rules. // API name: target_node_name func (r *PutNode) TargetNodeName(targetnodename string) *PutNode { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -480,7 +477,7 @@ func (r *PutNode) TargetNodeName(targetnodename string) *PutNode { return r } -// Valid values are restart, remove, or replace. +// Type Valid values are restart, remove, or replace. // Use restart when you need to temporarily shut down a node to perform an // upgrade, make configuration changes, or perform other maintenance. // Because the node is expected to rejoin the cluster, data is not migrated off @@ -494,10 +491,10 @@ func (r *PutNode) TargetNodeName(targetnodename string) *PutNode { // unassigned shards, and shrink may fail until the replacement is complete. // API name: type func (r *PutNode) Type(type_ type_.Type) *PutNode { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } r.req.Type = type_ + return r } diff --git a/typedapi/shutdown/putnode/request.go b/typedapi/shutdown/putnode/request.go index a003febf5a..3fecb658f3 100644 --- a/typedapi/shutdown/putnode/request.go +++ b/typedapi/shutdown/putnode/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putnode @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L108 type Request struct { // AllocationDelay Only valid if type is restart. diff --git a/typedapi/shutdown/putnode/response.go b/typedapi/shutdown/putnode/response.go index 54ef0322fd..6c0abfce2d 100644 --- a/typedapi/shutdown/putnode/response.go +++ b/typedapi/shutdown/putnode/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putnode // Response holds the response body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/simulate/ingest/ingest.go b/typedapi/simulate/ingest/ingest.go index 17617dc8b5..2a143b71fc 100644 --- a/typedapi/simulate/ingest/ingest.go +++ b/typedapi/simulate/ingest/ingest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Simulate data ingestion. // Run ingest pipelines against a set of provided documents, optionally with @@ -440,125 +440,66 @@ func (r *Ingest) Pretty(pretty bool) *Ingest { return r } -// A map of component template names to substitute component template definition +// ComponentTemplateSubstitutions A map of component template names to substitute component template definition // objects. // API name: component_template_substitutions func (r *Ingest) ComponentTemplateSubstitutions(componenttemplatesubstitutions map[string]types.ComponentTemplateNode) *Ingest { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ComponentTemplateSubstitutions = componenttemplatesubstitutions - return r -} - -func (r *Ingest) AddComponentTemplateSubstitution(key string, value types.ComponentTemplateNodeVariant) *Ingest { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.ComponentTemplateNode - if r.req.ComponentTemplateSubstitutions == nil { - r.req.ComponentTemplateSubstitutions = make(map[string]types.ComponentTemplateNode) - } else { - tmp = r.req.ComponentTemplateSubstitutions - } - tmp[key] = *value.ComponentTemplateNodeCaster() + r.req.ComponentTemplateSubstitutions = componenttemplatesubstitutions - r.req.ComponentTemplateSubstitutions = tmp return r } -// Sample documents to test in the pipeline. +// Docs Sample documents to test in the pipeline. // API name: docs -func (r *Ingest) Docs(docs ...types.DocumentVariant) *Ingest { - // Initialize the request if it is not already initialized +func (r *Ingest) Docs(docs ...types.Document) *Ingest { if r.req == nil { r.req = NewRequest() } - for _, v := range docs { - - r.req.Docs = append(r.req.Docs, *v.DocumentCaster()) + r.req.Docs = docs - } return r } -// A map of index template names to substitute index template definition +// IndexTemplateSubstitutions A map of index template names to substitute index template definition // objects. // API name: index_template_substitutions func (r *Ingest) IndexTemplateSubstitutions(indextemplatesubstitutions map[string]types.IndexTemplate) *Ingest { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexTemplateSubstitutions = indextemplatesubstitutions - return r -} -func (r *Ingest) AddIndexTemplateSubstitution(key string, value types.IndexTemplateVariant) *Ingest { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.IndexTemplate - if r.req.IndexTemplateSubstitutions == nil { - r.req.IndexTemplateSubstitutions = make(map[string]types.IndexTemplate) - } else { - tmp = r.req.IndexTemplateSubstitutions - } - - tmp[key] = *value.IndexTemplateCaster() + r.req.IndexTemplateSubstitutions = indextemplatesubstitutions - r.req.IndexTemplateSubstitutions = tmp return r } // API name: mapping_addition -func (r *Ingest) MappingAddition(mappingaddition types.TypeMappingVariant) *Ingest { - // Initialize the request if it is not already initialized +func (r *Ingest) MappingAddition(mappingaddition *types.TypeMapping) *Ingest { if r.req == nil { r.req = NewRequest() } - r.req.MappingAddition = mappingaddition.TypeMappingCaster() + r.req.MappingAddition = mappingaddition return r } -// Pipelines to test. +// PipelineSubstitutions Pipelines to test. // If you don’t specify the `pipeline` request path parameter, this parameter is // required. // If you specify both this and the request path parameter, the API only uses // the request path parameter. // API name: pipeline_substitutions func (r *Ingest) PipelineSubstitutions(pipelinesubstitutions map[string]types.IngestPipeline) *Ingest { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.PipelineSubstitutions = pipelinesubstitutions - return r -} -func (r *Ingest) AddPipelineSubstitution(key string, value types.IngestPipelineVariant) *Ingest { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]types.IngestPipeline - if r.req.PipelineSubstitutions == nil { - r.req.PipelineSubstitutions = make(map[string]types.IngestPipeline) - } else { - tmp = r.req.PipelineSubstitutions - } - - tmp[key] = *value.IngestPipelineCaster() + r.req.PipelineSubstitutions = pipelinesubstitutions - r.req.PipelineSubstitutions = tmp return r } diff --git a/typedapi/simulate/ingest/request.go b/typedapi/simulate/ingest/request.go index 29d4ab30bb..8625a88179 100644 --- a/typedapi/simulate/ingest/request.go +++ b/typedapi/simulate/ingest/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package ingest @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package ingest // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/simulate/ingest/SimulateIngestRequest.ts#L29-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/simulate/ingest/SimulateIngestRequest.ts#L29-L100 type Request struct { // ComponentTemplateSubstitutions A map of component template names to substitute component template definition diff --git a/typedapi/simulate/ingest/response.go b/typedapi/simulate/ingest/response.go index 3f75a35016..116b8d2ba9 100644 --- a/typedapi/simulate/ingest/response.go +++ b/typedapi/simulate/ingest/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package ingest @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ingest // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/simulate/ingest/SimulateIngestResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/simulate/ingest/SimulateIngestResponse.ts#L27-L29 type Response struct { Docs []types.SimulateIngestDocumentResult `json:"docs"` } diff --git a/typedapi/slm/deletelifecycle/delete_lifecycle.go b/typedapi/slm/deletelifecycle/delete_lifecycle.go index 75bab344fd..110c5f6436 100644 --- a/typedapi/slm/deletelifecycle/delete_lifecycle.go +++ b/typedapi/slm/deletelifecycle/delete_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a policy. // Delete a snapshot lifecycle policy definition. diff --git a/typedapi/slm/deletelifecycle/response.go b/typedapi/slm/deletelifecycle/response.go index 480faeeb8f..8df46c3f3a 100644 --- a/typedapi/slm/deletelifecycle/response.go +++ b/typedapi/slm/deletelifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/executelifecycle/execute_lifecycle.go b/typedapi/slm/executelifecycle/execute_lifecycle.go index 0a5369354a..588ad72e30 100644 --- a/typedapi/slm/executelifecycle/execute_lifecycle.go +++ b/typedapi/slm/executelifecycle/execute_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a policy. // Immediately create a snapshot according to the snapshot lifecycle policy diff --git a/typedapi/slm/executelifecycle/response.go b/typedapi/slm/executelifecycle/response.go index 38f265a6df..8cbad34182 100644 --- a/typedapi/slm/executelifecycle/response.go +++ b/typedapi/slm/executelifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package executelifecycle // Response holds the response body struct for the package executelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/execute_lifecycle/ExecuteSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/execute_lifecycle/ExecuteSnapshotLifecycleResponse.ts#L22-L24 type Response struct { SnapshotName string `json:"snapshot_name"` } diff --git a/typedapi/slm/executeretention/execute_retention.go b/typedapi/slm/executeretention/execute_retention.go index e0d3298c12..d5f6a67f16 100644 --- a/typedapi/slm/executeretention/execute_retention.go +++ b/typedapi/slm/executeretention/execute_retention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a retention policy. // Manually apply the retention policy to force immediate removal of snapshots diff --git a/typedapi/slm/executeretention/response.go b/typedapi/slm/executeretention/response.go index 17eb19e10d..0b97cb83d6 100644 --- a/typedapi/slm/executeretention/response.go +++ b/typedapi/slm/executeretention/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package executeretention // Response holds the response body struct for the package executeretention // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/getlifecycle/get_lifecycle.go b/typedapi/slm/getlifecycle/get_lifecycle.go index 91ca90e375..9fdb4b1daa 100644 --- a/typedapi/slm/getlifecycle/get_lifecycle.go +++ b/typedapi/slm/getlifecycle/get_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get policy information. // Get snapshot lifecycle policy definitions and information about the latest diff --git a/typedapi/slm/getlifecycle/response.go b/typedapi/slm/getlifecycle/response.go index 404179b9d5..4973d7b54f 100644 --- a/typedapi/slm/getlifecycle/response.go +++ b/typedapi/slm/getlifecycle/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/get_lifecycle/GetSnapshotLifecycleResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/get_lifecycle/GetSnapshotLifecycleResponse.ts#L24-L27 type Response map[string]types.SnapshotLifecycle diff --git a/typedapi/slm/getstats/get_stats.go b/typedapi/slm/getstats/get_stats.go index 0e08b3a0d8..52f607c23b 100644 --- a/typedapi/slm/getstats/get_stats.go +++ b/typedapi/slm/getstats/get_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get snapshot lifecycle management statistics. // Get global and policy-level statistics about actions taken by snapshot diff --git a/typedapi/slm/getstats/response.go b/typedapi/slm/getstats/response.go index 9da1c33a36..eb060f7704 100644 --- a/typedapi/slm/getstats/response.go +++ b/typedapi/slm/getstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getstats @@ -26,18 +26,18 @@ import ( // Response holds the response body struct for the package getstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L24-L37 type Response struct { - PolicyStats []string `json:"policy_stats"` - RetentionDeletionTime types.Duration `json:"retention_deletion_time"` - RetentionDeletionTimeMillis int64 `json:"retention_deletion_time_millis"` - RetentionFailed int64 `json:"retention_failed"` - RetentionRuns int64 `json:"retention_runs"` - RetentionTimedOut int64 `json:"retention_timed_out"` - TotalSnapshotDeletionFailures int64 `json:"total_snapshot_deletion_failures"` - TotalSnapshotsDeleted int64 `json:"total_snapshots_deleted"` - TotalSnapshotsFailed int64 `json:"total_snapshots_failed"` - TotalSnapshotsTaken int64 `json:"total_snapshots_taken"` + PolicyStats []types.SnapshotPolicyStats `json:"policy_stats"` + RetentionDeletionTime types.Duration `json:"retention_deletion_time"` + RetentionDeletionTimeMillis int64 `json:"retention_deletion_time_millis"` + RetentionFailed int64 `json:"retention_failed"` + RetentionRuns int64 `json:"retention_runs"` + RetentionTimedOut int64 `json:"retention_timed_out"` + TotalSnapshotDeletionFailures int64 `json:"total_snapshot_deletion_failures"` + TotalSnapshotsDeleted int64 `json:"total_snapshots_deleted"` + TotalSnapshotsFailed int64 `json:"total_snapshots_failed"` + TotalSnapshotsTaken int64 `json:"total_snapshots_taken"` } // NewResponse returns a Response diff --git a/typedapi/slm/getstatus/get_status.go b/typedapi/slm/getstatus/get_status.go index af0c756dd2..00e628f039 100644 --- a/typedapi/slm/getstatus/get_status.go +++ b/typedapi/slm/getstatus/get_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the snapshot lifecycle management status. package getstatus diff --git a/typedapi/slm/getstatus/response.go b/typedapi/slm/getstatus/response.go index d5b7d91b2e..625f381769 100644 --- a/typedapi/slm/getstatus/response.go +++ b/typedapi/slm/getstatus/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/get_status/GetSnapshotLifecycleManagementStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/get_status/GetSnapshotLifecycleManagementStatusResponse.ts#L22-L24 type Response struct { OperationMode lifecycleoperationmode.LifecycleOperationMode `json:"operation_mode"` } diff --git a/typedapi/slm/putlifecycle/put_lifecycle.go b/typedapi/slm/putlifecycle/put_lifecycle.go index 008b694b6d..ef87b0d33d 100644 --- a/typedapi/slm/putlifecycle/put_lifecycle.go +++ b/typedapi/slm/putlifecycle/put_lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a policy. // Create or update a snapshot lifecycle policy. @@ -386,40 +386,36 @@ func (r *PutLifecycle) Pretty(pretty bool) *PutLifecycle { return r } -// Configuration for each snapshot created by the policy. +// Config Configuration for each snapshot created by the policy. // API name: config -func (r *PutLifecycle) Config(config types.ConfigurationVariant) *PutLifecycle { - // Initialize the request if it is not already initialized +func (r *PutLifecycle) Config(config *types.Configuration) *PutLifecycle { if r.req == nil { r.req = NewRequest() } - r.req.Config = config.ConfigurationCaster() + r.req.Config = config return r } -// Name automatically assigned to each snapshot created by the policy. Date math +// Name Name automatically assigned to each snapshot created by the policy. Date math // is supported. To prevent conflicting snapshot names, a UUID is automatically // appended to each snapshot name. // API name: name func (r *PutLifecycle) Name(name string) *PutLifecycle { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Name = &name return r } -// Repository used to store snapshots created by this policy. This repository +// Repository Repository used to store snapshots created by this policy. This repository // must exist prior to the policy’s creation. You can create a repository using // the snapshot repository API. // API name: repository func (r *PutLifecycle) Repository(repository string) *PutLifecycle { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -429,28 +425,25 @@ func (r *PutLifecycle) Repository(repository string) *PutLifecycle { return r } -// Retention rules used to retain and delete snapshots created by the policy. +// Retention Retention rules used to retain and delete snapshots created by the policy. // API name: retention -func (r *PutLifecycle) Retention(retention types.RetentionVariant) *PutLifecycle { - // Initialize the request if it is not already initialized +func (r *PutLifecycle) Retention(retention *types.Retention) *PutLifecycle { if r.req == nil { r.req = NewRequest() } - r.req.Retention = retention.RetentionCaster() + r.req.Retention = retention return r } -// Periodic or absolute schedule at which the policy creates snapshots. SLM +// Schedule Periodic or absolute schedule at which the policy creates snapshots. SLM // applies schedule changes immediately. // API name: schedule func (r *PutLifecycle) Schedule(cronexpression string) *PutLifecycle { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Schedule = &cronexpression return r diff --git a/typedapi/slm/putlifecycle/request.go b/typedapi/slm/putlifecycle/request.go index 9055ed2ab4..5d08a449e4 100644 --- a/typedapi/slm/putlifecycle/request.go +++ b/typedapi/slm/putlifecycle/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putlifecycle @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L89 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L89 type Request struct { // Config Configuration for each snapshot created by the policy. diff --git a/typedapi/slm/putlifecycle/response.go b/typedapi/slm/putlifecycle/response.go index 9d60d6cccd..d6588cddd7 100644 --- a/typedapi/slm/putlifecycle/response.go +++ b/typedapi/slm/putlifecycle/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/start/response.go b/typedapi/slm/start/response.go index 468e613e52..7b199118f7 100644 --- a/typedapi/slm/start/response.go +++ b/typedapi/slm/start/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/start/start.go b/typedapi/slm/start/start.go index 769b6d6a0a..032738a0af 100644 --- a/typedapi/slm/start/start.go +++ b/typedapi/slm/start/start.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start snapshot lifecycle management. // Snapshot lifecycle management (SLM) starts automatically when a cluster is diff --git a/typedapi/slm/stop/response.go b/typedapi/slm/stop/response.go index 679a76af27..fe47056a58 100644 --- a/typedapi/slm/stop/response.go +++ b/typedapi/slm/stop/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/slm/stop/stop.go b/typedapi/slm/stop/stop.go index 53cd7fd44e..b9a44ae29b 100644 --- a/typedapi/slm/stop/stop.go +++ b/typedapi/slm/stop/stop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop snapshot lifecycle management. // Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. diff --git a/typedapi/snapshot/cleanuprepository/cleanup_repository.go b/typedapi/snapshot/cleanuprepository/cleanup_repository.go index 6dcaa69cac..80891ec97c 100644 --- a/typedapi/snapshot/cleanuprepository/cleanup_repository.go +++ b/typedapi/snapshot/cleanuprepository/cleanup_repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clean up the snapshot repository. // Trigger the review of the contents of a snapshot repository and delete any diff --git a/typedapi/snapshot/cleanuprepository/response.go b/typedapi/snapshot/cleanuprepository/response.go index 42fae1f377..9aea1f2c46 100644 --- a/typedapi/snapshot/cleanuprepository/response.go +++ b/typedapi/snapshot/cleanuprepository/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package cleanuprepository @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cleanuprepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27 type Response struct { // Results Statistics for cleanup operations. diff --git a/typedapi/snapshot/clone/clone.go b/typedapi/snapshot/clone/clone.go index f60bcefa06..0c7d8d6a64 100644 --- a/typedapi/snapshot/clone/clone.go +++ b/typedapi/snapshot/clone/clone.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clone a snapshot. // Clone part of all of a snapshot into another snapshot in the same repository. @@ -409,7 +409,6 @@ func (r *Clone) Pretty(pretty bool) *Clone { // API name: indices func (r *Clone) Indices(indices string) *Clone { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/snapshot/clone/request.go b/typedapi/snapshot/clone/request.go index d029a9ac3a..1f15a0f113 100644 --- a/typedapi/snapshot/clone/request.go +++ b/typedapi/snapshot/clone/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clone @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L51 type Request struct { Indices string `json:"indices"` } diff --git a/typedapi/snapshot/clone/response.go b/typedapi/snapshot/clone/response.go index 35ef24f9d6..815522c1f3 100644 --- a/typedapi/snapshot/clone/response.go +++ b/typedapi/snapshot/clone/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/create/create.go b/typedapi/snapshot/create/create.go index 70c693bafd..25e9b048f9 100644 --- a/typedapi/snapshot/create/create.go +++ b/typedapi/snapshot/create/create.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a snapshot. // Take a snapshot of a cluster or of data streams and indices. @@ -395,97 +395,83 @@ func (r *Create) Pretty(pretty bool) *Create { return r } -// Feature states to include in the snapshot. Each feature state includes one or +// FeatureStates Feature states to include in the snapshot. Each feature state includes one or // more system indices containing related data. You can view a list of eligible // features using the get features API. If `include_global_state` is `true`, all // current feature states are included by default. If `include_global_state` is // `false`, no feature states are included by default. // API name: feature_states func (r *Create) FeatureStates(featurestates ...string) *Create { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range featurestates { + r.req.FeatureStates = featurestates - r.req.FeatureStates = append(r.req.FeatureStates, v) - - } return r } -// If `true`, the request ignores data streams and indices in `indices` that are +// IgnoreUnavailable If `true`, the request ignores data streams and indices in `indices` that are // missing or closed. If `false`, the request returns an error for any data // stream or index that is missing or closed. // API name: ignore_unavailable func (r *Create) IgnoreUnavailable(ignoreunavailable bool) *Create { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IgnoreUnavailable = &ignoreunavailable return r } -// If `true`, the current cluster state is included in the snapshot. The cluster +// IncludeGlobalState If `true`, the current cluster state is included in the snapshot. The cluster // state includes persistent cluster settings, composable index templates, // legacy index templates, ingest pipelines, and ILM policies. It also includes // data stored in system indices, such as Watches and task records (configurable // via `feature_states`). // API name: include_global_state func (r *Create) IncludeGlobalState(includeglobalstate bool) *Create { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IncludeGlobalState = &includeglobalstate return r } -// Data streams and indices to include in the snapshot. Supports multi-target +// Indices Data streams and indices to include in the snapshot. Supports multi-target // syntax. Includes all data streams and indices by default. // API name: indices func (r *Create) Indices(indices ...string) *Create { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Indices = indices return r } -// Optional metadata for the snapshot. May have any contents. Must be less than +// Metadata Optional metadata for the snapshot. May have any contents. Must be less than // 1024 bytes. This map is not automatically generated by Elasticsearch. // API name: metadata -func (r *Create) Metadata(metadata types.MetadataVariant) *Create { - // Initialize the request if it is not already initialized +func (r *Create) Metadata(metadata types.Metadata) *Create { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// If `true`, allows restoring a partial snapshot of indices with unavailable +// Partial If `true`, allows restoring a partial snapshot of indices with unavailable // shards. Only shards that were successfully included in the snapshot will be // restored. All missing shards will be recreated as empty. If `false`, the // entire restore operation will fail if one or more indices included in the // snapshot do not have all primary shards available. // API name: partial func (r *Create) Partial(partial bool) *Create { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Partial = &partial return r diff --git a/typedapi/snapshot/create/request.go b/typedapi/snapshot/create/request.go index dbf41437d6..5cf87ab7c7 100644 --- a/typedapi/snapshot/create/request.go +++ b/typedapi/snapshot/create/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package create @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L92 type Request struct { // FeatureStates Feature states to include in the snapshot. Each feature state includes one or diff --git a/typedapi/snapshot/create/response.go b/typedapi/snapshot/create/response.go index f798a93914..44e8f2f657 100644 --- a/typedapi/snapshot/create/response.go +++ b/typedapi/snapshot/create/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package create @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/create/SnapshotCreateResponse.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/create/SnapshotCreateResponse.ts#L22-L35 type Response struct { // Accepted Equals `true` if the snapshot was accepted. Present when the request had diff --git a/typedapi/snapshot/createrepository/create_repository.go b/typedapi/snapshot/createrepository/create_repository.go index b6ebe0df8c..83b113dca9 100644 --- a/typedapi/snapshot/createrepository/create_repository.go +++ b/typedapi/snapshot/createrepository/create_repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a snapshot repository. // IMPORTANT: If you are migrating searchable snapshots, the repository name diff --git a/typedapi/snapshot/createrepository/request.go b/typedapi/snapshot/createrepository/request.go index eedfbb87e6..7f7db0de3e 100644 --- a/typedapi/snapshot/createrepository/request.go +++ b/typedapi/snapshot/createrepository/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createrepository @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L54 type Request = types.Repository diff --git a/typedapi/snapshot/createrepository/response.go b/typedapi/snapshot/createrepository/response.go index 72dcd6bce7..42a49de9c7 100644 --- a/typedapi/snapshot/createrepository/response.go +++ b/typedapi/snapshot/createrepository/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package createrepository // Response holds the response body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/delete/delete.go b/typedapi/snapshot/delete/delete.go index 146dce57cb..227f4f7abc 100644 --- a/typedapi/snapshot/delete/delete.go +++ b/typedapi/snapshot/delete/delete.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete snapshots. package delete @@ -325,6 +325,17 @@ func (r *Delete) MasterTimeout(duration string) *Delete { return r } +// WaitForCompletion If `true`, the request returns a response when the matching snapshots are all +// deleted. +// If `false`, the request returns a response as soon as the deletes are +// scheduled. +// API name: wait_for_completion +func (r *Delete) WaitForCompletion(waitforcompletion bool) *Delete { + r.values.Set("wait_for_completion", strconv.FormatBool(waitforcompletion)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace diff --git a/typedapi/snapshot/delete/response.go b/typedapi/snapshot/delete/response.go index da3121bd5b..6e4a159085 100644 --- a/typedapi/snapshot/delete/response.go +++ b/typedapi/snapshot/delete/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/deleterepository/delete_repository.go b/typedapi/snapshot/deleterepository/delete_repository.go index 117050f854..a299121e44 100644 --- a/typedapi/snapshot/deleterepository/delete_repository.go +++ b/typedapi/snapshot/deleterepository/delete_repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete snapshot repositories. // When a repository is unregistered, Elasticsearch removes only the reference diff --git a/typedapi/snapshot/deleterepository/response.go b/typedapi/snapshot/deleterepository/response.go index 56def25953..b32bb146a3 100644 --- a/typedapi/snapshot/deleterepository/response.go +++ b/typedapi/snapshot/deleterepository/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleterepository // Response holds the response body struct for the package deleterepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/snapshot/get/get.go b/typedapi/snapshot/get/get.go index b503534b20..4041c9f811 100644 --- a/typedapi/snapshot/get/get.go +++ b/typedapi/snapshot/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get snapshot information. package get diff --git a/typedapi/snapshot/get/response.go b/typedapi/snapshot/get/response.go index 60361964fd..7935d0a010 100644 --- a/typedapi/snapshot/get/response.go +++ b/typedapi/snapshot/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/get/SnapshotGetResponse.ts#L25-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/get/SnapshotGetResponse.ts#L25-L42 type Response struct { // Remaining The number of remaining snapshots that were not returned due to size limits diff --git a/typedapi/snapshot/getrepository/get_repository.go b/typedapi/snapshot/getrepository/get_repository.go index f3f4044a80..9e43cc184e 100644 --- a/typedapi/snapshot/getrepository/get_repository.go +++ b/typedapi/snapshot/getrepository/get_repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get snapshot repository information. package getrepository diff --git a/typedapi/snapshot/getrepository/response.go b/typedapi/snapshot/getrepository/response.go index c66b426b69..a973321690 100644 --- a/typedapi/snapshot/getrepository/response.go +++ b/typedapi/snapshot/getrepository/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getrepository @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package getrepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L25 type Response map[string]types.Repository diff --git a/typedapi/snapshot/repositoryanalyze/repository_analyze.go b/typedapi/snapshot/repositoryanalyze/repository_analyze.go index 04e649efbb..81e0c25545 100644 --- a/typedapi/snapshot/repositoryanalyze/repository_analyze.go +++ b/typedapi/snapshot/repositoryanalyze/repository_analyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Analyze a snapshot repository. // Analyze the performance characteristics and any incorrect behaviour found in diff --git a/typedapi/snapshot/repositoryanalyze/response.go b/typedapi/snapshot/repositoryanalyze/response.go index 855ea6b5f7..71c7181595 100644 --- a/typedapi/snapshot/repositoryanalyze/response.go +++ b/typedapi/snapshot/repositoryanalyze/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package repositoryanalyze @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositoryanalyze // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L24-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L24-L108 type Response struct { // BlobCount The number of blobs written to the repository during the test. diff --git a/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go b/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go index 8a26dd6e2f..21de02111d 100644 --- a/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go +++ b/typedapi/snapshot/repositoryverifyintegrity/repository_verify_integrity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Verify the repository integrity. // Verify the integrity of the contents of a snapshot repository. diff --git a/typedapi/snapshot/repositoryverifyintegrity/response.go b/typedapi/snapshot/repositoryverifyintegrity/response.go index fa4da27f36..702242b485 100644 --- a/typedapi/snapshot/repositoryverifyintegrity/response.go +++ b/typedapi/snapshot/repositoryverifyintegrity/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package repositoryverifyintegrity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositoryverifyintegrity // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L24 type Response = json.RawMessage diff --git a/typedapi/snapshot/restore/request.go b/typedapi/snapshot/restore/request.go index 03dd6bae1d..5729dcda6b 100644 --- a/typedapi/snapshot/restore/request.go +++ b/typedapi/snapshot/restore/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package restore @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L78 type Request struct { FeatureStates []string `json:"feature_states,omitempty"` IgnoreIndexSettings []string `json:"ignore_index_settings,omitempty"` diff --git a/typedapi/snapshot/restore/response.go b/typedapi/snapshot/restore/response.go index 65e7093131..c8a2a225f1 100644 --- a/typedapi/snapshot/restore/response.go +++ b/typedapi/snapshot/restore/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package restore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L28 type Response struct { Accepted *bool `json:"accepted,omitempty"` Snapshot *types.SnapshotRestore `json:"snapshot,omitempty"` diff --git a/typedapi/snapshot/restore/restore.go b/typedapi/snapshot/restore/restore.go index da23807eb3..f0b3c0c086 100644 --- a/typedapi/snapshot/restore/restore.go +++ b/typedapi/snapshot/restore/restore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Restore a snapshot. // Restore a snapshot of a cluster or data streams and indices. @@ -447,39 +447,29 @@ func (r *Restore) Pretty(pretty bool) *Restore { // API name: feature_states func (r *Restore) FeatureStates(featurestates ...string) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range featurestates { + r.req.FeatureStates = featurestates - r.req.FeatureStates = append(r.req.FeatureStates, v) - - } return r } // API name: ignore_index_settings func (r *Restore) IgnoreIndexSettings(ignoreindexsettings ...string) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range ignoreindexsettings { - - r.req.IgnoreIndexSettings = append(r.req.IgnoreIndexSettings, v) + r.req.IgnoreIndexSettings = ignoreindexsettings - } return r } // API name: ignore_unavailable func (r *Restore) IgnoreUnavailable(ignoreunavailable bool) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IgnoreUnavailable = &ignoreunavailable return r @@ -487,11 +477,9 @@ func (r *Restore) IgnoreUnavailable(ignoreunavailable bool) *Restore { // API name: include_aliases func (r *Restore) IncludeAliases(includealiases bool) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IncludeAliases = &includealiases return r @@ -499,35 +487,30 @@ func (r *Restore) IncludeAliases(includealiases bool) *Restore { // API name: include_global_state func (r *Restore) IncludeGlobalState(includeglobalstate bool) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IncludeGlobalState = &includeglobalstate return r } // API name: index_settings -func (r *Restore) IndexSettings(indexsettings types.IndexSettingsVariant) *Restore { - // Initialize the request if it is not already initialized +func (r *Restore) IndexSettings(indexsettings *types.IndexSettings) *Restore { if r.req == nil { r.req = NewRequest() } - r.req.IndexSettings = indexsettings.IndexSettingsCaster() + r.req.IndexSettings = indexsettings return r } // API name: indices func (r *Restore) Indices(indices ...string) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Indices = indices return r @@ -535,11 +518,9 @@ func (r *Restore) Indices(indices ...string) *Restore { // API name: partial func (r *Restore) Partial(partial bool) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Partial = &partial return r @@ -547,7 +528,6 @@ func (r *Restore) Partial(partial bool) *Restore { // API name: rename_pattern func (r *Restore) RenamePattern(renamepattern string) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -559,7 +539,6 @@ func (r *Restore) RenamePattern(renamepattern string) *Restore { // API name: rename_replacement func (r *Restore) RenameReplacement(renamereplacement string) *Restore { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/snapshot/status/response.go b/typedapi/snapshot/status/response.go index 8efadde73a..4c8b27c6d5 100644 --- a/typedapi/snapshot/status/response.go +++ b/typedapi/snapshot/status/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package status @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/status/SnapshotStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/status/SnapshotStatusResponse.ts#L22-L24 type Response struct { Snapshots []types.Status `json:"snapshots"` } diff --git a/typedapi/snapshot/status/status.go b/typedapi/snapshot/status/status.go index c690ff0e14..44106a22e2 100644 --- a/typedapi/snapshot/status/status.go +++ b/typedapi/snapshot/status/status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the snapshot status. // Get a detailed description of the current state for each shard participating diff --git a/typedapi/snapshot/verifyrepository/response.go b/typedapi/snapshot/verifyrepository/response.go index 4f47558fbd..9cb0f5ca72 100644 --- a/typedapi/snapshot/verifyrepository/response.go +++ b/typedapi/snapshot/verifyrepository/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package verifyrepository @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package verifyrepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L25 type Response struct { Nodes map[string]types.CompactNodeInfo `json:"nodes"` } diff --git a/typedapi/snapshot/verifyrepository/verify_repository.go b/typedapi/snapshot/verifyrepository/verify_repository.go index 093b2681f3..a4139c120b 100644 --- a/typedapi/snapshot/verifyrepository/verify_repository.go +++ b/typedapi/snapshot/verifyrepository/verify_repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Verify a snapshot repository. // Check for common misconfigurations in a snapshot repository. diff --git a/typedapi/sql/clearcursor/clear_cursor.go b/typedapi/sql/clearcursor/clear_cursor.go index f973895af6..f6d0939a7c 100644 --- a/typedapi/sql/clearcursor/clear_cursor.go +++ b/typedapi/sql/clearcursor/clear_cursor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Clear an SQL search cursor. package clearcursor @@ -334,10 +334,9 @@ func (r *ClearCursor) Pretty(pretty bool) *ClearCursor { return r } -// Cursor to clear. +// Cursor Cursor to clear. // API name: cursor func (r *ClearCursor) Cursor(cursor string) *ClearCursor { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } diff --git a/typedapi/sql/clearcursor/request.go b/typedapi/sql/clearcursor/request.go index 6bb8e96f54..6b408db845 100644 --- a/typedapi/sql/clearcursor/request.go +++ b/typedapi/sql/clearcursor/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcursor @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L42 type Request struct { // Cursor Cursor to clear. diff --git a/typedapi/sql/clearcursor/response.go b/typedapi/sql/clearcursor/response.go index a767017eb3..5fa58ed96d 100644 --- a/typedapi/sql/clearcursor/response.go +++ b/typedapi/sql/clearcursor/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package clearcursor // Response holds the response body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22 type Response struct { Succeeded bool `json:"succeeded"` } diff --git a/typedapi/sql/deleteasync/delete_async.go b/typedapi/sql/deleteasync/delete_async.go index 6853991883..77916de17b 100644 --- a/typedapi/sql/deleteasync/delete_async.go +++ b/typedapi/sql/deleteasync/delete_async.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete an async SQL search. // Delete an async SQL search or a stored synchronous SQL search. diff --git a/typedapi/sql/deleteasync/response.go b/typedapi/sql/deleteasync/response.go index e2cf863297..e673ce84c1 100644 --- a/typedapi/sql/deleteasync/response.go +++ b/typedapi/sql/deleteasync/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deleteasync // Response holds the response body struct for the package deleteasync // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/sql/getasync/get_async.go b/typedapi/sql/getasync/get_async.go index f26404fad8..4cf732c6e1 100644 --- a/typedapi/sql/getasync/get_async.go +++ b/typedapi/sql/getasync/get_async.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get async SQL search results. // Get the current status and available results for an async SQL search or diff --git a/typedapi/sql/getasync/response.go b/typedapi/sql/getasync/response.go index 73d475b41c..58822930ed 100644 --- a/typedapi/sql/getasync/response.go +++ b/typedapi/sql/getasync/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getasync @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package getasync // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/get_async/SqlGetAsyncResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/get_async/SqlGetAsyncResponse.ts#L23-L60 type Response struct { // Columns Column headings for the search results. Each object is a column. diff --git a/typedapi/sql/getasyncstatus/get_async_status.go b/typedapi/sql/getasyncstatus/get_async_status.go index 05e299d0d9..6de03c9998 100644 --- a/typedapi/sql/getasyncstatus/get_async_status.go +++ b/typedapi/sql/getasyncstatus/get_async_status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get the async SQL search status. // Get the current status of an async SQL search or a stored synchronous SQL diff --git a/typedapi/sql/getasyncstatus/response.go b/typedapi/sql/getasyncstatus/response.go index bbc8362317..5743a184b6 100644 --- a/typedapi/sql/getasyncstatus/response.go +++ b/typedapi/sql/getasyncstatus/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getasyncstatus // Response holds the response body struct for the package getasyncstatus // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 type Response struct { // CompletionStatus The HTTP status code for the search. diff --git a/typedapi/sql/query/query.go b/typedapi/sql/query/query.go index 6c4c4e19e2..a2a0d280ec 100644 --- a/typedapi/sql/query/query.go +++ b/typedapi/sql/query/query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get SQL search results. // Run an SQL request. @@ -346,26 +346,23 @@ func (r *Query) Pretty(pretty bool) *Query { return r } -// If `true`, the response has partial results when there are shard request +// AllowPartialSearchResults If `true`, the response has partial results when there are shard request // timeouts or shard failures. // If `false`, the API returns an error with no partial results. // API name: allow_partial_search_results func (r *Query) AllowPartialSearchResults(allowpartialsearchresults bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.AllowPartialSearchResults = &allowpartialsearchresults return r } -// The default catalog (cluster) for queries. +// Catalog The default catalog (cluster) for queries. // If unspecified, the queries execute on the data in the local cluster only. // API name: catalog func (r *Query) Catalog(catalog string) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -375,29 +372,26 @@ func (r *Query) Catalog(catalog string) *Query { return r } -// If `true`, the results are in a columnar fashion: one row represents all the +// Columnar If `true`, the results are in a columnar fashion: one row represents all the // values of a certain column from the current page of results. // The API supports this parameter only for CBOR, JSON, SMILE, and YAML // responses. // API name: columnar func (r *Query) Columnar(columnar bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Columnar = &columnar return r } -// The cursor used to retrieve a set of paginated results. +// Cursor The cursor used to retrieve a set of paginated results. // If you specify a cursor, the API only uses the `columnar` and `time_zone` // request body parameters. // It ignores other request body parameters. // API name: cursor func (r *Query) Cursor(cursor string) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -407,141 +401,108 @@ func (r *Query) Cursor(cursor string) *Query { return r } -// The maximum number of rows (or entries) to return in one response. +// FetchSize The maximum number of rows (or entries) to return in one response. // API name: fetch_size func (r *Query) FetchSize(fetchsize int) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FetchSize = &fetchsize return r } -// If `false`, the API returns an exception when encountering multiple values +// FieldMultiValueLeniency If `false`, the API returns an exception when encountering multiple values // for a field. // If `true`, the API is lenient and returns the first value from the array with // no guarantee of consistent results. // API name: field_multi_value_leniency func (r *Query) FieldMultiValueLeniency(fieldmultivalueleniency bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FieldMultiValueLeniency = &fieldmultivalueleniency return r } -// The Elasticsearch query DSL for additional filtering. +// Filter The Elasticsearch query DSL for additional filtering. // API name: filter -func (r *Query) Filter(filter types.QueryVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) Filter(filter *types.Query) *Query { if r.req == nil { r.req = NewRequest() } - r.req.Filter = filter.QueryCaster() + r.req.Filter = filter return r } -// If `true`, the search can run on frozen indices. +// IndexUsingFrozen If `true`, the search can run on frozen indices. // API name: index_using_frozen func (r *Query) IndexUsingFrozen(indexusingfrozen bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexUsingFrozen = &indexusingfrozen return r } -// The retention period for an async or saved synchronous search. +// KeepAlive The retention period for an async or saved synchronous search. // API name: keep_alive -func (r *Query) KeepAlive(duration types.DurationVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) KeepAlive(duration types.Duration) *Query { if r.req == nil { r.req = NewRequest() } - - r.req.KeepAlive = *duration.DurationCaster() + r.req.KeepAlive = duration return r } -// If `true`, Elasticsearch stores synchronous searches if you also specify the +// KeepOnCompletion If `true`, Elasticsearch stores synchronous searches if you also specify the // `wait_for_completion_timeout` parameter. // If `false`, Elasticsearch only stores async searches that don't finish before // the `wait_for_completion_timeout`. // API name: keep_on_completion func (r *Query) KeepOnCompletion(keeponcompletion bool) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.KeepOnCompletion = &keeponcompletion return r } -// The minimum retention period for the scroll cursor. +// PageTimeout The minimum retention period for the scroll cursor. // After this time period, a pagination request might fail because the scroll // cursor is no longer available. // Subsequent scroll requests prolong the lifetime of the scroll cursor by the // duration of `page_timeout` in the scroll request. // API name: page_timeout -func (r *Query) PageTimeout(duration types.DurationVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) PageTimeout(duration types.Duration) *Query { if r.req == nil { r.req = NewRequest() } - - r.req.PageTimeout = *duration.DurationCaster() + r.req.PageTimeout = duration return r } -// The values for parameters in the query. +// Params The values for parameters in the query. // API name: params -func (r *Query) Params(params map[string]json.RawMessage) *Query { - // Initialize the request if it is not already initialized +func (r *Query) Params(params ...json.RawMessage) *Query { if r.req == nil { r.req = NewRequest() } r.req.Params = params - return r -} - -func (r *Query) AddParam(key string, value json.RawMessage) *Query { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]json.RawMessage - if r.req.Params == nil { - r.req.Params = make(map[string]json.RawMessage) - } else { - tmp = r.req.Params - } - tmp[key] = value - - r.req.Params = tmp return r } -// The SQL query to run. +// Query The SQL query to run. // API name: query func (r *Query) Query(query string) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -551,47 +512,41 @@ func (r *Query) Query(query string) *Query { return r } -// The timeout before the request fails. +// RequestTimeout The timeout before the request fails. // API name: request_timeout -func (r *Query) RequestTimeout(duration types.DurationVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) RequestTimeout(duration types.Duration) *Query { if r.req == nil { r.req = NewRequest() } - - r.req.RequestTimeout = *duration.DurationCaster() + r.req.RequestTimeout = duration return r } -// One or more runtime fields for the search request. +// RuntimeMappings One or more runtime fields for the search request. // These fields take precedence over mapped fields with the same name. // API name: runtime_mappings -func (r *Query) RuntimeMappings(runtimefields types.RuntimeFieldsVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) RuntimeMappings(runtimefields types.RuntimeFields) *Query { if r.req == nil { r.req = NewRequest() } - - r.req.RuntimeMappings = *runtimefields.RuntimeFieldsCaster() + r.req.RuntimeMappings = runtimefields return r } -// The ISO-8601 time zone ID for the search. +// TimeZone The ISO-8601 time zone ID for the search. // API name: time_zone func (r *Query) TimeZone(timezone string) *Query { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TimeZone = &timezone return r } -// The period to wait for complete results. +// WaitForCompletionTimeout The period to wait for complete results. // It defaults to no timeout, meaning the request waits for complete search // results. // If the search doesn't finish within this period, the search becomes async. @@ -599,13 +554,11 @@ func (r *Query) TimeZone(timezone string) *Query { // To save a synchronous search, you must specify this parameter and the // `keep_on_completion` parameter. // API name: wait_for_completion_timeout -func (r *Query) WaitForCompletionTimeout(duration types.DurationVariant) *Query { - // Initialize the request if it is not already initialized +func (r *Query) WaitForCompletionTimeout(duration types.Duration) *Query { if r.req == nil { r.req = NewRequest() } - - r.req.WaitForCompletionTimeout = *duration.DurationCaster() + r.req.WaitForCompletionTimeout = duration return r } diff --git a/typedapi/sql/query/request.go b/typedapi/sql/query/request.go index da8381ebe0..d3fa780196 100644 --- a/typedapi/sql/query/request.go +++ b/typedapi/sql/query/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package query @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/query/QuerySqlRequest.ts#L28-L152 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/query/QuerySqlRequest.ts#L27-L151 type Request struct { // AllowPartialSearchResults If `true`, the response has partial results when there are shard request @@ -78,7 +78,7 @@ type Request struct { // duration of `page_timeout` in the scroll request. PageTimeout types.Duration `json:"page_timeout,omitempty"` // Params The values for parameters in the query. - Params map[string]json.RawMessage `json:"params,omitempty"` + Params []json.RawMessage `json:"params,omitempty"` // Query The SQL query to run. Query *string `json:"query,omitempty"` // RequestTimeout The timeout before the request fails. @@ -100,9 +100,7 @@ type Request struct { // NewRequest returns a Request func NewRequest() *Request { - r := &Request{ - Params: make(map[string]json.RawMessage, 0), - } + r := &Request{} return r } @@ -259,9 +257,6 @@ func (s *Request) UnmarshalJSON(data []byte) error { } case "params": - if s.Params == nil { - s.Params = make(map[string]json.RawMessage, 0) - } if err := dec.Decode(&s.Params); err != nil { return fmt.Errorf("%s | %w", "Params", err) } diff --git a/typedapi/sql/query/response.go b/typedapi/sql/query/response.go index 57e9eaa405..40928b11d1 100644 --- a/typedapi/sql/query/response.go +++ b/typedapi/sql/query/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package query @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/query/QuerySqlResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/query/QuerySqlResponse.ts#L23-L60 type Response struct { // Columns Column headings for the search results. Each object is a column. diff --git a/typedapi/sql/translate/request.go b/typedapi/sql/translate/request.go index d1f9cb37ff..8b3aaba2f1 100644 --- a/typedapi/sql/translate/request.go +++ b/typedapi/sql/translate/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package translate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/translate/TranslateSqlRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/translate/TranslateSqlRequest.ts#L25-L65 type Request struct { // FetchSize The maximum number of rows (or entries) to return in one response. diff --git a/typedapi/sql/translate/response.go b/typedapi/sql/translate/response.go index 852914f9c6..59d0463ba5 100644 --- a/typedapi/sql/translate/response.go +++ b/typedapi/sql/translate/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package translate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/translate/TranslateSqlResponse.ts#L27-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/translate/TranslateSqlResponse.ts#L27-L37 type Response struct { Aggregations map[string]types.Aggregations `json:"aggregations,omitempty"` Fields []types.FieldAndFormat `json:"fields,omitempty"` @@ -132,7 +132,7 @@ func (s *Response) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := types.NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { diff --git a/typedapi/sql/translate/translate.go b/typedapi/sql/translate/translate.go index 0d10d1da86..a994d32f2f 100644 --- a/typedapi/sql/translate/translate.go +++ b/typedapi/sql/translate/translate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Translate SQL into Elasticsearch queries. // Translate an SQL search into a search API request containing Query DSL. @@ -340,36 +340,32 @@ func (r *Translate) Pretty(pretty bool) *Translate { return r } -// The maximum number of rows (or entries) to return in one response. +// FetchSize The maximum number of rows (or entries) to return in one response. // API name: fetch_size func (r *Translate) FetchSize(fetchsize int) *Translate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.FetchSize = &fetchsize return r } -// The Elasticsearch query DSL for additional filtering. +// Filter The Elasticsearch query DSL for additional filtering. // API name: filter -func (r *Translate) Filter(filter types.QueryVariant) *Translate { - // Initialize the request if it is not already initialized +func (r *Translate) Filter(filter *types.Query) *Translate { if r.req == nil { r.req = NewRequest() } - r.req.Filter = filter.QueryCaster() + r.req.Filter = filter return r } -// The SQL query to run. +// Query The SQL query to run. // API name: query func (r *Translate) Query(query string) *Translate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -379,14 +375,12 @@ func (r *Translate) Query(query string) *Translate { return r } -// The ISO-8601 time zone ID for the search. +// TimeZone The ISO-8601 time zone ID for the search. // API name: time_zone func (r *Translate) TimeZone(timezone string) *Translate { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.TimeZone = &timezone return r diff --git a/typedapi/ssl/certificates/certificates.go b/typedapi/ssl/certificates/certificates.go index 6c15b06e37..ccedaffcb8 100644 --- a/typedapi/ssl/certificates/certificates.go +++ b/typedapi/ssl/certificates/certificates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get SSL certificates. // diff --git a/typedapi/ssl/certificates/response.go b/typedapi/ssl/certificates/response.go index e7b1101994..fc327f04db 100644 --- a/typedapi/ssl/certificates/response.go +++ b/typedapi/ssl/certificates/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package certificates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package certificates // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L24 type Response []types.CertificateInformation diff --git a/typedapi/streams/logsdisable/logs_disable.go b/typedapi/streams/logsdisable/logs_disable.go new file mode 100644 index 0000000000..9dce4d5ef9 --- /dev/null +++ b/typedapi/streams/logsdisable/logs_disable.go @@ -0,0 +1,227 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Disable the Logs Streams feature for this cluster +package logsdisable + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type LogsDisable struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewLogsDisable type alias for index. +type NewLogsDisable func() *LogsDisable + +// NewLogsDisableFunc returns a new instance of LogsDisable with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewLogsDisableFunc(tp elastictransport.Interface) NewLogsDisable { + return func() *LogsDisable { + n := New(tp) + + return n + } +} + +// Disable the Logs Streams feature for this cluster +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-disable.html +func New(tp elastictransport.Interface) *LogsDisable { + r := &LogsDisable{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *LogsDisable) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_streams") + path.WriteString("/") + path.WriteString("logs") + path.WriteString("/") + path.WriteString("_disable") + + method = http.MethodPost + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r LogsDisable) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "streams.logs_disable") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "streams.logs_disable") + if reader := instrument.RecordRequestBody(ctx, "streams.logs_disable", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "streams.logs_disable") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the LogsDisable query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a logsdisable.Response +func (r LogsDisable) Do(ctx context.Context) (bool, error) { + return r.IsSuccess(ctx) +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r LogsDisable) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.logs_disable") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the LogsDisable query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the LogsDisable headers map. +func (r *LogsDisable) Header(key, value string) *LogsDisable { + r.headers.Set(key, value) + + return r +} diff --git a/typedapi/streams/logsenable/logs_enable.go b/typedapi/streams/logsenable/logs_enable.go new file mode 100644 index 0000000000..45ee0a78cc --- /dev/null +++ b/typedapi/streams/logsenable/logs_enable.go @@ -0,0 +1,227 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Enable the Logs Streams feature for this cluster +package logsenable + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type LogsEnable struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewLogsEnable type alias for index. +type NewLogsEnable func() *LogsEnable + +// NewLogsEnableFunc returns a new instance of LogsEnable with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewLogsEnableFunc(tp elastictransport.Interface) NewLogsEnable { + return func() *LogsEnable { + n := New(tp) + + return n + } +} + +// Enable the Logs Streams feature for this cluster +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-enable.html +func New(tp elastictransport.Interface) *LogsEnable { + r := &LogsEnable{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *LogsEnable) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_streams") + path.WriteString("/") + path.WriteString("logs") + path.WriteString("/") + path.WriteString("_enable") + + method = http.MethodPost + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r LogsEnable) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "streams.logs_enable") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "streams.logs_enable") + if reader := instrument.RecordRequestBody(ctx, "streams.logs_enable", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "streams.logs_enable") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the LogsEnable query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a logsenable.Response +func (r LogsEnable) Do(ctx context.Context) (bool, error) { + return r.IsSuccess(ctx) +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r LogsEnable) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.logs_enable") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the LogsEnable query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the LogsEnable headers map. +func (r *LogsEnable) Header(key, value string) *LogsEnable { + r.headers.Set(key, value) + + return r +} diff --git a/typedapi/streams/status/status.go b/typedapi/streams/status/status.go new file mode 100644 index 0000000000..ff98d2b0c2 --- /dev/null +++ b/typedapi/streams/status/status.go @@ -0,0 +1,225 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Return the current status of the streams feature for each streams type +package status + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/elastic/elastic-transport-go/v8/elastictransport" +) + +// ErrBuildPath is returned in case of missing parameters within the build of the request. +var ErrBuildPath = errors.New("cannot build path, check for missing path parameters") + +type Status struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewStatus type alias for index. +type NewStatus func() *Status + +// NewStatusFunc returns a new instance of Status with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewStatusFunc(tp elastictransport.Interface) NewStatus { + return func() *Status { + n := New(tp) + + return n + } +} + +// Return the current status of the streams feature for each streams type +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-status.html +func New(tp elastictransport.Interface) *Status { + r := &Status{ + transport: tp, + values: make(url.Values), + headers: make(http.Header), + } + + if instrumented, ok := r.transport.(elastictransport.Instrumented); ok { + if instrument := instrumented.InstrumentationEnabled(); instrument != nil { + r.instrument = instrument + } + } + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *Status) HttpRequest(ctx context.Context) (*http.Request, error) { + var path strings.Builder + var method string + var req *http.Request + + var err error + + r.path.Scheme = "http" + + switch { + case r.paramSet == 0: + path.WriteString("/") + path.WriteString("_streams") + path.WriteString("/") + path.WriteString("status") + + method = http.MethodGet + } + + r.path.Path = path.String() + r.path.RawQuery = r.values.Encode() + + if r.path.Path == "" { + return nil, ErrBuildPath + } + + if ctx != nil { + req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.raw) + } else { + req, err = http.NewRequest(method, r.path.String(), r.raw) + } + + req.Header = r.headers.Clone() + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8") + } + + if err != nil { + return req, fmt.Errorf("could not build http.Request: %w", err) + } + + return req, nil +} + +// Perform runs the http.Request through the provided transport and returns an http.Response. +func (r Status) Perform(providedCtx context.Context) (*http.Response, error) { + var ctx context.Context + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + if r.spanStarted == false { + ctx := instrument.Start(providedCtx, "streams.status") + defer instrument.Close(ctx) + } + } + if ctx == nil { + ctx = providedCtx + } + + req, err := r.HttpRequest(ctx) + if err != nil { + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return nil, err + } + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.BeforeRequest(req, "streams.status") + if reader := instrument.RecordRequestBody(ctx, "streams.status", r.raw); reader != nil { + req.Body = reader + } + } + res, err := r.transport.Perform(req) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "streams.status") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the Status query execution: %w", err) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, localErr) + } + return nil, localErr + } + + return res, nil +} + +// Do runs the request through the transport, handle the response and returns a status.Response +func (r Status) Do(ctx context.Context) (bool, error) { + return r.IsSuccess(ctx) +} + +// IsSuccess allows to run a query with a context and retrieve the result as a boolean. +// This only exists for endpoints without a request payload and allows for quick control flow. +func (r Status) IsSuccess(providedCtx context.Context) (bool, error) { + var ctx context.Context + r.spanStarted = true + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + ctx = instrument.Start(providedCtx, "streams.status") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + res, err := r.Perform(ctx) + + if err != nil { + return false, err + } + io.Copy(io.Discard, res.Body) + err = res.Body.Close() + if err != nil { + return false, err + } + + if res.StatusCode >= 200 && res.StatusCode < 300 { + return true, nil + } + + if res.StatusCode != 404 { + err := fmt.Errorf("an error happened during the Status query execution, status code: %d", res.StatusCode) + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordError(ctx, err) + } + return false, err + } + + return false, nil +} + +// Header set a key, value pair in the Status headers map. +func (r *Status) Header(key, value string) *Status { + r.headers.Set(key, value) + + return r +} diff --git a/typedapi/synonyms/deletesynonym/delete_synonym.go b/typedapi/synonyms/deletesynonym/delete_synonym.go index 67cbec1886..3b0530cd28 100644 --- a/typedapi/synonyms/deletesynonym/delete_synonym.go +++ b/typedapi/synonyms/deletesynonym/delete_synonym.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a synonym set. // diff --git a/typedapi/synonyms/deletesynonym/response.go b/typedapi/synonyms/deletesynonym/response.go index a264b404d0..9083978a43 100644 --- a/typedapi/synonyms/deletesynonym/response.go +++ b/typedapi/synonyms/deletesynonym/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletesynonym // Response holds the response body struct for the package deletesynonym // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go b/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go index 7a4b4911c9..d2ffbf64c1 100644 --- a/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go +++ b/typedapi/synonyms/deletesynonymrule/delete_synonym_rule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a synonym rule. // Delete a synonym rule from a synonym set. diff --git a/typedapi/synonyms/deletesynonymrule/response.go b/typedapi/synonyms/deletesynonymrule/response.go index 72a9176193..147e5c7063 100644 --- a/typedapi/synonyms/deletesynonymrule/response.go +++ b/typedapi/synonyms/deletesynonymrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletesynonymrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package deletesynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L24 type Response struct { // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. diff --git a/typedapi/synonyms/getsynonym/get_synonym.go b/typedapi/synonyms/getsynonym/get_synonym.go index 043afa1661..28419ed656 100644 --- a/typedapi/synonyms/getsynonym/get_synonym.go +++ b/typedapi/synonyms/getsynonym/get_synonym.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a synonym set. package getsynonym diff --git a/typedapi/synonyms/getsynonym/response.go b/typedapi/synonyms/getsynonym/response.go index b3cf47af8d..976faccb78 100644 --- a/typedapi/synonyms/getsynonym/response.go +++ b/typedapi/synonyms/getsynonym/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsynonym @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L34 type Response struct { // Count The total number of synonyms rules that the synonyms set contains. diff --git a/typedapi/synonyms/getsynonymrule/get_synonym_rule.go b/typedapi/synonyms/getsynonymrule/get_synonym_rule.go index 9b56c0a453..93d84f43cd 100644 --- a/typedapi/synonyms/getsynonymrule/get_synonym_rule.go +++ b/typedapi/synonyms/getsynonymrule/get_synonym_rule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a synonym rule. // Get a synonym rule from a synonym set. diff --git a/typedapi/synonyms/getsynonymrule/response.go b/typedapi/synonyms/getsynonymrule/response.go index d803a4ff59..8d90249ad3 100644 --- a/typedapi/synonyms/getsynonymrule/response.go +++ b/typedapi/synonyms/getsynonymrule/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsynonymrule // Response holds the response body struct for the package getsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L24 type Response struct { // Id Synonym Rule identifier diff --git a/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go b/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go index 98d8a108fb..809fa88a56 100644 --- a/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go +++ b/typedapi/synonyms/getsynonymssets/get_synonyms_sets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get all synonym sets. // Get a summary of all defined synonym sets. diff --git a/typedapi/synonyms/getsynonymssets/response.go b/typedapi/synonyms/getsynonymssets/response.go index 8247af5883..feeb164426 100644 --- a/typedapi/synonyms/getsynonymssets/response.go +++ b/typedapi/synonyms/getsynonymssets/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsynonymssets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsynonymssets // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L34 type Response struct { // Count The total number of synonyms sets defined. diff --git a/typedapi/synonyms/putsynonym/put_synonym.go b/typedapi/synonyms/putsynonym/put_synonym.go index 04b7aa1ebb..0a3f9d41b7 100644 --- a/typedapi/synonyms/putsynonym/put_synonym.go +++ b/typedapi/synonyms/putsynonym/put_synonym.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a synonym set. // Synonyms sets are limited to a maximum of 10,000 synonym rules per set. @@ -371,17 +371,13 @@ func (r *PutSynonym) Pretty(pretty bool) *PutSynonym { return r } -// The synonym rules definitions for the synonyms set. +// SynonymsSet The synonym rules definitions for the synonyms set. // API name: synonyms_set -func (r *PutSynonym) SynonymsSet(synonymssets ...types.SynonymRuleVariant) *PutSynonym { - // Initialize the request if it is not already initialized +func (r *PutSynonym) SynonymsSet(synonymssets ...types.SynonymRule) *PutSynonym { if r.req == nil { r.req = NewRequest() } - r.req.SynonymsSet = make([]types.SynonymRule, len(synonymssets)) - for i, v := range synonymssets { - r.req.SynonymsSet[i] = *v.SynonymRuleCaster() - } + r.req.SynonymsSet = synonymssets return r } diff --git a/typedapi/synonyms/putsynonym/request.go b/typedapi/synonyms/putsynonym/request.go index 901ccc95c0..1d9b943c40 100644 --- a/typedapi/synonyms/putsynonym/request.go +++ b/typedapi/synonyms/putsynonym/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsynonym @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L55 type Request struct { // SynonymsSet The synonym rules definitions for the synonyms set. diff --git a/typedapi/synonyms/putsynonym/response.go b/typedapi/synonyms/putsynonym/response.go index dcdc33908a..ce1205ab29 100644 --- a/typedapi/synonyms/putsynonym/response.go +++ b/typedapi/synonyms/putsynonym/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsynonym @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L28 type Response struct { ReloadAnalyzersDetails types.ReloadResult `json:"reload_analyzers_details"` Result result.Result `json:"result"` diff --git a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go index 9a291b8a1e..ce6fbf60fc 100644 --- a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go +++ b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a synonym rule. // Create or update a synonym rule in a synonym set. @@ -387,14 +387,12 @@ func (r *PutSynonymRule) Pretty(pretty bool) *PutSynonymRule { return r } -// The synonym rule information definition, which must be in Solr format. +// Synonyms The synonym rule information definition, which must be in Solr format. // API name: synonyms func (r *PutSynonymRule) Synonyms(synonymstring string) *PutSynonymRule { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Synonyms = synonymstring return r diff --git a/typedapi/synonyms/putsynonymrule/request.go b/typedapi/synonyms/putsynonymrule/request.go index bf92ee4bcf..b87291e15c 100644 --- a/typedapi/synonyms/putsynonymrule/request.go +++ b/typedapi/synonyms/putsynonymrule/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsynonymrule @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L60 type Request struct { // Synonyms The synonym rule information definition, which must be in Solr format. diff --git a/typedapi/synonyms/putsynonymrule/response.go b/typedapi/synonyms/putsynonymrule/response.go index 69103b00ba..d4c9a7000f 100644 --- a/typedapi/synonyms/putsynonymrule/response.go +++ b/typedapi/synonyms/putsynonymrule/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putsynonymrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24 type Response struct { // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. diff --git a/typedapi/tasks/cancel/cancel.go b/typedapi/tasks/cancel/cancel.go index 13dcc23d94..a3715cbde3 100644 --- a/typedapi/tasks/cancel/cancel.go +++ b/typedapi/tasks/cancel/cancel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Cancel a task. // diff --git a/typedapi/tasks/cancel/response.go b/typedapi/tasks/cancel/response.go index 405914a649..da149e439e 100644 --- a/typedapi/tasks/cancel/response.go +++ b/typedapi/tasks/cancel/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package cancel @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package cancel // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/cancel/CancelTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/cancel/CancelTasksResponse.ts#L22-L24 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/tasks/get/get.go b/typedapi/tasks/get/get.go index f1fa04dda9..52032a2ff0 100644 --- a/typedapi/tasks/get/get.go +++ b/typedapi/tasks/get/get.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get task information. // Get information about a task currently running in the cluster. diff --git a/typedapi/tasks/get/response.go b/typedapi/tasks/get/response.go index 670e57f5be..06f2dd2604 100644 --- a/typedapi/tasks/get/response.go +++ b/typedapi/tasks/get/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package get @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/get/GetTaskResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/get/GetTaskResponse.ts#L24-L31 type Response struct { Completed bool `json:"completed"` Error *types.ErrorCause `json:"error,omitempty"` diff --git a/typedapi/tasks/list/list.go b/typedapi/tasks/list/list.go index 0d56135f6d..b3bd93a822 100644 --- a/typedapi/tasks/list/list.go +++ b/typedapi/tasks/list/list.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get all tasks. // Get information about the tasks currently running on one or more nodes in the diff --git a/typedapi/tasks/list/response.go b/typedapi/tasks/list/response.go index 2e609fc45b..590212fd8f 100644 --- a/typedapi/tasks/list/response.go +++ b/typedapi/tasks/list/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package list @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/list/ListTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/list/ListTasksResponse.ts#L22-L24 type Response struct { NodeFailures []types.ErrorCause `json:"node_failures,omitempty"` // Nodes Task information grouped by node, if `group_by` was set to `node` (the diff --git a/typedapi/textstructure/findfieldstructure/find_field_structure.go b/typedapi/textstructure/findfieldstructure/find_field_structure.go index 67d56a62ac..308302ddee 100644 --- a/typedapi/textstructure/findfieldstructure/find_field_structure.go +++ b/typedapi/textstructure/findfieldstructure/find_field_structure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Find the structure of a text field. // Find the structure of a text field in an Elasticsearch index. diff --git a/typedapi/textstructure/findfieldstructure/response.go b/typedapi/textstructure/findfieldstructure/response.go index 5699b61d59..901cda356c 100644 --- a/typedapi/textstructure/findfieldstructure/response.go +++ b/typedapi/textstructure/findfieldstructure/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package findfieldstructure @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package findfieldstructure // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/find_field_structure/FindFieldStructureResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/find_field_structure/FindFieldStructureResponse.ts#L31-L49 type Response struct { Charset string `json:"charset"` EcsCompatibility *ecscompatibilitytype.EcsCompatibilityType `json:"ecs_compatibility,omitempty"` diff --git a/typedapi/textstructure/findmessagestructure/find_message_structure.go b/typedapi/textstructure/findmessagestructure/find_message_structure.go index eaefd6aba7..649b1b5304 100644 --- a/typedapi/textstructure/findmessagestructure/find_message_structure.go +++ b/typedapi/textstructure/findmessagestructure/find_message_structure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Find the structure of text messages. // Find the structure of a list of text messages. @@ -588,17 +588,13 @@ func (r *FindMessageStructure) Pretty(pretty bool) *FindMessageStructure { return r } -// The list of messages you want to analyze. +// Messages The list of messages you want to analyze. // API name: messages func (r *FindMessageStructure) Messages(messages ...string) *FindMessageStructure { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range messages { + r.req.Messages = messages - r.req.Messages = append(r.req.Messages, v) - - } return r } diff --git a/typedapi/textstructure/findmessagestructure/request.go b/typedapi/textstructure/findmessagestructure/request.go index 9ee9bd5848..60b1997749 100644 --- a/typedapi/textstructure/findmessagestructure/request.go +++ b/typedapi/textstructure/findmessagestructure/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package findmessagestructure @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package findmessagestructure // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/find_message_structure/FindMessageStructureRequest.ts#L25-L174 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/find_message_structure/FindMessageStructureRequest.ts#L25-L174 type Request struct { // Messages The list of messages you want to analyze. diff --git a/typedapi/textstructure/findmessagestructure/response.go b/typedapi/textstructure/findmessagestructure/response.go index 51ca79fbc2..5c64f74dc1 100644 --- a/typedapi/textstructure/findmessagestructure/response.go +++ b/typedapi/textstructure/findmessagestructure/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package findmessagestructure @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package findmessagestructure // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/find_message_structure/FindMessageStructureResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/find_message_structure/FindMessageStructureResponse.ts#L31-L49 type Response struct { Charset string `json:"charset"` EcsCompatibility *ecscompatibilitytype.EcsCompatibilityType `json:"ecs_compatibility,omitempty"` diff --git a/typedapi/textstructure/findstructure/find_structure.go b/typedapi/textstructure/findstructure/find_structure.go index 95eb2275e7..eba5772c53 100644 --- a/typedapi/textstructure/findstructure/find_structure.go +++ b/typedapi/textstructure/findstructure/find_structure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Find the structure of a text file. // The text file must contain data that is suitable to be ingested into diff --git a/typedapi/textstructure/findstructure/request.go b/typedapi/textstructure/findstructure/request.go index 5df426b1f5..3cda266ca0 100644 --- a/typedapi/textstructure/findstructure/request.go +++ b/typedapi/textstructure/findstructure/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package findstructure @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L207 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L207 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/textstructure/findstructure/response.go b/typedapi/textstructure/findstructure/response.go index 125b9465ee..5764c3d777 100644 --- a/typedapi/textstructure/findstructure/response.go +++ b/typedapi/textstructure/findstructure/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package findstructure @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L97 type Response struct { // Charset The character encoding used to parse the text. diff --git a/typedapi/textstructure/testgrokpattern/request.go b/typedapi/textstructure/testgrokpattern/request.go index 732b93c585..3ba0bdd2db 100644 --- a/typedapi/textstructure/testgrokpattern/request.go +++ b/typedapi/textstructure/testgrokpattern/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package testgrokpattern @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L23-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L23-L59 type Request struct { // GrokPattern The Grok pattern to run on the text. diff --git a/typedapi/textstructure/testgrokpattern/response.go b/typedapi/textstructure/testgrokpattern/response.go index 70e1198430..4d57ce06b4 100644 --- a/typedapi/textstructure/testgrokpattern/response.go +++ b/typedapi/textstructure/testgrokpattern/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package testgrokpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/test_grok_pattern/TestGrokPatternResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/test_grok_pattern/TestGrokPatternResponse.ts#L22-L26 type Response struct { Matches []types.MatchedText `json:"matches"` } diff --git a/typedapi/textstructure/testgrokpattern/test_grok_pattern.go b/typedapi/textstructure/testgrokpattern/test_grok_pattern.go index 3aee441557..d67ea889f5 100644 --- a/typedapi/textstructure/testgrokpattern/test_grok_pattern.go +++ b/typedapi/textstructure/testgrokpattern/test_grok_pattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Test a Grok pattern. // Test a Grok pattern on one or more lines of text. @@ -351,30 +351,24 @@ func (r *TestGrokPattern) Pretty(pretty bool) *TestGrokPattern { return r } -// The Grok pattern to run on the text. +// GrokPattern The Grok pattern to run on the text. // API name: grok_pattern func (r *TestGrokPattern) GrokPattern(grokpattern string) *TestGrokPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.GrokPattern = grokpattern return r } -// The lines of text to run the Grok pattern on. +// Text The lines of text to run the Grok pattern on. // API name: text func (r *TestGrokPattern) Text(texts ...string) *TestGrokPattern { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - for _, v := range texts { - - r.req.Text = append(r.req.Text, v) + r.req.Text = texts - } return r } diff --git a/typedapi/transform/deletetransform/delete_transform.go b/typedapi/transform/deletetransform/delete_transform.go index d9b0d967ab..e9cffa6773 100644 --- a/typedapi/transform/deletetransform/delete_transform.go +++ b/typedapi/transform/deletetransform/delete_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a transform. package deletetransform diff --git a/typedapi/transform/deletetransform/response.go b/typedapi/transform/deletetransform/response.go index d22c5714f5..3bda4daf8a 100644 --- a/typedapi/transform/deletetransform/response.go +++ b/typedapi/transform/deletetransform/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletetransform // Response holds the response body struct for the package deletetransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/getnodestats/get_node_stats.go b/typedapi/transform/getnodestats/get_node_stats.go index 913abcc65a..e4a4ad0f4b 100644 --- a/typedapi/transform/getnodestats/get_node_stats.go +++ b/typedapi/transform/getnodestats/get_node_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Retrieves transform usage information for transform nodes. package getnodestats diff --git a/typedapi/transform/gettransform/get_transform.go b/typedapi/transform/gettransform/get_transform.go index 51cdf3826e..7902d3e3a2 100644 --- a/typedapi/transform/gettransform/get_transform.go +++ b/typedapi/transform/gettransform/get_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get transforms. // Get configuration information for transforms. diff --git a/typedapi/transform/gettransform/response.go b/typedapi/transform/gettransform/response.go index 0fc5feca5d..c8463cdd6c 100644 --- a/typedapi/transform/gettransform/response.go +++ b/typedapi/transform/gettransform/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform/GetTransformResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform/GetTransformResponse.ts#L23-L25 type Response struct { Count int64 `json:"count"` Transforms []types.TransformSummary `json:"transforms"` diff --git a/typedapi/transform/gettransformstats/get_transform_stats.go b/typedapi/transform/gettransformstats/get_transform_stats.go index cddb3cbec6..83b1508101 100644 --- a/typedapi/transform/gettransformstats/get_transform_stats.go +++ b/typedapi/transform/gettransformstats/get_transform_stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get transform stats. // diff --git a/typedapi/transform/gettransformstats/response.go b/typedapi/transform/gettransformstats/response.go index 631199471c..6038867545 100644 --- a/typedapi/transform/gettransformstats/response.go +++ b/typedapi/transform/gettransformstats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package gettransformstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransformstats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25 type Response struct { Count int64 `json:"count"` Transforms []types.TransformStats `json:"transforms"` diff --git a/typedapi/transform/previewtransform/preview_transform.go b/typedapi/transform/previewtransform/preview_transform.go index f743370569..1f2206bf7e 100644 --- a/typedapi/transform/previewtransform/preview_transform.go +++ b/typedapi/transform/previewtransform/preview_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Preview a transform. // Generates a preview of the results that you will get when you create a @@ -389,10 +389,9 @@ func (r *PreviewTransform) Pretty(pretty bool) *PreviewTransform { return r } -// Free text description of the transform. +// Description Free text description of the transform. // API name: description func (r *PreviewTransform) Description(description string) *PreviewTransform { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -402,113 +401,104 @@ func (r *PreviewTransform) Description(description string) *PreviewTransform { return r } -// The destination for the transform. +// Dest The destination for the transform. // API name: dest -func (r *PreviewTransform) Dest(dest types.TransformDestinationVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Dest(dest *types.TransformDestination) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.Dest = dest.TransformDestinationCaster() + r.req.Dest = dest return r } -// The interval between checks for changes in the source indices when the +// Frequency The interval between checks for changes in the source indices when the // transform is running continuously. Also determines the retry interval in // the event of transient failures while the transform is searching or // indexing. The minimum value is 1s and the maximum is 1h. // API name: frequency -func (r *PreviewTransform) Frequency(duration types.DurationVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Frequency(duration types.Duration) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - - r.req.Frequency = *duration.DurationCaster() + r.req.Frequency = duration return r } -// The latest method transforms the data by finding the latest document for +// Latest The latest method transforms the data by finding the latest document for // each unique key. // API name: latest -func (r *PreviewTransform) Latest(latest types.LatestVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Latest(latest *types.Latest) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.Latest = latest.LatestCaster() + r.req.Latest = latest return r } -// The pivot method transforms the data by aggregating and grouping it. +// Pivot The pivot method transforms the data by aggregating and grouping it. // These objects define the group by fields and the aggregation to reduce // the data. // API name: pivot -func (r *PreviewTransform) Pivot(pivot types.PivotVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Pivot(pivot *types.Pivot) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.Pivot = pivot.PivotCaster() + r.req.Pivot = pivot return r } -// Defines a retention policy for the transform. Data that meets the defined +// RetentionPolicy Defines a retention policy for the transform. Data that meets the defined // criteria is deleted from the destination index. // API name: retention_policy -func (r *PreviewTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainerVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) RetentionPolicy(retentionpolicy *types.RetentionPolicyContainer) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.RetentionPolicy = retentionpolicy.RetentionPolicyContainerCaster() + r.req.RetentionPolicy = retentionpolicy return r } -// Defines optional transform settings. +// Settings Defines optional transform settings. // API name: settings -func (r *PreviewTransform) Settings(settings types.SettingsVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Settings(settings *types.Settings) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.SettingsCaster() + r.req.Settings = settings return r } -// The source of the data for the transform. +// Source The source of the data for the transform. // API name: source -func (r *PreviewTransform) Source(source types.TransformSourceVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Source(source *types.TransformSource) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.Source = source.TransformSourceCaster() + r.req.Source = source return r } -// Defines the properties transforms require to run continuously. +// Sync Defines the properties transforms require to run continuously. // API name: sync -func (r *PreviewTransform) Sync(sync types.SyncContainerVariant) *PreviewTransform { - // Initialize the request if it is not already initialized +func (r *PreviewTransform) Sync(sync *types.SyncContainer) *PreviewTransform { if r.req == nil { r.req = NewRequest() } - r.req.Sync = sync.SyncContainerCaster() + r.req.Sync = sync return r } diff --git a/typedapi/transform/previewtransform/request.go b/typedapi/transform/previewtransform/request.go index ccbd082b81..8d718b49c0 100644 --- a/typedapi/transform/previewtransform/request.go +++ b/typedapi/transform/previewtransform/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package previewtransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L119 type Request struct { // Description Free text description of the transform. diff --git a/typedapi/transform/previewtransform/response.go b/typedapi/transform/previewtransform/response.go index fa2ec6be90..88753b25cc 100644 --- a/typedapi/transform/previewtransform/response.go +++ b/typedapi/transform/previewtransform/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package previewtransform @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/preview_transform/PreviewTransformResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/preview_transform/PreviewTransformResponse.ts#L22-L27 type Response struct { GeneratedDestIndex types.IndexState `json:"generated_dest_index"` Preview []json.RawMessage `json:"preview"` diff --git a/typedapi/transform/puttransform/put_transform.go b/typedapi/transform/puttransform/put_transform.go index 0eae1de7fb..7c4cb2ffff 100644 --- a/typedapi/transform/puttransform/put_transform.go +++ b/typedapi/transform/puttransform/put_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create a transform. // Creates a transform. @@ -451,10 +451,9 @@ func (r *PutTransform) Pretty(pretty bool) *PutTransform { return r } -// Free text description of the transform. +// Description Free text description of the transform. // API name: description func (r *PutTransform) Description(description string) *PutTransform { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -464,128 +463,117 @@ func (r *PutTransform) Description(description string) *PutTransform { return r } -// The destination for the transform. +// Dest The destination for the transform. // API name: dest -func (r *PutTransform) Dest(dest types.TransformDestinationVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Dest(dest *types.TransformDestination) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.Dest = *dest.TransformDestinationCaster() + r.req.Dest = *dest return r } -// The interval between checks for changes in the source indices when the +// Frequency The interval between checks for changes in the source indices when the // transform is running continuously. Also // determines the retry interval in the event of transient failures while the // transform is searching or indexing. // The minimum value is `1s` and the maximum is `1h`. // API name: frequency -func (r *PutTransform) Frequency(duration types.DurationVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Frequency(duration types.Duration) *PutTransform { if r.req == nil { r.req = NewRequest() } - - r.req.Frequency = *duration.DurationCaster() + r.req.Frequency = duration return r } -// The latest method transforms the data by finding the latest document for each +// Latest The latest method transforms the data by finding the latest document for each // unique key. // API name: latest -func (r *PutTransform) Latest(latest types.LatestVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Latest(latest *types.Latest) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.Latest = latest.LatestCaster() + r.req.Latest = latest return r } -// Defines optional transform metadata. +// Meta_ Defines optional transform metadata. // API name: _meta -func (r *PutTransform) Meta_(metadata types.MetadataVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Meta_(metadata types.Metadata) *PutTransform { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// The pivot method transforms the data by aggregating and grouping it. These +// Pivot The pivot method transforms the data by aggregating and grouping it. These // objects define the group by fields // and the aggregation to reduce the data. // API name: pivot -func (r *PutTransform) Pivot(pivot types.PivotVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Pivot(pivot *types.Pivot) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.Pivot = pivot.PivotCaster() + r.req.Pivot = pivot return r } -// Defines a retention policy for the transform. Data that meets the defined +// RetentionPolicy Defines a retention policy for the transform. Data that meets the defined // criteria is deleted from the // destination index. // API name: retention_policy -func (r *PutTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainerVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) RetentionPolicy(retentionpolicy *types.RetentionPolicyContainer) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.RetentionPolicy = retentionpolicy.RetentionPolicyContainerCaster() + r.req.RetentionPolicy = retentionpolicy return r } -// Defines optional transform settings. +// Settings Defines optional transform settings. // API name: settings -func (r *PutTransform) Settings(settings types.SettingsVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Settings(settings *types.Settings) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.SettingsCaster() + r.req.Settings = settings return r } -// The source of the data for the transform. +// Source The source of the data for the transform. // API name: source -func (r *PutTransform) Source(source types.TransformSourceVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Source(source *types.TransformSource) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.Source = *source.TransformSourceCaster() + r.req.Source = *source return r } -// Defines the properties transforms require to run continuously. +// Sync Defines the properties transforms require to run continuously. // API name: sync -func (r *PutTransform) Sync(sync types.SyncContainerVariant) *PutTransform { - // Initialize the request if it is not already initialized +func (r *PutTransform) Sync(sync *types.SyncContainer) *PutTransform { if r.req == nil { r.req = NewRequest() } - r.req.Sync = sync.SyncContainerCaster() + r.req.Sync = sync return r } diff --git a/typedapi/transform/puttransform/request.go b/typedapi/transform/puttransform/request.go index c55c47f65d..8dd6f25c59 100644 --- a/typedapi/transform/puttransform/request.go +++ b/typedapi/transform/puttransform/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/put_transform/PutTransformRequest.ts#L33-L130 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/put_transform/PutTransformRequest.ts#L33-L130 type Request struct { // Description Free text description of the transform. diff --git a/typedapi/transform/puttransform/response.go b/typedapi/transform/puttransform/response.go index a24dccd75e..3e37dbe2ea 100644 --- a/typedapi/transform/puttransform/response.go +++ b/typedapi/transform/puttransform/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package puttransform // Response holds the response body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/put_transform/PutTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/put_transform/PutTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/resettransform/reset_transform.go b/typedapi/transform/resettransform/reset_transform.go index b17ab334d0..d1bf2fc398 100644 --- a/typedapi/transform/resettransform/reset_transform.go +++ b/typedapi/transform/resettransform/reset_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Reset a transform. // diff --git a/typedapi/transform/resettransform/response.go b/typedapi/transform/resettransform/response.go index 17f79e2d24..30e393ef11 100644 --- a/typedapi/transform/resettransform/response.go +++ b/typedapi/transform/resettransform/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package resettransform // Response holds the response body struct for the package resettransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/schedulenowtransform/response.go b/typedapi/transform/schedulenowtransform/response.go index 70f78de5ce..bf1de464e1 100644 --- a/typedapi/transform/schedulenowtransform/response.go +++ b/typedapi/transform/schedulenowtransform/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package schedulenowtransform // Response holds the response body struct for the package schedulenowtransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L23 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/schedulenowtransform/schedule_now_transform.go b/typedapi/transform/schedulenowtransform/schedule_now_transform.go index 247e4bcd0a..880630bff1 100644 --- a/typedapi/transform/schedulenowtransform/schedule_now_transform.go +++ b/typedapi/transform/schedulenowtransform/schedule_now_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Schedule a transform to start now. // diff --git a/typedapi/transform/starttransform/response.go b/typedapi/transform/starttransform/response.go index 6c6159f49c..c56b2d983a 100644 --- a/typedapi/transform/starttransform/response.go +++ b/typedapi/transform/starttransform/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package starttransform // Response holds the response body struct for the package starttransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/start_transform/StartTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/start_transform/StartTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/starttransform/start_transform.go b/typedapi/transform/starttransform/start_transform.go index bcac94d6e9..40177e5b64 100644 --- a/typedapi/transform/starttransform/start_transform.go +++ b/typedapi/transform/starttransform/start_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start a transform. // diff --git a/typedapi/transform/stoptransform/response.go b/typedapi/transform/stoptransform/response.go index 33e70b0d38..eb43591a21 100644 --- a/typedapi/transform/stoptransform/response.go +++ b/typedapi/transform/stoptransform/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stoptransform // Response holds the response body struct for the package stoptransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/stop_transform/StopTransformResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/stop_transform/StopTransformResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/transform/stoptransform/stop_transform.go b/typedapi/transform/stoptransform/stop_transform.go index 3fc27134a5..af6c3041c2 100644 --- a/typedapi/transform/stoptransform/stop_transform.go +++ b/typedapi/transform/stoptransform/stop_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop transforms. // Stops one or more transforms. diff --git a/typedapi/transform/updatetransform/request.go b/typedapi/transform/updatetransform/request.go index 3c7d9c1746..621f407aac 100644 --- a/typedapi/transform/updatetransform/request.go +++ b/typedapi/transform/updatetransform/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatetransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L113 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L113 type Request struct { // Description Free text description of the transform. diff --git a/typedapi/transform/updatetransform/response.go b/typedapi/transform/updatetransform/response.go index 704422bd2a..d02edadd08 100644 --- a/typedapi/transform/updatetransform/response.go +++ b/typedapi/transform/updatetransform/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatetransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51 type Response struct { Authorization *types.TransformAuthorization `json:"authorization,omitempty"` CreateTime int64 `json:"create_time"` diff --git a/typedapi/transform/updatetransform/update_transform.go b/typedapi/transform/updatetransform/update_transform.go index 1436247a48..e55cab5918 100644 --- a/typedapi/transform/updatetransform/update_transform.go +++ b/typedapi/transform/updatetransform/update_transform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update a transform. // Updates certain properties of a transform. @@ -398,10 +398,9 @@ func (r *UpdateTransform) Pretty(pretty bool) *UpdateTransform { return r } -// Free text description of the transform. +// Description Free text description of the transform. // API name: description func (r *UpdateTransform) Description(description string) *UpdateTransform { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -411,97 +410,87 @@ func (r *UpdateTransform) Description(description string) *UpdateTransform { return r } -// The destination for the transform. +// Dest The destination for the transform. // API name: dest -func (r *UpdateTransform) Dest(dest types.TransformDestinationVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) Dest(dest *types.TransformDestination) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - r.req.Dest = dest.TransformDestinationCaster() + r.req.Dest = dest return r } -// The interval between checks for changes in the source indices when the +// Frequency The interval between checks for changes in the source indices when the // transform is running continuously. Also determines the retry interval in // the event of transient failures while the transform is searching or // indexing. The minimum value is 1s and the maximum is 1h. // API name: frequency -func (r *UpdateTransform) Frequency(duration types.DurationVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) Frequency(duration types.Duration) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - - r.req.Frequency = *duration.DurationCaster() + r.req.Frequency = duration return r } -// Defines optional transform metadata. +// Meta_ Defines optional transform metadata. // API name: _meta -func (r *UpdateTransform) Meta_(metadata types.MetadataVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) Meta_(metadata types.Metadata) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - - r.req.Meta_ = *metadata.MetadataCaster() + r.req.Meta_ = metadata return r } -// Defines a retention policy for the transform. Data that meets the defined +// RetentionPolicy Defines a retention policy for the transform. Data that meets the defined // criteria is deleted from the destination index. // API name: retention_policy -func (r *UpdateTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainerVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainer) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - - r.req.RetentionPolicy = retentionpolicy.RetentionPolicyContainerCaster() + r.req.RetentionPolicy = &retentionpolicy return r } -// Defines optional transform settings. +// Settings Defines optional transform settings. // API name: settings -func (r *UpdateTransform) Settings(settings types.SettingsVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) Settings(settings *types.Settings) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - r.req.Settings = settings.SettingsCaster() + r.req.Settings = settings return r } -// The source of the data for the transform. +// Source The source of the data for the transform. // API name: source -func (r *UpdateTransform) Source(source types.TransformSourceVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) Source(source *types.TransformSource) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - r.req.Source = source.TransformSourceCaster() + r.req.Source = source return r } -// Defines the properties transforms require to run continuously. +// Sync Defines the properties transforms require to run continuously. // API name: sync -func (r *UpdateTransform) Sync(sync types.SyncContainerVariant) *UpdateTransform { - // Initialize the request if it is not already initialized +func (r *UpdateTransform) Sync(sync *types.SyncContainer) *UpdateTransform { if r.req == nil { r.req = NewRequest() } - r.req.Sync = sync.SyncContainerCaster() + r.req.Sync = sync return r } diff --git a/typedapi/transform/upgradetransforms/response.go b/typedapi/transform/upgradetransforms/response.go index a2a8de873c..56c82af932 100644 --- a/typedapi/transform/upgradetransforms/response.go +++ b/typedapi/transform/upgradetransforms/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package upgradetransforms // Response holds the response body struct for the package upgradetransforms // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/upgrade_transforms/UpgradeTransformsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/upgrade_transforms/UpgradeTransformsResponse.ts#L25-L34 type Response struct { // NeedsUpdate The number of transforms that need to be upgraded. diff --git a/typedapi/transform/upgradetransforms/upgrade_transforms.go b/typedapi/transform/upgradetransforms/upgrade_transforms.go index 96a9159ff8..a2e611e6d2 100644 --- a/typedapi/transform/upgradetransforms/upgrade_transforms.go +++ b/typedapi/transform/upgradetransforms/upgrade_transforms.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Upgrade all transforms. // diff --git a/typedapi/types/access.go b/typedapi/types/access.go index df96659b89..3f3a7eb132 100644 --- a/typedapi/types/access.go +++ b/typedapi/types/access.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Access type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Access.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Access.ts#L22-L31 type Access struct { // Replication A list of indices permission entries for cross-cluster replication. Replication []ReplicationAccess `json:"replication,omitempty"` @@ -36,13 +36,3 @@ func NewAccess() *Access { return r } - -// true - -type AccessVariant interface { - AccessCaster() *Access -} - -func (s *Access) AccessCaster() *Access { - return s -} diff --git a/typedapi/types/acknowledgement.go b/typedapi/types/acknowledgement.go index 758476e5c2..557ff27649 100644 --- a/typedapi/types/acknowledgement.go +++ b/typedapi/types/acknowledgement.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Acknowledgement type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/post/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/post/types.ts#L20-L23 type Acknowledgement struct { License []string `json:"license"` Message string `json:"message"` @@ -80,5 +80,3 @@ func NewAcknowledgement() *Acknowledgement { return r } - -// false diff --git a/typedapi/types/acknowledgestate.go b/typedapi/types/acknowledgestate.go index 46e801a874..e1caf7727c 100644 --- a/typedapi/types/acknowledgestate.go +++ b/typedapi/types/acknowledgestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // AcknowledgeState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L109-L112 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L109-L112 type AcknowledgeState struct { State acknowledgementoptions.AcknowledgementOptions `json:"state"` Timestamp DateTime `json:"timestamp"` @@ -74,13 +74,3 @@ func NewAcknowledgeState() *AcknowledgeState { return r } - -// true - -type AcknowledgeStateVariant interface { - AcknowledgeStateCaster() *AcknowledgeState -} - -func (s *AcknowledgeState) AcknowledgeStateCaster() *AcknowledgeState { - return s -} diff --git a/typedapi/types/actionstatus.go b/typedapi/types/actionstatus.go index f73ecf9fb8..3f87bde5ca 100644 --- a/typedapi/types/actionstatus.go +++ b/typedapi/types/actionstatus.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ActionStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L125-L130 type ActionStatus struct { Ack AcknowledgeState `json:"ack"` LastExecution *ExecutionState `json:"last_execution,omitempty"` @@ -36,13 +36,3 @@ func NewActionStatus() *ActionStatus { return r } - -// true - -type ActionStatusVariant interface { - ActionStatusCaster() *ActionStatus -} - -func (s *ActionStatus) ActionStatusCaster() *ActionStatus { - return s -} diff --git a/typedapi/types/activationstate.go b/typedapi/types/activationstate.go index 9d087cac19..b551b5d055 100644 --- a/typedapi/types/activationstate.go +++ b/typedapi/types/activationstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ActivationState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Activation.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Activation.ts#L24-L27 type ActivationState struct { Active bool `json:"active"` Timestamp DateTime `json:"timestamp"` @@ -82,13 +82,3 @@ func NewActivationState() *ActivationState { return r } - -// true - -type ActivationStateVariant interface { - ActivationStateCaster() *ActivationState -} - -func (s *ActivationState) ActivationStateCaster() *ActivationState { - return s -} diff --git a/typedapi/types/activationstatus.go b/typedapi/types/activationstatus.go index eb2a40a708..a8d306f3c0 100644 --- a/typedapi/types/activationstatus.go +++ b/typedapi/types/activationstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ActivationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Activation.ts#L29-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Activation.ts#L29-L33 type ActivationStatus struct { Actions WatcherStatusActions `json:"actions"` State ActivationState `json:"state"` @@ -78,5 +78,3 @@ func NewActivationStatus() *ActivationStatus { return r } - -// false diff --git a/typedapi/types/adaptiveallocations.go b/typedapi/types/adaptiveallocations.go index 2dd4940183..46730a2ccc 100644 --- a/typedapi/types/adaptiveallocations.go +++ b/typedapi/types/adaptiveallocations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AdaptiveAllocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L60-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L99-L116 type AdaptiveAllocations struct { // Enabled Turn on `adaptive_allocations`. Enabled *bool `json:"enabled,omitempty"` @@ -116,13 +116,3 @@ func NewAdaptiveAllocations() *AdaptiveAllocations { return r } - -// true - -type AdaptiveAllocationsVariant interface { - AdaptiveAllocationsCaster() *AdaptiveAllocations -} - -func (s *AdaptiveAllocations) AdaptiveAllocationsCaster() *AdaptiveAllocations { - return s -} diff --git a/typedapi/types/adaptiveallocationssettings.go b/typedapi/types/adaptiveallocationssettings.go index 5e7d6297c2..a18ac59c19 100644 --- a/typedapi/types/adaptiveallocationssettings.go +++ b/typedapi/types/adaptiveallocationssettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AdaptiveAllocationsSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L109-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L109-L125 type AdaptiveAllocationsSettings struct { // Enabled If true, adaptive_allocations is enabled Enabled bool `json:"enabled"` @@ -116,13 +116,3 @@ func NewAdaptiveAllocationsSettings() *AdaptiveAllocationsSettings { return r } - -// true - -type AdaptiveAllocationsSettingsVariant interface { - AdaptiveAllocationsSettingsCaster() *AdaptiveAllocationsSettings -} - -func (s *AdaptiveAllocationsSettings) AdaptiveAllocationsSettingsCaster() *AdaptiveAllocationsSettings { - return s -} diff --git a/typedapi/types/adaptiveselection.go b/typedapi/types/adaptiveselection.go index e5f250abbd..df13b4e66c 100644 --- a/typedapi/types/adaptiveselection.go +++ b/typedapi/types/adaptiveselection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AdaptiveSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L439-L468 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L441-L470 type AdaptiveSelection struct { // AvgQueueSize The exponentially weighted moving average queue size of search requests on // the keyed node. @@ -163,5 +163,3 @@ func NewAdaptiveSelection() *AdaptiveSelection { return r } - -// false diff --git a/typedapi/types/addaction.go b/typedapi/types/addaction.go index 9c2ec2d8df..6fac3c028b 100644 --- a/typedapi/types/addaction.go +++ b/typedapi/types/addaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AddAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/update_aliases/types.ts#L41-L95 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/update_aliases/types.ts#L41-L95 type AddAction struct { // Alias Alias for the action. // Index alias names support date math. @@ -196,13 +196,3 @@ func NewAddAction() *AddAction { return r } - -// true - -type AddActionVariant interface { - AddActionCaster() *AddAction -} - -func (s *AddAction) AddActionCaster() *AddAction { - return s -} diff --git a/typedapi/types/adjacencymatrixaggregate.go b/typedapi/types/adjacencymatrixaggregate.go index 467db728fa..cff745c677 100644 --- a/typedapi/types/adjacencymatrixaggregate.go +++ b/typedapi/types/adjacencymatrixaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AdjacencyMatrixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L647-L652 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L649-L654 type AdjacencyMatrixAggregate struct { Buckets BucketsAdjacencyMatrixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewAdjacencyMatrixAggregate() *AdjacencyMatrixAggregate { return r } - -// false diff --git a/typedapi/types/adjacencymatrixaggregation.go b/typedapi/types/adjacencymatrixaggregation.go index fb16fa6fc2..849670ea77 100644 --- a/typedapi/types/adjacencymatrixaggregation.go +++ b/typedapi/types/adjacencymatrixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AdjacencyMatrixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L60-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L60-L70 type AdjacencyMatrixAggregation struct { // Filters Filters used to create buckets. // At least one filter is required. @@ -88,13 +88,3 @@ func NewAdjacencyMatrixAggregation() *AdjacencyMatrixAggregation { return r } - -// true - -type AdjacencyMatrixAggregationVariant interface { - AdjacencyMatrixAggregationCaster() *AdjacencyMatrixAggregation -} - -func (s *AdjacencyMatrixAggregation) AdjacencyMatrixAggregationCaster() *AdjacencyMatrixAggregation { - return s -} diff --git a/typedapi/types/adjacencymatrixbucket.go b/typedapi/types/adjacencymatrixbucket.go index 76ce0f122a..61e14f2268 100644 --- a/typedapi/types/adjacencymatrixbucket.go +++ b/typedapi/types/adjacencymatrixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // AdjacencyMatrixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L654-L656 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L656-L658 type AdjacencyMatrixBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -643,5 +643,3 @@ func NewAdjacencyMatrixBucket() *AdjacencyMatrixBucket { return r } - -// false diff --git a/typedapi/types/aggregate.go b/typedapi/types/aggregate.go index 4f6277ea78..dac67024e7 100644 --- a/typedapi/types/aggregate.go +++ b/typedapi/types/aggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -93,5 +93,5 @@ package types // MatrixStatsAggregate // GeoLineAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L38-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L38-L125 type Aggregate any diff --git a/typedapi/types/aggregatemetricdoubleproperty.go b/typedapi/types/aggregatemetricdoubleproperty.go index 07d12c303f..62c756fcdd 100644 --- a/typedapi/types/aggregatemetricdoubleproperty.go +++ b/typedapi/types/aggregatemetricdoubleproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,12 +35,13 @@ import ( // AggregateMetricDoubleProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/complex.ts#L59-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/complex.ts#L60-L66 type AggregateMetricDoubleProperty struct { - DefaultMetric string `json:"default_metric"` - Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` - Fields map[string]Property `json:"fields,omitempty"` - IgnoreAbove *int `json:"ignore_above,omitempty"` + DefaultMetric string `json:"default_metric"` + Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` + Fields map[string]Property `json:"fields,omitempty"` + IgnoreAbove *int `json:"ignore_above,omitempty"` + IgnoreMalformed *bool `json:"ignore_malformed,omitempty"` // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Metrics []string `json:"metrics"` @@ -224,6 +225,12 @@ func (s *AggregateMetricDoubleProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -429,6 +436,20 @@ func (s *AggregateMetricDoubleProperty) UnmarshalJSON(data []byte) error { s.IgnoreAbove = &f } + case "ignore_malformed": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "IgnoreMalformed", err) + } + s.IgnoreMalformed = &value + case bool: + s.IgnoreMalformed = &v + } + case "meta": if s.Meta == nil { s.Meta = make(map[string]string, 0) @@ -584,6 +605,12 @@ func (s *AggregateMetricDoubleProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -801,6 +828,7 @@ func (s AggregateMetricDoubleProperty) MarshalJSON() ([]byte, error) { Dynamic: s.Dynamic, Fields: s.Fields, IgnoreAbove: s.IgnoreAbove, + IgnoreMalformed: s.IgnoreMalformed, Meta: s.Meta, Metrics: s.Metrics, Properties: s.Properties, @@ -824,13 +852,3 @@ func NewAggregateMetricDoubleProperty() *AggregateMetricDoubleProperty { return r } - -// true - -type AggregateMetricDoublePropertyVariant interface { - AggregateMetricDoublePropertyCaster() *AggregateMetricDoubleProperty -} - -func (s *AggregateMetricDoubleProperty) AggregateMetricDoublePropertyCaster() *AggregateMetricDoubleProperty { - return s -} diff --git a/typedapi/types/aggregateorder.go b/typedapi/types/aggregateorder.go index 3aae86a09a..900d0f6665 100644 --- a/typedapi/types/aggregateorder.go +++ b/typedapi/types/aggregateorder.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // map[string]sortorder.SortOrder // []map[string]sortorder.SortOrder // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1052-L1054 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1052-L1054 type AggregateOrder any - -type AggregateOrderVariant interface { - AggregateOrderCaster() *AggregateOrder -} diff --git a/typedapi/types/aggregateoutput.go b/typedapi/types/aggregateoutput.go index 73402d0362..2b082cb617 100644 --- a/typedapi/types/aggregateoutput.go +++ b/typedapi/types/aggregateoutput.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // AggregateOutput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L101-L106 type AggregateOutput struct { Exponent *Weights `json:"exponent,omitempty"` LogisticRegression *Weights `json:"logistic_regression,omitempty"` @@ -36,13 +36,3 @@ func NewAggregateOutput() *AggregateOutput { return r } - -// true - -type AggregateOutputVariant interface { - AggregateOutputCaster() *AggregateOutput -} - -func (s *AggregateOutput) AggregateOutputCaster() *AggregateOutput { - return s -} diff --git a/typedapi/types/aggregationbreakdown.go b/typedapi/types/aggregationbreakdown.go index 4f0db93e5b..d3051a2c6f 100644 --- a/typedapi/types/aggregationbreakdown.go +++ b/typedapi/types/aggregationbreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AggregationBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L26-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L26-L39 type AggregationBreakdown struct { BuildAggregation int64 `json:"build_aggregation"` BuildAggregationCount int64 `json:"build_aggregation_count"` @@ -253,5 +253,3 @@ func NewAggregationBreakdown() *AggregationBreakdown { return r } - -// false diff --git a/typedapi/types/aggregationprofile.go b/typedapi/types/aggregationprofile.go index 02778719e6..0295fc9c1b 100644 --- a/typedapi/types/aggregationprofile.go +++ b/typedapi/types/aggregationprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AggregationProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L85-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L85-L92 type AggregationProfile struct { Breakdown AggregationBreakdown `json:"breakdown"` Children []AggregationProfile `json:"children,omitempty"` @@ -111,5 +111,3 @@ func NewAggregationProfile() *AggregationProfile { return r } - -// false diff --git a/typedapi/types/aggregationprofiledebug.go b/typedapi/types/aggregationprofiledebug.go index 1f144fb46b..8552e7252d 100644 --- a/typedapi/types/aggregationprofiledebug.go +++ b/typedapi/types/aggregationprofiledebug.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L42-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L42-L76 type AggregationProfileDebug struct { BruteForceUsed *int `json:"brute_force_used,omitempty"` BuiltBuckets *int `json:"built_buckets,omitempty"` @@ -554,5 +554,3 @@ func NewAggregationProfileDebug() *AggregationProfileDebug { return r } - -// false diff --git a/typedapi/types/aggregationprofiledelegatedebugfilter.go b/typedapi/types/aggregationprofiledelegatedebugfilter.go index 926c445067..a9ec163f10 100644 --- a/typedapi/types/aggregationprofiledelegatedebugfilter.go +++ b/typedapi/types/aggregationprofiledelegatedebugfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDelegateDebugFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L78-L83 type AggregationProfileDelegateDebugFilter struct { Query *string `json:"query,omitempty"` ResultsFromMetadata *int `json:"results_from_metadata,omitempty"` @@ -121,5 +121,3 @@ func NewAggregationProfileDelegateDebugFilter() *AggregationProfileDelegateDebug return r } - -// false diff --git a/typedapi/types/aggregationrange.go b/typedapi/types/aggregationrange.go index dce16b9ac1..163902b1a3 100644 --- a/typedapi/types/aggregationrange.go +++ b/typedapi/types/aggregationrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L691-L704 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L691-L704 type AggregationRange struct { // From Start of the range (inclusive). From *Float64 `json:"from,omitempty"` @@ -89,13 +89,3 @@ func NewAggregationRange() *AggregationRange { return r } - -// true - -type AggregationRangeVariant interface { - AggregationRangeCaster() *AggregationRange -} - -func (s *AggregationRange) AggregationRangeCaster() *AggregationRange { - return s -} diff --git a/typedapi/types/aggregations.go b/typedapi/types/aggregations.go index c1c48082a7..7865f8e491 100644 --- a/typedapi/types/aggregations.go +++ b/typedapi/types/aggregations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Aggregations type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/AggregationContainer.ts#L107-L533 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/AggregationContainer.ts#L107-L533 type Aggregations struct { AdditionalAggregationsProperty map[string]json.RawMessage `json:"-"` // AdjacencyMatrix A bucket aggregation returning a form of adjacency matrix. @@ -813,13 +813,3 @@ func NewAggregations() *Aggregations { return r } - -// true - -type AggregationsVariant interface { - AggregationsCaster() *Aggregations -} - -func (s *Aggregations) AggregationsCaster() *Aggregations { - return s -} diff --git a/typedapi/types/alias.go b/typedapi/types/alias.go index bf1dab44ad..5a8de2bc74 100644 --- a/typedapi/types/alias.go +++ b/typedapi/types/alias.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Alias type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/Alias.ts#L23-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/Alias.ts#L23-L53 type Alias struct { // Filter Query used to limit documents the alias can access. Filter *Query `json:"filter,omitempty"` @@ -124,13 +124,3 @@ func NewAlias() *Alias { return r } - -// true - -type AliasVariant interface { - AliasCaster() *Alias -} - -func (s *Alias) AliasCaster() *Alias { - return s -} diff --git a/typedapi/types/aliasdefinition.go b/typedapi/types/aliasdefinition.go index 09fcc8d564..30678723d9 100644 --- a/typedapi/types/aliasdefinition.go +++ b/typedapi/types/aliasdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AliasDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/AliasDefinition.ts#L22-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/AliasDefinition.ts#L22-L54 type AliasDefinition struct { // Filter Query used to limit documents the alias can access. Filter *Query `json:"filter,omitempty"` @@ -145,13 +145,3 @@ func NewAliasDefinition() *AliasDefinition { return r } - -// true - -type AliasDefinitionVariant interface { - AliasDefinitionCaster() *AliasDefinition -} - -func (s *AliasDefinition) AliasDefinitionCaster() *AliasDefinition { - return s -} diff --git a/typedapi/types/aliasesrecord.go b/typedapi/types/aliasesrecord.go index 775463e86e..33a84e65d8 100644 --- a/typedapi/types/aliasesrecord.go +++ b/typedapi/types/aliasesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AliasesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/aliases/types.ts#L22-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/aliases/types.ts#L22-L53 type AliasesRecord struct { // Alias alias name Alias *string `json:"alias,omitempty"` @@ -138,5 +138,3 @@ func NewAliasesRecord() *AliasesRecord { return r } - -// false diff --git a/typedapi/types/alibabacloudservicesettings.go b/typedapi/types/alibabacloudservicesettings.go index 2a45b14dfc..1905671127 100644 --- a/typedapi/types/alibabacloudservicesettings.go +++ b/typedapi/types/alibabacloudservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AlibabaCloudServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L219-L264 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L292-L337 type AlibabaCloudServiceSettings struct { // ApiKey A valid API key for the AlibabaCloud AI Search API. ApiKey string `json:"api_key"` @@ -149,13 +149,3 @@ func NewAlibabaCloudServiceSettings() *AlibabaCloudServiceSettings { return r } - -// true - -type AlibabaCloudServiceSettingsVariant interface { - AlibabaCloudServiceSettingsCaster() *AlibabaCloudServiceSettings -} - -func (s *AlibabaCloudServiceSettings) AlibabaCloudServiceSettingsCaster() *AlibabaCloudServiceSettings { - return s -} diff --git a/typedapi/types/alibabacloudtasksettings.go b/typedapi/types/alibabacloudtasksettings.go index 53fbfb9130..a1276f16ec 100644 --- a/typedapi/types/alibabacloudtasksettings.go +++ b/typedapi/types/alibabacloudtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AlibabaCloudTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L266-L280 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L339-L353 type AlibabaCloudTaskSettings struct { // InputType For a `sparse_embedding` or `text_embedding` task, specify the type of input // passed to the model. @@ -100,13 +100,3 @@ func NewAlibabaCloudTaskSettings() *AlibabaCloudTaskSettings { return r } - -// true - -type AlibabaCloudTaskSettingsVariant interface { - AlibabaCloudTaskSettingsCaster() *AlibabaCloudTaskSettings -} - -func (s *AlibabaCloudTaskSettings) AlibabaCloudTaskSettingsCaster() *AlibabaCloudTaskSettings { - return s -} diff --git a/typedapi/types/allfield.go b/typedapi/types/allfield.go index d6cad3b764..4fc4077d5d 100644 --- a/typedapi/types/allfield.go +++ b/typedapi/types/allfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AllField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L29-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L29-L40 type AllField struct { Analyzer string `json:"analyzer"` Enabled bool `json:"enabled"` @@ -205,13 +205,3 @@ func NewAllField() *AllField { return r } - -// true - -type AllFieldVariant interface { - AllFieldCaster() *AllField -} - -func (s *AllField) AllFieldCaster() *AllField { - return s -} diff --git a/typedapi/types/allocateaction.go b/typedapi/types/allocateaction.go index b148b161b3..b5800914ce 100644 --- a/typedapi/types/allocateaction.go +++ b/typedapi/types/allocateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AllocateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L133-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L133-L139 type AllocateAction struct { Exclude map[string]string `json:"exclude,omitempty"` Include map[string]string `json:"include,omitempty"` @@ -126,13 +126,3 @@ func NewAllocateAction() *AllocateAction { return r } - -// true - -type AllocateActionVariant interface { - AllocateActionCaster() *AllocateAction -} - -func (s *AllocateAction) AllocateActionCaster() *AllocateAction { - return s -} diff --git a/typedapi/types/allocationdecision.go b/typedapi/types/allocationdecision.go index b1671b8f03..0a5d086638 100644 --- a/typedapi/types/allocationdecision.go +++ b/typedapi/types/allocationdecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // AllocationDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L27-L31 type AllocationDecision struct { Decider string `json:"decider"` Decision allocationexplaindecision.AllocationExplainDecision `json:"decision"` @@ -95,5 +95,3 @@ func NewAllocationDecision() *AllocationDecision { return r } - -// false diff --git a/typedapi/types/allocationrecord.go b/typedapi/types/allocationrecord.go index 8e02bc9e8d..b1e475fb0a 100644 --- a/typedapi/types/allocationrecord.go +++ b/typedapi/types/allocationrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AllocationRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/allocation/types.ts#L25-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/allocation/types.ts#L25-L99 type AllocationRecord struct { // DiskAvail Free disk space available to Elasticsearch. // Elasticsearch retrieves this metric from the node’s operating system. @@ -194,5 +194,3 @@ func NewAllocationRecord() *AllocationRecord { return r } - -// false diff --git a/typedapi/types/allocationstore.go b/typedapi/types/allocationstore.go index eb57f3fc02..6228e75203 100644 --- a/typedapi/types/allocationstore.go +++ b/typedapi/types/allocationstore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AllocationStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L40-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L40-L47 type AllocationStore struct { AllocationId string `json:"allocation_id"` Found bool `json:"found"` @@ -148,5 +148,3 @@ func NewAllocationStore() *AllocationStore { return r } - -// false diff --git a/typedapi/types/alwayscondition.go b/typedapi/types/alwayscondition.go index 9939af55b8..f6a7c78cfb 100644 --- a/typedapi/types/alwayscondition.go +++ b/typedapi/types/alwayscondition.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // AlwaysCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L25-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L25-L25 type AlwaysCondition struct { } @@ -32,13 +32,3 @@ func NewAlwaysCondition() *AlwaysCondition { return r } - -// true - -type AlwaysConditionVariant interface { - AlwaysConditionCaster() *AlwaysCondition -} - -func (s *AlwaysCondition) AlwaysConditionCaster() *AlwaysCondition { - return s -} diff --git a/typedapi/types/amazonbedrockservicesettings.go b/typedapi/types/amazonbedrockservicesettings.go index a4b5dd9033..565be925f3 100644 --- a/typedapi/types/amazonbedrockservicesettings.go +++ b/typedapi/types/amazonbedrockservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AmazonBedrockServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L293-L335 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L366-L408 type AmazonBedrockServiceSettings struct { // AccessKey A valid AWS access key that has permissions to use Amazon Bedrock and access // to models for inference requests. @@ -158,13 +158,3 @@ func NewAmazonBedrockServiceSettings() *AmazonBedrockServiceSettings { return r } - -// true - -type AmazonBedrockServiceSettingsVariant interface { - AmazonBedrockServiceSettingsCaster() *AmazonBedrockServiceSettings -} - -func (s *AmazonBedrockServiceSettings) AmazonBedrockServiceSettingsCaster() *AmazonBedrockServiceSettings { - return s -} diff --git a/typedapi/types/amazonbedrocktasksettings.go b/typedapi/types/amazonbedrocktasksettings.go index 346f15dd9d..9c76da2085 100644 --- a/typedapi/types/amazonbedrocktasksettings.go +++ b/typedapi/types/amazonbedrocktasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AmazonBedrockTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L337-L361 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L410-L434 type AmazonBedrockTaskSettings struct { // MaxNewTokens For a `completion` task, it sets the maximum number for the output tokens to // be generated. @@ -147,13 +147,3 @@ func NewAmazonBedrockTaskSettings() *AmazonBedrockTaskSettings { return r } - -// true - -type AmazonBedrockTaskSettingsVariant interface { - AmazonBedrockTaskSettingsCaster() *AmazonBedrockTaskSettings -} - -func (s *AmazonBedrockTaskSettings) AmazonBedrockTaskSettingsCaster() *AmazonBedrockTaskSettings { - return s -} diff --git a/typedapi/types/amazonsagemakerservicesettings.go b/typedapi/types/amazonsagemakerservicesettings.go new file mode 100644 index 0000000000..49548629a0 --- /dev/null +++ b/typedapi/types/amazonsagemakerservicesettings.go @@ -0,0 +1,220 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/amazonsagemakerapi" +) + +// AmazonSageMakerServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L445-L499 +type AmazonSageMakerServiceSettings struct { + // AccessKey A valid AWS access key that has permissions to use Amazon SageMaker and + // access to models for invoking requests. + AccessKey string `json:"access_key"` + // Api The API format to use when calling SageMaker. + // Elasticsearch will convert the POST _inference request to this data format + // when invoking the SageMaker endpoint. + Api amazonsagemakerapi.AmazonSageMakerApi `json:"api"` + // BatchSize The maximum number of inputs in each batch. This value is used by inference + // ingestion pipelines + // when processing semantic values. It correlates to the number of times the + // SageMaker endpoint is + // invoked (one per batch of input). + BatchSize *int `json:"batch_size,omitempty"` + // Dimensions The number of dimensions returned by the text embedding models. If this value + // is not provided, then + // it is guessed by making invoking the endpoint for the `text_embedding` task. + Dimensions *int `json:"dimensions,omitempty"` + // EndpointName The name of the SageMaker endpoint. + EndpointName string `json:"endpoint_name"` + // InferenceComponentName The inference component to directly invoke when calling a multi-component + // endpoint. + InferenceComponentName *string `json:"inference_component_name,omitempty"` + // Region The region that your endpoint or Amazon Resource Name (ARN) is deployed in. + // The list of available regions per model can be found in the Amazon SageMaker + // documentation. + Region string `json:"region"` + // SecretKey A valid AWS secret key that is paired with the `access_key`. + // For information about creating and managing access and secret keys, refer to + // the AWS documentation. + SecretKey string `json:"secret_key"` + // TargetContainerHostname The container to directly invoke when calling a multi-container endpoint. + TargetContainerHostname *string `json:"target_container_hostname,omitempty"` + // TargetModel The model ID when calling a multi-model endpoint. + TargetModel *string `json:"target_model,omitempty"` +} + +func (s *AmazonSageMakerServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "access_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "AccessKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.AccessKey = o + + case "api": + if err := dec.Decode(&s.Api); err != nil { + return fmt.Errorf("%s | %w", "Api", err) + } + + case "batch_size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "BatchSize", err) + } + s.BatchSize = &value + case float64: + f := int(v) + s.BatchSize = &f + } + + case "dimensions": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Dimensions", err) + } + s.Dimensions = &value + case float64: + f := int(v) + s.Dimensions = &f + } + + case "endpoint_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "EndpointName", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.EndpointName = o + + case "inference_component_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "InferenceComponentName", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.InferenceComponentName = &o + + case "region": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Region", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Region = o + + case "secret_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "SecretKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.SecretKey = o + + case "target_container_hostname": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "TargetContainerHostname", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.TargetContainerHostname = &o + + case "target_model": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "TargetModel", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.TargetModel = &o + + } + } + return nil +} + +// NewAmazonSageMakerServiceSettings returns a AmazonSageMakerServiceSettings. +func NewAmazonSageMakerServiceSettings() *AmazonSageMakerServiceSettings { + r := &AmazonSageMakerServiceSettings{} + + return r +} diff --git a/typedapi/types/amazonsagemakertasksettings.go b/typedapi/types/amazonsagemakertasksettings.go new file mode 100644 index 0000000000..6e1540ae9a --- /dev/null +++ b/typedapi/types/amazonsagemakertasksettings.go @@ -0,0 +1,141 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// AmazonSageMakerTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L535-L564 +type AmazonSageMakerTaskSettings struct { + // CustomAttributes The AWS custom attributes passed verbatim through to the model running in the + // SageMaker Endpoint. + // Values will be returned in the `X-elastic-sagemaker-custom-attributes` + // header. + CustomAttributes *string `json:"custom_attributes,omitempty"` + // EnableExplanations The optional JMESPath expression used to override the EnableExplanations + // provided during endpoint creation. + EnableExplanations *string `json:"enable_explanations,omitempty"` + // InferenceId The capture data ID when enabled in the endpoint. + InferenceId *string `json:"inference_id,omitempty"` + // SessionId The stateful session identifier for a new or existing session. + // New sessions will be returned in the `X-elastic-sagemaker-new-session-id` + // header. + // Closed sessions will be returned in the + // `X-elastic-sagemaker-closed-session-id` header. + SessionId *string `json:"session_id,omitempty"` + // TargetVariant Specifies the variant when running with multi-variant Endpoints. + TargetVariant *string `json:"target_variant,omitempty"` +} + +func (s *AmazonSageMakerTaskSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "custom_attributes": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "CustomAttributes", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.CustomAttributes = &o + + case "enable_explanations": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "EnableExplanations", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.EnableExplanations = &o + + case "inference_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "InferenceId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.InferenceId = &o + + case "session_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "SessionId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.SessionId = &o + + case "target_variant": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "TargetVariant", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.TargetVariant = &o + + } + } + return nil +} + +// NewAmazonSageMakerTaskSettings returns a AmazonSageMakerTaskSettings. +func NewAmazonSageMakerTaskSettings() *AmazonSageMakerTaskSettings { + r := &AmazonSageMakerTaskSettings{} + + return r +} diff --git a/typedapi/types/analysisconfig.go b/typedapi/types/analysisconfig.go index bf2cfead3e..2c5e6cca78 100644 --- a/typedapi/types/analysisconfig.go +++ b/typedapi/types/analysisconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalysisConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L29-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L29-L77 type AnalysisConfig struct { // BucketSpan The size of the interval that the analysis is aggregated into, typically // between `5m` and `1h`. This value should be either a whole number of days or @@ -234,13 +234,3 @@ func NewAnalysisConfig() *AnalysisConfig { return r } - -// true - -type AnalysisConfigVariant interface { - AnalysisConfigCaster() *AnalysisConfig -} - -func (s *AnalysisConfig) AnalysisConfigCaster() *AnalysisConfig { - return s -} diff --git a/typedapi/types/analysisconfigread.go b/typedapi/types/analysisconfigread.go index 93646f3a5d..a004de3ad2 100644 --- a/typedapi/types/analysisconfigread.go +++ b/typedapi/types/analysisconfigread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalysisConfigRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L79-L148 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L79-L148 type AnalysisConfigRead struct { // BucketSpan The size of the interval that the analysis is aggregated into, typically // between `5m` and `1h`. @@ -221,5 +221,3 @@ func NewAnalysisConfigRead() *AnalysisConfigRead { return r } - -// false diff --git a/typedapi/types/analysislimits.go b/typedapi/types/analysislimits.go index 5ea132ab85..4cb6203db6 100644 --- a/typedapi/types/analysislimits.go +++ b/typedapi/types/analysislimits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalysisLimits type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L161-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L161-L172 type AnalysisLimits struct { // CategorizationExamplesLimit The maximum number of examples stored per category in memory and in the // results data store. If you increase this value, more examples are available, @@ -104,13 +104,3 @@ func NewAnalysisLimits() *AnalysisLimits { return r } - -// true - -type AnalysisLimitsVariant interface { - AnalysisLimitsCaster() *AnalysisLimits -} - -func (s *AnalysisLimits) AnalysisLimitsCaster() *AnalysisLimits { - return s -} diff --git a/typedapi/types/analysismemorylimit.go b/typedapi/types/analysismemorylimit.go index 71e1582e8b..f600967c1b 100644 --- a/typedapi/types/analysismemorylimit.go +++ b/typedapi/types/analysismemorylimit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalysisMemoryLimit type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L174-L179 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L174-L179 type AnalysisMemoryLimit struct { // ModelMemoryLimit Limits can be applied for the resources required to hold the mathematical // models in memory. These limits are approximate and can be set per job. They @@ -78,13 +78,3 @@ func NewAnalysisMemoryLimit() *AnalysisMemoryLimit { return r } - -// true - -type AnalysisMemoryLimitVariant interface { - AnalysisMemoryLimitCaster() *AnalysisMemoryLimit -} - -func (s *AnalysisMemoryLimit) AnalysisMemoryLimitCaster() *AnalysisMemoryLimit { - return s -} diff --git a/typedapi/types/analytics.go b/typedapi/types/analytics.go index 8f7de224ac..d3dfef835a 100644 --- a/typedapi/types/analytics.go +++ b/typedapi/types/analytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Analytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L340-L342 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L340-L342 type Analytics struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -97,5 +97,3 @@ func NewAnalytics() *Analytics { return r } - -// false diff --git a/typedapi/types/analyticscollection.go b/typedapi/types/analyticscollection.go index 44d6195882..fe91887876 100644 --- a/typedapi/types/analyticscollection.go +++ b/typedapi/types/analyticscollection.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // AnalyticsCollection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 type AnalyticsCollection struct { // EventDataStream Data stream for the collection. EventDataStream EventDataStream `json:"event_data_stream"` @@ -34,5 +34,3 @@ func NewAnalyticsCollection() *AnalyticsCollection { return r } - -// false diff --git a/typedapi/types/analyticsstatistics.go b/typedapi/types/analyticsstatistics.go index b2fc795651..eb3cbcc632 100644 --- a/typedapi/types/analyticsstatistics.go +++ b/typedapi/types/analyticsstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalyticsStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L58-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L58-L68 type AnalyticsStatistics struct { BoxplotUsage int64 `json:"boxplot_usage"` CumulativeCardinalityUsage int64 `json:"cumulative_cardinality_usage"` @@ -205,5 +205,3 @@ func NewAnalyticsStatistics() *AnalyticsStatistics { return r } - -// false diff --git a/typedapi/types/analyzedetail.go b/typedapi/types/analyzedetail.go index aaa973e870..cb9d3d135e 100644 --- a/typedapi/types/analyzedetail.go +++ b/typedapi/types/analyzedetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalyzeDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L24-L30 type AnalyzeDetail struct { Analyzer *AnalyzerDetail `json:"analyzer,omitempty"` Charfilters []CharFilterDetail `json:"charfilters,omitempty"` @@ -100,5 +100,3 @@ func NewAnalyzeDetail() *AnalyzeDetail { return r } - -// false diff --git a/typedapi/types/analyzer.go b/typedapi/types/analyzer.go index e78b799f44..917e8ec154 100644 --- a/typedapi/types/analyzer.go +++ b/typedapi/types/analyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -72,9 +72,5 @@ package types // TurkishAnalyzer // ThaiAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L350-L403 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L350-L403 type Analyzer any - -type AnalyzerVariant interface { - AnalyzerCaster() *Analyzer -} diff --git a/typedapi/types/analyzerdetail.go b/typedapi/types/analyzerdetail.go index da72b4a557..9133b68f3a 100644 --- a/typedapi/types/analyzerdetail.go +++ b/typedapi/types/analyzerdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalyzerDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L32-L35 type AnalyzerDetail struct { Name string `json:"name"` Tokens []ExplainAnalyzeToken `json:"tokens"` @@ -80,5 +80,3 @@ func NewAnalyzerDetail() *AnalyzerDetail { return r } - -// false diff --git a/typedapi/types/analyzetoken.go b/typedapi/types/analyzetoken.go index 3ffb196424..e3e4858d8b 100644 --- a/typedapi/types/analyzetoken.go +++ b/typedapi/types/analyzetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L37-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L37-L44 type AnalyzeToken struct { EndOffset int64 `json:"end_offset"` Position int64 `json:"position"` @@ -151,5 +151,3 @@ func NewAnalyzeToken() *AnalyzeToken { return r } - -// false diff --git a/typedapi/types/anomaly.go b/typedapi/types/anomaly.go index 20149df048..e83dc27979 100644 --- a/typedapi/types/anomaly.go +++ b/typedapi/types/anomaly.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Anomaly type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Anomaly.ts#L24-L121 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Anomaly.ts#L24-L121 type Anomaly struct { // Actual The actual value for the bucket. Actual []Float64 `json:"actual,omitempty"` @@ -388,5 +388,3 @@ func NewAnomaly() *Anomaly { return r } - -// false diff --git a/typedapi/types/anomalycause.go b/typedapi/types/anomalycause.go index 068c2be38a..9f1f28f693 100644 --- a/typedapi/types/anomalycause.go +++ b/typedapi/types/anomalycause.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnomalyCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Anomaly.ts#L123-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Anomaly.ts#L123-L139 type AnomalyCause struct { Actual []Float64 `json:"actual,omitempty"` ByFieldName *string `json:"by_field_name,omitempty"` @@ -211,5 +211,3 @@ func NewAnomalyCause() *AnomalyCause { return r } - -// false diff --git a/typedapi/types/anomalydetectors.go b/typedapi/types/anomalydetectors.go index 0e9caac347..e1117c0bdb 100644 --- a/typedapi/types/anomalydetectors.go +++ b/typedapi/types/anomalydetectors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnomalyDetectors type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/info/types.ts#L46-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/info/types.ts#L46-L52 type AnomalyDetectors struct { CategorizationAnalyzer CategorizationAnalyzer `json:"categorization_analyzer"` CategorizationExamplesLimit int `json:"categorization_examples_limit"` @@ -162,5 +162,3 @@ func NewAnomalyDetectors() *AnomalyDetectors { return r } - -// false diff --git a/typedapi/types/anomalyexplanation.go b/typedapi/types/anomalyexplanation.go index 7147f422b8..23c08c663a 100644 --- a/typedapi/types/anomalyexplanation.go +++ b/typedapi/types/anomalyexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnomalyExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Anomaly.ts#L157-L198 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Anomaly.ts#L157-L198 type AnomalyExplanation struct { // AnomalyCharacteristicsImpact Impact from the duration and magnitude of the detected anomaly relative to // the historical average. @@ -237,5 +237,3 @@ func NewAnomalyExplanation() *AnomalyExplanation { return r } - -// false diff --git a/typedapi/types/anthropicservicesettings.go b/typedapi/types/anthropicservicesettings.go index f730583cdc..490f9ba68c 100644 --- a/typedapi/types/anthropicservicesettings.go +++ b/typedapi/types/anthropicservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnthropicServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L372-L388 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L588-L604 type AnthropicServiceSettings struct { // ApiKey A valid API key for the Anthropic API. ApiKey string `json:"api_key"` @@ -100,13 +100,3 @@ func NewAnthropicServiceSettings() *AnthropicServiceSettings { return r } - -// true - -type AnthropicServiceSettingsVariant interface { - AnthropicServiceSettingsCaster() *AnthropicServiceSettings -} - -func (s *AnthropicServiceSettings) AnthropicServiceSettingsCaster() *AnthropicServiceSettings { - return s -} diff --git a/typedapi/types/anthropictasksettings.go b/typedapi/types/anthropictasksettings.go index 5a62ce0244..e715d5a1cd 100644 --- a/typedapi/types/anthropictasksettings.go +++ b/typedapi/types/anthropictasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AnthropicTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L390-L415 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L606-L631 type AnthropicTaskSettings struct { // MaxTokens For a `completion` task, it is the maximum number of tokens to generate // before stopping. @@ -145,13 +145,3 @@ func NewAnthropicTaskSettings() *AnthropicTaskSettings { return r } - -// true - -type AnthropicTaskSettingsVariant interface { - AnthropicTaskSettingsCaster() *AnthropicTaskSettings -} - -func (s *AnthropicTaskSettings) AnthropicTaskSettingsCaster() *AnthropicTaskSettings { - return s -} diff --git a/typedapi/types/apikey.go b/typedapi/types/apikey.go index dc0e88104a..8b1b854643 100644 --- a/typedapi/types/apikey.go +++ b/typedapi/types/apikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/ApiKey.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/ApiKey.ts#L27-L113 type ApiKey struct { // Access The access granted to cross-cluster API keys. // The access is composed of permissions for cross cluster search and cross @@ -225,5 +225,3 @@ func NewApiKey() *ApiKey { return r } - -// false diff --git a/typedapi/types/apikeyaggregate.go b/typedapi/types/apikeyaggregate.go index 8623c9ceff..af4cacac93 100644 --- a/typedapi/types/apikeyaggregate.go +++ b/typedapi/types/apikeyaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,5 +36,5 @@ package types // DateRangeAggregate // CompositeAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_api_keys/types.ts#L122-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_api_keys/types.ts#L122-L139 type ApiKeyAggregate any diff --git a/typedapi/types/apikeyaggregationcontainer.go b/typedapi/types/apikeyaggregationcontainer.go index 3485018bdf..60768a9a9c 100644 --- a/typedapi/types/apikeyaggregationcontainer.go +++ b/typedapi/types/apikeyaggregationcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ApiKeyAggregationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_api_keys/types.ts#L63-L120 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_api_keys/types.ts#L63-L120 type ApiKeyAggregationContainer struct { AdditionalApiKeyAggregationContainerProperty map[string]json.RawMessage `json:"-"` // Aggregations Sub-aggregations for this aggregation. @@ -196,13 +196,3 @@ func NewApiKeyAggregationContainer() *ApiKeyAggregationContainer { return r } - -// true - -type ApiKeyAggregationContainerVariant interface { - ApiKeyAggregationContainerCaster() *ApiKeyAggregationContainer -} - -func (s *ApiKeyAggregationContainer) ApiKeyAggregationContainerCaster() *ApiKeyAggregationContainer { - return s -} diff --git a/typedapi/types/apikeyauthorization.go b/typedapi/types/apikeyauthorization.go index bd4c901227..0897ee99e2 100644 --- a/typedapi/types/apikeyauthorization.go +++ b/typedapi/types/apikeyauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ApiKeyAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Authorization.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Authorization.ts#L20-L29 type ApiKeyAuthorization struct { // Id The identifier for the API key. Id string `json:"id"` @@ -89,5 +89,3 @@ func NewApiKeyAuthorization() *ApiKeyAuthorization { return r } - -// false diff --git a/typedapi/types/apikeyfiltersaggregation.go b/typedapi/types/apikeyfiltersaggregation.go index f008accff0..5bad997807 100644 --- a/typedapi/types/apikeyfiltersaggregation.go +++ b/typedapi/types/apikeyfiltersaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ApiKeyFiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_api_keys/types.ts#L207-L227 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_api_keys/types.ts#L207-L227 type ApiKeyFiltersAggregation struct { // Filters Collection of queries from which to build buckets. Filters BucketsApiKeyQueryContainer `json:"filters,omitempty"` @@ -132,13 +132,3 @@ func NewApiKeyFiltersAggregation() *ApiKeyFiltersAggregation { return r } - -// true - -type ApiKeyFiltersAggregationVariant interface { - ApiKeyFiltersAggregationCaster() *ApiKeyFiltersAggregation -} - -func (s *ApiKeyFiltersAggregation) ApiKeyFiltersAggregationCaster() *ApiKeyFiltersAggregation { - return s -} diff --git a/typedapi/types/apikeyquerycontainer.go b/typedapi/types/apikeyquerycontainer.go index 1996e40965..6219883887 100644 --- a/typedapi/types/apikeyquerycontainer.go +++ b/typedapi/types/apikeyquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ApiKeyQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_api_keys/types.ts#L141-L205 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_api_keys/types.ts#L141-L205 type ApiKeyQueryContainer struct { AdditionalApiKeyQueryContainerProperty map[string]json.RawMessage `json:"-"` // Bool Matches documents matching boolean combinations of other queries. @@ -220,13 +220,3 @@ func NewApiKeyQueryContainer() *ApiKeyQueryContainer { return r } - -// true - -type ApiKeyQueryContainerVariant interface { - ApiKeyQueryContainerCaster() *ApiKeyQueryContainer -} - -func (s *ApiKeyQueryContainer) ApiKeyQueryContainerCaster() *ApiKeyQueryContainer { - return s -} diff --git a/typedapi/types/apostrophetokenfilter.go b/typedapi/types/apostrophetokenfilter.go new file mode 100644 index 0000000000..0375e638ae --- /dev/null +++ b/typedapi/types/apostrophetokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ApostropheTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L451-L453 +type ApostropheTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ApostropheTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ApostropheTokenFilter) MarshalJSON() ([]byte, error) { + type innerApostropheTokenFilter ApostropheTokenFilter + tmp := innerApostropheTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "apostrophe" + + return json.Marshal(tmp) +} + +// NewApostropheTokenFilter returns a ApostropheTokenFilter. +func NewApostropheTokenFilter() *ApostropheTokenFilter { + r := &ApostropheTokenFilter{} + + return r +} diff --git a/typedapi/types/appendprocessor.go b/typedapi/types/appendprocessor.go index 219d4d09d2..ca3e9eb96c 100644 --- a/typedapi/types/appendprocessor.go +++ b/typedapi/types/appendprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AppendProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L328-L343 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L328-L343 type AppendProcessor struct { // AllowDuplicates If `false`, the processor does not append values already present in the // field. @@ -171,13 +171,3 @@ func NewAppendProcessor() *AppendProcessor { return r } - -// true - -type AppendProcessorVariant interface { - AppendProcessorCaster() *AppendProcessor -} - -func (s *AppendProcessor) AppendProcessorCaster() *AppendProcessor { - return s -} diff --git a/typedapi/types/applicationglobaluserprivileges.go b/typedapi/types/applicationglobaluserprivileges.go index 9fd5897794..2c19199282 100644 --- a/typedapi/types/applicationglobaluserprivileges.go +++ b/typedapi/types/applicationglobaluserprivileges.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ApplicationGlobalUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L434-L436 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L434-L436 type ApplicationGlobalUserPrivileges struct { Manage ManageUserPrivileges `json:"manage"` } @@ -33,13 +33,3 @@ func NewApplicationGlobalUserPrivileges() *ApplicationGlobalUserPrivileges { return r } - -// true - -type ApplicationGlobalUserPrivilegesVariant interface { - ApplicationGlobalUserPrivilegesCaster() *ApplicationGlobalUserPrivileges -} - -func (s *ApplicationGlobalUserPrivileges) ApplicationGlobalUserPrivilegesCaster() *ApplicationGlobalUserPrivileges { - return s -} diff --git a/typedapi/types/applicationprivileges.go b/typedapi/types/applicationprivileges.go index 0ae91b97e5..c10fa744df 100644 --- a/typedapi/types/applicationprivileges.go +++ b/typedapi/types/applicationprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L27-L40 type ApplicationPrivileges struct { // Application The name of the application to which this entry applies. Application string `json:"application"` @@ -90,13 +90,3 @@ func NewApplicationPrivileges() *ApplicationPrivileges { return r } - -// true - -type ApplicationPrivilegesVariant interface { - ApplicationPrivilegesCaster() *ApplicationPrivileges -} - -func (s *ApplicationPrivileges) ApplicationPrivilegesCaster() *ApplicationPrivileges { - return s -} diff --git a/typedapi/types/applicationprivilegescheck.go b/typedapi/types/applicationprivilegescheck.go index 737183d616..03aac5e74d 100644 --- a/typedapi/types/applicationprivilegescheck.go +++ b/typedapi/types/applicationprivilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/types.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/types.ts#L24-L32 type ApplicationPrivilegesCheck struct { // Application The name of the application. Application string `json:"application"` @@ -91,13 +91,3 @@ func NewApplicationPrivilegesCheck() *ApplicationPrivilegesCheck { return r } - -// true - -type ApplicationPrivilegesCheckVariant interface { - ApplicationPrivilegesCheckCaster() *ApplicationPrivilegesCheck -} - -func (s *ApplicationPrivilegesCheck) ApplicationPrivilegesCheckCaster() *ApplicationPrivilegesCheck { - return s -} diff --git a/typedapi/types/applicationsprivileges.go b/typedapi/types/applicationsprivileges.go index 6a7bf114ca..e94da2f00f 100644 --- a/typedapi/types/applicationsprivileges.go +++ b/typedapi/types/applicationsprivileges.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ApplicationsPrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/types.ts#L47-L47 type ApplicationsPrivileges map[string]ResourcePrivileges diff --git a/typedapi/types/arabicanalyzer.go b/typedapi/types/arabicanalyzer.go index 6e60b77fd6..e75c6f44b9 100644 --- a/typedapi/types/arabicanalyzer.go +++ b/typedapi/types/arabicanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // ArabicAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L52-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L52-L57 type ArabicAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *ArabicAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *ArabicAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewArabicAnalyzer() *ArabicAnalyzer { return r } - -// true - -type ArabicAnalyzerVariant interface { - ArabicAnalyzerCaster() *ArabicAnalyzer -} - -func (s *ArabicAnalyzer) ArabicAnalyzerCaster() *ArabicAnalyzer { - return s -} diff --git a/typedapi/types/arabicnormalizationtokenfilter.go b/typedapi/types/arabicnormalizationtokenfilter.go new file mode 100644 index 0000000000..dadddc4e81 --- /dev/null +++ b/typedapi/types/arabicnormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ArabicNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L455-L457 +type ArabicNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ArabicNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ArabicNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerArabicNormalizationTokenFilter ArabicNormalizationTokenFilter + tmp := innerArabicNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "arabic_normalization" + + return json.Marshal(tmp) +} + +// NewArabicNormalizationTokenFilter returns a ArabicNormalizationTokenFilter. +func NewArabicNormalizationTokenFilter() *ArabicNormalizationTokenFilter { + r := &ArabicNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/arabicstemtokenfilter.go b/typedapi/types/arabicstemtokenfilter.go new file mode 100644 index 0000000000..5026254cf2 --- /dev/null +++ b/typedapi/types/arabicstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ArabicStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L547-L549 +type ArabicStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ArabicStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ArabicStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerArabicStemTokenFilter ArabicStemTokenFilter + tmp := innerArabicStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "arabic_stem" + + return json.Marshal(tmp) +} + +// NewArabicStemTokenFilter returns a ArabicStemTokenFilter. +func NewArabicStemTokenFilter() *ArabicStemTokenFilter { + r := &ArabicStemTokenFilter{} + + return r +} diff --git a/typedapi/types/archive.go b/typedapi/types/archive.go index 97a5acc231..2f45f8c012 100644 --- a/typedapi/types/archive.go +++ b/typedapi/types/archive.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Archive type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L45-L47 type Archive struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -107,5 +107,3 @@ func NewArchive() *Archive { return r } - -// false diff --git a/typedapi/types/armeniananalyzer.go b/typedapi/types/armeniananalyzer.go index 8bb6eff777..6ab42d9008 100644 --- a/typedapi/types/armeniananalyzer.go +++ b/typedapi/types/armeniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // ArmenianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L59-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L59-L64 type ArmenianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *ArmenianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *ArmenianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewArmenianAnalyzer() *ArmenianAnalyzer { return r } - -// true - -type ArmenianAnalyzerVariant interface { - ArmenianAnalyzerCaster() *ArmenianAnalyzer -} - -func (s *ArmenianAnalyzer) ArmenianAnalyzerCaster() *ArmenianAnalyzer { - return s -} diff --git a/typedapi/types/arraycomparecondition.go b/typedapi/types/arraycomparecondition.go index 2785899b69..d639c3ac48 100644 --- a/typedapi/types/arraycomparecondition.go +++ b/typedapi/types/arraycomparecondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ArrayCompareCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L32-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L32-L39 type ArrayCompareCondition struct { ArrayCompareCondition map[conditionop.ConditionOp]ArrayCompareOpParams `json:"-"` Path string `json:"path"` @@ -126,13 +126,3 @@ func NewArrayCompareCondition() *ArrayCompareCondition { return r } - -// true - -type ArrayCompareConditionVariant interface { - ArrayCompareConditionCaster() *ArrayCompareCondition -} - -func (s *ArrayCompareCondition) ArrayCompareConditionCaster() *ArrayCompareCondition { - return s -} diff --git a/typedapi/types/arraycompareopparams.go b/typedapi/types/arraycompareopparams.go index 8c35c861b8..965e1332ad 100644 --- a/typedapi/types/arraycompareopparams.go +++ b/typedapi/types/arraycompareopparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ArrayCompareOpParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L27-L30 type ArrayCompareOpParams struct { Quantifier quantifier.Quantifier `json:"quantifier"` Value FieldValue `json:"value"` @@ -74,13 +74,3 @@ func NewArrayCompareOpParams() *ArrayCompareOpParams { return r } - -// true - -type ArrayCompareOpParamsVariant interface { - ArrayCompareOpParamsCaster() *ArrayCompareOpParams -} - -func (s *ArrayCompareOpParams) ArrayCompareOpParamsCaster() *ArrayCompareOpParams { - return s -} diff --git a/typedapi/types/arraypercentilesitem.go b/typedapi/types/arraypercentilesitem.go index 7e0ee45b23..9d27ca6a25 100644 --- a/typedapi/types/arraypercentilesitem.go +++ b/typedapi/types/arraypercentilesitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ArrayPercentilesItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L162-L166 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L162-L166 type ArrayPercentilesItem struct { Key string `json:"key"` Value *Float64 `json:"value,omitempty"` @@ -93,5 +93,3 @@ func NewArrayPercentilesItem() *ArrayPercentilesItem { return r } - -// false diff --git a/typedapi/types/asciifoldingtokenfilter.go b/typedapi/types/asciifoldingtokenfilter.go index a2bce76ef6..6d72c66978 100644 --- a/typedapi/types/asciifoldingtokenfilter.go +++ b/typedapi/types/asciifoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,8 +30,9 @@ import ( // AsciiFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L169-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L213-L217 type AsciiFoldingTokenFilter struct { + // PreserveOriginal If `true`, emit both original tokens and folded tokens. Defaults to `false`. PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -92,13 +93,3 @@ func NewAsciiFoldingTokenFilter() *AsciiFoldingTokenFilter { return r } - -// true - -type AsciiFoldingTokenFilterVariant interface { - AsciiFoldingTokenFilterCaster() *AsciiFoldingTokenFilter -} - -func (s *AsciiFoldingTokenFilter) AsciiFoldingTokenFilterCaster() *AsciiFoldingTokenFilter { - return s -} diff --git a/typedapi/types/asyncsearch.go b/typedapi/types/asyncsearch.go index b5765db8e6..33b4914e7c 100644 --- a/typedapi/types/asyncsearch.go +++ b/typedapi/types/asyncsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // AsyncSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/async_search/_types/AsyncSearch.ts#L30-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/async_search/_types/AsyncSearch.ts#L30-L56 type AsyncSearch struct { // Aggregations Partial aggregations results, coming from the shards that have already // completed running the query. @@ -796,5 +796,3 @@ func NewAsyncSearch() *AsyncSearch { return r } - -// false diff --git a/typedapi/types/attachmentprocessor.go b/typedapi/types/attachmentprocessor.go index 7b97b645b1..8934a46ecf 100644 --- a/typedapi/types/attachmentprocessor.go +++ b/typedapi/types/attachmentprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AttachmentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L345-L386 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L345-L386 type AttachmentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -226,13 +226,3 @@ func NewAttachmentProcessor() *AttachmentProcessor { return r } - -// true - -type AttachmentProcessorVariant interface { - AttachmentProcessorCaster() *AttachmentProcessor -} - -func (s *AttachmentProcessor) AttachmentProcessorCaster() *AttachmentProcessor { - return s -} diff --git a/typedapi/types/audit.go b/typedapi/types/audit.go index b3249af72f..eccd86ac03 100644 --- a/typedapi/types/audit.go +++ b/typedapi/types/audit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Audit type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L70-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L70-L72 type Audit struct { Enabled bool `json:"enabled"` Outputs []string `json:"outputs,omitempty"` @@ -82,5 +82,3 @@ func NewAudit() *Audit { return r } - -// false diff --git a/typedapi/types/authenticateapikey.go b/typedapi/types/authenticateapikey.go index d808fe0ba2..da12c0c2db 100644 --- a/typedapi/types/authenticateapikey.go +++ b/typedapi/types/authenticateapikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AuthenticateApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/authenticate/SecurityAuthenticateResponse.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/authenticate/SecurityAuthenticateResponse.ts#L44-L47 type AuthenticateApiKey struct { Id string `json:"id"` Name *string `json:"name,omitempty"` @@ -72,5 +72,3 @@ func NewAuthenticateApiKey() *AuthenticateApiKey { return r } - -// false diff --git a/typedapi/types/authenticateduser.go b/typedapi/types/authenticateduser.go index f399ce3024..92626586fe 100644 --- a/typedapi/types/authenticateduser.go +++ b/typedapi/types/authenticateduser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AuthenticatedUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_token/types.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_token/types.ts#L60-L65 type AuthenticatedUser struct { AuthenticationProvider *AuthenticationProvider `json:"authentication_provider,omitempty"` AuthenticationRealm UserRealm `json:"authentication_realm"` @@ -150,5 +150,3 @@ func NewAuthenticatedUser() *AuthenticatedUser { return r } - -// false diff --git a/typedapi/types/authenticatetoken.go b/typedapi/types/authenticatetoken.go index 475524706b..c37ea7e10c 100644 --- a/typedapi/types/authenticatetoken.go +++ b/typedapi/types/authenticatetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AuthenticateToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/authenticate/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/authenticate/types.ts#L22-L29 type AuthenticateToken struct { Name string `json:"name"` Type *string `json:"type,omitempty"` @@ -80,5 +80,3 @@ func NewAuthenticateToken() *AuthenticateToken { return r } - -// false diff --git a/typedapi/types/authentication.go b/typedapi/types/authentication.go index 8f08cd1f89..5a61964d0d 100644 --- a/typedapi/types/authentication.go +++ b/typedapi/types/authentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Authentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L43-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L43-L55 type Authentication struct { ApiKey map[string]string `json:"api_key,omitempty"` AuthenticationRealm AuthenticationRealm `json:"authentication_realm"` @@ -173,5 +173,3 @@ func NewAuthentication() *Authentication { return r } - -// false diff --git a/typedapi/types/authenticationprovider.go b/typedapi/types/authenticationprovider.go index fcb0bed6ea..eaec323f6f 100644 --- a/typedapi/types/authenticationprovider.go +++ b/typedapi/types/authenticationprovider.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AuthenticationProvider type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_token/types.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_token/types.ts#L55-L58 type AuthenticationProvider struct { Name string `json:"name"` Type string `json:"type"` @@ -80,5 +80,3 @@ func NewAuthenticationProvider() *AuthenticationProvider { return r } - -// false diff --git a/typedapi/types/authenticationrealm.go b/typedapi/types/authenticationrealm.go index 320ab4fcc5..3e37b926a6 100644 --- a/typedapi/types/authenticationrealm.go +++ b/typedapi/types/authenticationrealm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AuthenticationRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L57-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L57-L61 type AuthenticationRealm struct { Domain *string `json:"domain,omitempty"` Name string `json:"name"` @@ -100,5 +100,3 @@ func NewAuthenticationRealm() *AuthenticationRealm { return r } - -// false diff --git a/typedapi/types/autodatehistogramaggregate.go b/typedapi/types/autodatehistogramaggregate.go index 19e0775984..830d09bc01 100644 --- a/typedapi/types/autodatehistogramaggregate.go +++ b/typedapi/types/autodatehistogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AutoDateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L393-L400 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L393-L400 type AutoDateHistogramAggregate struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Interval string `json:"interval"` @@ -94,5 +94,3 @@ func NewAutoDateHistogramAggregate() *AutoDateHistogramAggregate { return r } - -// false diff --git a/typedapi/types/autodatehistogramaggregation.go b/typedapi/types/autodatehistogramaggregation.go index 211689ef30..498483da78 100644 --- a/typedapi/types/autodatehistogramaggregation.go +++ b/typedapi/types/autodatehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // AutoDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L72-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L72-L110 type AutoDateHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` @@ -159,13 +159,3 @@ func NewAutoDateHistogramAggregation() *AutoDateHistogramAggregation { return r } - -// true - -type AutoDateHistogramAggregationVariant interface { - AutoDateHistogramAggregationCaster() *AutoDateHistogramAggregation -} - -func (s *AutoDateHistogramAggregation) AutoDateHistogramAggregationCaster() *AutoDateHistogramAggregation { - return s -} diff --git a/typedapi/types/autofollowedcluster.go b/typedapi/types/autofollowedcluster.go index b0d60b23b5..f21f2922ed 100644 --- a/typedapi/types/autofollowedcluster.go +++ b/typedapi/types/autofollowedcluster.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AutoFollowedCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/stats/types.ts.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/stats/types.ts.ts#L26-L30 type AutoFollowedCluster struct { ClusterName string `json:"cluster_name"` LastSeenMetadataVersion int64 `json:"last_seen_metadata_version"` @@ -78,5 +78,3 @@ func NewAutoFollowedCluster() *AutoFollowedCluster { return r } - -// false diff --git a/typedapi/types/autofollowpattern.go b/typedapi/types/autofollowpattern.go index c0db850084..bd830bdde1 100644 --- a/typedapi/types/autofollowpattern.go +++ b/typedapi/types/autofollowpattern.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AutoFollowPattern type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 type AutoFollowPattern struct { Name string `json:"name"` Pattern AutoFollowPatternSummary `json:"pattern"` @@ -72,5 +72,3 @@ func NewAutoFollowPattern() *AutoFollowPattern { return r } - -// false diff --git a/typedapi/types/autofollowpatternsummary.go b/typedapi/types/autofollowpatternsummary.go index 979fdd8602..9df920ec60 100644 --- a/typedapi/types/autofollowpatternsummary.go +++ b/typedapi/types/autofollowpatternsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AutoFollowPatternSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 type AutoFollowPatternSummary struct { Active bool `json:"active"` // FollowIndexPattern The name of follower index. @@ -131,5 +131,3 @@ func NewAutoFollowPatternSummary() *AutoFollowPatternSummary { return r } - -// false diff --git a/typedapi/types/autofollowstats.go b/typedapi/types/autofollowstats.go index 386f076147..c570343afe 100644 --- a/typedapi/types/autofollowstats.go +++ b/typedapi/types/autofollowstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AutoFollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/stats/types.ts.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/stats/types.ts.ts#L32-L47 type AutoFollowStats struct { AutoFollowedClusters []AutoFollowedCluster `json:"auto_followed_clusters"` // NumberOfFailedFollowIndices The number of indices that the auto-follow coordinator failed to @@ -130,5 +130,3 @@ func NewAutoFollowStats() *AutoFollowStats { return r } - -// false diff --git a/typedapi/types/autoscalingcapacity.go b/typedapi/types/autoscalingcapacity.go index 34e0722d19..94f755e743 100644 --- a/typedapi/types/autoscalingcapacity.go +++ b/typedapi/types/autoscalingcapacity.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // AutoscalingCapacity type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 type AutoscalingCapacity struct { Node AutoscalingResources `json:"node"` Total AutoscalingResources `json:"total"` @@ -34,5 +34,3 @@ func NewAutoscalingCapacity() *AutoscalingCapacity { return r } - -// false diff --git a/typedapi/types/autoscalingdecider.go b/typedapi/types/autoscalingdecider.go index b73395bd17..9fa408c1eb 100644 --- a/typedapi/types/autoscalingdecider.go +++ b/typedapi/types/autoscalingdecider.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AutoscalingDecider type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56 type AutoscalingDecider struct { ReasonDetails json.RawMessage `json:"reason_details,omitempty"` ReasonSummary *string `json:"reason_summary,omitempty"` @@ -86,5 +86,3 @@ func NewAutoscalingDecider() *AutoscalingDecider { return r } - -// false diff --git a/typedapi/types/autoscalingdeciders.go b/typedapi/types/autoscalingdeciders.go index aa1f42cc93..9f6a6e75e0 100644 --- a/typedapi/types/autoscalingdeciders.go +++ b/typedapi/types/autoscalingdeciders.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // AutoscalingDeciders type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 type AutoscalingDeciders struct { CurrentCapacity AutoscalingCapacity `json:"current_capacity"` CurrentNodes []AutoscalingNode `json:"current_nodes"` @@ -38,5 +38,3 @@ func NewAutoscalingDeciders() *AutoscalingDeciders { return r } - -// false diff --git a/typedapi/types/autoscalingnode.go b/typedapi/types/autoscalingnode.go index 7d0a5a5afa..3f5ff370b6 100644 --- a/typedapi/types/autoscalingnode.go +++ b/typedapi/types/autoscalingnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AutoscalingNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 type AutoscalingNode struct { Name string `json:"name"` } @@ -66,5 +66,3 @@ func NewAutoscalingNode() *AutoscalingNode { return r } - -// false diff --git a/typedapi/types/autoscalingpolicy.go b/typedapi/types/autoscalingpolicy.go index 3baa6e6a79..e2ee8e5e39 100644 --- a/typedapi/types/autoscalingpolicy.go +++ b/typedapi/types/autoscalingpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // AutoscalingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 type AutoscalingPolicy struct { // Deciders Decider settings. Deciders map[string]json.RawMessage `json:"deciders"` @@ -41,13 +41,3 @@ func NewAutoscalingPolicy() *AutoscalingPolicy { return r } - -// true - -type AutoscalingPolicyVariant interface { - AutoscalingPolicyCaster() *AutoscalingPolicy -} - -func (s *AutoscalingPolicy) AutoscalingPolicyCaster() *AutoscalingPolicy { - return s -} diff --git a/typedapi/types/autoscalingresources.go b/typedapi/types/autoscalingresources.go index 808391e0d6..1d3d080383 100644 --- a/typedapi/types/autoscalingresources.go +++ b/typedapi/types/autoscalingresources.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AutoscalingResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 type AutoscalingResources struct { Memory int `json:"memory"` Storage int `json:"storage"` @@ -95,5 +95,3 @@ func NewAutoscalingResources() *AutoscalingResources { return r } - -// false diff --git a/typedapi/types/averageaggregation.go b/typedapi/types/averageaggregation.go index 7085effb4b..584404b8c6 100644 --- a/typedapi/types/averageaggregation.go +++ b/typedapi/types/averageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L55-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L55-L55 type AverageAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -95,13 +95,3 @@ func NewAverageAggregation() *AverageAggregation { return r } - -// true - -type AverageAggregationVariant interface { - AverageAggregationCaster() *AverageAggregation -} - -func (s *AverageAggregation) AverageAggregationCaster() *AverageAggregation { - return s -} diff --git a/typedapi/types/averagebucketaggregation.go b/typedapi/types/averagebucketaggregation.go index e8429fdd2b..2a22c73a6a 100644 --- a/typedapi/types/averagebucketaggregation.go +++ b/typedapi/types/averagebucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // AverageBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L78-L81 type AverageBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewAverageBucketAggregation() *AverageBucketAggregation { return r } - -// true - -type AverageBucketAggregationVariant interface { - AverageBucketAggregationCaster() *AverageBucketAggregation -} - -func (s *AverageBucketAggregation) AverageBucketAggregationCaster() *AverageBucketAggregation { - return s -} diff --git a/typedapi/types/avgaggregate.go b/typedapi/types/avgaggregate.go index fa77b278f7..ecf186c98e 100644 --- a/typedapi/types/avgaggregate.go +++ b/typedapi/types/avgaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L218-L222 type AvgAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewAvgAggregate() *AvgAggregate { return r } - -// false diff --git a/typedapi/types/azureaistudioservicesettings.go b/typedapi/types/azureaistudioservicesettings.go index acec5f3b58..86139dc7f2 100644 --- a/typedapi/types/azureaistudioservicesettings.go +++ b/typedapi/types/azureaistudioservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AzureAiStudioServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L425-L467 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L641-L683 type AzureAiStudioServiceSettings struct { // ApiKey A valid API key of your Azure AI Studio model deployment. // This key can be found on the overview page for your deployment in the @@ -152,13 +152,3 @@ func NewAzureAiStudioServiceSettings() *AzureAiStudioServiceSettings { return r } - -// true - -type AzureAiStudioServiceSettingsVariant interface { - AzureAiStudioServiceSettingsCaster() *AzureAiStudioServiceSettings -} - -func (s *AzureAiStudioServiceSettings) AzureAiStudioServiceSettingsCaster() *AzureAiStudioServiceSettings { - return s -} diff --git a/typedapi/types/azureaistudiotasksettings.go b/typedapi/types/azureaistudiotasksettings.go index 8912766a6d..a99752e1e2 100644 --- a/typedapi/types/azureaistudiotasksettings.go +++ b/typedapi/types/azureaistudiotasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AzureAiStudioTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L469-L497 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L685-L713 type AzureAiStudioTaskSettings struct { // DoSample For a `completion` task, instruct the inference process to perform sampling. // It has no effect unless `temperature` or `top_p` is specified. @@ -157,13 +157,3 @@ func NewAzureAiStudioTaskSettings() *AzureAiStudioTaskSettings { return r } - -// true - -type AzureAiStudioTaskSettingsVariant interface { - AzureAiStudioTaskSettingsCaster() *AzureAiStudioTaskSettings -} - -func (s *AzureAiStudioTaskSettings) AzureAiStudioTaskSettingsCaster() *AzureAiStudioTaskSettings { - return s -} diff --git a/typedapi/types/azureopenaiservicesettings.go b/typedapi/types/azureopenaiservicesettings.go index 84ab063a06..5cf5f73728 100644 --- a/typedapi/types/azureopenaiservicesettings.go +++ b/typedapi/types/azureopenaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AzureOpenAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L508-L553 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L724-L769 type AzureOpenAIServiceSettings struct { // ApiKey A valid API key for your Azure OpenAI account. // You must specify either `api_key` or `entra_id`. @@ -161,13 +161,3 @@ func NewAzureOpenAIServiceSettings() *AzureOpenAIServiceSettings { return r } - -// true - -type AzureOpenAIServiceSettingsVariant interface { - AzureOpenAIServiceSettingsCaster() *AzureOpenAIServiceSettings -} - -func (s *AzureOpenAIServiceSettings) AzureOpenAIServiceSettingsCaster() *AzureOpenAIServiceSettings { - return s -} diff --git a/typedapi/types/azureopenaitasksettings.go b/typedapi/types/azureopenaitasksettings.go index 40097d0cda..5507c74779 100644 --- a/typedapi/types/azureopenaitasksettings.go +++ b/typedapi/types/azureopenaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AzureOpenAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L555-L561 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L771-L777 type AzureOpenAITaskSettings struct { // User For a `completion` or `text_embedding` task, specify the user issuing the // request. @@ -77,13 +77,3 @@ func NewAzureOpenAITaskSettings() *AzureOpenAITaskSettings { return r } - -// true - -type AzureOpenAITaskSettingsVariant interface { - AzureOpenAITaskSettingsCaster() *AzureOpenAITaskSettings -} - -func (s *AzureOpenAITaskSettings) AzureOpenAITaskSettingsCaster() *AzureOpenAITaskSettings { - return s -} diff --git a/typedapi/types/azurerepository.go b/typedapi/types/azurerepository.go index 3ffd4caef5..dfe8d9912c 100644 --- a/typedapi/types/azurerepository.go +++ b/typedapi/types/azurerepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // AzureRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L40-L43 type AzureRepository struct { Settings AzureRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewAzureRepository() *AzureRepository { return r } - -// true - -type AzureRepositoryVariant interface { - AzureRepositoryCaster() *AzureRepository -} - -func (s *AzureRepository) AzureRepositoryCaster() *AzureRepository { - return s -} diff --git a/typedapi/types/azurerepositorysettings.go b/typedapi/types/azurerepositorysettings.go index caca698ef0..76cef5b78c 100644 --- a/typedapi/types/azurerepositorysettings.go +++ b/typedapi/types/azurerepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // AzureRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L77-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L77-L83 type AzureRepositorySettings struct { BasePath *string `json:"base_path,omitempty"` ChunkSize ByteSize `json:"chunk_size,omitempty"` @@ -161,13 +161,3 @@ func NewAzureRepositorySettings() *AzureRepositorySettings { return r } - -// true - -type AzureRepositorySettingsVariant interface { - AzureRepositorySettingsCaster() *AzureRepositorySettings -} - -func (s *AzureRepositorySettings) AzureRepositorySettingsCaster() *AzureRepositorySettings { - return s -} diff --git a/typedapi/types/base.go b/typedapi/types/base.go index c549cc85d0..05ded27c30 100644 --- a/typedapi/types/base.go +++ b/typedapi/types/base.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Base type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L27-L30 type Base struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -91,5 +91,3 @@ func NewBase() *Base { return r } - -// false diff --git a/typedapi/types/basqueanalyzer.go b/typedapi/types/basqueanalyzer.go index cf977b2cb3..e88f63ebe6 100644 --- a/typedapi/types/basqueanalyzer.go +++ b/typedapi/types/basqueanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // BasqueAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L66-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L66-L71 type BasqueAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *BasqueAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *BasqueAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewBasqueAnalyzer() *BasqueAnalyzer { return r } - -// true - -type BasqueAnalyzerVariant interface { - BasqueAnalyzerCaster() *BasqueAnalyzer -} - -func (s *BasqueAnalyzer) BasqueAnalyzerCaster() *BasqueAnalyzer { - return s -} diff --git a/typedapi/types/bengalianalyzer.go b/typedapi/types/bengalianalyzer.go index 40ad364046..53891656ce 100644 --- a/typedapi/types/bengalianalyzer.go +++ b/typedapi/types/bengalianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // BengaliAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L73-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L73-L78 type BengaliAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *BengaliAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *BengaliAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewBengaliAnalyzer() *BengaliAnalyzer { return r } - -// true - -type BengaliAnalyzerVariant interface { - BengaliAnalyzerCaster() *BengaliAnalyzer -} - -func (s *BengaliAnalyzer) BengaliAnalyzerCaster() *BengaliAnalyzer { - return s -} diff --git a/typedapi/types/bengalinormalizationtokenfilter.go b/typedapi/types/bengalinormalizationtokenfilter.go new file mode 100644 index 0000000000..99936b1adb --- /dev/null +++ b/typedapi/types/bengalinormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// BengaliNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L490-L492 +type BengaliNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *BengaliNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s BengaliNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerBengaliNormalizationTokenFilter BengaliNormalizationTokenFilter + tmp := innerBengaliNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "bengali_normalization" + + return json.Marshal(tmp) +} + +// NewBengaliNormalizationTokenFilter returns a BengaliNormalizationTokenFilter. +func NewBengaliNormalizationTokenFilter() *BengaliNormalizationTokenFilter { + r := &BengaliNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/binaryproperty.go b/typedapi/types/binaryproperty.go index 6c3d417b43..8ee208a4c9 100644 --- a/typedapi/types/binaryproperty.go +++ b/typedapi/types/binaryproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // BinaryProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L57-L59 type BinaryProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -241,6 +241,12 @@ func (s *BinaryProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -596,6 +602,12 @@ func (s *BinaryProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -845,13 +857,3 @@ func NewBinaryProperty() *BinaryProperty { return r } - -// true - -type BinaryPropertyVariant interface { - BinaryPropertyCaster() *BinaryProperty -} - -func (s *BinaryProperty) BinaryPropertyCaster() *BinaryProperty { - return s -} diff --git a/typedapi/types/blobdetails.go b/typedapi/types/blobdetails.go index a56cbd3343..412d770a3a 100644 --- a/typedapi/types/blobdetails.go +++ b/typedapi/types/blobdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BlobDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L250-L284 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L250-L284 type BlobDetails struct { // Name The name of the blob. Name string `json:"name"` @@ -174,5 +174,3 @@ func NewBlobDetails() *BlobDetails { return r } - -// false diff --git a/typedapi/types/booleanproperty.go b/typedapi/types/booleanproperty.go index 7b8a665846..df8aeeb9cd 100644 --- a/typedapi/types/booleanproperty.go +++ b/typedapi/types/booleanproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // BooleanProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L59-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L61-L76 type BooleanProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -273,6 +273,12 @@ func (s *BooleanProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -675,6 +681,12 @@ func (s *BooleanProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -951,13 +963,3 @@ func NewBooleanProperty() *BooleanProperty { return r } - -// true - -type BooleanPropertyVariant interface { - BooleanPropertyCaster() *BooleanProperty -} - -func (s *BooleanProperty) BooleanPropertyCaster() *BooleanProperty { - return s -} diff --git a/typedapi/types/boolquery.go b/typedapi/types/boolquery.go index 01d45f93d2..4ec0b9d612 100644 --- a/typedapi/types/boolquery.go +++ b/typedapi/types/boolquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BoolQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L29-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L29-L56 type BoolQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -179,13 +179,3 @@ func NewBoolQuery() *BoolQuery { return r } - -// true - -type BoolQueryVariant interface { - BoolQueryCaster() *BoolQuery -} - -func (s *BoolQuery) BoolQueryCaster() *BoolQuery { - return s -} diff --git a/typedapi/types/boostingquery.go b/typedapi/types/boostingquery.go index 8774d84389..001d26e92b 100644 --- a/typedapi/types/boostingquery.go +++ b/typedapi/types/boostingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BoostingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L58-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L58-L74 type BoostingQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -129,13 +129,3 @@ func NewBoostingQuery() *BoostingQuery { return r } - -// true - -type BoostingQueryVariant interface { - BoostingQueryCaster() *BoostingQuery -} - -func (s *BoostingQuery) BoostingQueryCaster() *BoostingQuery { - return s -} diff --git a/typedapi/types/boxplotaggregate.go b/typedapi/types/boxplotaggregate.go index fa7f292d0b..2caff2f2d3 100644 --- a/typedapi/types/boxplotaggregate.go +++ b/typedapi/types/boxplotaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BoxPlotAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L806-L825 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L808-L827 type BoxPlotAggregate struct { Lower Float64 `json:"lower"` LowerAsString *string `json:"lower_as_string,omitempty"` @@ -277,5 +277,3 @@ func NewBoxPlotAggregate() *BoxPlotAggregate { return r } - -// false diff --git a/typedapi/types/boxplotaggregation.go b/typedapi/types/boxplotaggregation.go index 67e9da9238..4c52dcc9e8 100644 --- a/typedapi/types/boxplotaggregation.go +++ b/typedapi/types/boxplotaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,16 +27,25 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tdigestexecutionhint" ) // BoxplotAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L57-L68 type BoxplotAggregation struct { // Compression Limits the maximum number of nodes used by the underlying TDigest algorithm // to `20 * compression`, enabling control of memory usage and approximation // error. Compression *Float64 `json:"compression,omitempty"` + // ExecutionHint The default implementation of TDigest is optimized for performance, scaling + // to millions or even billions of sample values while maintaining acceptable + // accuracy levels (close to 1% relative error for millions of samples in some + // cases). + // To use an implementation optimized for accuracy, set this parameter to + // high_accuracy instead. + ExecutionHint *tdigestexecutionhint.TDigestExecutionHint `json:"execution_hint,omitempty"` // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` // Missing The value to apply to documents that do not have a value. @@ -76,6 +85,11 @@ func (s *BoxplotAggregation) UnmarshalJSON(data []byte) error { s.Compression = &f } + case "execution_hint": + if err := dec.Decode(&s.ExecutionHint); err != nil { + return fmt.Errorf("%s | %w", "ExecutionHint", err) + } + case "field": if err := dec.Decode(&s.Field); err != nil { return fmt.Errorf("%s | %w", "Field", err) @@ -102,13 +116,3 @@ func NewBoxplotAggregation() *BoxplotAggregation { return r } - -// true - -type BoxplotAggregationVariant interface { - BoxplotAggregationCaster() *BoxplotAggregation -} - -func (s *BoxplotAggregation) BoxplotAggregationCaster() *BoxplotAggregation { - return s -} diff --git a/typedapi/types/braziliananalyzer.go b/typedapi/types/braziliananalyzer.go index feb2901fdb..a76c9b6ce1 100644 --- a/typedapi/types/braziliananalyzer.go +++ b/typedapi/types/braziliananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // BrazilianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L80-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L80-L84 type BrazilianAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *BrazilianAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *BrazilianAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewBrazilianAnalyzer() *BrazilianAnalyzer { return r } - -// true - -type BrazilianAnalyzerVariant interface { - BrazilianAnalyzerCaster() *BrazilianAnalyzer -} - -func (s *BrazilianAnalyzer) BrazilianAnalyzerCaster() *BrazilianAnalyzer { - return s -} diff --git a/typedapi/types/brazilianstemtokenfilter.go b/typedapi/types/brazilianstemtokenfilter.go new file mode 100644 index 0000000000..80fddff3c7 --- /dev/null +++ b/typedapi/types/brazilianstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// BrazilianStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L494-L496 +type BrazilianStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *BrazilianStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s BrazilianStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerBrazilianStemTokenFilter BrazilianStemTokenFilter + tmp := innerBrazilianStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "brazilian_stem" + + return json.Marshal(tmp) +} + +// NewBrazilianStemTokenFilter returns a BrazilianStemTokenFilter. +func NewBrazilianStemTokenFilter() *BrazilianStemTokenFilter { + r := &BrazilianStemTokenFilter{} + + return r +} diff --git a/typedapi/types/breaker.go b/typedapi/types/breaker.go index d06b69b651..09e716f775 100644 --- a/typedapi/types/breaker.go +++ b/typedapi/types/breaker.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Breaker type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L470-L495 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L472-L497 type Breaker struct { // EstimatedSize Estimated memory used for the operation. EstimatedSize *string `json:"estimated_size,omitempty"` @@ -161,5 +161,3 @@ func NewBreaker() *Breaker { return r } - -// false diff --git a/typedapi/types/bucketcorrelationaggregation.go b/typedapi/types/bucketcorrelationaggregation.go index d8c119bd59..97e2de8e9d 100644 --- a/typedapi/types/bucketcorrelationaggregation.go +++ b/typedapi/types/bucketcorrelationaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // BucketCorrelationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L139-L146 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L139-L146 type BucketCorrelationAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -74,13 +74,3 @@ func NewBucketCorrelationAggregation() *BucketCorrelationAggregation { return r } - -// true - -type BucketCorrelationAggregationVariant interface { - BucketCorrelationAggregationCaster() *BucketCorrelationAggregation -} - -func (s *BucketCorrelationAggregation) BucketCorrelationAggregationCaster() *BucketCorrelationAggregation { - return s -} diff --git a/typedapi/types/bucketcorrelationfunction.go b/typedapi/types/bucketcorrelationfunction.go index acdb689464..26eaba3c8e 100644 --- a/typedapi/types/bucketcorrelationfunction.go +++ b/typedapi/types/bucketcorrelationfunction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // BucketCorrelationFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L148-L153 type BucketCorrelationFunction struct { // CountCorrelation The configuration to calculate a count correlation. This function is designed // for determining the correlation of a term value and a given metric. @@ -35,13 +35,3 @@ func NewBucketCorrelationFunction() *BucketCorrelationFunction { return r } - -// true - -type BucketCorrelationFunctionVariant interface { - BucketCorrelationFunctionCaster() *BucketCorrelationFunction -} - -func (s *BucketCorrelationFunction) BucketCorrelationFunctionCaster() *BucketCorrelationFunction { - return s -} diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelation.go b/typedapi/types/bucketcorrelationfunctioncountcorrelation.go index 816424eafa..353622fb6b 100644 --- a/typedapi/types/bucketcorrelationfunctioncountcorrelation.go +++ b/typedapi/types/bucketcorrelationfunctioncountcorrelation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // BucketCorrelationFunctionCountCorrelation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L155-L158 type BucketCorrelationFunctionCountCorrelation struct { // Indicator The indicator with which to correlate the configured `bucket_path` values. Indicator BucketCorrelationFunctionCountCorrelationIndicator `json:"indicator"` @@ -34,13 +34,3 @@ func NewBucketCorrelationFunctionCountCorrelation() *BucketCorrelationFunctionCo return r } - -// true - -type BucketCorrelationFunctionCountCorrelationVariant interface { - BucketCorrelationFunctionCountCorrelationCaster() *BucketCorrelationFunctionCountCorrelation -} - -func (s *BucketCorrelationFunctionCountCorrelation) BucketCorrelationFunctionCountCorrelationCaster() *BucketCorrelationFunctionCountCorrelation { - return s -} diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go b/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go index 53c291e141..85a3de37d5 100644 --- a/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go +++ b/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BucketCorrelationFunctionCountCorrelationIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L160-L178 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L160-L178 type BucketCorrelationFunctionCountCorrelationIndicator struct { // DocCount The total number of documents that initially created the expectations. It’s // required to be greater @@ -104,13 +104,3 @@ func NewBucketCorrelationFunctionCountCorrelationIndicator() *BucketCorrelationF return r } - -// true - -type BucketCorrelationFunctionCountCorrelationIndicatorVariant interface { - BucketCorrelationFunctionCountCorrelationIndicatorCaster() *BucketCorrelationFunctionCountCorrelationIndicator -} - -func (s *BucketCorrelationFunctionCountCorrelationIndicator) BucketCorrelationFunctionCountCorrelationIndicatorCaster() *BucketCorrelationFunctionCountCorrelationIndicator { - return s -} diff --git a/typedapi/types/bucketinfluencer.go b/typedapi/types/bucketinfluencer.go index e47228c822..dc6963bb3e 100644 --- a/typedapi/types/bucketinfluencer.go +++ b/typedapi/types/bucketinfluencer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BucketInfluencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Bucket.ts#L79-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Bucket.ts#L79-L127 type BucketInfluencer struct { // AnomalyScore A normalized score between 0-100, which is calculated for each bucket // influencer. This score might be updated as @@ -208,5 +208,3 @@ func NewBucketInfluencer() *BucketInfluencer { return r } - -// false diff --git a/typedapi/types/bucketksaggregation.go b/typedapi/types/bucketksaggregation.go index cd6947d8d2..159809a8a9 100644 --- a/typedapi/types/bucketksaggregation.go +++ b/typedapi/types/bucketksaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BucketKsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L103-L137 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L103-L137 type BucketKsAggregation struct { // Alternative A list of string values indicating which K-S test alternative to calculate. // The valid values @@ -115,13 +115,3 @@ func NewBucketKsAggregation() *BucketKsAggregation { return r } - -// true - -type BucketKsAggregationVariant interface { - BucketKsAggregationCaster() *BucketKsAggregation -} - -func (s *BucketKsAggregation) BucketKsAggregationCaster() *BucketKsAggregation { - return s -} diff --git a/typedapi/types/bucketmetricvalueaggregate.go b/typedapi/types/bucketmetricvalueaggregate.go index 27d4005e63..f3c43239b2 100644 --- a/typedapi/types/bucketmetricvalueaggregate.go +++ b/typedapi/types/bucketmetricvalueaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BucketMetricValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L250-L253 type BucketMetricValueAggregate struct { Keys []string `json:"keys"` Meta Metadata `json:"meta,omitempty"` @@ -95,5 +95,3 @@ func NewBucketMetricValueAggregate() *BucketMetricValueAggregate { return r } - -// false diff --git a/typedapi/types/bucketsadjacencymatrixbucket.go b/typedapi/types/bucketsadjacencymatrixbucket.go index 0620c77d53..e4cb156e63 100644 --- a/typedapi/types/bucketsadjacencymatrixbucket.go +++ b/typedapi/types/bucketsadjacencymatrixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]AdjacencyMatrixBucket // []AdjacencyMatrixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsAdjacencyMatrixBucket any diff --git a/typedapi/types/bucketsapikeyquerycontainer.go b/typedapi/types/bucketsapikeyquerycontainer.go index b05879f2a1..e65e4a9e94 100644 --- a/typedapi/types/bucketsapikeyquerycontainer.go +++ b/typedapi/types/bucketsapikeyquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // map[string]ApiKeyQueryContainer // []ApiKeyQueryContainer // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsApiKeyQueryContainer any - -type BucketsApiKeyQueryContainerVariant interface { - BucketsApiKeyQueryContainerCaster() *BucketsApiKeyQueryContainer -} diff --git a/typedapi/types/bucketscompositebucket.go b/typedapi/types/bucketscompositebucket.go index 1a0c71275d..f54dcb36cd 100644 --- a/typedapi/types/bucketscompositebucket.go +++ b/typedapi/types/bucketscompositebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]CompositeBucket // []CompositeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsCompositeBucket any diff --git a/typedapi/types/bucketscriptaggregation.go b/typedapi/types/bucketscriptaggregation.go index 1dbd34105b..2c8ca2b8bf 100644 --- a/typedapi/types/bucketscriptaggregation.go +++ b/typedapi/types/bucketscriptaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // BucketScriptAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L83-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L83-L91 type BucketScriptAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -100,13 +100,3 @@ func NewBucketScriptAggregation() *BucketScriptAggregation { return r } - -// true - -type BucketScriptAggregationVariant interface { - BucketScriptAggregationCaster() *BucketScriptAggregation -} - -func (s *BucketScriptAggregation) BucketScriptAggregationCaster() *BucketScriptAggregation { - return s -} diff --git a/typedapi/types/bucketsdatehistogrambucket.go b/typedapi/types/bucketsdatehistogrambucket.go index e07a4cb048..6d2cc11246 100644 --- a/typedapi/types/bucketsdatehistogrambucket.go +++ b/typedapi/types/bucketsdatehistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]DateHistogramBucket // []DateHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsDateHistogramBucket any diff --git a/typedapi/types/bucketsdoubletermsbucket.go b/typedapi/types/bucketsdoubletermsbucket.go index e459386035..cea14ef7c2 100644 --- a/typedapi/types/bucketsdoubletermsbucket.go +++ b/typedapi/types/bucketsdoubletermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]DoubleTermsBucket // []DoubleTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsDoubleTermsBucket any diff --git a/typedapi/types/bucketselectoraggregation.go b/typedapi/types/bucketselectoraggregation.go index 0cfb858818..0e31bb2abc 100644 --- a/typedapi/types/bucketselectoraggregation.go +++ b/typedapi/types/bucketselectoraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // BucketSelectorAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L93-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L93-L101 type BucketSelectorAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -100,13 +100,3 @@ func NewBucketSelectorAggregation() *BucketSelectorAggregation { return r } - -// true - -type BucketSelectorAggregationVariant interface { - BucketSelectorAggregationCaster() *BucketSelectorAggregation -} - -func (s *BucketSelectorAggregation) BucketSelectorAggregationCaster() *BucketSelectorAggregation { - return s -} diff --git a/typedapi/types/bucketsfiltersbucket.go b/typedapi/types/bucketsfiltersbucket.go index f27d556b47..129a84043a 100644 --- a/typedapi/types/bucketsfiltersbucket.go +++ b/typedapi/types/bucketsfiltersbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]FiltersBucket // []FiltersBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsFiltersBucket any diff --git a/typedapi/types/bucketsfrequentitemsetsbucket.go b/typedapi/types/bucketsfrequentitemsetsbucket.go index 95d41b0072..40e6fec40a 100644 --- a/typedapi/types/bucketsfrequentitemsetsbucket.go +++ b/typedapi/types/bucketsfrequentitemsetsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]FrequentItemSetsBucket // []FrequentItemSetsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsFrequentItemSetsBucket any diff --git a/typedapi/types/bucketsgeohashgridbucket.go b/typedapi/types/bucketsgeohashgridbucket.go index 54cb601057..a48518c0eb 100644 --- a/typedapi/types/bucketsgeohashgridbucket.go +++ b/typedapi/types/bucketsgeohashgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]GeoHashGridBucket // []GeoHashGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoHashGridBucket any diff --git a/typedapi/types/bucketsgeohexgridbucket.go b/typedapi/types/bucketsgeohexgridbucket.go index 4b711e244e..01c47ffd4f 100644 --- a/typedapi/types/bucketsgeohexgridbucket.go +++ b/typedapi/types/bucketsgeohexgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]GeoHexGridBucket // []GeoHexGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoHexGridBucket any diff --git a/typedapi/types/bucketsgeotilegridbucket.go b/typedapi/types/bucketsgeotilegridbucket.go index 0e1a24f062..cf89650619 100644 --- a/typedapi/types/bucketsgeotilegridbucket.go +++ b/typedapi/types/bucketsgeotilegridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]GeoTileGridBucket // []GeoTileGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoTileGridBucket any diff --git a/typedapi/types/bucketshistogrambucket.go b/typedapi/types/bucketshistogrambucket.go index 71c836ed31..e3030b778f 100644 --- a/typedapi/types/bucketshistogrambucket.go +++ b/typedapi/types/bucketshistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]HistogramBucket // []HistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsHistogramBucket any diff --git a/typedapi/types/bucketsipprefixbucket.go b/typedapi/types/bucketsipprefixbucket.go index 62519116c4..fdce014e4b 100644 --- a/typedapi/types/bucketsipprefixbucket.go +++ b/typedapi/types/bucketsipprefixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]IpPrefixBucket // []IpPrefixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsIpPrefixBucket any diff --git a/typedapi/types/bucketsiprangebucket.go b/typedapi/types/bucketsiprangebucket.go index 2514878432..5e59d3a37f 100644 --- a/typedapi/types/bucketsiprangebucket.go +++ b/typedapi/types/bucketsiprangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]IpRangeBucket // []IpRangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsIpRangeBucket any diff --git a/typedapi/types/bucketslongraretermsbucket.go b/typedapi/types/bucketslongraretermsbucket.go index 3d2018f1f9..096444683f 100644 --- a/typedapi/types/bucketslongraretermsbucket.go +++ b/typedapi/types/bucketslongraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]LongRareTermsBucket // []LongRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsLongRareTermsBucket any diff --git a/typedapi/types/bucketslongtermsbucket.go b/typedapi/types/bucketslongtermsbucket.go index 5a863ac315..a036686970 100644 --- a/typedapi/types/bucketslongtermsbucket.go +++ b/typedapi/types/bucketslongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]LongTermsBucket // []LongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsLongTermsBucket any diff --git a/typedapi/types/bucketsmultitermsbucket.go b/typedapi/types/bucketsmultitermsbucket.go index fca6f88073..8c33eb104c 100644 --- a/typedapi/types/bucketsmultitermsbucket.go +++ b/typedapi/types/bucketsmultitermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]MultiTermsBucket // []MultiTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsMultiTermsBucket any diff --git a/typedapi/types/bucketsortaggregation.go b/typedapi/types/bucketsortaggregation.go index b60f8bd776..2dda6db6ca 100644 --- a/typedapi/types/bucketsortaggregation.go +++ b/typedapi/types/bucketsortaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // BucketSortAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L180-L204 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L180-L204 type BucketSortAggregation struct { // From Buckets in positions prior to `from` will be truncated. From *int `json:"from,omitempty"` @@ -125,13 +125,3 @@ func NewBucketSortAggregation() *BucketSortAggregation { return r } - -// true - -type BucketSortAggregationVariant interface { - BucketSortAggregationCaster() *BucketSortAggregation -} - -func (s *BucketSortAggregation) BucketSortAggregationCaster() *BucketSortAggregation { - return s -} diff --git a/typedapi/types/bucketspath.go b/typedapi/types/bucketspath.go index 913f1c65fd..95fa40c5ec 100644 --- a/typedapi/types/bucketspath.go +++ b/typedapi/types/bucketspath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,9 +26,5 @@ package types // []string // map[string]string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L53-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L53-L59 type BucketsPath any - -type BucketsPathVariant interface { - BucketsPathCaster() *BucketsPath -} diff --git a/typedapi/types/bucketsquery.go b/typedapi/types/bucketsquery.go index 6c8608977b..ec0f9e126a 100644 --- a/typedapi/types/bucketsquery.go +++ b/typedapi/types/bucketsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // map[string]Query // []Query // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsQuery any - -type BucketsQueryVariant interface { - BucketsQueryCaster() *BucketsQuery -} diff --git a/typedapi/types/bucketsrangebucket.go b/typedapi/types/bucketsrangebucket.go index 4fcf8ff801..3d6ceb58ca 100644 --- a/typedapi/types/bucketsrangebucket.go +++ b/typedapi/types/bucketsrangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]RangeBucket // []RangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsRangeBucket any diff --git a/typedapi/types/bucketssignificantlongtermsbucket.go b/typedapi/types/bucketssignificantlongtermsbucket.go index 1afb5a9f85..9e6c09e4e5 100644 --- a/typedapi/types/bucketssignificantlongtermsbucket.go +++ b/typedapi/types/bucketssignificantlongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]SignificantLongTermsBucket // []SignificantLongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsSignificantLongTermsBucket any diff --git a/typedapi/types/bucketssignificantstringtermsbucket.go b/typedapi/types/bucketssignificantstringtermsbucket.go index 095bc4b8cf..23a136f3fa 100644 --- a/typedapi/types/bucketssignificantstringtermsbucket.go +++ b/typedapi/types/bucketssignificantstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]SignificantStringTermsBucket // []SignificantStringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsSignificantStringTermsBucket any diff --git a/typedapi/types/bucketsstringraretermsbucket.go b/typedapi/types/bucketsstringraretermsbucket.go index e1f6bc4268..2aeb2b7dbd 100644 --- a/typedapi/types/bucketsstringraretermsbucket.go +++ b/typedapi/types/bucketsstringraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]StringRareTermsBucket // []StringRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsStringRareTermsBucket any diff --git a/typedapi/types/bucketsstringtermsbucket.go b/typedapi/types/bucketsstringtermsbucket.go index 99eeb2d3c0..b7d8c93521 100644 --- a/typedapi/types/bucketsstringtermsbucket.go +++ b/typedapi/types/bucketsstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]StringTermsBucket // []StringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsStringTermsBucket any diff --git a/typedapi/types/bucketstimeseriesbucket.go b/typedapi/types/bucketstimeseriesbucket.go index 1ed4a3c1b3..1b6ec12b9f 100644 --- a/typedapi/types/bucketstimeseriesbucket.go +++ b/typedapi/types/bucketstimeseriesbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]TimeSeriesBucket // []TimeSeriesBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsTimeSeriesBucket any diff --git a/typedapi/types/bucketsummary.go b/typedapi/types/bucketsummary.go index 255d5a9b0d..b8a31a684d 100644 --- a/typedapi/types/bucketsummary.go +++ b/typedapi/types/bucketsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BucketSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Bucket.ts#L30-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Bucket.ts#L30-L77 type BucketSummary struct { // AnomalyScore The maximum anomaly score, between 0-100, for any of the bucket influencers. // This is an overall, rate-limited @@ -198,5 +198,3 @@ func NewBucketSummary() *BucketSummary { return r } - -// false diff --git a/typedapi/types/bucketsvariablewidthhistogrambucket.go b/typedapi/types/bucketsvariablewidthhistogrambucket.go index 04c6a08d19..a06a6b9668 100644 --- a/typedapi/types/bucketsvariablewidthhistogrambucket.go +++ b/typedapi/types/bucketsvariablewidthhistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]VariableWidthHistogramBucket // []VariableWidthHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsVariableWidthHistogramBucket any diff --git a/typedapi/types/bucketsvoid.go b/typedapi/types/bucketsvoid.go index 6882db8823..35b0f182ef 100644 --- a/typedapi/types/bucketsvoid.go +++ b/typedapi/types/bucketsvoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // map[string]any // []any // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsVoid any diff --git a/typedapi/types/buildinformation.go b/typedapi/types/buildinformation.go index b6bd3eb4ba..7821d3528a 100644 --- a/typedapi/types/buildinformation.go +++ b/typedapi/types/buildinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BuildInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/types.ts#L24-L27 type BuildInformation struct { Date DateTime `json:"date"` Hash string `json:"hash"` @@ -80,5 +80,3 @@ func NewBuildInformation() *BuildInformation { return r } - -// false diff --git a/typedapi/types/bulgariananalyzer.go b/typedapi/types/bulgariananalyzer.go index 2a3b8eefb3..a478c5b416 100644 --- a/typedapi/types/bulgariananalyzer.go +++ b/typedapi/types/bulgariananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // BulgarianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L86-L91 type BulgarianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *BulgarianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *BulgarianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewBulgarianAnalyzer() *BulgarianAnalyzer { return r } - -// true - -type BulgarianAnalyzerVariant interface { - BulgarianAnalyzerCaster() *BulgarianAnalyzer -} - -func (s *BulgarianAnalyzer) BulgarianAnalyzerCaster() *BulgarianAnalyzer { - return s -} diff --git a/typedapi/types/bulkerror.go b/typedapi/types/bulkerror.go index d5c39b6aa9..05d701d35f 100644 --- a/typedapi/types/bulkerror.go +++ b/typedapi/types/bulkerror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BulkError type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Bulk.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Bulk.ts#L24-L33 type BulkError struct { // Count The number of errors Count int `json:"count"` @@ -91,5 +91,3 @@ func NewBulkError() *BulkError { return r } - -// false diff --git a/typedapi/types/bulkindexbyscrollfailure.go b/typedapi/types/bulkindexbyscrollfailure.go index 7e1a70173c..827f56ac4e 100644 --- a/typedapi/types/bulkindexbyscrollfailure.go +++ b/typedapi/types/bulkindexbyscrollfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BulkIndexByScrollFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Errors.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Errors.ts#L60-L65 type BulkIndexByScrollFailure struct { Cause ErrorCause `json:"cause"` Id string `json:"id"` @@ -96,5 +96,3 @@ func NewBulkIndexByScrollFailure() *BulkIndexByScrollFailure { return r } - -// false diff --git a/typedapi/types/bulkstats.go b/typedapi/types/bulkstats.go index 39ddb7ebfa..adc5aada86 100644 --- a/typedapi/types/bulkstats.go +++ b/typedapi/types/bulkstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BulkStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L71-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L71-L81 type BulkStats struct { AvgSize ByteSize `json:"avg_size,omitempty"` AvgSizeInBytes int64 `json:"avg_size_in_bytes"` @@ -145,5 +145,3 @@ func NewBulkStats() *BulkStats { return r } - -// false diff --git a/typedapi/types/bytenumberproperty.go b/typedapi/types/bytenumberproperty.go index d2da3b1001..88c0fd3941 100644 --- a/typedapi/types/bytenumberproperty.go +++ b/typedapi/types/bytenumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // ByteNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L186-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L188-L191 type ByteNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *ByteNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -679,6 +685,12 @@ func (s *ByteNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -961,13 +973,3 @@ func NewByteNumberProperty() *ByteNumberProperty { return r } - -// true - -type ByteNumberPropertyVariant interface { - ByteNumberPropertyCaster() *ByteNumberProperty -} - -func (s *ByteNumberProperty) ByteNumberPropertyCaster() *ByteNumberProperty { - return s -} diff --git a/typedapi/types/bytesize.go b/typedapi/types/bytesize.go index fdcea111f5..6ae30e792d 100644 --- a/typedapi/types/bytesize.go +++ b/typedapi/types/bytesize.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L97-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L97-L98 type ByteSize any - -type ByteSizeVariant interface { - ByteSizeCaster() *ByteSize -} diff --git a/typedapi/types/bytesprocessor.go b/typedapi/types/bytesprocessor.go index 3370fd281b..bc35374c18 100644 --- a/typedapi/types/bytesprocessor.go +++ b/typedapi/types/bytesprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // BytesProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L555-L571 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L555-L571 type BytesProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewBytesProcessor() *BytesProcessor { return r } - -// true - -type BytesProcessorVariant interface { - BytesProcessorCaster() *BytesProcessor -} - -func (s *BytesProcessor) BytesProcessorCaster() *BytesProcessor { - return s -} diff --git a/typedapi/types/cachequeries.go b/typedapi/types/cachequeries.go index cb77c0224a..21da64e11d 100644 --- a/typedapi/types/cachequeries.go +++ b/typedapi/types/cachequeries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CacheQueries type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L421-L423 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L421-L423 type CacheQueries struct { Enabled bool `json:"enabled"` } @@ -76,13 +76,3 @@ func NewCacheQueries() *CacheQueries { return r } - -// true - -type CacheQueriesVariant interface { - CacheQueriesCaster() *CacheQueries -} - -func (s *CacheQueries) CacheQueriesCaster() *CacheQueries { - return s -} diff --git a/typedapi/types/cachestats.go b/typedapi/types/cachestats.go index e42446fe3a..47ff7ef397 100644 --- a/typedapi/types/cachestats.go +++ b/typedapi/types/cachestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/stats/types.ts#L38-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/stats/types.ts#L38-L50 type CacheStats struct { Count int `json:"count"` Evictions int `json:"evictions"` @@ -163,5 +163,3 @@ func NewCacheStats() *CacheStats { return r } - -// false diff --git a/typedapi/types/calendar.go b/typedapi/types/calendar.go index dd69ae1eaf..131d967a6d 100644 --- a/typedapi/types/calendar.go +++ b/typedapi/types/calendar.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Calendar type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_calendars/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_calendars/types.ts#L22-L29 type Calendar struct { // CalendarId A string that uniquely identifies a calendar. CalendarId string `json:"calendar_id"` @@ -89,5 +89,3 @@ func NewCalendar() *Calendar { return r } - -// false diff --git a/typedapi/types/calendarevent.go b/typedapi/types/calendarevent.go index 6c1a995998..dec8c1dbe9 100644 --- a/typedapi/types/calendarevent.go +++ b/typedapi/types/calendarevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CalendarEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/CalendarEvent.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/CalendarEvent.ts#L23-L33 type CalendarEvent struct { // CalendarId A string that uniquely identifies a calendar. CalendarId *string `json:"calendar_id,omitempty"` @@ -104,13 +104,3 @@ func NewCalendarEvent() *CalendarEvent { return r } - -// true - -type CalendarEventVariant interface { - CalendarEventCaster() *CalendarEvent -} - -func (s *CalendarEvent) CalendarEventCaster() *CalendarEvent { - return s -} diff --git a/typedapi/types/cardinalityaggregate.go b/typedapi/types/cardinalityaggregate.go index bd51364062..e325825d75 100644 --- a/typedapi/types/cardinalityaggregate.go +++ b/typedapi/types/cardinalityaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L140-L143 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L140-L143 type CardinalityAggregate struct { Meta Metadata `json:"meta,omitempty"` Value int64 `json:"value"` @@ -83,5 +83,3 @@ func NewCardinalityAggregate() *CardinalityAggregate { return r } - -// false diff --git a/typedapi/types/cardinalityaggregation.go b/typedapi/types/cardinalityaggregation.go index 95c7b2e2a0..18684da024 100644 --- a/typedapi/types/cardinalityaggregation.go +++ b/typedapi/types/cardinalityaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L87-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L93-L105 type CardinalityAggregation struct { // ExecutionHint Mechanism by which cardinality aggregations is run. ExecutionHint *cardinalityexecutionmode.CardinalityExecutionMode `json:"execution_hint,omitempty"` @@ -125,13 +125,3 @@ func NewCardinalityAggregation() *CardinalityAggregation { return r } - -// true - -type CardinalityAggregationVariant interface { - CardinalityAggregationCaster() *CardinalityAggregation -} - -func (s *CardinalityAggregation) CardinalityAggregationCaster() *CardinalityAggregation { - return s -} diff --git a/typedapi/types/catalananalyzer.go b/typedapi/types/catalananalyzer.go index f5daf8178b..b10aff65d2 100644 --- a/typedapi/types/catalananalyzer.go +++ b/typedapi/types/catalananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // CatalanAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L93-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L93-L98 type CatalanAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *CatalanAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *CatalanAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewCatalanAnalyzer() *CatalanAnalyzer { return r } - -// true - -type CatalanAnalyzerVariant interface { - CatalanAnalyzerCaster() *CatalanAnalyzer -} - -func (s *CatalanAnalyzer) CatalanAnalyzerCaster() *CatalanAnalyzer { - return s -} diff --git a/typedapi/types/catanonalydetectorcolumns.go b/typedapi/types/catanonalydetectorcolumns.go index 336a7fd950..09c67bc713 100644 --- a/typedapi/types/catanonalydetectorcolumns.go +++ b/typedapi/types/catanonalydetectorcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // CatAnonalyDetectorColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L402-L404 type CatAnonalyDetectorColumns []catanomalydetectorcolumn.CatAnomalyDetectorColumn diff --git a/typedapi/types/catcomponenttemplate.go b/typedapi/types/catcomponenttemplate.go index 9f09348162..c2f2785016 100644 --- a/typedapi/types/catcomponenttemplate.go +++ b/typedapi/types/catcomponenttemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CatComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/component_templates/types.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/component_templates/types.ts#L20-L28 type CatComponentTemplate struct { AliasCount string `json:"alias_count"` IncludedIn string `json:"included_in"` @@ -152,5 +152,3 @@ func NewCatComponentTemplate() *CatComponentTemplate { return r } - -// false diff --git a/typedapi/types/catdatafeedcolumns.go b/typedapi/types/catdatafeedcolumns.go index 647d56fab6..0530db3db6 100644 --- a/typedapi/types/catdatafeedcolumns.go +++ b/typedapi/types/catdatafeedcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // CatDatafeedColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L559-L559 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1284-L1284 type CatDatafeedColumns []catdatafeedcolumn.CatDatafeedColumn diff --git a/typedapi/types/catdfacolumns.go b/typedapi/types/catdfacolumns.go index eb0f3ced6a..fa3dd57085 100644 --- a/typedapi/types/catdfacolumns.go +++ b/typedapi/types/catdfacolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // CatDfaColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L558-L558 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1283-L1283 type CatDfaColumns []catdfacolumn.CatDfaColumn diff --git a/typedapi/types/categorizationanalyzer.go b/typedapi/types/categorizationanalyzer.go index aa0199ad1b..1c254c6ced 100644 --- a/typedapi/types/categorizationanalyzer.go +++ b/typedapi/types/categorizationanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // CategorizationAnalyzerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L181-L182 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L181-L182 type CategorizationAnalyzer any - -type CategorizationAnalyzerVariant interface { - CategorizationAnalyzerCaster() *CategorizationAnalyzer -} diff --git a/typedapi/types/categorizationanalyzerdefinition.go b/typedapi/types/categorizationanalyzerdefinition.go index 1ac1f7a609..4bf48027cf 100644 --- a/typedapi/types/categorizationanalyzerdefinition.go +++ b/typedapi/types/categorizationanalyzerdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // CategorizationAnalyzerDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L184-L198 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L184-L198 type CategorizationAnalyzerDefinition struct { // CharFilter One or more character filters. In addition to the built-in character filters, // other plugins can provide more character filters. If this property is not @@ -142,12 +142,60 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { switch kind["type"] { + case "apostrophe": + o := NewApostropheTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "apostrophe", err) + } + s.Filter = append(s.Filter, *o) + case "arabic_stem": + o := NewArabicStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "arabic_stem", err) + } + s.Filter = append(s.Filter, *o) + case "arabic_normalization": + o := NewArabicNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "arabic_normalization", err) + } + s.Filter = append(s.Filter, *o) case "asciifolding": o := NewAsciiFoldingTokenFilter() if err := localDec.Decode(&o); err != nil { return fmt.Errorf("%s | %w", "asciifolding", err) } s.Filter = append(s.Filter, *o) + case "bengali_normalization": + o := NewBengaliNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "bengali_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "brazilian_stem": + o := NewBrazilianStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "brazilian_stem", err) + } + s.Filter = append(s.Filter, *o) + case "cjk_bigram": + o := NewCjkBigramTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "cjk_bigram", err) + } + s.Filter = append(s.Filter, *o) + case "cjk_width": + o := NewCjkWidthTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "cjk_width", err) + } + s.Filter = append(s.Filter, *o) + case "classic": + o := NewClassicTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "classic", err) + } + s.Filter = append(s.Filter, *o) case "common_grams": o := NewCommonGramsTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -160,12 +208,30 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "condition", err) } s.Filter = append(s.Filter, *o) + case "czech_stem": + o := NewCzechStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "czech_stem", err) + } + s.Filter = append(s.Filter, *o) + case "decimal_digit": + o := NewDecimalDigitTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "decimal_digit", err) + } + s.Filter = append(s.Filter, *o) case "delimited_payload": o := NewDelimitedPayloadTokenFilter() if err := localDec.Decode(&o); err != nil { return fmt.Errorf("%s | %w", "delimited_payload", err) } s.Filter = append(s.Filter, *o) + case "dutch_stem": + o := NewDutchStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "dutch_stem", err) + } + s.Filter = append(s.Filter, *o) case "edge_ngram": o := NewEdgeNGramTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -184,6 +250,36 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "fingerprint", err) } s.Filter = append(s.Filter, *o) + case "flatten_graph": + o := NewFlattenGraphTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "flatten_graph", err) + } + s.Filter = append(s.Filter, *o) + case "french_stem": + o := NewFrenchStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "french_stem", err) + } + s.Filter = append(s.Filter, *o) + case "german_normalization": + o := NewGermanNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "german_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "german_stem": + o := NewGermanStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "german_stem", err) + } + s.Filter = append(s.Filter, *o) + case "hindi_normalization": + o := NewHindiNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "hindi_normalization", err) + } + s.Filter = append(s.Filter, *o) case "hunspell": o := NewHunspellTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -196,6 +292,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "hyphenation_decompounder", err) } s.Filter = append(s.Filter, *o) + case "indic_normalization": + o := NewIndicNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "indic_normalization", err) + } + s.Filter = append(s.Filter, *o) case "keep_types": o := NewKeepTypesTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -214,6 +316,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "keyword_marker", err) } s.Filter = append(s.Filter, *o) + case "keyword_repeat": + o := NewKeywordRepeatTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "keyword_repeat", err) + } + s.Filter = append(s.Filter, *o) case "kstem": o := NewKStemTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -238,6 +346,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "lowercase", err) } s.Filter = append(s.Filter, *o) + case "min_hash": + o := NewMinHashTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "min_hash", err) + } + s.Filter = append(s.Filter, *o) case "multiplexer": o := NewMultiplexerTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -268,6 +382,18 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "pattern_replace", err) } s.Filter = append(s.Filter, *o) + case "persian_normalization": + o := NewPersianNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "persian_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "persian_stem": + o := NewPersianStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "persian_stem", err) + } + s.Filter = append(s.Filter, *o) case "porter_stem": o := NewPorterStemTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -292,6 +418,30 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "reverse", err) } s.Filter = append(s.Filter, *o) + case "russian_stem": + o := NewRussianStemTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "russian_stem", err) + } + s.Filter = append(s.Filter, *o) + case "scandinavian_folding": + o := NewScandinavianFoldingTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "scandinavian_folding", err) + } + s.Filter = append(s.Filter, *o) + case "scandinavian_normalization": + o := NewScandinavianNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "scandinavian_normalization", err) + } + s.Filter = append(s.Filter, *o) + case "serbian_normalization": + o := NewSerbianNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "serbian_normalization", err) + } + s.Filter = append(s.Filter, *o) case "shingle": o := NewShingleTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -304,6 +454,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "snowball", err) } s.Filter = append(s.Filter, *o) + case "sorani_normalization": + o := NewSoraniNormalizationTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "sorani_normalization", err) + } + s.Filter = append(s.Filter, *o) case "stemmer_override": o := NewStemmerOverrideTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -370,6 +526,12 @@ func (s *CategorizationAnalyzerDefinition) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "word_delimiter", err) } s.Filter = append(s.Filter, *o) + case "ja_stop": + o := NewJaStopTokenFilter() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "ja_stop", err) + } + s.Filter = append(s.Filter, *o) case "kuromoji_stemmer": o := NewKuromojiStemmerTokenFilter() if err := localDec.Decode(&o); err != nil { @@ -570,13 +732,3 @@ func NewCategorizationAnalyzerDefinition() *CategorizationAnalyzerDefinition { return r } - -// true - -type CategorizationAnalyzerDefinitionVariant interface { - CategorizationAnalyzerDefinitionCaster() *CategorizationAnalyzerDefinition -} - -func (s *CategorizationAnalyzerDefinition) CategorizationAnalyzerDefinitionCaster() *CategorizationAnalyzerDefinition { - return s -} diff --git a/typedapi/types/categorizetextaggregation.go b/typedapi/types/categorizetextaggregation.go index 6a20207e0c..752d325b20 100644 --- a/typedapi/types/categorizetextaggregation.go +++ b/typedapi/types/categorizetextaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,14 +31,12 @@ import ( // CategorizeTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1117-L1182 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1117-L1183 type CategorizeTextAggregation struct { // CategorizationAnalyzer The categorization analyzer specifies how the text is analyzed and tokenized // before being categorized. // The syntax is very similar to that used to define the analyzer in the - // [Analyze - // endpoint](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/indices-analyze.html). - // This property + // `_analyze` endpoint. This property // cannot be used at the same time as categorization_filters. CategorizationAnalyzer CategorizeTextAnalyzer `json:"categorization_analyzer,omitempty"` // CategorizationFilters This property expects an array of regular expressions. The expressions are @@ -271,13 +269,3 @@ func NewCategorizeTextAggregation() *CategorizeTextAggregation { return r } - -// true - -type CategorizeTextAggregationVariant interface { - CategorizeTextAggregationCaster() *CategorizeTextAggregation -} - -func (s *CategorizeTextAggregation) CategorizeTextAggregationCaster() *CategorizeTextAggregation { - return s -} diff --git a/typedapi/types/categorizetextanalyzer.go b/typedapi/types/categorizetextanalyzer.go index 69160833b8..5b281e4c75 100644 --- a/typedapi/types/categorizetextanalyzer.go +++ b/typedapi/types/categorizetextanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // CustomCategorizeTextAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1184-L1187 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1185-L1188 type CategorizeTextAnalyzer any - -type CategorizeTextAnalyzerVariant interface { - CategorizeTextAnalyzerCaster() *CategorizeTextAnalyzer -} diff --git a/typedapi/types/category.go b/typedapi/types/category.go index 3845eab65a..786527b276 100644 --- a/typedapi/types/category.go +++ b/typedapi/types/category.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Category type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Category.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Category.ts#L23-L49 type Category struct { // CategoryId A unique identifier for the category. category_id is unique at the job level, // even when per-partition categorization is enabled. @@ -232,5 +232,3 @@ func NewCategory() *Category { return r } - -// false diff --git a/typedapi/types/esqlresult.go b/typedapi/types/catnodecolumns.go similarity index 67% rename from typedapi/types/esqlresult.go rename to typedapi/types/catnodecolumns.go index cdd77ac7f2..8412b776c4 100644 --- a/typedapi/types/esqlresult.go +++ b/typedapi/types/catnodecolumns.go @@ -16,11 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types -// EsqlResult type alias. +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catnodecolumn" +) + +// CatNodeColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Binary.ts#L24-L24 -type EsqlResult []byte +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1285-L1285 +type CatNodeColumns []catnodecolumn.CatNodeColumn diff --git a/typedapi/types/catrecoverycolumns.go b/typedapi/types/catrecoverycolumns.go new file mode 100644 index 0000000000..cb8cb9629f --- /dev/null +++ b/typedapi/types/catrecoverycolumns.go @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catrecoverycolumn" +) + +// CatRecoveryColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1286-L1286 +type CatRecoveryColumns []catrecoverycolumn.CatRecoveryColumn diff --git a/typedapi/types/catsegmentscolumns.go b/typedapi/types/catsegmentscolumns.go new file mode 100644 index 0000000000..0ffa7ab7a9 --- /dev/null +++ b/typedapi/types/catsegmentscolumns.go @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catsegmentscolumn" +) + +// CatSegmentsColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1287-L1287 +type CatSegmentsColumns []catsegmentscolumn.CatSegmentsColumn diff --git a/typedapi/types/catshardcolumns.go b/typedapi/types/catshardcolumns.go new file mode 100644 index 0000000000..3aad6e2dc2 --- /dev/null +++ b/typedapi/types/catshardcolumns.go @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catshardcolumn" +) + +// CatShardColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1950-L1950 +type CatShardColumns []catshardcolumn.CatShardColumn diff --git a/typedapi/types/catsnapshotscolumns.go b/typedapi/types/catsnapshotscolumns.go new file mode 100644 index 0000000000..4ca4535319 --- /dev/null +++ b/typedapi/types/catsnapshotscolumns.go @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catsnapshotscolumn" +) + +// CatSnapshotsColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1288-L1288 +type CatSnapshotsColumns []catsnapshotscolumn.CatSnapshotsColumn diff --git a/typedapi/types/catthreadpoolcolumns.go b/typedapi/types/catthreadpoolcolumns.go new file mode 100644 index 0000000000..f80938807c --- /dev/null +++ b/typedapi/types/catthreadpoolcolumns.go @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/catthreadpoolcolumn" +) + +// CatThreadPoolColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L2053-L2053 +type CatThreadPoolColumns []catthreadpoolcolumn.CatThreadPoolColumn diff --git a/typedapi/types/cattrainedmodelscolumns.go b/typedapi/types/cattrainedmodelscolumns.go index 535df52386..2dedca3dae 100644 --- a/typedapi/types/cattrainedmodelscolumns.go +++ b/typedapi/types/cattrainedmodelscolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // CatTrainedModelsColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L636-L638 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1365-L1367 type CatTrainedModelsColumns []cattrainedmodelscolumn.CatTrainedModelsColumn diff --git a/typedapi/types/cattransformcolumns.go b/typedapi/types/cattransformcolumns.go index 50e6859baf..2868e885aa 100644 --- a/typedapi/types/cattransformcolumns.go +++ b/typedapi/types/cattransformcolumns.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // CatTransformColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L845-L845 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1574-L1574 type CatTransformColumns []cattransformcolumn.CatTransformColumn diff --git a/typedapi/types/ccr.go b/typedapi/types/ccr.go index 502ac58de8..abf8be245c 100644 --- a/typedapi/types/ccr.go +++ b/typedapi/types/ccr.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Ccr type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L344-L347 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L344-L347 type Ccr struct { AutoFollowPatternsCount int `json:"auto_follow_patterns_count"` Available bool `json:"available"` @@ -125,5 +125,3 @@ func NewCcr() *Ccr { return r } - -// false diff --git a/typedapi/types/ccrshardstats.go b/typedapi/types/ccrshardstats.go index f12b7dfe08..1ef6250886 100644 --- a/typedapi/types/ccrshardstats.go +++ b/typedapi/types/ccrshardstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CcrShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/_types/FollowIndexStats.ts#L37-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/_types/FollowIndexStats.ts#L37-L109 type CcrShardStats struct { // BytesRead The total of transferred bytes read from the leader. // This is only an estimate and does not account for compression if enabled. @@ -451,5 +451,3 @@ func NewCcrShardStats() *CcrShardStats { return r } - -// false diff --git a/typedapi/types/ccsstats.go b/typedapi/types/ccsstats.go new file mode 100644 index 0000000000..f56e30d815 --- /dev/null +++ b/typedapi/types/ccsstats.go @@ -0,0 +1,44 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +// CCSStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L769-L784 +type CCSStats struct { + // Clusters Contains remote cluster settings and metrics collected from them. + // The keys are cluster names, and the values are per-cluster data. + // Only present if `include_remotes` option is set to true. + Clusters map[string]RemoteClusterInfo `json:"clusters,omitempty"` + // Esql_ Information about ES|QL cross-cluster query usage. + Esql_ *CCSUsageStats `json:"_esql,omitempty"` + // Search_ Information about cross-cluster search usage. + Search_ CCSUsageStats `json:"_search"` +} + +// NewCCSStats returns a CCSStats. +func NewCCSStats() *CCSStats { + r := &CCSStats{ + Clusters: make(map[string]RemoteClusterInfo), + } + + return r +} diff --git a/typedapi/types/ccsusageclusterstats.go b/typedapi/types/ccsusageclusterstats.go new file mode 100644 index 0000000000..2dde8105c7 --- /dev/null +++ b/typedapi/types/ccsusageclusterstats.go @@ -0,0 +1,110 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CCSUsageClusterStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L855-L862 +type CCSUsageClusterStats struct { + // Skipped The total number of cross-cluster search requests for which this cluster was + // skipped. + Skipped int `json:"skipped"` + // Took Statistics about the time taken to execute requests against this cluster. + Took CCSUsageTimeValue `json:"took"` + // Total The total number of successful (not skipped) cross-cluster search requests + // that were executed against this cluster. This may include requests where + // partial results were returned, but not requests in which the cluster has been + // skipped entirely. + Total int `json:"total"` +} + +func (s *CCSUsageClusterStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "skipped": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Skipped", err) + } + s.Skipped = value + case float64: + f := int(v) + s.Skipped = f + } + + case "took": + if err := dec.Decode(&s.Took); err != nil { + return fmt.Errorf("%s | %w", "Took", err) + } + + case "total": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + s.Total = value + case float64: + f := int(v) + s.Total = f + } + + } + } + return nil +} + +// NewCCSUsageClusterStats returns a CCSUsageClusterStats. +func NewCCSUsageClusterStats() *CCSUsageClusterStats { + r := &CCSUsageClusterStats{} + + return r +} diff --git a/typedapi/types/ccsusagestats.go b/typedapi/types/ccsusagestats.go new file mode 100644 index 0000000000..507cef5232 --- /dev/null +++ b/typedapi/types/ccsusagestats.go @@ -0,0 +1,236 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CCSUsageStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L819-L844 +type CCSUsageStats struct { + // Clients Statistics about the clients that executed cross-cluster search requests. The + // keys are the names of the clients, and the values are the number of requests + // that were executed by that client. Only known clients (such as `kibana` or + // `elasticsearch`) are counted. + Clients map[string]int `json:"clients"` + // Clusters Statistics about the clusters that were queried in cross-cluster search + // requests. The keys are cluster names, and the values are per-cluster + // telemetry data. This also includes the local cluster itself, which uses the + // name `(local)`. + Clusters map[string]CCSUsageClusterStats `json:"clusters"` + // FailureReasons Statistics about the reasons for cross-cluster search request failures. The + // keys are the failure reason names and the values are the number of requests + // that failed for that reason. + FailureReasons map[string]int `json:"failure_reasons"` + // Features The keys are the names of the search feature, and the values are the number + // of requests that used that feature. Single request can use more than one + // feature (e.g. both `async` and `wildcard`). + Features map[string]int `json:"features"` + // RemotesPerSearchAvg The average number of remote clusters that were queried in a single + // cross-cluster search request. + RemotesPerSearchAvg Float64 `json:"remotes_per_search_avg"` + // RemotesPerSearchMax The maximum number of remote clusters that were queried in a single + // cross-cluster search request. + RemotesPerSearchMax int `json:"remotes_per_search_max"` + // Skipped The total number of cross-cluster search requests (successful or failed) that + // had at least one remote cluster skipped. + Skipped int `json:"skipped"` + // Success The total number of cross-cluster search requests that have been successfully + // executed by the cluster. + Success int `json:"success"` + // Took Statistics about the time taken to execute cross-cluster search requests. + Took CCSUsageTimeValue `json:"took"` + // TookMrtFalse Statistics about the time taken to execute cross-cluster search requests for + // which the `ccs_minimize_roundtrips` setting was set to `false`. + TookMrtFalse *CCSUsageTimeValue `json:"took_mrt_false,omitempty"` + // TookMrtTrue Statistics about the time taken to execute cross-cluster search requests for + // which the `ccs_minimize_roundtrips` setting was set to `true`. + TookMrtTrue *CCSUsageTimeValue `json:"took_mrt_true,omitempty"` + // Total The total number of cross-cluster search requests that have been executed by + // the cluster. + Total int `json:"total"` +} + +func (s *CCSUsageStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "clients": + if s.Clients == nil { + s.Clients = make(map[string]int, 0) + } + if err := dec.Decode(&s.Clients); err != nil { + return fmt.Errorf("%s | %w", "Clients", err) + } + + case "clusters": + if s.Clusters == nil { + s.Clusters = make(map[string]CCSUsageClusterStats, 0) + } + if err := dec.Decode(&s.Clusters); err != nil { + return fmt.Errorf("%s | %w", "Clusters", err) + } + + case "failure_reasons": + if s.FailureReasons == nil { + s.FailureReasons = make(map[string]int, 0) + } + if err := dec.Decode(&s.FailureReasons); err != nil { + return fmt.Errorf("%s | %w", "FailureReasons", err) + } + + case "features": + if s.Features == nil { + s.Features = make(map[string]int, 0) + } + if err := dec.Decode(&s.Features); err != nil { + return fmt.Errorf("%s | %w", "Features", err) + } + + case "remotes_per_search_avg": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 64) + if err != nil { + return fmt.Errorf("%s | %w", "RemotesPerSearchAvg", err) + } + f := Float64(value) + s.RemotesPerSearchAvg = f + case float64: + f := Float64(v) + s.RemotesPerSearchAvg = f + } + + case "remotes_per_search_max": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "RemotesPerSearchMax", err) + } + s.RemotesPerSearchMax = value + case float64: + f := int(v) + s.RemotesPerSearchMax = f + } + + case "skipped": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Skipped", err) + } + s.Skipped = value + case float64: + f := int(v) + s.Skipped = f + } + + case "success": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Success", err) + } + s.Success = value + case float64: + f := int(v) + s.Success = f + } + + case "took": + if err := dec.Decode(&s.Took); err != nil { + return fmt.Errorf("%s | %w", "Took", err) + } + + case "took_mrt_false": + if err := dec.Decode(&s.TookMrtFalse); err != nil { + return fmt.Errorf("%s | %w", "TookMrtFalse", err) + } + + case "took_mrt_true": + if err := dec.Decode(&s.TookMrtTrue); err != nil { + return fmt.Errorf("%s | %w", "TookMrtTrue", err) + } + + case "total": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + s.Total = value + case float64: + f := int(v) + s.Total = f + } + + } + } + return nil +} + +// NewCCSUsageStats returns a CCSUsageStats. +func NewCCSUsageStats() *CCSUsageStats { + r := &CCSUsageStats{ + Clients: make(map[string]int), + Clusters: make(map[string]CCSUsageClusterStats), + FailureReasons: make(map[string]int), + Features: make(map[string]int), + } + + return r +} diff --git a/typedapi/types/ccsusagetimevalue.go b/typedapi/types/ccsusagetimevalue.go new file mode 100644 index 0000000000..acf9e5a4e7 --- /dev/null +++ b/typedapi/types/ccsusagetimevalue.go @@ -0,0 +1,83 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CCSUsageTimeValue type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L846-L853 +type CCSUsageTimeValue struct { + // Avg The average time taken to execute a request, in milliseconds. + Avg int64 `json:"avg"` + // Max The maximum time taken to execute a request, in milliseconds. + Max int64 `json:"max"` + // P90 The 90th percentile of the time taken to execute requests, in milliseconds. + P90 int64 `json:"p90"` +} + +func (s *CCSUsageTimeValue) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "avg": + if err := dec.Decode(&s.Avg); err != nil { + return fmt.Errorf("%s | %w", "Avg", err) + } + + case "max": + if err := dec.Decode(&s.Max); err != nil { + return fmt.Errorf("%s | %w", "Max", err) + } + + case "p90": + if err := dec.Decode(&s.P90); err != nil { + return fmt.Errorf("%s | %w", "P90", err) + } + + } + } + return nil +} + +// NewCCSUsageTimeValue returns a CCSUsageTimeValue. +func NewCCSUsageTimeValue() *CCSUsageTimeValue { + r := &CCSUsageTimeValue{} + + return r +} diff --git a/typedapi/types/certificateinformation.go b/typedapi/types/certificateinformation.go index baee90d87f..1f37ac3021 100644 --- a/typedapi/types/certificateinformation.go +++ b/typedapi/types/certificateinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CertificateInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ssl/certificates/types.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ssl/certificates/types.ts#L22-L57 type CertificateInformation struct { // Alias If the path refers to a container file (a jks keystore, or a PKCS#12 file), // it is the alias of the certificate. @@ -172,5 +172,3 @@ func NewCertificateInformation() *CertificateInformation { return r } - -// false diff --git a/typedapi/types/cgroup.go b/typedapi/types/cgroup.go index c10ea09cb6..3826baa51b 100644 --- a/typedapi/types/cgroup.go +++ b/typedapi/types/cgroup.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Cgroup type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L497-L510 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L499-L512 type Cgroup struct { // Cpu Contains statistics about `cpu` control group for the node. Cpu *CgroupCpu `json:"cpu,omitempty"` @@ -38,5 +38,3 @@ func NewCgroup() *Cgroup { return r } - -// false diff --git a/typedapi/types/cgroupcpu.go b/typedapi/types/cgroupcpu.go index fba4278907..200aa451e5 100644 --- a/typedapi/types/cgroupcpu.go +++ b/typedapi/types/cgroupcpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CgroupCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L523-L540 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L525-L542 type CgroupCpu struct { // CfsPeriodMicros The period of time, in microseconds, for how regularly all tasks in the same // cgroup as the Elasticsearch process should have their access to CPU resources @@ -122,5 +122,3 @@ func NewCgroupCpu() *CgroupCpu { return r } - -// false diff --git a/typedapi/types/cgroupcpustat.go b/typedapi/types/cgroupcpustat.go index 1372650c09..b85afd14b2 100644 --- a/typedapi/types/cgroupcpustat.go +++ b/typedapi/types/cgroupcpustat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CgroupCpuStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L542-L555 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L544-L557 type CgroupCpuStat struct { // NumberOfElapsedPeriods The number of reporting periods (as specified by `cfs_period_micros`) that // have elapsed. @@ -105,5 +105,3 @@ func NewCgroupCpuStat() *CgroupCpuStat { return r } - -// false diff --git a/typedapi/types/cgroupmemory.go b/typedapi/types/cgroupmemory.go index 5fdbeacdf1..e1428e4de4 100644 --- a/typedapi/types/cgroupmemory.go +++ b/typedapi/types/cgroupmemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CgroupMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L557-L573 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L559-L575 type CgroupMemory struct { // ControlGroup The `memory` control group to which the Elasticsearch process belongs. ControlGroup *string `json:"control_group,omitempty"` @@ -111,5 +111,3 @@ func NewCgroupMemory() *CgroupMemory { return r } - -// false diff --git a/typedapi/types/chaininput.go b/typedapi/types/chaininput.go index fc39a44d8f..5d89bebff5 100644 --- a/typedapi/types/chaininput.go +++ b/typedapi/types/chaininput.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ChainInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L35-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L35-L37 type ChainInput struct { Inputs []map[string]WatcherInput `json:"inputs"` } @@ -33,13 +33,3 @@ func NewChainInput() *ChainInput { return r } - -// true - -type ChainInputVariant interface { - ChainInputCaster() *ChainInput -} - -func (s *ChainInput) ChainInputCaster() *ChainInput { - return s -} diff --git a/typedapi/types/charfilter.go b/typedapi/types/charfilter.go index 0c1bf1c194..092f7cff81 100644 --- a/typedapi/types/charfilter.go +++ b/typedapi/types/charfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // CharFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/char_filters.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/char_filters.ts#L28-L33 type CharFilter any - -type CharFilterVariant interface { - CharFilterCaster() *CharFilter -} diff --git a/typedapi/types/charfilterdefinition.go b/typedapi/types/charfilterdefinition.go index 1b47388517..f1a65e86a2 100644 --- a/typedapi/types/charfilterdefinition.go +++ b/typedapi/types/charfilterdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,9 +28,5 @@ package types // IcuNormalizationCharFilter // KuromojiIterationMarkCharFilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/char_filters.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/char_filters.ts#L35-L44 type CharFilterDefinition any - -type CharFilterDefinitionVariant interface { - CharFilterDefinitionCaster() *CharFilterDefinition -} diff --git a/typedapi/types/charfilterdetail.go b/typedapi/types/charfilterdetail.go index 254dc67a0c..3de1582035 100644 --- a/typedapi/types/charfilterdetail.go +++ b/typedapi/types/charfilterdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CharFilterDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L46-L49 type CharFilterDetail struct { FilteredText []string `json:"filtered_text"` Name string `json:"name"` @@ -80,5 +80,3 @@ func NewCharFilterDetail() *CharFilterDetail { return r } - -// false diff --git a/typedapi/types/charfiltertypes.go b/typedapi/types/charfiltertypes.go index fdd1dd0238..b17028682d 100644 --- a/typedapi/types/charfiltertypes.go +++ b/typedapi/types/charfiltertypes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // CharFilterTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L228-L261 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L315-L352 type CharFilterTypes struct { // AnalyzerTypes Contains statistics about analyzer types used in selected nodes. AnalyzerTypes []FieldTypes `json:"analyzer_types"` @@ -38,15 +38,17 @@ type CharFilterTypes struct { CharFilterTypes []FieldTypes `json:"char_filter_types"` // FilterTypes Contains statistics about token filter types used in selected nodes. FilterTypes []FieldTypes `json:"filter_types"` + // Synonyms Contains statistics about synonyms types used in selected nodes. + Synonyms map[string]SynonymsStats `json:"synonyms"` // TokenizerTypes Contains statistics about tokenizer types used in selected nodes. TokenizerTypes []FieldTypes `json:"tokenizer_types"` } // NewCharFilterTypes returns a CharFilterTypes. func NewCharFilterTypes() *CharFilterTypes { - r := &CharFilterTypes{} + r := &CharFilterTypes{ + Synonyms: make(map[string]SynonymsStats), + } return r } - -// false diff --git a/typedapi/types/chargrouptokenizer.go b/typedapi/types/chargrouptokenizer.go index abc87ff387..225e97e5c2 100644 --- a/typedapi/types/chargrouptokenizer.go +++ b/typedapi/types/chargrouptokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CharGroupTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L31-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L31-L38 type CharGroupTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` TokenizeOnChars []string `json:"tokenize_on_chars"` @@ -111,13 +111,3 @@ func NewCharGroupTokenizer() *CharGroupTokenizer { return r } - -// true - -type CharGroupTokenizerVariant interface { - CharGroupTokenizerCaster() *CharGroupTokenizer -} - -func (s *CharGroupTokenizer) CharGroupTokenizerCaster() *CharGroupTokenizer { - return s -} diff --git a/typedapi/types/checkpointing.go b/typedapi/types/checkpointing.go index 15e41c82f2..554241690b 100644 --- a/typedapi/types/checkpointing.go +++ b/typedapi/types/checkpointing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Checkpointing type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L102-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L102-L110 type Checkpointing struct { ChangesLastDetectedAt *int64 `json:"changes_last_detected_at,omitempty"` ChangesLastDetectedAtString DateTime `json:"changes_last_detected_at_string,omitempty"` @@ -133,5 +133,3 @@ func NewCheckpointing() *Checkpointing { return r } - -// false diff --git a/typedapi/types/checkpointstats.go b/typedapi/types/checkpointstats.go index cdc2f07e93..7203545566 100644 --- a/typedapi/types/checkpointstats.go +++ b/typedapi/types/checkpointstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CheckpointStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L93-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L93-L100 type CheckpointStats struct { Checkpoint int64 `json:"checkpoint"` CheckpointProgress *TransformProgress `json:"checkpoint_progress,omitempty"` @@ -107,5 +107,3 @@ func NewCheckpointStats() *CheckpointStats { return r } - -// false diff --git a/typedapi/types/childrenaggregate.go b/typedapi/types/childrenaggregate.go index 0e78d6c0b2..da29071953 100644 --- a/typedapi/types/childrenaggregate.go +++ b/typedapi/types/childrenaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ChildrenAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L888-L892 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L890-L894 type ChildrenAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewChildrenAggregate() *ChildrenAggregate { return r } - -// false diff --git a/typedapi/types/childrenaggregation.go b/typedapi/types/childrenaggregation.go index 03132c5f04..d40be45069 100644 --- a/typedapi/types/childrenaggregation.go +++ b/typedapi/types/childrenaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ChildrenAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L121-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L121-L126 type ChildrenAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` @@ -67,13 +67,3 @@ func NewChildrenAggregation() *ChildrenAggregation { return r } - -// true - -type ChildrenAggregationVariant interface { - ChildrenAggregationCaster() *ChildrenAggregation -} - -func (s *ChildrenAggregation) ChildrenAggregationCaster() *ChildrenAggregation { - return s -} diff --git a/typedapi/types/chineseanalyzer.go b/typedapi/types/chineseanalyzer.go index b621d6b0d4..b34e6be990 100644 --- a/typedapi/types/chineseanalyzer.go +++ b/typedapi/types/chineseanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // ChineseAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L100-L104 type ChineseAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *ChineseAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *ChineseAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewChineseAnalyzer() *ChineseAnalyzer { return r } - -// true - -type ChineseAnalyzerVariant interface { - ChineseAnalyzerCaster() *ChineseAnalyzer -} - -func (s *ChineseAnalyzer) ChineseAnalyzerCaster() *ChineseAnalyzer { - return s -} diff --git a/typedapi/types/chisquareheuristic.go b/typedapi/types/chisquareheuristic.go index 2c923f0342..5ad8ec161e 100644 --- a/typedapi/types/chisquareheuristic.go +++ b/typedapi/types/chisquareheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ChiSquareHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L782-L791 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L782-L791 type ChiSquareHeuristic struct { // BackgroundIsSuperset Set to `false` if you defined a custom background filter that represents a // different set of documents that you want to compare to. @@ -95,13 +95,3 @@ func NewChiSquareHeuristic() *ChiSquareHeuristic { return r } - -// true - -type ChiSquareHeuristicVariant interface { - ChiSquareHeuristicCaster() *ChiSquareHeuristic -} - -func (s *ChiSquareHeuristic) ChiSquareHeuristicCaster() *ChiSquareHeuristic { - return s -} diff --git a/typedapi/types/chunkingconfig.go b/typedapi/types/chunkingconfig.go index a51a974de2..25a01478bd 100644 --- a/typedapi/types/chunkingconfig.go +++ b/typedapi/types/chunkingconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ChunkingConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L251-L264 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L251-L264 type ChunkingConfig struct { // Mode If the mode is `auto`, the chunk size is dynamically calculated; // this is the recommended value when the datafeed does not use aggregations. @@ -82,13 +82,3 @@ func NewChunkingConfig() *ChunkingConfig { return r } - -// true - -type ChunkingConfigVariant interface { - ChunkingConfigCaster() *ChunkingConfig -} - -func (s *ChunkingConfig) ChunkingConfigCaster() *ChunkingConfig { - return s -} diff --git a/typedapi/types/chunkingsettings.go b/typedapi/types/chunkingsettings.go index d0f2e51c18..bff81c3d9f 100644 --- a/typedapi/types/chunkingsettings.go +++ b/typedapi/types/chunkingsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ChunkingSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/ChunkingSettings.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/ChunkingSettings.ts#L24-L32 type ChunkingSettings struct { // MaxChunkSize The maximum size of a chunk in words. // This value cannot be higher than `300` or lower than `20` (for `sentence` @@ -135,13 +135,3 @@ func NewChunkingSettings() *ChunkingSettings { return r } - -// true - -type ChunkingSettingsVariant interface { - ChunkingSettingsCaster() *ChunkingSettings -} - -func (s *ChunkingSettings) ChunkingSettingsCaster() *ChunkingSettings { - return s -} diff --git a/typedapi/types/circleprocessor.go b/typedapi/types/circleprocessor.go index d693709c7a..a1b9f1592f 100644 --- a/typedapi/types/circleprocessor.go +++ b/typedapi/types/circleprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CircleProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L573-L596 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L573-L596 type CircleProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -191,13 +191,3 @@ func NewCircleProcessor() *CircleProcessor { return r } - -// true - -type CircleProcessorVariant interface { - CircleProcessorCaster() *CircleProcessor -} - -func (s *CircleProcessor) CircleProcessorCaster() *CircleProcessor { - return s -} diff --git a/typedapi/types/cjkanalyzer.go b/typedapi/types/cjkanalyzer.go index 5b98e4bc2c..341ada9f34 100644 --- a/typedapi/types/cjkanalyzer.go +++ b/typedapi/types/cjkanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // CjkAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L106-L110 type CjkAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *CjkAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *CjkAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewCjkAnalyzer() *CjkAnalyzer { return r } - -// true - -type CjkAnalyzerVariant interface { - CjkAnalyzerCaster() *CjkAnalyzer -} - -func (s *CjkAnalyzer) CjkAnalyzerCaster() *CjkAnalyzer { - return s -} diff --git a/typedapi/types/cjkbigramtokenfilter.go b/typedapi/types/cjkbigramtokenfilter.go new file mode 100644 index 0000000000..b5d1f93301 --- /dev/null +++ b/typedapi/types/cjkbigramtokenfilter.go @@ -0,0 +1,117 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/cjkbigramignoredscript" +) + +// CjkBigramTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L466-L472 +type CjkBigramTokenFilter struct { + // IgnoredScripts Array of character scripts for which to disable bigrams. + IgnoredScripts []cjkbigramignoredscript.CjkBigramIgnoredScript `json:"ignored_scripts,omitempty"` + // OutputUnigrams If `true`, emit tokens in both bigram and unigram form. If `false`, a CJK + // character is output in unigram form when it has no adjacent characters. + // Defaults to `false`. + OutputUnigrams *bool `json:"output_unigrams,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *CjkBigramTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "ignored_scripts": + if err := dec.Decode(&s.IgnoredScripts); err != nil { + return fmt.Errorf("%s | %w", "IgnoredScripts", err) + } + + case "output_unigrams": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "OutputUnigrams", err) + } + s.OutputUnigrams = &value + case bool: + s.OutputUnigrams = &v + } + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s CjkBigramTokenFilter) MarshalJSON() ([]byte, error) { + type innerCjkBigramTokenFilter CjkBigramTokenFilter + tmp := innerCjkBigramTokenFilter{ + IgnoredScripts: s.IgnoredScripts, + OutputUnigrams: s.OutputUnigrams, + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "cjk_bigram" + + return json.Marshal(tmp) +} + +// NewCjkBigramTokenFilter returns a CjkBigramTokenFilter. +func NewCjkBigramTokenFilter() *CjkBigramTokenFilter { + r := &CjkBigramTokenFilter{} + + return r +} diff --git a/typedapi/types/cjkwidthtokenfilter.go b/typedapi/types/cjkwidthtokenfilter.go new file mode 100644 index 0000000000..891fde7fce --- /dev/null +++ b/typedapi/types/cjkwidthtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CjkWidthTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L474-L476 +type CjkWidthTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *CjkWidthTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s CjkWidthTokenFilter) MarshalJSON() ([]byte, error) { + type innerCjkWidthTokenFilter CjkWidthTokenFilter + tmp := innerCjkWidthTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "cjk_width" + + return json.Marshal(tmp) +} + +// NewCjkWidthTokenFilter returns a CjkWidthTokenFilter. +func NewCjkWidthTokenFilter() *CjkWidthTokenFilter { + r := &CjkWidthTokenFilter{} + + return r +} diff --git a/typedapi/types/classictokenfilter.go b/typedapi/types/classictokenfilter.go new file mode 100644 index 0000000000..13eb4ea0fa --- /dev/null +++ b/typedapi/types/classictokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ClassicTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L478-L480 +type ClassicTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ClassicTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ClassicTokenFilter) MarshalJSON() ([]byte, error) { + type innerClassicTokenFilter ClassicTokenFilter + tmp := innerClassicTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "classic" + + return json.Marshal(tmp) +} + +// NewClassicTokenFilter returns a ClassicTokenFilter. +func NewClassicTokenFilter() *ClassicTokenFilter { + r := &ClassicTokenFilter{} + + return r +} diff --git a/typedapi/types/classictokenizer.go b/typedapi/types/classictokenizer.go index 489a35fdec..21ce8a1aa2 100644 --- a/typedapi/types/classictokenizer.go +++ b/typedapi/types/classictokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClassicTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L40-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L40-L46 type ClassicTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -104,13 +104,3 @@ func NewClassicTokenizer() *ClassicTokenizer { return r } - -// true - -type ClassicTokenizerVariant interface { - ClassicTokenizerCaster() *ClassicTokenizer -} - -func (s *ClassicTokenizer) ClassicTokenizerCaster() *ClassicTokenizer { - return s -} diff --git a/typedapi/types/classificationinferenceoptions.go b/typedapi/types/classificationinferenceoptions.go index 375e4eb5b3..c3c36a65fc 100644 --- a/typedapi/types/classificationinferenceoptions.go +++ b/typedapi/types/classificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L118-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L118-L133 type ClassificationInferenceOptions struct { // NumTopClasses Specifies the number of top class predictions to return. Defaults to 0. NumTopClasses *int `json:"num_top_classes,omitempty"` @@ -143,13 +143,3 @@ func NewClassificationInferenceOptions() *ClassificationInferenceOptions { return r } - -// true - -type ClassificationInferenceOptionsVariant interface { - ClassificationInferenceOptionsCaster() *ClassificationInferenceOptions -} - -func (s *ClassificationInferenceOptions) ClassificationInferenceOptionsCaster() *ClassificationInferenceOptions { - return s -} diff --git a/typedapi/types/cleanuprepositoryresults.go b/typedapi/types/cleanuprepositoryresults.go index a20ef7831a..6e4d50e2fe 100644 --- a/typedapi/types/cleanuprepositoryresults.go +++ b/typedapi/types/cleanuprepositoryresults.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CleanupRepositoryResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L34 type CleanupRepositoryResults struct { // DeletedBlobs Number of binary large objects (blobs) removed during cleanup. DeletedBlobs int64 `json:"deleted_blobs"` @@ -95,5 +95,3 @@ func NewCleanupRepositoryResults() *CleanupRepositoryResults { return r } - -// false diff --git a/typedapi/types/client.go b/typedapi/types/client.go index 7cae6a5a54..73971198c4 100644 --- a/typedapi/types/client.go +++ b/typedapi/types/client.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Client type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L720-L767 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L722-L769 type Client struct { // Agent Reported agent for the HTTP client. // If unavailable, this property is not included in the response. @@ -235,5 +235,3 @@ func NewClient() *Client { return r } - -// false diff --git a/typedapi/types/closeindexresult.go b/typedapi/types/closeindexresult.go index a4ac2c4781..2dd54e44b6 100644 --- a/typedapi/types/closeindexresult.go +++ b/typedapi/types/closeindexresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CloseIndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/close/CloseIndexResponse.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/close/CloseIndexResponse.ts#L32-L35 type CloseIndexResult struct { Closed bool `json:"closed"` Shards map[string]CloseShardResult `json:"shards,omitempty"` @@ -87,5 +87,3 @@ func NewCloseIndexResult() *CloseIndexResult { return r } - -// false diff --git a/typedapi/types/closeshardresult.go b/typedapi/types/closeshardresult.go index 22e6436b44..5c94bc4d54 100644 --- a/typedapi/types/closeshardresult.go +++ b/typedapi/types/closeshardresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // CloseShardResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/close/CloseIndexResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/close/CloseIndexResponse.ts#L37-L39 type CloseShardResult struct { Failures []ShardFailure `json:"failures"` } @@ -33,5 +33,3 @@ func NewCloseShardResult() *CloseShardResult { return r } - -// false diff --git a/typedapi/types/clusterappliedstats.go b/typedapi/types/clusterappliedstats.go index 5128784fe2..a19d802043 100644 --- a/typedapi/types/clusterappliedstats.go +++ b/typedapi/types/clusterappliedstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterAppliedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L221-L223 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L223-L225 type ClusterAppliedStats struct { Recordings []Recording `json:"recordings,omitempty"` } @@ -33,5 +33,3 @@ func NewClusterAppliedStats() *ClusterAppliedStats { return r } - -// false diff --git a/typedapi/types/clustercomponenttemplate.go b/typedapi/types/clustercomponenttemplate.go index 1da7fe4630..f1b13fd15c 100644 --- a/typedapi/types/clustercomponenttemplate.go +++ b/typedapi/types/clustercomponenttemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ClusterComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/_types/ComponentTemplate.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/_types/ComponentTemplate.ts#L27-L30 type ClusterComponentTemplate struct { ComponentTemplate ComponentTemplateNode `json:"component_template"` Name string `json:"name"` @@ -72,5 +72,3 @@ func NewClusterComponentTemplate() *ClusterComponentTemplate { return r } - -// false diff --git a/typedapi/types/clusterdetails.go b/typedapi/types/clusterdetails.go index 0883b64b54..e6cdd7a813 100644 --- a/typedapi/types/clusterdetails.go +++ b/typedapi/types/clusterdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ClusterDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L45-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L45-L52 type ClusterDetails struct { Failures []ShardFailure `json:"failures,omitempty"` Indices string `json:"indices"` @@ -115,5 +115,3 @@ func NewClusterDetails() *ClusterDetails { return r } - -// false diff --git a/typedapi/types/clusterfilesystem.go b/typedapi/types/clusterfilesystem.go index c643dd1aeb..2eb1f8c70d 100644 --- a/typedapi/types/clusterfilesystem.go +++ b/typedapi/types/clusterfilesystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,19 +31,42 @@ import ( // ClusterFileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L34-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L35-L75 type ClusterFileSystem struct { + // Available Total number of bytes available to JVM in file stores across all selected + // nodes. + // Depending on operating system or process-level restrictions, this number may + // be less than `nodes.fs.free_in_byes`. + // This is the actual amount of free disk space the selected Elasticsearch nodes + // can use. + Available ByteSize `json:"available,omitempty"` // AvailableInBytes Total number of bytes available to JVM in file stores across all selected // nodes. // Depending on operating system or process-level restrictions, this number may // be less than `nodes.fs.free_in_byes`. // This is the actual amount of free disk space the selected Elasticsearch nodes // can use. - AvailableInBytes int64 `json:"available_in_bytes"` - // FreeInBytes Total number of unallocated bytes in file stores across all selected nodes. - FreeInBytes int64 `json:"free_in_bytes"` + AvailableInBytes *int64 `json:"available_in_bytes,omitempty"` + FloodStageFreeSpace ByteSize `json:"flood_stage_free_space,omitempty"` + FloodStageFreeSpaceInBytes *int64 `json:"flood_stage_free_space_in_bytes,omitempty"` + // Free Total number of unallocated bytes in file stores across all selected nodes. + Free ByteSize `json:"free,omitempty"` + // FreeInBytes Total number, in bytes, of unallocated bytes in file stores across all + // selected nodes. + FreeInBytes *int64 `json:"free_in_bytes,omitempty"` + FrozenFloodStageFreeSpace ByteSize `json:"frozen_flood_stage_free_space,omitempty"` + FrozenFloodStageFreeSpaceInBytes *int64 `json:"frozen_flood_stage_free_space_in_bytes,omitempty"` + HighWatermarkFreeSpace ByteSize `json:"high_watermark_free_space,omitempty"` + HighWatermarkFreeSpaceInBytes *int64 `json:"high_watermark_free_space_in_bytes,omitempty"` + LowWatermarkFreeSpace ByteSize `json:"low_watermark_free_space,omitempty"` + LowWatermarkFreeSpaceInBytes *int64 `json:"low_watermark_free_space_in_bytes,omitempty"` + Mount *string `json:"mount,omitempty"` + Path *string `json:"path,omitempty"` + // Total Total size of all file stores across all selected nodes. + Total ByteSize `json:"total,omitempty"` // TotalInBytes Total size, in bytes, of all file stores across all selected nodes. - TotalInBytes int64 `json:"total_in_bytes"` + TotalInBytes *int64 `json:"total_in_bytes,omitempty"` + Type *string `json:"type,omitempty"` } func (s *ClusterFileSystem) UnmarshalJSON(data []byte) error { @@ -61,6 +84,11 @@ func (s *ClusterFileSystem) UnmarshalJSON(data []byte) error { switch t { + case "available": + if err := dec.Decode(&s.Available); err != nil { + return fmt.Errorf("%s | %w", "Available", err) + } + case "available_in_bytes": var tmp any dec.Decode(&tmp) @@ -70,10 +98,35 @@ func (s *ClusterFileSystem) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "AvailableInBytes", err) } - s.AvailableInBytes = value + s.AvailableInBytes = &value case float64: f := int64(v) - s.AvailableInBytes = f + s.AvailableInBytes = &f + } + + case "flood_stage_free_space": + if err := dec.Decode(&s.FloodStageFreeSpace); err != nil { + return fmt.Errorf("%s | %w", "FloodStageFreeSpace", err) + } + + case "flood_stage_free_space_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "FloodStageFreeSpaceInBytes", err) + } + s.FloodStageFreeSpaceInBytes = &value + case float64: + f := int64(v) + s.FloodStageFreeSpaceInBytes = &f + } + + case "free": + if err := dec.Decode(&s.Free); err != nil { + return fmt.Errorf("%s | %w", "Free", err) } case "free_in_bytes": @@ -85,10 +138,99 @@ func (s *ClusterFileSystem) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "FreeInBytes", err) } - s.FreeInBytes = value + s.FreeInBytes = &value + case float64: + f := int64(v) + s.FreeInBytes = &f + } + + case "frozen_flood_stage_free_space": + if err := dec.Decode(&s.FrozenFloodStageFreeSpace); err != nil { + return fmt.Errorf("%s | %w", "FrozenFloodStageFreeSpace", err) + } + + case "frozen_flood_stage_free_space_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "FrozenFloodStageFreeSpaceInBytes", err) + } + s.FrozenFloodStageFreeSpaceInBytes = &value case float64: f := int64(v) - s.FreeInBytes = f + s.FrozenFloodStageFreeSpaceInBytes = &f + } + + case "high_watermark_free_space": + if err := dec.Decode(&s.HighWatermarkFreeSpace); err != nil { + return fmt.Errorf("%s | %w", "HighWatermarkFreeSpace", err) + } + + case "high_watermark_free_space_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "HighWatermarkFreeSpaceInBytes", err) + } + s.HighWatermarkFreeSpaceInBytes = &value + case float64: + f := int64(v) + s.HighWatermarkFreeSpaceInBytes = &f + } + + case "low_watermark_free_space": + if err := dec.Decode(&s.LowWatermarkFreeSpace); err != nil { + return fmt.Errorf("%s | %w", "LowWatermarkFreeSpace", err) + } + + case "low_watermark_free_space_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "LowWatermarkFreeSpaceInBytes", err) + } + s.LowWatermarkFreeSpaceInBytes = &value + case float64: + f := int64(v) + s.LowWatermarkFreeSpaceInBytes = &f + } + + case "mount": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Mount", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Mount = &o + + case "path": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Path", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Path = &o + + case "total": + if err := dec.Decode(&s.Total); err != nil { + return fmt.Errorf("%s | %w", "Total", err) } case "total_in_bytes": @@ -100,12 +242,24 @@ func (s *ClusterFileSystem) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "TotalInBytes", err) } - s.TotalInBytes = value + s.TotalInBytes = &value case float64: f := int64(v) - s.TotalInBytes = f + s.TotalInBytes = &f } + case "type": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Type = &o + } } return nil @@ -117,5 +271,3 @@ func NewClusterFileSystem() *ClusterFileSystem { return r } - -// false diff --git a/typedapi/types/clusterindexingpressure.go b/typedapi/types/clusterindexingpressure.go index 28270d83cc..ebf397adde 100644 --- a/typedapi/types/clusterindexingpressure.go +++ b/typedapi/types/clusterindexingpressure.go @@ -16,15 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L570-L572 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L765-L767 type ClusterIndexingPressure struct { - Memory ClusterPressureMemory `json:"memory"` + Memory NodesIndexingPressureMemory `json:"memory"` } // NewClusterIndexingPressure returns a ClusterIndexingPressure. @@ -33,5 +33,3 @@ func NewClusterIndexingPressure() *ClusterIndexingPressure { return r } - -// false diff --git a/typedapi/types/clusterindices.go b/typedapi/types/clusterindices.go index 873b12e79d..82a8a55c52 100644 --- a/typedapi/types/clusterindices.go +++ b/typedapi/types/clusterindices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,27 +31,37 @@ import ( // ClusterIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L74-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L100-L147 type ClusterIndices struct { // Analysis Contains statistics about analyzers and analyzer components used in selected // nodes. - Analysis CharFilterTypes `json:"analysis"` + Analysis *CharFilterTypes `json:"analysis,omitempty"` // Completion Contains statistics about memory used for completion in selected nodes. Completion CompletionStats `json:"completion"` // Count Total number of indices with shards assigned to selected nodes. Count int64 `json:"count"` + // DenseVector Contains statistics about indexed dense vector + DenseVector DenseVectorStats `json:"dense_vector"` // Docs Contains counts for documents in selected nodes. Docs DocStats `json:"docs"` // Fielddata Contains statistics about the field data cache of selected nodes. Fielddata FielddataStats `json:"fielddata"` // Mappings Contains statistics about field mappings in selected nodes. - Mappings FieldTypesMappings `json:"mappings"` + Mappings *FieldTypesMappings `json:"mappings,omitempty"` // QueryCache Contains statistics about the query cache of selected nodes. QueryCache QueryCacheStats `json:"query_cache"` + // Search Holds a snapshot of the search usage statistics. + // Used to hold the stats for a single node that's part of a + // ClusterStatsNodeResponse, as well as to + // accumulate stats for the entire cluster and return them as part of the + // ClusterStatsResponse. + Search SearchUsageStats `json:"search"` // Segments Contains statistics about segments in selected nodes. Segments SegmentsStats `json:"segments"` // Shards Contains statistics about indices with shards assigned to selected nodes. Shards ClusterIndicesShards `json:"shards"` + // SparseVector Contains statistics about indexed sparse vector + SparseVector SparseVectorStats `json:"sparse_vector"` // Store Contains statistics about the size of shards assigned to selected nodes. Store StoreStats `json:"store"` // Versions Contains statistics about analyzers and analyzer components used in selected @@ -99,6 +109,11 @@ func (s *ClusterIndices) UnmarshalJSON(data []byte) error { s.Count = f } + case "dense_vector": + if err := dec.Decode(&s.DenseVector); err != nil { + return fmt.Errorf("%s | %w", "DenseVector", err) + } + case "docs": if err := dec.Decode(&s.Docs); err != nil { return fmt.Errorf("%s | %w", "Docs", err) @@ -119,6 +134,11 @@ func (s *ClusterIndices) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "QueryCache", err) } + case "search": + if err := dec.Decode(&s.Search); err != nil { + return fmt.Errorf("%s | %w", "Search", err) + } + case "segments": if err := dec.Decode(&s.Segments); err != nil { return fmt.Errorf("%s | %w", "Segments", err) @@ -129,6 +149,11 @@ func (s *ClusterIndices) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Shards", err) } + case "sparse_vector": + if err := dec.Decode(&s.SparseVector); err != nil { + return fmt.Errorf("%s | %w", "SparseVector", err) + } + case "store": if err := dec.Decode(&s.Store); err != nil { return fmt.Errorf("%s | %w", "Store", err) @@ -150,5 +175,3 @@ func NewClusterIndices() *ClusterIndices { return r } - -// false diff --git a/typedapi/types/clusterindicesshards.go b/typedapi/types/clusterindicesshards.go index af4f01d392..5a03aa79a4 100644 --- a/typedapi/types/clusterindicesshards.go +++ b/typedapi/types/clusterindicesshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterIndicesShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L86-L98 type ClusterIndicesShards struct { // Index Contains statistics about shards assigned to selected nodes. Index *ClusterIndicesShardsIndex `json:"index,omitempty"` @@ -122,5 +122,3 @@ func NewClusterIndicesShards() *ClusterIndicesShards { return r } - -// false diff --git a/typedapi/types/clusterindicesshardsindex.go b/typedapi/types/clusterindicesshardsindex.go index f4a1a3493c..894c0cbb7b 100644 --- a/typedapi/types/clusterindicesshardsindex.go +++ b/typedapi/types/clusterindicesshardsindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterIndicesShardsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L51-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L77-L84 type ClusterIndicesShardsIndex struct { // Primaries Contains statistics about the number of primary shards assigned to selected // nodes. @@ -40,5 +40,3 @@ func NewClusterIndicesShardsIndex() *ClusterIndicesShardsIndex { return r } - -// false diff --git a/typedapi/types/clusterinfo.go b/typedapi/types/clusterinfo.go index 1be4c077b1..67f3568e79 100644 --- a/typedapi/types/clusterinfo.go +++ b/typedapi/types/clusterinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L49-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L49-L55 type ClusterInfo struct { Nodes map[string]NodeDiskUsage `json:"nodes"` ReservedSizes []ReservedSize `json:"reserved_sizes"` @@ -42,5 +42,3 @@ func NewClusterInfo() *ClusterInfo { return r } - -// false diff --git a/typedapi/types/clusterinfotargets.go b/typedapi/types/clusterinfotargets.go index 33bebb9736..de9e29e5ad 100644 --- a/typedapi/types/clusterinfotargets.go +++ b/typedapi/types/clusterinfotargets.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // ClusterInfoTargets type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L393-L393 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L395-L395 type ClusterInfoTargets []clusterinfotarget.ClusterInfoTarget diff --git a/typedapi/types/clusteringest.go b/typedapi/types/clusteringest.go index a843994336..49180af8dd 100644 --- a/typedapi/types/clusteringest.go +++ b/typedapi/types/clusteringest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L270-L273 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L367-L370 type ClusterIngest struct { NumberOfPipelines int `json:"number_of_pipelines"` ProcessorStats map[string]ClusterProcessor `json:"processor_stats"` @@ -89,5 +89,3 @@ func NewClusterIngest() *ClusterIngest { return r } - -// false diff --git a/typedapi/types/clusterjvm.go b/typedapi/types/clusterjvm.go index f3fc16daf4..d2cd9b7568 100644 --- a/typedapi/types/clusterjvm.go +++ b/typedapi/types/clusterjvm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,8 +31,10 @@ import ( // ClusterJvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L275-L292 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L372-L393 type ClusterJvm struct { + // MaxUptime Uptime duration since JVM last started. + MaxUptime Duration `json:"max_uptime,omitempty"` // MaxUptimeInMillis Uptime duration, in milliseconds, since JVM last started. MaxUptimeInMillis int64 `json:"max_uptime_in_millis"` // Mem Contains statistics about memory used by selected nodes. @@ -58,6 +60,11 @@ func (s *ClusterJvm) UnmarshalJSON(data []byte) error { switch t { + case "max_uptime": + if err := dec.Decode(&s.MaxUptime); err != nil { + return fmt.Errorf("%s | %w", "MaxUptime", err) + } + case "max_uptime_in_millis": if err := dec.Decode(&s.MaxUptimeInMillis); err != nil { return fmt.Errorf("%s | %w", "MaxUptimeInMillis", err) @@ -99,5 +106,3 @@ func NewClusterJvm() *ClusterJvm { return r } - -// false diff --git a/typedapi/types/clusterjvmmemory.go b/typedapi/types/clusterjvmmemory.go index e05e4b40ea..71f37ec1a3 100644 --- a/typedapi/types/clusterjvmmemory.go +++ b/typedapi/types/clusterjvmmemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,16 @@ import ( // ClusterJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L294-L303 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L395-L412 type ClusterJvmMemory struct { + // HeapMax Maximum amount of memory available for use by the heap across all selected + // nodes. + HeapMax ByteSize `json:"heap_max,omitempty"` // HeapMaxInBytes Maximum amount of memory, in bytes, available for use by the heap across all // selected nodes. HeapMaxInBytes int64 `json:"heap_max_in_bytes"` + // HeapUsed Memory currently in use by the heap across all selected nodes. + HeapUsed ByteSize `json:"heap_used,omitempty"` // HeapUsedInBytes Memory, in bytes, currently in use by the heap across all selected nodes. HeapUsedInBytes int64 `json:"heap_used_in_bytes"` } @@ -55,6 +60,11 @@ func (s *ClusterJvmMemory) UnmarshalJSON(data []byte) error { switch t { + case "heap_max": + if err := dec.Decode(&s.HeapMax); err != nil { + return fmt.Errorf("%s | %w", "HeapMax", err) + } + case "heap_max_in_bytes": var tmp any dec.Decode(&tmp) @@ -70,6 +80,11 @@ func (s *ClusterJvmMemory) UnmarshalJSON(data []byte) error { s.HeapMaxInBytes = f } + case "heap_used": + if err := dec.Decode(&s.HeapUsed); err != nil { + return fmt.Errorf("%s | %w", "HeapUsed", err) + } + case "heap_used_in_bytes": var tmp any dec.Decode(&tmp) @@ -96,5 +111,3 @@ func NewClusterJvmMemory() *ClusterJvmMemory { return r } - -// false diff --git a/typedapi/types/clusterjvmversion.go b/typedapi/types/clusterjvmversion.go index be183aaf38..ab683d6d9b 100644 --- a/typedapi/types/clusterjvmversion.go +++ b/typedapi/types/clusterjvmversion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterJvmVersion type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L305-L335 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L414-L444 type ClusterJvmVersion struct { // BundledJdk Always `true`. All distributions come with a bundled Java Development Kit // (JDK). @@ -156,5 +156,3 @@ func NewClusterJvmVersion() *ClusterJvmVersion { return r } - -// false diff --git a/typedapi/types/clusternetworktypes.go b/typedapi/types/clusternetworktypes.go index 2733c06ccc..7526d853b0 100644 --- a/typedapi/types/clusternetworktypes.go +++ b/typedapi/types/clusternetworktypes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterNetworkTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L337-L346 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L446-L455 type ClusterNetworkTypes struct { // HttpTypes Contains statistics about the HTTP network types used by selected nodes. HttpTypes map[string]int `json:"http_types"` @@ -39,5 +39,3 @@ func NewClusterNetworkTypes() *ClusterNetworkTypes { return r } - -// false diff --git a/typedapi/types/clusternode.go b/typedapi/types/clusternode.go index 7c405a775b..41c9da79d2 100644 --- a/typedapi/types/clusternode.go +++ b/typedapi/types/clusternode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ClusterNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/ClusterNode.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/ClusterNode.ts#L22-L24 type ClusterNode struct { Name string `json:"name"` } @@ -66,5 +66,3 @@ func NewClusterNode() *ClusterNode { return r } - -// false diff --git a/typedapi/types/clusternodecount.go b/typedapi/types/clusternodecount.go index 7f8d088acb..ff1bff11e5 100644 --- a/typedapi/types/clusternodecount.go +++ b/typedapi/types/clusternodecount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,22 +31,24 @@ import ( // ClusterNodeCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L348-L367 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L457-L478 type ClusterNodeCount struct { - CoordinatingOnly int `json:"coordinating_only"` - Data int `json:"data"` - DataCold int `json:"data_cold"` - DataContent int `json:"data_content"` + CoordinatingOnly *int `json:"coordinating_only,omitempty"` + Data *int `json:"data,omitempty"` + DataCold *int `json:"data_cold,omitempty"` + DataContent *int `json:"data_content,omitempty"` DataFrozen *int `json:"data_frozen,omitempty"` - DataHot int `json:"data_hot"` - DataWarm int `json:"data_warm"` - Ingest int `json:"ingest"` - Master int `json:"master"` - Ml int `json:"ml"` - RemoteClusterClient int `json:"remote_cluster_client"` + DataHot *int `json:"data_hot,omitempty"` + DataWarm *int `json:"data_warm,omitempty"` + Index *int `json:"index,omitempty"` + Ingest *int `json:"ingest,omitempty"` + Master *int `json:"master,omitempty"` + Ml *int `json:"ml,omitempty"` + RemoteClusterClient *int `json:"remote_cluster_client,omitempty"` + Search *int `json:"search,omitempty"` Total int `json:"total"` - Transform int `json:"transform"` - VotingOnly int `json:"voting_only"` + Transform *int `json:"transform,omitempty"` + VotingOnly *int `json:"voting_only,omitempty"` } func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { @@ -74,10 +76,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "CoordinatingOnly", err) } - s.CoordinatingOnly = value + s.CoordinatingOnly = &value case float64: f := int(v) - s.CoordinatingOnly = f + s.CoordinatingOnly = &f } case "data": @@ -90,10 +92,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Data", err) } - s.Data = value + s.Data = &value case float64: f := int(v) - s.Data = f + s.Data = &f } case "data_cold": @@ -106,10 +108,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "DataCold", err) } - s.DataCold = value + s.DataCold = &value case float64: f := int(v) - s.DataCold = f + s.DataCold = &f } case "data_content": @@ -122,10 +124,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "DataContent", err) } - s.DataContent = value + s.DataContent = &value case float64: f := int(v) - s.DataContent = f + s.DataContent = &f } case "data_frozen": @@ -154,10 +156,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "DataHot", err) } - s.DataHot = value + s.DataHot = &value case float64: f := int(v) - s.DataHot = f + s.DataHot = &f } case "data_warm": @@ -170,10 +172,26 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "DataWarm", err) } - s.DataWarm = value + s.DataWarm = &value case float64: f := int(v) - s.DataWarm = f + s.DataWarm = &f + } + + case "index": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Index", err) + } + s.Index = &value + case float64: + f := int(v) + s.Index = &f } case "ingest": @@ -186,10 +204,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Ingest", err) } - s.Ingest = value + s.Ingest = &value case float64: f := int(v) - s.Ingest = f + s.Ingest = &f } case "master": @@ -202,10 +220,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Master", err) } - s.Master = value + s.Master = &value case float64: f := int(v) - s.Master = f + s.Master = &f } case "ml": @@ -218,10 +236,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Ml", err) } - s.Ml = value + s.Ml = &value case float64: f := int(v) - s.Ml = f + s.Ml = &f } case "remote_cluster_client": @@ -234,10 +252,26 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "RemoteClusterClient", err) } - s.RemoteClusterClient = value + s.RemoteClusterClient = &value case float64: f := int(v) - s.RemoteClusterClient = f + s.RemoteClusterClient = &f + } + + case "search": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Search", err) + } + s.Search = &value + case float64: + f := int(v) + s.Search = &f } case "total": @@ -266,10 +300,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "Transform", err) } - s.Transform = value + s.Transform = &value case float64: f := int(v) - s.Transform = f + s.Transform = &f } case "voting_only": @@ -282,10 +316,10 @@ func (s *ClusterNodeCount) UnmarshalJSON(data []byte) error { if err != nil { return fmt.Errorf("%s | %w", "VotingOnly", err) } - s.VotingOnly = value + s.VotingOnly = &value case float64: f := int(v) - s.VotingOnly = f + s.VotingOnly = &f } } @@ -299,5 +333,3 @@ func NewClusterNodeCount() *ClusterNodeCount { return r } - -// false diff --git a/typedapi/types/clusternodes.go b/typedapi/types/clusternodes.go index d26f64ab00..cbe6e5ea19 100644 --- a/typedapi/types/clusternodes.go +++ b/typedapi/types/clusternodes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterNodes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L369-L402 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L480-L513 type ClusterNodes struct { // Count Contains counts for nodes selected by the request’s node filters. Count ClusterNodeCount `json:"count"` @@ -60,5 +60,3 @@ func NewClusterNodes() *ClusterNodes { return r } - -// false diff --git a/typedapi/types/clusteroperatingsystem.go b/typedapi/types/clusteroperatingsystem.go index 500c24b092..386183bfe5 100644 --- a/typedapi/types/clusteroperatingsystem.go +++ b/typedapi/types/clusteroperatingsystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L415-L442 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L526-L553 type ClusterOperatingSystem struct { // AllocatedProcessors Number of processors used to calculate thread pool size across all selected // nodes. @@ -130,5 +130,3 @@ func NewClusterOperatingSystem() *ClusterOperatingSystem { return r } - -// false diff --git a/typedapi/types/clusteroperatingsystemarchitecture.go b/typedapi/types/clusteroperatingsystemarchitecture.go index 1dcd2208d5..67f5516006 100644 --- a/typedapi/types/clusteroperatingsystemarchitecture.go +++ b/typedapi/types/clusteroperatingsystemarchitecture.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemArchitecture type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L404-L413 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L515-L524 type ClusterOperatingSystemArchitecture struct { // Arch Name of an architecture used by one or more selected nodes. Arch string `json:"arch"` @@ -93,5 +93,3 @@ func NewClusterOperatingSystemArchitecture() *ClusterOperatingSystemArchitecture return r } - -// false diff --git a/typedapi/types/clusteroperatingsystemname.go b/typedapi/types/clusteroperatingsystemname.go index 631174de64..fb23298ada 100644 --- a/typedapi/types/clusteroperatingsystemname.go +++ b/typedapi/types/clusteroperatingsystemname.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemName type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L444-L453 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L555-L564 type ClusterOperatingSystemName struct { // Count Number of selected nodes using the operating system. Count int `json:"count"` @@ -86,5 +86,3 @@ func NewClusterOperatingSystemName() *ClusterOperatingSystemName { return r } - -// false diff --git a/typedapi/types/clusteroperatingsystemprettyname.go b/typedapi/types/clusteroperatingsystemprettyname.go index 3c15b7f21b..b6a983d2ac 100644 --- a/typedapi/types/clusteroperatingsystemprettyname.go +++ b/typedapi/types/clusteroperatingsystemprettyname.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemPrettyName type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L455-L464 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L566-L575 type ClusterOperatingSystemPrettyName struct { // Count Number of selected nodes using the operating system. Count int `json:"count"` @@ -87,5 +87,3 @@ func NewClusterOperatingSystemPrettyName() *ClusterOperatingSystemPrettyName { return r } - -// false diff --git a/typedapi/types/clusterprocess.go b/typedapi/types/clusterprocess.go index 4c3435a21c..fdb9233283 100644 --- a/typedapi/types/clusterprocess.go +++ b/typedapi/types/clusterprocess.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ClusterProcess type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L466-L475 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L577-L586 type ClusterProcess struct { // Cpu Contains statistics about CPU used by selected nodes. Cpu ClusterProcessCpu `json:"cpu"` @@ -36,5 +36,3 @@ func NewClusterProcess() *ClusterProcess { return r } - -// false diff --git a/typedapi/types/clusterprocesscpu.go b/typedapi/types/clusterprocesscpu.go index 27d70d0f91..6077f7ae6b 100644 --- a/typedapi/types/clusterprocesscpu.go +++ b/typedapi/types/clusterprocesscpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterProcessCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L477-L483 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L588-L594 type ClusterProcessCpu struct { // Percent Percentage of CPU used across all selected nodes. // Returns `-1` if not supported. @@ -80,5 +80,3 @@ func NewClusterProcessCpu() *ClusterProcessCpu { return r } - -// false diff --git a/typedapi/types/clusterprocessopenfiledescriptors.go b/typedapi/types/clusterprocessopenfiledescriptors.go index fb1e3b5c95..1a95fce40f 100644 --- a/typedapi/types/clusterprocessopenfiledescriptors.go +++ b/typedapi/types/clusterprocessopenfiledescriptors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterProcessOpenFileDescriptors type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L485-L501 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L596-L612 type ClusterProcessOpenFileDescriptors struct { // Avg Average number of concurrently open file descriptors. // Returns `-1` if not supported. @@ -117,5 +117,3 @@ func NewClusterProcessOpenFileDescriptors() *ClusterProcessOpenFileDescriptors { return r } - -// false diff --git a/typedapi/types/clusterprocessor.go b/typedapi/types/clusterprocessor.go index 2f213539cb..c8ee96d765 100644 --- a/typedapi/types/clusterprocessor.go +++ b/typedapi/types/clusterprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L503-L509 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L614-L620 type ClusterProcessor struct { Count int64 `json:"count"` Current int64 `json:"current"` @@ -121,5 +121,3 @@ func NewClusterProcessor() *ClusterProcessor { return r } - -// false diff --git a/typedapi/types/clusterremoteinfo.go b/typedapi/types/clusterremoteinfo.go index 514fa0a7d7..7f763563db 100644 --- a/typedapi/types/clusterremoteinfo.go +++ b/typedapi/types/clusterremoteinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // ClusterRemoteSniffInfo // ClusterRemoteProxyInfo // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 type ClusterRemoteInfo any diff --git a/typedapi/types/clusterremoteproxyinfo.go b/typedapi/types/clusterremoteproxyinfo.go index b424c0db1b..5560a36b06 100644 --- a/typedapi/types/clusterremoteproxyinfo.go +++ b/typedapi/types/clusterremoteproxyinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteProxyInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L58-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L58-L83 type ClusterRemoteProxyInfo struct { // ClusterCredentials This field is present and has a value of `::es_redacted::` only when the // remote cluster is configured with the API key based model. Otherwise, the @@ -214,5 +214,3 @@ func NewClusterRemoteProxyInfo() *ClusterRemoteProxyInfo { return r } - -// false diff --git a/typedapi/types/clusterremotesniffinfo.go b/typedapi/types/clusterremotesniffinfo.go index dc0578593e..b335ae2c73 100644 --- a/typedapi/types/clusterremotesniffinfo.go +++ b/typedapi/types/clusterremotesniffinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteSniffInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L56 type ClusterRemoteSniffInfo struct { // Connected If it is `true`, there is at least one open connection to the remote cluster. // If it is `false`, it means that the cluster no longer has an open connection @@ -176,5 +176,3 @@ func NewClusterRemoteSniffInfo() *ClusterRemoteSniffInfo { return r } - -// false diff --git a/typedapi/types/clusterruntimefieldtypes.go b/typedapi/types/clusterruntimefieldtypes.go index f293ab1564..71d45c07c2 100644 --- a/typedapi/types/clusterruntimefieldtypes.go +++ b/typedapi/types/clusterruntimefieldtypes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L169-L226 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L256-L313 type ClusterRuntimeFieldTypes struct { // CharsMax Maximum number of characters for a single runtime field script. CharsMax int `json:"chars_max"` @@ -296,5 +296,3 @@ func NewClusterRuntimeFieldTypes() *ClusterRuntimeFieldTypes { return r } - -// false diff --git a/typedapi/types/clustershardmetrics.go b/typedapi/types/clustershardmetrics.go index e1214ed908..96cd165f40 100644 --- a/typedapi/types/clustershardmetrics.go +++ b/typedapi/types/clustershardmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterShardMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L511-L524 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L622-L635 type ClusterShardMetrics struct { // Avg Mean number of shards in an index, counting only shards assigned to selected // nodes. @@ -118,5 +118,3 @@ func NewClusterShardMetrics() *ClusterShardMetrics { return r } - -// false diff --git a/typedapi/types/clustersnapshotstats.go b/typedapi/types/clustersnapshotstats.go new file mode 100644 index 0000000000..24928b0ea1 --- /dev/null +++ b/typedapi/types/clustersnapshotstats.go @@ -0,0 +1,38 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +// ClusterSnapshotStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L637-L640 +type ClusterSnapshotStats struct { + CurrentCounts SnapshotCurrentCounts `json:"current_counts"` + Repositories map[string]PerRepositoryStats `json:"repositories"` +} + +// NewClusterSnapshotStats returns a ClusterSnapshotStats. +func NewClusterSnapshotStats() *ClusterSnapshotStats { + r := &ClusterSnapshotStats{ + Repositories: make(map[string]PerRepositoryStats), + } + + return r +} diff --git a/typedapi/types/clusterstatequeue.go b/typedapi/types/clusterstatequeue.go index 9567149aac..dbb82b8e9c 100644 --- a/typedapi/types/clusterstatequeue.go +++ b/typedapi/types/clusterstatequeue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterStateQueue type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L248-L261 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L250-L263 type ClusterStateQueue struct { // Committed Number of committed cluster states in queue. Committed *int64 `json:"committed,omitempty"` @@ -112,5 +112,3 @@ func NewClusterStateQueue() *ClusterStateQueue { return r } - -// false diff --git a/typedapi/types/clusterstateupdate.go b/typedapi/types/clusterstateupdate.go index 96d559cbeb..153d2be5f4 100644 --- a/typedapi/types/clusterstateupdate.go +++ b/typedapi/types/clusterstateupdate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterStateUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L278-L343 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L280-L345 type ClusterStateUpdate struct { // CommitTime The cumulative amount of time spent waiting for a successful cluster state // update to commit, which measures the time from the start of each publication @@ -216,5 +216,3 @@ func NewClusterStateUpdate() *ClusterStateUpdate { return r } - -// false diff --git a/typedapi/types/clusterstatistics.go b/typedapi/types/clusterstatistics.go index c1d0c382af..7df3fadc6c 100644 --- a/typedapi/types/clusterstatistics.go +++ b/typedapi/types/clusterstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ClusterStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L27-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L27-L35 type ClusterStatistics struct { Details map[string]ClusterDetails `json:"details,omitempty"` Failed int `json:"failed"` @@ -174,5 +174,3 @@ func NewClusterStatistics() *ClusterStatistics { return r } - -// false diff --git a/typedapi/types/cohereservicesettings.go b/typedapi/types/cohereservicesettings.go index 37bfcd46fd..c623f121b4 100644 --- a/typedapi/types/cohereservicesettings.go +++ b/typedapi/types/cohereservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // CohereServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L572-L613 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L788-L831 type CohereServiceSettings struct { // ApiKey A valid API key for your Cohere account. // You can find or create your Cohere API keys on the Cohere API key settings @@ -48,6 +48,10 @@ type CohereServiceSettings struct { // recreate it with the same name and the updated API key. ApiKey string `json:"api_key"` // EmbeddingType For a `text_embedding` task, the types of embeddings you want to get back. + // Use `binary` for binary embeddings, which are encoded as bytes with signed + // int8 precision. + // Use `bit` for binary embeddings, which are encoded as bytes with signed int8 + // precision (this is a synonym of `binary`). // Use `byte` for signed int8 embeddings (this is a synonym of `int8`). // Use `float` for the default float embeddings. // Use `int8` for signed int8 embeddings. @@ -140,13 +144,3 @@ func NewCohereServiceSettings() *CohereServiceSettings { return r } - -// true - -type CohereServiceSettingsVariant interface { - CohereServiceSettingsCaster() *CohereServiceSettings -} - -func (s *CohereServiceSettings) CohereServiceSettingsCaster() *CohereServiceSettings { - return s -} diff --git a/typedapi/types/coheretasksettings.go b/typedapi/types/coheretasksettings.go index 239ed2b71f..36157c4206 100644 --- a/typedapi/types/coheretasksettings.go +++ b/typedapi/types/coheretasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // CohereTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L650-L682 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L870-L902 type CohereTaskSettings struct { // InputType For a `text_embedding` task, the type of input passed to the model. // Valid values are: @@ -135,13 +135,3 @@ func NewCohereTaskSettings() *CohereTaskSettings { return r } - -// true - -type CohereTaskSettingsVariant interface { - CohereTaskSettingsCaster() *CohereTaskSettings -} - -func (s *CohereTaskSettings) CohereTaskSettingsCaster() *CohereTaskSettings { - return s -} diff --git a/typedapi/types/collector.go b/typedapi/types/collector.go index ff9e6cb254..946ace8494 100644 --- a/typedapi/types/collector.go +++ b/typedapi/types/collector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Collector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L94-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L94-L99 type Collector struct { Children []Collector `json:"children,omitempty"` Name string `json:"name"` @@ -99,5 +99,3 @@ func NewCollector() *Collector { return r } - -// false diff --git a/typedapi/types/column.go b/typedapi/types/column.go index b498b3c472..00529e6e8a 100644 --- a/typedapi/types/column.go +++ b/typedapi/types/column.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Column type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/types.ts#L23-L26 type Column struct { Name string `json:"name"` Type string `json:"type"` @@ -80,5 +80,3 @@ func NewColumn() *Column { return r } - -// false diff --git a/typedapi/types/combinedfieldsquery.go b/typedapi/types/combinedfieldsquery.go index 568b72a853..bb52f39b45 100644 --- a/typedapi/types/combinedfieldsquery.go +++ b/typedapi/types/combinedfieldsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // CombinedFieldsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L472-L506 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L472-L506 type CombinedFieldsQuery struct { // AutoGenerateSynonymsPhraseQuery If true, match phrase queries are automatically created for multi-term // synonyms. @@ -162,13 +162,3 @@ func NewCombinedFieldsQuery() *CombinedFieldsQuery { return r } - -// true - -type CombinedFieldsQueryVariant interface { - CombinedFieldsQueryCaster() *CombinedFieldsQuery -} - -func (s *CombinedFieldsQuery) CombinedFieldsQueryCaster() *CombinedFieldsQuery { - return s -} diff --git a/typedapi/types/command.go b/typedapi/types/command.go index 48d31db3d4..b5e411c1f6 100644 --- a/typedapi/types/command.go +++ b/typedapi/types/command.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Command type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L22-L43 type Command struct { // AllocateEmptyPrimary Allocate an empty primary shard to a node. Accepts the index and shard for // index name and shard number, and node to allocate the shard to. Using this @@ -66,13 +66,3 @@ func NewCommand() *Command { return r } - -// true - -type CommandVariant interface { - CommandCaster() *Command -} - -func (s *Command) CommandCaster() *Command { - return s -} diff --git a/typedapi/types/commandallocateprimaryaction.go b/typedapi/types/commandallocateprimaryaction.go index 17c0126b48..3b68c7ce1c 100644 --- a/typedapi/types/commandallocateprimaryaction.go +++ b/typedapi/types/commandallocateprimaryaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CommandAllocatePrimaryAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L78-L84 type CommandAllocatePrimaryAction struct { // AcceptDataLoss If a node which has a copy of the data rejoins the cluster later on, that // data will be deleted. To ensure that these implications are well-understood, @@ -115,13 +115,3 @@ func NewCommandAllocatePrimaryAction() *CommandAllocatePrimaryAction { return r } - -// true - -type CommandAllocatePrimaryActionVariant interface { - CommandAllocatePrimaryActionCaster() *CommandAllocatePrimaryAction -} - -func (s *CommandAllocatePrimaryAction) CommandAllocatePrimaryActionCaster() *CommandAllocatePrimaryAction { - return s -} diff --git a/typedapi/types/commandallocatereplicaaction.go b/typedapi/types/commandallocatereplicaaction.go index fb80c39199..82ca28014d 100644 --- a/typedapi/types/commandallocatereplicaaction.go +++ b/typedapi/types/commandallocatereplicaaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CommandAllocateReplicaAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L69-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L69-L76 type CommandAllocateReplicaAction struct { Index string `json:"index"` Node string `json:"node"` @@ -97,13 +97,3 @@ func NewCommandAllocateReplicaAction() *CommandAllocateReplicaAction { return r } - -// true - -type CommandAllocateReplicaActionVariant interface { - CommandAllocateReplicaActionCaster() *CommandAllocateReplicaAction -} - -func (s *CommandAllocateReplicaAction) CommandAllocateReplicaActionCaster() *CommandAllocateReplicaAction { - return s -} diff --git a/typedapi/types/commandcancelaction.go b/typedapi/types/commandcancelaction.go index 5c9b3dcda2..cb6f8b7860 100644 --- a/typedapi/types/commandcancelaction.go +++ b/typedapi/types/commandcancelaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CommandCancelAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L45-L50 type CommandCancelAction struct { AllowPrimary *bool `json:"allow_primary,omitempty"` Index string `json:"index"` @@ -112,13 +112,3 @@ func NewCommandCancelAction() *CommandCancelAction { return r } - -// true - -type CommandCancelActionVariant interface { - CommandCancelActionCaster() *CommandCancelAction -} - -func (s *CommandCancelAction) CommandCancelActionCaster() *CommandCancelAction { - return s -} diff --git a/typedapi/types/commandmoveaction.go b/typedapi/types/commandmoveaction.go index ae82e7d9dd..5fa50b1290 100644 --- a/typedapi/types/commandmoveaction.go +++ b/typedapi/types/commandmoveaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CommandMoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L60-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L60-L67 type CommandMoveAction struct { // FromNode The node to move the shard from FromNode string `json:"from_node"` @@ -112,13 +112,3 @@ func NewCommandMoveAction() *CommandMoveAction { return r } - -// true - -type CommandMoveActionVariant interface { - CommandMoveActionCaster() *CommandMoveAction -} - -func (s *CommandMoveAction) CommandMoveActionCaster() *CommandMoveAction { - return s -} diff --git a/typedapi/types/commongramstokenfilter.go b/typedapi/types/commongramstokenfilter.go index bafabd1c91..6a4427ce02 100644 --- a/typedapi/types/commongramstokenfilter.go +++ b/typedapi/types/commongramstokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,14 +31,29 @@ import ( // CommonGramsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L174-L180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L219-L235 type CommonGramsTokenFilter struct { - CommonWords []string `json:"common_words,omitempty"` - CommonWordsPath *string `json:"common_words_path,omitempty"` - IgnoreCase *bool `json:"ignore_case,omitempty"` - QueryMode *bool `json:"query_mode,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // CommonWords A list of tokens. The filter generates bigrams for these tokens. + // Either this or the `common_words_path` parameter is required. + CommonWords []string `json:"common_words,omitempty"` + // CommonWordsPath Path to a file containing a list of tokens. The filter generates bigrams for + // these tokens. + // This path must be absolute or relative to the `config` location. The file + // must be UTF-8 encoded. Each token in the file must be separated by a line + // break. + // Either this or the `common_words` parameter is required. + CommonWordsPath *string `json:"common_words_path,omitempty"` + // IgnoreCase If `true`, matches for common words matching are case-insensitive. Defaults + // to `false`. + IgnoreCase *bool `json:"ignore_case,omitempty"` + // QueryMode If `true`, the filter excludes the following tokens from the output: + // - Unigrams for common words + // - Unigrams for terms followed by common words + // Defaults to `false`. We recommend enabling this parameter for search + // analyzers. + QueryMode *bool `json:"query_mode,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *CommonGramsTokenFilter) UnmarshalJSON(data []byte) error { @@ -139,13 +154,3 @@ func NewCommonGramsTokenFilter() *CommonGramsTokenFilter { return r } - -// true - -type CommonGramsTokenFilterVariant interface { - CommonGramsTokenFilterCaster() *CommonGramsTokenFilter -} - -func (s *CommonGramsTokenFilter) CommonGramsTokenFilterCaster() *CommonGramsTokenFilter { - return s -} diff --git a/typedapi/types/commontermsquery.go b/typedapi/types/commontermsquery.go index a7e8e2221d..b6b5f3ca0b 100644 --- a/typedapi/types/commontermsquery.go +++ b/typedapi/types/commontermsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CommonTermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L34-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L34-L44 type CommonTermsQuery struct { Analyzer *string `json:"analyzer,omitempty"` // Boost Floating point number used to decrease or increase the relevance scores of @@ -171,13 +171,3 @@ func NewCommonTermsQuery() *CommonTermsQuery { return r } - -// true - -type CommonTermsQueryVariant interface { - CommonTermsQueryCaster() *CommonTermsQuery -} - -func (s *CommonTermsQuery) CommonTermsQueryCaster() *CommonTermsQuery { - return s -} diff --git a/typedapi/types/communityidprocessor.go b/typedapi/types/communityidprocessor.go index 21e50039e9..d4d1634304 100644 --- a/typedapi/types/communityidprocessor.go +++ b/typedapi/types/communityidprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CommunityIDProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L598-L659 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L598-L659 type CommunityIDProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -231,13 +231,3 @@ func NewCommunityIDProcessor() *CommunityIDProcessor { return r } - -// true - -type CommunityIDProcessorVariant interface { - CommunityIDProcessorCaster() *CommunityIDProcessor -} - -func (s *CommunityIDProcessor) CommunityIDProcessorCaster() *CommunityIDProcessor { - return s -} diff --git a/typedapi/types/compactnodeinfo.go b/typedapi/types/compactnodeinfo.go index cc397ed975..4593aba9d5 100644 --- a/typedapi/types/compactnodeinfo.go +++ b/typedapi/types/compactnodeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // CompactNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L27-L29 type CompactNodeInfo struct { Name string `json:"name"` } @@ -66,5 +66,3 @@ func NewCompactNodeInfo() *CompactNodeInfo { return r } - -// false diff --git a/typedapi/types/completioncontext.go b/typedapi/types/completioncontext.go index cc236c7dfb..4ada7bfe23 100644 --- a/typedapi/types/completioncontext.go +++ b/typedapi/types/completioncontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L235-L264 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L235-L264 type CompletionContext struct { // Boost The factor by which the score of the suggestion should be boosted. // The score is computed by multiplying the boost with the suggestion weight. @@ -129,13 +129,3 @@ func NewCompletionContext() *CompletionContext { return r } - -// true - -type CompletionContextVariant interface { - CompletionContextCaster() *CompletionContext -} - -func (s *CompletionContext) CompletionContextCaster() *CompletionContext { - return s -} diff --git a/typedapi/types/completionproperty.go b/typedapi/types/completionproperty.go index 2c32c53ee7..f9d20f1484 100644 --- a/typedapi/types/completionproperty.go +++ b/typedapi/types/completionproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // CompletionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L33-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L33-L41 type CompletionProperty struct { Analyzer *string `json:"analyzer,omitempty"` Contexts []SuggestContext `json:"contexts,omitempty"` @@ -264,6 +264,12 @@ func (s *CompletionProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -663,6 +669,12 @@ func (s *CompletionProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -930,13 +942,3 @@ func NewCompletionProperty() *CompletionProperty { return r } - -// true - -type CompletionPropertyVariant interface { - CompletionPropertyCaster() *CompletionProperty -} - -func (s *CompletionProperty) CompletionPropertyCaster() *CompletionProperty { - return s -} diff --git a/typedapi/types/completionresult.go b/typedapi/types/completionresult.go index 6edb9baa6f..b66b483d8d 100644 --- a/typedapi/types/completionresult.go +++ b/typedapi/types/completionresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Results.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Results.ts#L77-L82 type CompletionResult struct { Result string `json:"result"` } @@ -74,5 +74,3 @@ func NewCompletionResult() *CompletionResult { return r } - -// false diff --git a/typedapi/types/completionstats.go b/typedapi/types/completionstats.go index 5d984745e3..6268752e17 100644 --- a/typedapi/types/completionstats.go +++ b/typedapi/types/completionstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L83-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L83-L93 type CompletionStats struct { Fields map[string]FieldSizeUsage `json:"fields,omitempty"` // Size Total amount of memory used for completion across all shards assigned to @@ -98,5 +98,3 @@ func NewCompletionStats() *CompletionStats { return r } - -// false diff --git a/typedapi/types/completionsuggest.go b/typedapi/types/completionsuggest.go index b9e616b0c3..0a7960faaf 100644 --- a/typedapi/types/completionsuggest.go +++ b/typedapi/types/completionsuggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L48-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L48-L55 type CompletionSuggest struct { Length int `json:"length"` Offset int `json:"offset"` @@ -125,5 +125,3 @@ func NewCompletionSuggest() *CompletionSuggest { return r } - -// false diff --git a/typedapi/types/completionsuggester.go b/typedapi/types/completionsuggester.go index fc69c22756..c6fc1cda18 100644 --- a/typedapi/types/completionsuggester.go +++ b/typedapi/types/completionsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L163-L181 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L163-L181 type CompletionSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. @@ -163,13 +163,3 @@ func NewCompletionSuggester() *CompletionSuggester { return r } - -// true - -type CompletionSuggesterVariant interface { - CompletionSuggesterCaster() *CompletionSuggester -} - -func (s *CompletionSuggester) CompletionSuggesterCaster() *CompletionSuggester { - return s -} diff --git a/typedapi/types/completionsuggestoption.go b/typedapi/types/completionsuggestoption.go index 43b470f3d7..31a4c42c45 100644 --- a/typedapi/types/completionsuggestoption.go +++ b/typedapi/types/completionsuggestoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L73-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L73-L84 type CompletionSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Contexts map[string][]Context `json:"contexts,omitempty"` @@ -175,5 +175,3 @@ func NewCompletionSuggestOption() *CompletionSuggestOption { return r } - -// false diff --git a/typedapi/types/completiontool.go b/typedapi/types/completiontool.go index 9c6470ed2c..83cf9039cd 100644 --- a/typedapi/types/completiontool.go +++ b/typedapi/types/completiontool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionTool type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L205-L217 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L278-L290 type CompletionTool struct { // Function The function definition. Function CompletionToolFunction `json:"function"` @@ -82,13 +82,3 @@ func NewCompletionTool() *CompletionTool { return r } - -// true - -type CompletionToolVariant interface { - CompletionToolCaster() *CompletionTool -} - -func (s *CompletionTool) CompletionToolCaster() *CompletionTool { - return s -} diff --git a/typedapi/types/completiontoolchoice.go b/typedapi/types/completiontoolchoice.go index b0c764f2c4..5256db3b15 100644 --- a/typedapi/types/completiontoolchoice.go +++ b/typedapi/types/completiontoolchoice.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionToolChoice type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L168-L180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L241-L253 type CompletionToolChoice struct { // Function The tool choice function. Function CompletionToolChoiceFunction `json:"function"` @@ -82,13 +82,3 @@ func NewCompletionToolChoice() *CompletionToolChoice { return r } - -// true - -type CompletionToolChoiceVariant interface { - CompletionToolChoiceCaster() *CompletionToolChoice -} - -func (s *CompletionToolChoice) CompletionToolChoiceCaster() *CompletionToolChoice { - return s -} diff --git a/typedapi/types/completiontoolchoicefunction.go b/typedapi/types/completiontoolchoicefunction.go index f26feee3ec..86a6f89ecb 100644 --- a/typedapi/types/completiontoolchoicefunction.go +++ b/typedapi/types/completiontoolchoicefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionToolChoiceFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L157-L166 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L230-L239 type CompletionToolChoiceFunction struct { // Name The name of the function to call. Name string `json:"name"` @@ -75,13 +75,3 @@ func NewCompletionToolChoiceFunction() *CompletionToolChoiceFunction { return r } - -// true - -type CompletionToolChoiceFunctionVariant interface { - CompletionToolChoiceFunctionCaster() *CompletionToolChoiceFunction -} - -func (s *CompletionToolChoiceFunction) CompletionToolChoiceFunctionCaster() *CompletionToolChoiceFunction { - return s -} diff --git a/typedapi/types/completiontoolfunction.go b/typedapi/types/completiontoolfunction.go index c08d52f0b6..39de86071d 100644 --- a/typedapi/types/completiontoolfunction.go +++ b/typedapi/types/completiontoolfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompletionToolFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L182-L203 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L255-L276 type CompletionToolFunction struct { // Description A description of what the function does. // This is used by the model to choose when and how to call the function. @@ -114,13 +114,3 @@ func NewCompletionToolFunction() *CompletionToolFunction { return r } - -// true - -type CompletionToolFunctionVariant interface { - CompletionToolFunctionCaster() *CompletionToolFunction -} - -func (s *CompletionToolFunction) CompletionToolFunctionCaster() *CompletionToolFunction { - return s -} diff --git a/typedapi/types/completiontooltype.go b/typedapi/types/completiontooltype.go index 45714f0d3e..95fa2d4b9b 100644 --- a/typedapi/types/completiontooltype.go +++ b/typedapi/types/completiontooltype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // CompletionToolChoice // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L79-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L118-L121 type CompletionToolType any - -type CompletionToolTypeVariant interface { - CompletionToolTypeCaster() *CompletionToolType -} diff --git a/typedapi/types/componenttemplatenode.go b/typedapi/types/componenttemplatenode.go index a25f686bad..c1fdfee92c 100644 --- a/typedapi/types/componenttemplatenode.go +++ b/typedapi/types/componenttemplatenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ComponentTemplateNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/_types/ComponentTemplate.ts#L32-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/_types/ComponentTemplate.ts#L32-L41 type ComponentTemplateNode struct { Deprecated *bool `json:"deprecated,omitempty"` Meta_ Metadata `json:"_meta,omitempty"` @@ -94,13 +94,3 @@ func NewComponentTemplateNode() *ComponentTemplateNode { return r } - -// true - -type ComponentTemplateNodeVariant interface { - ComponentTemplateNodeCaster() *ComponentTemplateNode -} - -func (s *ComponentTemplateNode) ComponentTemplateNodeCaster() *ComponentTemplateNode { - return s -} diff --git a/typedapi/types/componenttemplatesummary.go b/typedapi/types/componenttemplatesummary.go index 26ea74995d..4cf249562d 100644 --- a/typedapi/types/componenttemplatesummary.go +++ b/typedapi/types/componenttemplatesummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ComponentTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/_types/ComponentTemplate.ts#L43-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/_types/ComponentTemplate.ts#L43-L55 type ComponentTemplateSummary struct { Aliases map[string]AliasDefinition `json:"aliases,omitempty"` Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` @@ -105,13 +105,3 @@ func NewComponentTemplateSummary() *ComponentTemplateSummary { return r } - -// true - -type ComponentTemplateSummaryVariant interface { - ComponentTemplateSummaryCaster() *ComponentTemplateSummary -} - -func (s *ComponentTemplateSummary) ComponentTemplateSummaryCaster() *ComponentTemplateSummary { - return s -} diff --git a/typedapi/types/compositeaggregate.go b/typedapi/types/compositeaggregate.go index 20a0ff9546..ec5a7736ce 100644 --- a/typedapi/types/compositeaggregate.go +++ b/typedapi/types/compositeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // CompositeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L698-L703 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L700-L705 type CompositeAggregate struct { AfterKey CompositeAggregateKey `json:"after_key,omitempty"` Buckets BucketsCompositeBucket `json:"buckets"` @@ -94,5 +94,3 @@ func NewCompositeAggregate() *CompositeAggregate { return r } - -// false diff --git a/typedapi/types/compositeaggregatekey.go b/typedapi/types/compositeaggregatekey.go index 195ebb313d..207bd27fc0 100644 --- a/typedapi/types/compositeaggregatekey.go +++ b/typedapi/types/compositeaggregatekey.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // CompositeAggregateKey type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L128-L128 type CompositeAggregateKey map[string]FieldValue - -type CompositeAggregateKeyVariant interface { - CompositeAggregateKeyCaster() *CompositeAggregateKey -} diff --git a/typedapi/types/compositeaggregation.go b/typedapi/types/compositeaggregation.go index e451d990b1..7a8a7ccbfa 100644 --- a/typedapi/types/compositeaggregation.go +++ b/typedapi/types/compositeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CompositeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L130-L149 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L130-L149 type CompositeAggregation struct { // After When paginating, use the `after_key` value returned in the previous response // to retrieve the next page. @@ -95,13 +95,3 @@ func NewCompositeAggregation() *CompositeAggregation { return r } - -// true - -type CompositeAggregationVariant interface { - CompositeAggregationCaster() *CompositeAggregation -} - -func (s *CompositeAggregation) CompositeAggregationCaster() *CompositeAggregation { - return s -} diff --git a/typedapi/types/compositeaggregationsource.go b/typedapi/types/compositeaggregationsource.go index aba2246feb..bcd39d9940 100644 --- a/typedapi/types/compositeaggregationsource.go +++ b/typedapi/types/compositeaggregationsource.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // CompositeAggregationSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L151-L168 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L151-L168 type CompositeAggregationSource struct { // DateHistogram A date histogram aggregation. DateHistogram *CompositeDateHistogramAggregation `json:"date_histogram,omitempty"` @@ -40,13 +40,3 @@ func NewCompositeAggregationSource() *CompositeAggregationSource { return r } - -// true - -type CompositeAggregationSourceVariant interface { - CompositeAggregationSourceCaster() *CompositeAggregationSource -} - -func (s *CompositeAggregationSource) CompositeAggregationSourceCaster() *CompositeAggregationSource { - return s -} diff --git a/typedapi/types/compositebucket.go b/typedapi/types/compositebucket.go index 790b1698fe..454a3cb8b9 100644 --- a/typedapi/types/compositebucket.go +++ b/typedapi/types/compositebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // CompositeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L705-L707 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L707-L709 type CompositeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewCompositeBucket() *CompositeBucket { return r } - -// false diff --git a/typedapi/types/compositedatehistogramaggregation.go b/typedapi/types/compositedatehistogramaggregation.go index b9d0f26d16..a15a4cf04d 100644 --- a/typedapi/types/compositedatehistogramaggregation.go +++ b/typedapi/types/compositedatehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // CompositeDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L187-L195 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L187-L195 type CompositeDateHistogramAggregation struct { // CalendarInterval Either `calendar_interval` or `fixed_interval` must be present CalendarInterval *string `json:"calendar_interval,omitempty"` @@ -151,13 +151,3 @@ func NewCompositeDateHistogramAggregation() *CompositeDateHistogramAggregation { return r } - -// true - -type CompositeDateHistogramAggregationVariant interface { - CompositeDateHistogramAggregationCaster() *CompositeDateHistogramAggregation -} - -func (s *CompositeDateHistogramAggregation) CompositeDateHistogramAggregationCaster() *CompositeDateHistogramAggregation { - return s -} diff --git a/typedapi/types/compositegeotilegridaggregation.go b/typedapi/types/compositegeotilegridaggregation.go index 75fb1e57fc..4cf0637048 100644 --- a/typedapi/types/compositegeotilegridaggregation.go +++ b/typedapi/types/compositegeotilegridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // CompositeGeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L197-L200 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L197-L200 type CompositeGeoTileGridAggregation struct { Bounds GeoBounds `json:"bounds,omitempty"` // Field Either `field` or `script` must be present @@ -193,13 +193,3 @@ func NewCompositeGeoTileGridAggregation() *CompositeGeoTileGridAggregation { return r } - -// true - -type CompositeGeoTileGridAggregationVariant interface { - CompositeGeoTileGridAggregationCaster() *CompositeGeoTileGridAggregation -} - -func (s *CompositeGeoTileGridAggregation) CompositeGeoTileGridAggregationCaster() *CompositeGeoTileGridAggregation { - return s -} diff --git a/typedapi/types/compositehistogramaggregation.go b/typedapi/types/compositehistogramaggregation.go index 7c522847e7..ac7cdf33b5 100644 --- a/typedapi/types/compositehistogramaggregation.go +++ b/typedapi/types/compositehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // CompositeHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L183-L185 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L183-L185 type CompositeHistogramAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` @@ -129,13 +129,3 @@ func NewCompositeHistogramAggregation() *CompositeHistogramAggregation { return r } - -// true - -type CompositeHistogramAggregationVariant interface { - CompositeHistogramAggregationCaster() *CompositeHistogramAggregation -} - -func (s *CompositeHistogramAggregation) CompositeHistogramAggregationCaster() *CompositeHistogramAggregation { - return s -} diff --git a/typedapi/types/compositesubfield.go b/typedapi/types/compositesubfield.go index ec2ea96fe6..7d2cceb06e 100644 --- a/typedapi/types/compositesubfield.go +++ b/typedapi/types/compositesubfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // CompositeSubField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/RuntimeFields.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/RuntimeFields.ts#L52-L54 type CompositeSubField struct { Type runtimefieldtype.RuntimeFieldType `json:"type"` } @@ -37,13 +37,3 @@ func NewCompositeSubField() *CompositeSubField { return r } - -// true - -type CompositeSubFieldVariant interface { - CompositeSubFieldCaster() *CompositeSubField -} - -func (s *CompositeSubField) CompositeSubFieldCaster() *CompositeSubField { - return s -} diff --git a/typedapi/types/compositetermsaggregation.go b/typedapi/types/compositetermsaggregation.go index 528fe33015..5c35383340 100644 --- a/typedapi/types/compositetermsaggregation.go +++ b/typedapi/types/compositetermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // CompositeTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L181-L181 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L181-L181 type CompositeTermsAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` @@ -112,13 +112,3 @@ func NewCompositeTermsAggregation() *CompositeTermsAggregation { return r } - -// true - -type CompositeTermsAggregationVariant interface { - CompositeTermsAggregationCaster() *CompositeTermsAggregation -} - -func (s *CompositeTermsAggregation) CompositeTermsAggregationCaster() *CompositeTermsAggregation { - return s -} diff --git a/typedapi/types/conditiontokenfilter.go b/typedapi/types/conditiontokenfilter.go index def9ae5b66..601d5ba72f 100644 --- a/typedapi/types/conditiontokenfilter.go +++ b/typedapi/types/conditiontokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,12 +30,17 @@ import ( // ConditionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L182-L186 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L237-L243 type ConditionTokenFilter struct { - Filter []string `json:"filter"` - Script Script `json:"script"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // Filter Array of token filters. If a token matches the predicate script in the + // `script` parameter, these filters are applied to the token in the order + // provided. + Filter []string `json:"filter"` + // Script Predicate script used to apply token filters. If a token matches this script, + // the filters in the `filter` parameter are applied to the token. + Script Script `json:"script"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *ConditionTokenFilter) UnmarshalJSON(data []byte) error { @@ -99,13 +104,3 @@ func NewConditionTokenFilter() *ConditionTokenFilter { return r } - -// true - -type ConditionTokenFilterVariant interface { - ConditionTokenFilterCaster() *ConditionTokenFilter -} - -func (s *ConditionTokenFilter) ConditionTokenFilterCaster() *ConditionTokenFilter { - return s -} diff --git a/typedapi/types/configuration.go b/typedapi/types/configuration.go index 5e9380ba37..808246f007 100644 --- a/typedapi/types/configuration.go +++ b/typedapi/types/configuration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Configuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L109-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L109-L139 type Configuration struct { // FeatureStates A list of feature states to be included in this snapshot. A list of features // available for inclusion in the snapshot and their descriptions be can be @@ -158,13 +158,3 @@ func NewConfiguration() *Configuration { return r } - -// true - -type ConfigurationVariant interface { - ConfigurationCaster() *Configuration -} - -func (s *Configuration) ConfigurationCaster() *Configuration { - return s -} diff --git a/typedapi/types/confusionmatrixitem.go b/typedapi/types/confusionmatrixitem.go index bd7b003743..03a29a97ae 100644 --- a/typedapi/types/confusionmatrixitem.go +++ b/typedapi/types/confusionmatrixitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L125-L130 type ConfusionMatrixItem struct { ActualClass string `json:"actual_class"` ActualClassDocCount int `json:"actual_class_doc_count"` @@ -107,5 +107,3 @@ func NewConfusionMatrixItem() *ConfusionMatrixItem { return r } - -// false diff --git a/typedapi/types/confusionmatrixprediction.go b/typedapi/types/confusionmatrixprediction.go index f39a725de6..1306df6111 100644 --- a/typedapi/types/confusionmatrixprediction.go +++ b/typedapi/types/confusionmatrixprediction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixPrediction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L132-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L132-L135 type ConfusionMatrixPrediction struct { Count int `json:"count"` PredictedClass string `json:"predicted_class"` @@ -84,5 +84,3 @@ func NewConfusionMatrixPrediction() *ConfusionMatrixPrediction { return r } - -// false diff --git a/typedapi/types/confusionmatrixthreshold.go b/typedapi/types/confusionmatrixthreshold.go index 9ac944b838..6c0089a71b 100644 --- a/typedapi/types/confusionmatrixthreshold.go +++ b/typedapi/types/confusionmatrixthreshold.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixThreshold type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L137-L158 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L137-L158 type ConfusionMatrixThreshold struct { // FalseNegative False Negative FalseNegative int `json:"fn"` @@ -133,5 +133,3 @@ func NewConfusionMatrixThreshold() *ConfusionMatrixThreshold { return r } - -// false diff --git a/typedapi/types/connection.go b/typedapi/types/connection.go index cb487d6032..8e08a7d9ab 100644 --- a/typedapi/types/connection.go +++ b/typedapi/types/connection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Connection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/Connection.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/Connection.ts#L22-L27 type Connection struct { DocCount int64 `json:"doc_count"` Source int64 `json:"source"` @@ -126,5 +126,3 @@ func NewConnection() *Connection { return r } - -// false diff --git a/typedapi/types/connector.go b/typedapi/types/connector.go index 7a4f96e172..36749cd450 100644 --- a/typedapi/types/connector.go +++ b/typedapi/types/connector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // Connector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L252-L283 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L252-L283 type Connector struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` @@ -345,5 +345,3 @@ func NewConnector() *Connector { return r } - -// false diff --git a/typedapi/types/connectorconfigproperties.go b/typedapi/types/connectorconfigproperties.go index aa4163d5da..f0ee236f1f 100644 --- a/typedapi/types/connectorconfigproperties.go +++ b/typedapi/types/connectorconfigproperties.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // ConnectorConfigProperties type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L83-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L83-L99 type ConnectorConfigProperties struct { Category *string `json:"category,omitempty"` DefaultValue ScalarValue `json:"default_value"` @@ -259,13 +259,3 @@ func NewConnectorConfigProperties() *ConnectorConfigProperties { return r } - -// true - -type ConnectorConfigPropertiesVariant interface { - ConnectorConfigPropertiesCaster() *ConnectorConfigProperties -} - -func (s *ConnectorConfigProperties) ConnectorConfigPropertiesCaster() *ConnectorConfigProperties { - return s -} diff --git a/typedapi/types/connectorconfiguration.go b/typedapi/types/connectorconfiguration.go index 0df46db2d6..431991c3dc 100644 --- a/typedapi/types/connectorconfiguration.go +++ b/typedapi/types/connectorconfiguration.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ConnectorConfiguration type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L101-L104 type ConnectorConfiguration map[string]ConnectorConfigProperties - -type ConnectorConfigurationVariant interface { - ConnectorConfigurationCaster() *ConnectorConfiguration -} diff --git a/typedapi/types/connectorcustomscheduling.go b/typedapi/types/connectorcustomscheduling.go index 8b2013f30b..1f76746640 100644 --- a/typedapi/types/connectorcustomscheduling.go +++ b/typedapi/types/connectorcustomscheduling.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ConnectorCustomScheduling type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L128-L128 type ConnectorCustomScheduling map[string]CustomScheduling diff --git a/typedapi/types/connectorfeatures.go b/typedapi/types/connectorfeatures.go index 5fd337b668..9de6f230ef 100644 --- a/typedapi/types/connectorfeatures.go +++ b/typedapi/types/connectorfeatures.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ConnectorFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L230-L244 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L230-L244 type ConnectorFeatures struct { // DocumentLevelSecurity Indicates whether document-level security is enabled. DocumentLevelSecurity *FeatureEnabled `json:"document_level_security,omitempty"` @@ -39,13 +39,3 @@ func NewConnectorFeatures() *ConnectorFeatures { return r } - -// true - -type ConnectorFeaturesVariant interface { - ConnectorFeaturesCaster() *ConnectorFeatures -} - -func (s *ConnectorFeatures) ConnectorFeaturesCaster() *ConnectorFeatures { - return s -} diff --git a/typedapi/types/connectorscheduling.go b/typedapi/types/connectorscheduling.go index d5780cfc51..2bdcb92468 100644 --- a/typedapi/types/connectorscheduling.go +++ b/typedapi/types/connectorscheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ConnectorScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L106-L110 type ConnectorScheduling struct { Enabled bool `json:"enabled"` // Interval The interval is expressed using the crontab syntax @@ -90,13 +90,3 @@ func NewConnectorScheduling() *ConnectorScheduling { return r } - -// true - -type ConnectorSchedulingVariant interface { - ConnectorSchedulingCaster() *ConnectorScheduling -} - -func (s *ConnectorScheduling) ConnectorSchedulingCaster() *ConnectorScheduling { - return s -} diff --git a/typedapi/types/connectorsyncjob.go b/typedapi/types/connectorsyncjob.go index d28850dd6a..ffc4522111 100644 --- a/typedapi/types/connectorsyncjob.go +++ b/typedapi/types/connectorsyncjob.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // ConnectorSyncJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/SyncJob.ts#L53-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/SyncJob.ts#L53-L72 type ConnectorSyncJob struct { CancelationRequestedAt DateTime `json:"cancelation_requested_at,omitempty"` CanceledAt DateTime `json:"canceled_at,omitempty"` @@ -232,5 +232,3 @@ func NewConnectorSyncJob() *ConnectorSyncJob { return r } - -// false diff --git a/typedapi/types/constantkeywordproperty.go b/typedapi/types/constantkeywordproperty.go index 87b51ba0db..d6b7506d34 100644 --- a/typedapi/types/constantkeywordproperty.go +++ b/typedapi/types/constantkeywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // ConstantKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L50-L53 type ConstantKeywordProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -209,6 +209,12 @@ func (s *ConstantKeywordProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -564,6 +570,12 @@ func (s *ConstantKeywordProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -802,13 +814,3 @@ func NewConstantKeywordProperty() *ConstantKeywordProperty { return r } - -// true - -type ConstantKeywordPropertyVariant interface { - ConstantKeywordPropertyCaster() *ConstantKeywordProperty -} - -func (s *ConstantKeywordProperty) ConstantKeywordPropertyCaster() *ConstantKeywordProperty { - return s -} diff --git a/typedapi/types/constantscorequery.go b/typedapi/types/constantscorequery.go index 35699ed127..3250a9e0e7 100644 --- a/typedapi/types/constantscorequery.go +++ b/typedapi/types/constantscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ConstantScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L76-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L76-L86 type ConstantScoreQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -106,13 +106,3 @@ func NewConstantScoreQuery() *ConstantScoreQuery { return r } - -// true - -type ConstantScoreQueryVariant interface { - ConstantScoreQueryCaster() *ConstantScoreQuery -} - -func (s *ConstantScoreQuery) ConstantScoreQueryCaster() *ConstantScoreQuery { - return s -} diff --git a/typedapi/types/contentobject.go b/typedapi/types/contentobject.go index 6152c3014e..c2f030527a 100644 --- a/typedapi/types/contentobject.go +++ b/typedapi/types/contentobject.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ContentObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L84-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L123-L135 type ContentObject struct { // Text The text content. Text string `json:"text"` @@ -89,13 +89,3 @@ func NewContentObject() *ContentObject { return r } - -// true - -type ContentObjectVariant interface { - ContentObjectCaster() *ContentObject -} - -func (s *ContentObject) ContentObjectCaster() *ContentObject { - return s -} diff --git a/typedapi/types/context.go b/typedapi/types/context.go index d3495ed82d..d23a6b084f 100644 --- a/typedapi/types/context.go +++ b/typedapi/types/context.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // GeoLocation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L228-L233 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L228-L233 type Context any - -type ContextVariant interface { - ContextCaster() *Context -} diff --git a/typedapi/types/contextmethod.go b/typedapi/types/contextmethod.go index d6ea0336c9..19b3093ee9 100644 --- a/typedapi/types/contextmethod.go +++ b/typedapi/types/contextmethod.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ContextMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script_context/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script_context/types.ts#L27-L31 type ContextMethod struct { Name string `json:"name"` Params []ContextMethodParam `json:"params"` @@ -86,5 +86,3 @@ func NewContextMethod() *ContextMethod { return r } - -// false diff --git a/typedapi/types/contextmethodparam.go b/typedapi/types/contextmethodparam.go index 5f0a630e1a..6a6004af84 100644 --- a/typedapi/types/contextmethodparam.go +++ b/typedapi/types/contextmethodparam.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ContextMethodParam type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script_context/types.ts#L33-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script_context/types.ts#L33-L36 type ContextMethodParam struct { Name string `json:"name"` Type string `json:"type"` @@ -80,5 +80,3 @@ func NewContextMethodParam() *ContextMethodParam { return r } - -// false diff --git a/typedapi/types/convertprocessor.go b/typedapi/types/convertprocessor.go index f5b8ff486a..aab2fc21c6 100644 --- a/typedapi/types/convertprocessor.go +++ b/typedapi/types/convertprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ConvertProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L672-L692 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L672-L692 type ConvertProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -169,13 +169,3 @@ func NewConvertProcessor() *ConvertProcessor { return r } - -// true - -type ConvertProcessorVariant interface { - ConvertProcessorCaster() *ConvertProcessor -} - -func (s *ConvertProcessor) ConvertProcessorCaster() *ConvertProcessor { - return s -} diff --git a/typedapi/types/coordinatorstats.go b/typedapi/types/coordinatorstats.go index 51ad5cee14..908498a1b2 100644 --- a/typedapi/types/coordinatorstats.go +++ b/typedapi/types/coordinatorstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CoordinatorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/stats/types.ts#L30-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/stats/types.ts#L30-L36 type CoordinatorStats struct { ExecutedSearchesTotal int64 `json:"executed_searches_total"` NodeId string `json:"node_id"` @@ -133,5 +133,3 @@ func NewCoordinatorStats() *CoordinatorStats { return r } - -// false diff --git a/typedapi/types/coordsgeobounds.go b/typedapi/types/coordsgeobounds.go index fe8107b8e9..e21af38c29 100644 --- a/typedapi/types/coordsgeobounds.go +++ b/typedapi/types/coordsgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CoordsGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L154-L159 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L154-L159 type CoordsGeoBounds struct { Bottom Float64 `json:"bottom"` Left Float64 `json:"left"` @@ -129,13 +129,3 @@ func NewCoordsGeoBounds() *CoordsGeoBounds { return r } - -// true - -type CoordsGeoBoundsVariant interface { - CoordsGeoBoundsCaster() *CoordsGeoBounds -} - -func (s *CoordsGeoBounds) CoordsGeoBoundsCaster() *CoordsGeoBounds { - return s -} diff --git a/typedapi/types/coreknnquery.go b/typedapi/types/coreknnquery.go index 958e05998b..295b464ed0 100644 --- a/typedapi/types/coreknnquery.go +++ b/typedapi/types/coreknnquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CoreKnnQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/knn_search/_types/Knn.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/knn_search/_types/Knn.ts#L24-L33 type CoreKnnQuery struct { // Field The name of the vector field to search against Field string `json:"field"` @@ -111,13 +111,3 @@ func NewCoreKnnQuery() *CoreKnnQuery { return r } - -// true - -type CoreKnnQueryVariant interface { - CoreKnnQueryCaster() *CoreKnnQuery -} - -func (s *CoreKnnQuery) CoreKnnQueryCaster() *CoreKnnQuery { - return s -} diff --git a/typedapi/types/countedkeywordproperty.go b/typedapi/types/countedkeywordproperty.go index 84b88220dd..55c3f1c88b 100644 --- a/typedapi/types/countedkeywordproperty.go +++ b/typedapi/types/countedkeywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // CountedKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L55-L62 type CountedKeywordProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -209,6 +209,12 @@ func (s *CountedKeywordProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -578,6 +584,12 @@ func (s *CountedKeywordProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -811,13 +823,3 @@ func NewCountedKeywordProperty() *CountedKeywordProperty { return r } - -// true - -type CountedKeywordPropertyVariant interface { - CountedKeywordPropertyCaster() *CountedKeywordProperty -} - -func (s *CountedKeywordProperty) CountedKeywordPropertyCaster() *CountedKeywordProperty { - return s -} diff --git a/typedapi/types/counter.go b/typedapi/types/counter.go index 7a4ac971bc..e976fd60bd 100644 --- a/typedapi/types/counter.go +++ b/typedapi/types/counter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Counter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L32-L35 type Counter struct { Active int64 `json:"active"` Total int64 `json:"total"` @@ -93,5 +93,3 @@ func NewCounter() *Counter { return r } - -// false diff --git a/typedapi/types/countrecord.go b/typedapi/types/countrecord.go index 0855b8f66a..38b4954bd7 100644 --- a/typedapi/types/countrecord.go +++ b/typedapi/types/countrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CountRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/count/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/count/types.ts#L23-L39 type CountRecord struct { // Count the document count Count *string `json:"count,omitempty"` @@ -89,5 +89,3 @@ func NewCountRecord() *CountRecord { return r } - -// false diff --git a/typedapi/types/cpu.go b/typedapi/types/cpu.go index 25d02d416f..9709680a42 100644 --- a/typedapi/types/cpu.go +++ b/typedapi/types/cpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Cpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L575-L584 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L577-L586 type Cpu struct { LoadAverage map[string]Float64 `json:"load_average,omitempty"` Percent *int `json:"percent,omitempty"` @@ -125,5 +125,3 @@ func NewCpu() *Cpu { return r } - -// false diff --git a/typedapi/types/cpuacct.go b/typedapi/types/cpuacct.go index f70e28985f..b0ac1c3d08 100644 --- a/typedapi/types/cpuacct.go +++ b/typedapi/types/cpuacct.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CpuAcct type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L512-L521 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L514-L523 type CpuAcct struct { // ControlGroup The `cpuacct` control group to which the Elasticsearch process belongs. ControlGroup *string `json:"control_group,omitempty"` @@ -83,5 +83,3 @@ func NewCpuAcct() *CpuAcct { return r } - -// false diff --git a/typedapi/types/createdstatus.go b/typedapi/types/createdstatus.go index a0dd3d2478..742ce2b86b 100644 --- a/typedapi/types/createdstatus.go +++ b/typedapi/types/createdstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CreatedStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/CreatedStatus.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/CreatedStatus.ts#L20-L22 type CreatedStatus struct { Created bool `json:"created"` } @@ -76,5 +76,3 @@ func NewCreatedStatus() *CreatedStatus { return r } - -// false diff --git a/typedapi/types/createfrom.go b/typedapi/types/createfrom.go index 9a217ef22e..5fb1dbf5e3 100644 --- a/typedapi/types/createfrom.go +++ b/typedapi/types/createfrom.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CreateFrom type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/create_from/MigrateCreateFromRequest.ts#L46-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/create_from/MigrateCreateFromRequest.ts#L46-L60 type CreateFrom struct { // MappingsOverride Mappings overrides to be applied to the destination index (optional) MappingsOverride *TypeMapping `json:"mappings_override,omitempty"` @@ -91,13 +91,3 @@ func NewCreateFrom() *CreateFrom { return r } - -// true - -type CreateFromVariant interface { - CreateFromCaster() *CreateFrom -} - -func (s *CreateFrom) CreateFromCaster() *CreateFrom { - return s -} diff --git a/typedapi/types/createoperation.go b/typedapi/types/createoperation.go index bb653bafdb..6a2e0130bc 100644 --- a/typedapi/types/createoperation.go +++ b/typedapi/types/createoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CreateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L140-L140 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L140-L140 type CreateOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // It defaults to an empty map. @@ -169,13 +169,3 @@ func NewCreateOperation() *CreateOperation { return r } - -// true - -type CreateOperationVariant interface { - CreateOperationCaster() *CreateOperation -} - -func (s *CreateOperation) CreateOperationCaster() *CreateOperation { - return s -} diff --git a/typedapi/types/csvprocessor.go b/typedapi/types/csvprocessor.go index f98d8254c6..f02f97eff6 100644 --- a/typedapi/types/csvprocessor.go +++ b/typedapi/types/csvprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CsvProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L694-L727 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L694-L727 type CsvProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -224,13 +224,3 @@ func NewCsvProcessor() *CsvProcessor { return r } - -// true - -type CsvProcessorVariant interface { - CsvProcessorCaster() *CsvProcessor -} - -func (s *CsvProcessor) CsvProcessorCaster() *CsvProcessor { - return s -} diff --git a/typedapi/types/cumulativecardinalityaggregate.go b/typedapi/types/cumulativecardinalityaggregate.go index a9238f00f3..675d2fa475 100644 --- a/typedapi/types/cumulativecardinalityaggregate.go +++ b/typedapi/types/cumulativecardinalityaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CumulativeCardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L856-L864 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L858-L866 type CumulativeCardinalityAggregate struct { Meta Metadata `json:"meta,omitempty"` Value int64 `json:"value"` @@ -96,5 +96,3 @@ func NewCumulativeCardinalityAggregate() *CumulativeCardinalityAggregate { return r } - -// false diff --git a/typedapi/types/cumulativecardinalityaggregation.go b/typedapi/types/cumulativecardinalityaggregation.go index 4fb88d30fd..0a561e961f 100644 --- a/typedapi/types/cumulativecardinalityaggregation.go +++ b/typedapi/types/cumulativecardinalityaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CumulativeCardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L206-L209 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L206-L209 type CumulativeCardinalityAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewCumulativeCardinalityAggregation() *CumulativeCardinalityAggregation { return r } - -// true - -type CumulativeCardinalityAggregationVariant interface { - CumulativeCardinalityAggregationCaster() *CumulativeCardinalityAggregation -} - -func (s *CumulativeCardinalityAggregation) CumulativeCardinalityAggregationCaster() *CumulativeCardinalityAggregation { - return s -} diff --git a/typedapi/types/cumulativesumaggregation.go b/typedapi/types/cumulativesumaggregation.go index b075c54926..1b1ca63d30 100644 --- a/typedapi/types/cumulativesumaggregation.go +++ b/typedapi/types/cumulativesumaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CumulativeSumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L211-L214 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L211-L214 type CumulativeSumAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewCumulativeSumAggregation() *CumulativeSumAggregation { return r } - -// true - -type CumulativeSumAggregationVariant interface { - CumulativeSumAggregationCaster() *CumulativeSumAggregation -} - -func (s *CumulativeSumAggregation) CumulativeSumAggregationCaster() *CumulativeSumAggregation { - return s -} diff --git a/typedapi/types/currentnode.go b/typedapi/types/currentnode.go index 2657402315..f9e38dc136 100644 --- a/typedapi/types/currentnode.go +++ b/typedapi/types/currentnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // CurrentNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L79-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L79-L90 type CurrentNode struct { Attributes map[string]string `json:"attributes"` Id string `json:"id"` @@ -115,5 +115,3 @@ func NewCurrentNode() *CurrentNode { return r } - -// false diff --git a/typedapi/types/customanalyzer.go b/typedapi/types/customanalyzer.go index e8bd638740..eb63b87caa 100644 --- a/typedapi/types/customanalyzer.go +++ b/typedapi/types/customanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CustomAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L28-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L28-L35 type CustomAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -165,13 +165,3 @@ func NewCustomAnalyzer() *CustomAnalyzer { return r } - -// true - -type CustomAnalyzerVariant interface { - CustomAnalyzerCaster() *CustomAnalyzer -} - -func (s *CustomAnalyzer) CustomAnalyzerCaster() *CustomAnalyzer { - return s -} diff --git a/typedapi/types/customcategorizetextanalyzer.go b/typedapi/types/customcategorizetextanalyzer.go index 8035c32832..97a3d69535 100644 --- a/typedapi/types/customcategorizetextanalyzer.go +++ b/typedapi/types/customcategorizetextanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CustomCategorizeTextAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1189-L1193 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1190-L1194 type CustomCategorizeTextAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -86,13 +86,3 @@ func NewCustomCategorizeTextAnalyzer() *CustomCategorizeTextAnalyzer { return r } - -// true - -type CustomCategorizeTextAnalyzerVariant interface { - CustomCategorizeTextAnalyzerCaster() *CustomCategorizeTextAnalyzer -} - -func (s *CustomCategorizeTextAnalyzer) CustomCategorizeTextAnalyzerCaster() *CustomCategorizeTextAnalyzer { - return s -} diff --git a/typedapi/types/customnormalizer.go b/typedapi/types/customnormalizer.go index 6fce78b2d5..a8cbdf0095 100644 --- a/typedapi/types/customnormalizer.go +++ b/typedapi/types/customnormalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // CustomNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/normalizers.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/normalizers.ts#L30-L34 type CustomNormalizer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -53,13 +53,3 @@ func NewCustomNormalizer() *CustomNormalizer { return r } - -// true - -type CustomNormalizerVariant interface { - CustomNormalizerCaster() *CustomNormalizer -} - -func (s *CustomNormalizer) CustomNormalizerCaster() *CustomNormalizer { - return s -} diff --git a/typedapi/types/customrequestparams.go b/typedapi/types/customrequestparams.go new file mode 100644 index 0000000000..6828fb62de --- /dev/null +++ b/typedapi/types/customrequestparams.go @@ -0,0 +1,85 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CustomRequestParams type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L974-L985 +type CustomRequestParams struct { + // Content The body structure of the request. It requires passing in the string-escaped + // result of the JSON format HTTP request body. + // For example: + // ``` + // "request": "{\"input\":${input}}" + // ``` + // > info + // > The content string needs to be a single line except when using the Kibana + // console. + Content string `json:"content"` +} + +func (s *CustomRequestParams) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "content": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Content", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Content = o + + } + } + return nil +} + +// NewCustomRequestParams returns a CustomRequestParams. +func NewCustomRequestParams() *CustomRequestParams { + r := &CustomRequestParams{} + + return r +} diff --git a/typedapi/types/customresponseparams.go b/typedapi/types/customresponseparams.go new file mode 100644 index 0000000000..c292bcfd9f --- /dev/null +++ b/typedapi/types/customresponseparams.go @@ -0,0 +1,174 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "encoding/json" +) + +// CustomResponseParams type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L987-L1125 +type CustomResponseParams struct { + // JsonParser Specifies the JSON parser that is used to parse the response from the custom + // service. + // Different task types require different json_parser parameters. + // For example: + // ``` + // # text_embedding + // # For a response like this: + // + // { + // "object": "list", + // "data": [ + // { + // "object": "embedding", + // "index": 0, + // "embedding": [ + // 0.014539449, + // -0.015288644 + // ] + // } + // ], + // "model": "text-embedding-ada-002-v2", + // "usage": { + // "prompt_tokens": 8, + // "total_tokens": 8 + // } + // } + // + // # the json_parser definition should look like this: + // + // "response":{ + // "json_parser":{ + // "text_embeddings":"$.data[*].embedding[*]" + // } + // } + // + // # sparse_embedding + // # For a response like this: + // + // { + // "request_id": "75C50B5B-E79E-4930-****-F48DBB392231", + // "latency": 22, + // "usage": { + // "token_count": 11 + // }, + // "result": { + // "sparse_embeddings": [ + // { + // "index": 0, + // "embedding": [ + // { + // "token_id": 6, + // "weight": 0.101 + // }, + // { + // "token_id": 163040, + // "weight": 0.28417 + // } + // ] + // } + // ] + // } + // } + // + // # the json_parser definition should look like this: + // + // "response":{ + // "json_parser":{ + // "token_path":"$.result.sparse_embeddings[*].embedding[*].token_id", + // "weight_path":"$.result.sparse_embeddings[*].embedding[*].weight" + // } + // } + // + // # rerank + // # For a response like this: + // + // { + // "results": [ + // { + // "index": 3, + // "relevance_score": 0.999071, + // "document": "abc" + // }, + // { + // "index": 4, + // "relevance_score": 0.7867867, + // "document": "123" + // }, + // { + // "index": 0, + // "relevance_score": 0.32713068, + // "document": "super" + // } + // ], + // } + // + // # the json_parser definition should look like this: + // + // "response":{ + // "json_parser":{ + // "reranked_index":"$.result.scores[*].index", // optional + // "relevance_score":"$.result.scores[*].score", + // "document_text":"xxx" // optional + // } + // } + // + // # completion + // # For a response like this: + // + // { + // "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT", + // "object": "chat.completion", + // "created": 1741569952, + // "model": "gpt-4.1-2025-04-14", + // "choices": [ + // { + // "index": 0, + // "message": { + // "role": "assistant", + // "content": "Hello! How can I assist you today?", + // "refusal": null, + // "annotations": [] + // }, + // "logprobs": null, + // "finish_reason": "stop" + // } + // ] + // } + // + // # the json_parser definition should look like this: + // + // "response":{ + // "json_parser":{ + // "completion_result":"$.choices[*].message.content" + // } + // } + JsonParser json.RawMessage `json:"json_parser,omitempty"` +} + +// NewCustomResponseParams returns a CustomResponseParams. +func NewCustomResponseParams() *CustomResponseParams { + r := &CustomResponseParams{} + + return r +} diff --git a/typedapi/types/customscheduling.go b/typedapi/types/customscheduling.go index bb2cea7abf..e8153961ff 100644 --- a/typedapi/types/customscheduling.go +++ b/typedapi/types/customscheduling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CustomScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L120-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L120-L126 type CustomScheduling struct { ConfigurationOverrides CustomSchedulingConfigurationOverrides `json:"configuration_overrides"` Enabled bool `json:"enabled"` @@ -114,5 +114,3 @@ func NewCustomScheduling() *CustomScheduling { return r } - -// false diff --git a/typedapi/types/customschedulingconfigurationoverrides.go b/typedapi/types/customschedulingconfigurationoverrides.go index 869dc2671a..7e35b60473 100644 --- a/typedapi/types/customschedulingconfigurationoverrides.go +++ b/typedapi/types/customschedulingconfigurationoverrides.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // CustomSchedulingConfigurationOverrides type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L112-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L112-L118 type CustomSchedulingConfigurationOverrides struct { DomainAllowlist []string `json:"domain_allowlist,omitempty"` MaxCrawlDepth *int `json:"max_crawl_depth,omitempty"` @@ -111,5 +111,3 @@ func NewCustomSchedulingConfigurationOverrides() *CustomSchedulingConfigurationO return r } - -// false diff --git a/typedapi/types/customservicesettings.go b/typedapi/types/customservicesettings.go new file mode 100644 index 0000000000..eb8d8c287b --- /dev/null +++ b/typedapi/types/customservicesettings.go @@ -0,0 +1,174 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CustomServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L904-L972 +type CustomServiceSettings struct { + // Headers Specifies the HTTPS header parameters – such as `Authentication` or + // `Contet-Type` – that are required to access the custom service. + // For example: + // ``` + // + // "headers":{ + // "Authorization": "Bearer ${api_key}", + // "Content-Type": "application/json;charset=utf-8" + // } + // + // ``` + Headers json.RawMessage `json:"headers,omitempty"` + // InputType Specifies the input type translation values that are used to replace the + // `${input_type}` template in the request body. + // For example: + // ``` + // + // "input_type": { + // "translation": { + // "ingest": "do_ingest", + // "search": "do_search" + // }, + // "default": "a_default" + // }, + // + // ``` + // If the subsequent inference requests come from a search context, the `search` + // key will be used and the template will be replaced with `do_search`. + // If it comes from the ingest context `do_ingest` is used. If it's a different + // context that is not specified, the default value will be used. If no default + // is specified an empty string is used. + // `translation` can be: + // * `classification` + // * `clustering` + // * `ingest` + // * `search` + InputType json.RawMessage `json:"input_type,omitempty"` + // QueryParameters Specifies the query parameters as a list of tuples. The arrays inside the + // `query_parameters` must have two items, a key and a value. + // For example: + // ``` + // "query_parameters":[ + // + // ["param_key", "some_value"], + // ["param_key", "another_value"], + // ["other_key", "other_value"] + // + // ] + // ``` + // If the base url is `https://www.elastic.co` it results in: + // `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`. + QueryParameters json.RawMessage `json:"query_parameters,omitempty"` + // Request The request configuration object. + Request CustomRequestParams `json:"request"` + // Response The response configuration object. + Response CustomResponseParams `json:"response"` + // SecretParameters Specifies secret parameters, like `api_key` or `api_token`, that are required + // to access the custom service. + // For example: + // ``` + // + // "secret_parameters":{ + // "api_key":"" + // } + // + // ``` + SecretParameters json.RawMessage `json:"secret_parameters,omitempty"` + // Url The URL endpoint to use for the requests. + Url *string `json:"url,omitempty"` +} + +func (s *CustomServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "headers": + if err := dec.Decode(&s.Headers); err != nil { + return fmt.Errorf("%s | %w", "Headers", err) + } + + case "input_type": + if err := dec.Decode(&s.InputType); err != nil { + return fmt.Errorf("%s | %w", "InputType", err) + } + + case "query_parameters": + if err := dec.Decode(&s.QueryParameters); err != nil { + return fmt.Errorf("%s | %w", "QueryParameters", err) + } + + case "request": + if err := dec.Decode(&s.Request); err != nil { + return fmt.Errorf("%s | %w", "Request", err) + } + + case "response": + if err := dec.Decode(&s.Response); err != nil { + return fmt.Errorf("%s | %w", "Response", err) + } + + case "secret_parameters": + if err := dec.Decode(&s.SecretParameters); err != nil { + return fmt.Errorf("%s | %w", "SecretParameters", err) + } + + case "url": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Url", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Url = &o + + } + } + return nil +} + +// NewCustomServiceSettings returns a CustomServiceSettings. +func NewCustomServiceSettings() *CustomServiceSettings { + r := &CustomServiceSettings{} + + return r +} diff --git a/typedapi/types/customtasksettings.go b/typedapi/types/customtasksettings.go new file mode 100644 index 0000000000..be524aad6f --- /dev/null +++ b/typedapi/types/customtasksettings.go @@ -0,0 +1,52 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "encoding/json" +) + +// CustomTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1138-L1152 +type CustomTaskSettings struct { + // Parameters Specifies parameters that are required to run the custom service. The + // parameters depend on the model your custom service uses. + // For example: + // ``` + // + // "task_settings":{ + // "parameters":{ + // "input_type":"query", + // "return_token":true + // } + // } + // + // ``` + Parameters json.RawMessage `json:"parameters,omitempty"` +} + +// NewCustomTaskSettings returns a CustomTaskSettings. +func NewCustomTaskSettings() *CustomTaskSettings { + r := &CustomTaskSettings{} + + return r +} diff --git a/typedapi/types/czechanalyzer.go b/typedapi/types/czechanalyzer.go index 474c6e0d6c..eb73a015a7 100644 --- a/typedapi/types/czechanalyzer.go +++ b/typedapi/types/czechanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // CzechAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L112-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L112-L117 type CzechAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *CzechAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *CzechAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewCzechAnalyzer() *CzechAnalyzer { return r } - -// true - -type CzechAnalyzerVariant interface { - CzechAnalyzerCaster() *CzechAnalyzer -} - -func (s *CzechAnalyzer) CzechAnalyzerCaster() *CzechAnalyzer { - return s -} diff --git a/typedapi/types/czechstemtokenfilter.go b/typedapi/types/czechstemtokenfilter.go new file mode 100644 index 0000000000..11db3cd778 --- /dev/null +++ b/typedapi/types/czechstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CzechStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L551-L553 +type CzechStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *CzechStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s CzechStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerCzechStemTokenFilter CzechStemTokenFilter + tmp := innerCzechStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "czech_stem" + + return json.Marshal(tmp) +} + +// NewCzechStemTokenFilter returns a CzechStemTokenFilter. +func NewCzechStemTokenFilter() *CzechStemTokenFilter { + r := &CzechStemTokenFilter{} + + return r +} diff --git a/typedapi/types/dailyschedule.go b/typedapi/types/dailyschedule.go index bf71e94554..aca98c6b23 100644 --- a/typedapi/types/dailyschedule.go +++ b/typedapi/types/dailyschedule.go @@ -16,30 +16,53 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + // DailySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L33-L35 type DailySchedule struct { At []ScheduleTimeOfDay `json:"at"` } -// NewDailySchedule returns a DailySchedule. -func NewDailySchedule() *DailySchedule { - r := &DailySchedule{} +func (s *DailySchedule) UnmarshalJSON(data []byte) error { - return r -} + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } -// true + switch t { -type DailyScheduleVariant interface { - DailyScheduleCaster() *DailySchedule + case "at": + if err := dec.Decode(&s.At); err != nil { + return fmt.Errorf("%s | %w", "At", err) + } + + } + } + return nil } -func (s *DailySchedule) DailyScheduleCaster() *DailySchedule { - return s +// NewDailySchedule returns a DailySchedule. +func NewDailySchedule() *DailySchedule { + r := &DailySchedule{} + + return r } diff --git a/typedapi/types/danglingindex.go b/typedapi/types/danglingindex.go index 810f00cfc0..586ce81427 100644 --- a/typedapi/types/danglingindex.go +++ b/typedapi/types/danglingindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DanglingIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 type DanglingIndex struct { CreationDateMillis int64 `json:"creation_date_millis"` IndexName string `json:"index_name"` @@ -110,5 +110,3 @@ func NewDanglingIndex() *DanglingIndex { return r } - -// false diff --git a/typedapi/types/danishanalyzer.go b/typedapi/types/danishanalyzer.go index f72fe5d759..1ae9ad8199 100644 --- a/typedapi/types/danishanalyzer.go +++ b/typedapi/types/danishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // DanishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L119-L123 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L119-L123 type DanishAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *DanishAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *DanishAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewDanishAnalyzer() *DanishAnalyzer { return r } - -// true - -type DanishAnalyzerVariant interface { - DanishAnalyzerCaster() *DanishAnalyzer -} - -func (s *DanishAnalyzer) DanishAnalyzerCaster() *DanishAnalyzer { - return s -} diff --git a/typedapi/types/databaseconfiguration.go b/typedapi/types/databaseconfiguration.go index 0a6bc03898..92b71a8c71 100644 --- a/typedapi/types/databaseconfiguration.go +++ b/typedapi/types/databaseconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DatabaseConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Database.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Database.ts#L22-L37 type DatabaseConfiguration struct { AdditionalDatabaseConfigurationProperty map[string]json.RawMessage `json:"-"` Ipinfo *Ipinfo `json:"ipinfo,omitempty"` @@ -124,13 +124,3 @@ func NewDatabaseConfiguration() *DatabaseConfiguration { return r } - -// true - -type DatabaseConfigurationVariant interface { - DatabaseConfigurationCaster() *DatabaseConfiguration -} - -func (s *DatabaseConfiguration) DatabaseConfigurationCaster() *DatabaseConfiguration { - return s -} diff --git a/typedapi/types/databaseconfigurationfull.go b/typedapi/types/databaseconfigurationfull.go index bdf7af7d07..82f110f6bc 100644 --- a/typedapi/types/databaseconfigurationfull.go +++ b/typedapi/types/databaseconfigurationfull.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DatabaseConfigurationFull type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Database.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Database.ts#L39-L53 type DatabaseConfigurationFull struct { AdditionalDatabaseConfigurationFullProperty map[string]json.RawMessage `json:"-"` Ipinfo *Ipinfo `json:"ipinfo,omitempty"` @@ -136,5 +136,3 @@ func NewDatabaseConfigurationFull() *DatabaseConfigurationFull { return r } - -// false diff --git a/typedapi/types/datacounts.go b/typedapi/types/datacounts.go index 3362e31254..94f3e962bc 100644 --- a/typedapi/types/datacounts.go +++ b/typedapi/types/datacounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L352-L372 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L352-L372 type DataCounts struct { BucketCount int64 `json:"bucket_count"` EarliestRecordTimestamp *int64 `json:"earliest_record_timestamp,omitempty"` @@ -355,5 +355,3 @@ func NewDataCounts() *DataCounts { return r } - -// false diff --git a/typedapi/types/datadescription.go b/typedapi/types/datadescription.go index d7ceebe5f5..2472b71cfd 100644 --- a/typedapi/types/datadescription.go +++ b/typedapi/types/datadescription.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataDescription type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L374-L390 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L374-L390 type DataDescription struct { FieldDelimiter *string `json:"field_delimiter,omitempty"` // Format Only JSON format is supported at this time. @@ -117,13 +117,3 @@ func NewDataDescription() *DataDescription { return r } - -// true - -type DataDescriptionVariant interface { - DataDescriptionCaster() *DataDescription -} - -func (s *DataDescription) DataDescriptionCaster() *DataDescription { - return s -} diff --git a/typedapi/types/dataemailattachment.go b/typedapi/types/dataemailattachment.go index 7dbcefe858..ae4d231034 100644 --- a/typedapi/types/dataemailattachment.go +++ b/typedapi/types/dataemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // DataEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L234-L236 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L234-L236 type DataEmailAttachment struct { Format *dataattachmentformat.DataAttachmentFormat `json:"format,omitempty"` } @@ -37,13 +37,3 @@ func NewDataEmailAttachment() *DataEmailAttachment { return r } - -// true - -type DataEmailAttachmentVariant interface { - DataEmailAttachmentCaster() *DataEmailAttachment -} - -func (s *DataEmailAttachment) DataEmailAttachmentCaster() *DataEmailAttachment { - return s -} diff --git a/typedapi/types/datafeedauthorization.go b/typedapi/types/datafeedauthorization.go index fbc28e5249..6b69748632 100644 --- a/typedapi/types/datafeedauthorization.go +++ b/typedapi/types/datafeedauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DatafeedAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Authorization.ts#L31-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Authorization.ts#L31-L43 type DatafeedAuthorization struct { // ApiKey If an API key was used for the most recent update to the datafeed, its name // and identifier are listed in the response. @@ -92,5 +92,3 @@ func NewDatafeedAuthorization() *DatafeedAuthorization { return r } - -// false diff --git a/typedapi/types/datafeedconfig.go b/typedapi/types/datafeedconfig.go index 280819944b..3857336a8a 100644 --- a/typedapi/types/datafeedconfig.go +++ b/typedapi/types/datafeedconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DatafeedConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L63-L120 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L63-L120 type DatafeedConfig struct { // Aggregations If set, the datafeed performs aggregation searches. Support for aggregations // is limited and should be used only with low cardinality data. @@ -239,13 +239,3 @@ func NewDatafeedConfig() *DatafeedConfig { return r } - -// true - -type DatafeedConfigVariant interface { - DatafeedConfigCaster() *DatafeedConfig -} - -func (s *DatafeedConfig) DatafeedConfigCaster() *DatafeedConfig { - return s -} diff --git a/typedapi/types/datafeedrunningstate.go b/typedapi/types/datafeedrunningstate.go index 63d1698d22..6412c4f198 100644 --- a/typedapi/types/datafeedrunningstate.go +++ b/typedapi/types/datafeedrunningstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DatafeedRunningState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L210-L224 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L210-L224 type DatafeedRunningState struct { // RealTimeConfigured Indicates if the datafeed is "real-time"; meaning that the datafeed has no // configured `end` time. @@ -104,5 +104,3 @@ func NewDatafeedRunningState() *DatafeedRunningState { return r } - -// false diff --git a/typedapi/types/datafeeds.go b/typedapi/types/datafeeds.go index 2ea7cedc41..f26265ce20 100644 --- a/typedapi/types/datafeeds.go +++ b/typedapi/types/datafeeds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Datafeeds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/info/types.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/info/types.ts#L42-L44 type Datafeeds struct { ScrollSize int `json:"scroll_size"` } @@ -78,5 +78,3 @@ func NewDatafeeds() *Datafeeds { return r } - -// false diff --git a/typedapi/types/datafeedsrecord.go b/typedapi/types/datafeedsrecord.go index 3147ac484a..48d8d6aba6 100644 --- a/typedapi/types/datafeedsrecord.go +++ b/typedapi/types/datafeedsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DatafeedsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_datafeeds/types.ts#L22-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_datafeeds/types.ts#L22-L87 type DatafeedsRecord struct { // AssignmentExplanation For started datafeeds only, contains messages relating to the selection of a // node. @@ -233,5 +233,3 @@ func NewDatafeedsRecord() *DatafeedsRecord { return r } - -// false diff --git a/typedapi/types/datafeedstats.go b/typedapi/types/datafeedstats.go index 7b66ed9512..35fc2832c3 100644 --- a/typedapi/types/datafeedstats.go +++ b/typedapi/types/datafeedstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DatafeedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L143-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L143-L172 type DatafeedStats struct { // AssignmentExplanation For started datafeeds only, contains messages relating to the selection of a // node. @@ -120,5 +120,3 @@ func NewDatafeedStats() *DatafeedStats { return r } - -// false diff --git a/typedapi/types/datafeedtimingstats.go b/typedapi/types/datafeedtimingstats.go index 734da67ed9..aa4927fc33 100644 --- a/typedapi/types/datafeedtimingstats.go +++ b/typedapi/types/datafeedtimingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DatafeedTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L174-L202 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L174-L202 type DatafeedTimingStats struct { // AverageSearchTimePerBucketMs The average search time per bucket, in milliseconds. AverageSearchTimePerBucketMs Float64 `json:"average_search_time_per_bucket_ms,omitempty"` @@ -129,5 +129,3 @@ func NewDatafeedTimingStats() *DatafeedTimingStats { return r } - -// false diff --git a/typedapi/types/dataframeanalysisanalyzedfields.go b/typedapi/types/dataframeanalysisanalyzedfields.go index 5c25565232..50e974b5eb 100644 --- a/typedapi/types/dataframeanalysisanalyzedfields.go +++ b/typedapi/types/dataframeanalysisanalyzedfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisAnalyzedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L238-L244 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L238-L244 type DataframeAnalysisAnalyzedFields struct { // Excludes An array of strings that defines the fields that will be included in the // analysis. @@ -87,13 +87,3 @@ func NewDataframeAnalysisAnalyzedFields() *DataframeAnalysisAnalyzedFields { return r } - -// true - -type DataframeAnalysisAnalyzedFieldsVariant interface { - DataframeAnalysisAnalyzedFieldsCaster() *DataframeAnalysisAnalyzedFields -} - -func (s *DataframeAnalysisAnalyzedFields) DataframeAnalysisAnalyzedFieldsCaster() *DataframeAnalysisAnalyzedFields { - return s -} diff --git a/typedapi/types/dataframeanalysisclassification.go b/typedapi/types/dataframeanalysisclassification.go index 610e368fa0..ec31348cdf 100644 --- a/typedapi/types/dataframeanalysisclassification.go +++ b/typedapi/types/dataframeanalysisclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L227-L236 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L227-L236 type DataframeAnalysisClassification struct { // Alpha Advanced configuration option. Machine learning uses loss guided tree // growing, which means that the decision trees grow where the regularized loss @@ -460,13 +460,3 @@ func NewDataframeAnalysisClassification() *DataframeAnalysisClassification { return r } - -// true - -type DataframeAnalysisClassificationVariant interface { - DataframeAnalysisClassificationCaster() *DataframeAnalysisClassification -} - -func (s *DataframeAnalysisClassification) DataframeAnalysisClassificationCaster() *DataframeAnalysisClassification { - return s -} diff --git a/typedapi/types/dataframeanalysiscontainer.go b/typedapi/types/dataframeanalysiscontainer.go index 679fdf94e3..b98a9e2897 100644 --- a/typedapi/types/dataframeanalysiscontainer.go +++ b/typedapi/types/dataframeanalysiscontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // DataframeAnalysisContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L84-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L84-L101 type DataframeAnalysisContainer struct { AdditionalDataframeAnalysisContainerProperty map[string]json.RawMessage `json:"-"` // Classification The configuration information necessary to perform classification. @@ -83,13 +83,3 @@ func NewDataframeAnalysisContainer() *DataframeAnalysisContainer { return r } - -// true - -type DataframeAnalysisContainerVariant interface { - DataframeAnalysisContainerCaster() *DataframeAnalysisContainer -} - -func (s *DataframeAnalysisContainer) DataframeAnalysisContainerCaster() *DataframeAnalysisContainer { - return s -} diff --git a/typedapi/types/dataframeanalysisfeatureprocessor.go b/typedapi/types/dataframeanalysisfeatureprocessor.go index 89a3c3da37..1a894208d1 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessor.go +++ b/typedapi/types/dataframeanalysisfeatureprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // DataframeAnalysisFeatureProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L246-L258 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L246-L258 type DataframeAnalysisFeatureProcessor struct { AdditionalDataframeAnalysisFeatureProcessorProperty map[string]json.RawMessage `json:"-"` // FrequencyEncoding The configuration information necessary to perform frequency encoding. @@ -84,13 +84,3 @@ func NewDataframeAnalysisFeatureProcessor() *DataframeAnalysisFeatureProcessor { return r } - -// true - -type DataframeAnalysisFeatureProcessorVariant interface { - DataframeAnalysisFeatureProcessorCaster() *DataframeAnalysisFeatureProcessor -} - -func (s *DataframeAnalysisFeatureProcessor) DataframeAnalysisFeatureProcessorCaster() *DataframeAnalysisFeatureProcessor { - return s -} diff --git a/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go index 8d88d4daba..0f395512e5 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisFeatureProcessorFrequencyEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L260-L267 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L260-L267 type DataframeAnalysisFeatureProcessorFrequencyEncoding struct { // FeatureName The resulting feature name. FeatureName string `json:"feature_name"` @@ -86,13 +86,3 @@ func NewDataframeAnalysisFeatureProcessorFrequencyEncoding() *DataframeAnalysisF return r } - -// true - -type DataframeAnalysisFeatureProcessorFrequencyEncodingVariant interface { - DataframeAnalysisFeatureProcessorFrequencyEncodingCaster() *DataframeAnalysisFeatureProcessorFrequencyEncoding -} - -func (s *DataframeAnalysisFeatureProcessorFrequencyEncoding) DataframeAnalysisFeatureProcessorFrequencyEncodingCaster() *DataframeAnalysisFeatureProcessorFrequencyEncoding { - return s -} diff --git a/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go b/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go index 9c3b02eeb4..5fd241659a 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DataframeAnalysisFeatureProcessorMultiEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L269-L272 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L269-L272 type DataframeAnalysisFeatureProcessorMultiEncoding struct { // Processors The ordered array of custom processors to execute. Must be more than 1. Processors []int `json:"processors"` @@ -34,13 +34,3 @@ func NewDataframeAnalysisFeatureProcessorMultiEncoding() *DataframeAnalysisFeatu return r } - -// true - -type DataframeAnalysisFeatureProcessorMultiEncodingVariant interface { - DataframeAnalysisFeatureProcessorMultiEncodingCaster() *DataframeAnalysisFeatureProcessorMultiEncoding -} - -func (s *DataframeAnalysisFeatureProcessorMultiEncoding) DataframeAnalysisFeatureProcessorMultiEncodingCaster() *DataframeAnalysisFeatureProcessorMultiEncoding { - return s -} diff --git a/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go index 5cf72fc719..deed47b57d 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorNGramEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L274-L286 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L274-L286 type DataframeAnalysisFeatureProcessorNGramEncoding struct { Custom *bool `json:"custom,omitempty"` // FeaturePrefix The feature name prefix. Defaults to ngram__. @@ -143,13 +143,3 @@ func NewDataframeAnalysisFeatureProcessorNGramEncoding() *DataframeAnalysisFeatu return r } - -// true - -type DataframeAnalysisFeatureProcessorNGramEncodingVariant interface { - DataframeAnalysisFeatureProcessorNGramEncodingCaster() *DataframeAnalysisFeatureProcessorNGramEncoding -} - -func (s *DataframeAnalysisFeatureProcessorNGramEncoding) DataframeAnalysisFeatureProcessorNGramEncodingCaster() *DataframeAnalysisFeatureProcessorNGramEncoding { - return s -} diff --git a/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go b/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go index b815c8da35..23727317bd 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorOneHotEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L288-L293 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L288-L293 type DataframeAnalysisFeatureProcessorOneHotEncoding struct { // Field The name of the field to encode. Field string `json:"field"` @@ -82,13 +82,3 @@ func NewDataframeAnalysisFeatureProcessorOneHotEncoding() *DataframeAnalysisFeat return r } - -// true - -type DataframeAnalysisFeatureProcessorOneHotEncodingVariant interface { - DataframeAnalysisFeatureProcessorOneHotEncodingCaster() *DataframeAnalysisFeatureProcessorOneHotEncoding -} - -func (s *DataframeAnalysisFeatureProcessorOneHotEncoding) DataframeAnalysisFeatureProcessorOneHotEncodingCaster() *DataframeAnalysisFeatureProcessorOneHotEncoding { - return s -} diff --git a/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go b/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go index 7bc33292be..2987775355 100644 --- a/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go +++ b/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorTargetMeanEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L295-L304 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L295-L304 type DataframeAnalysisFeatureProcessorTargetMeanEncoding struct { // DefaultValue The default value if field value is not found in the target_map. DefaultValue int `json:"default_value"` @@ -105,13 +105,3 @@ func NewDataframeAnalysisFeatureProcessorTargetMeanEncoding() *DataframeAnalysis return r } - -// true - -type DataframeAnalysisFeatureProcessorTargetMeanEncodingVariant interface { - DataframeAnalysisFeatureProcessorTargetMeanEncodingCaster() *DataframeAnalysisFeatureProcessorTargetMeanEncoding -} - -func (s *DataframeAnalysisFeatureProcessorTargetMeanEncoding) DataframeAnalysisFeatureProcessorTargetMeanEncodingCaster() *DataframeAnalysisFeatureProcessorTargetMeanEncoding { - return s -} diff --git a/typedapi/types/dataframeanalysisoutlierdetection.go b/typedapi/types/dataframeanalysisoutlierdetection.go index 8a988beacf..8364f174ee 100644 --- a/typedapi/types/dataframeanalysisoutlierdetection.go +++ b/typedapi/types/dataframeanalysisoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L103-L132 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L103-L132 type DataframeAnalysisOutlierDetection struct { // ComputeFeatureInfluence Specifies whether the feature influence calculation is enabled. ComputeFeatureInfluence *bool `json:"compute_feature_influence,omitempty"` @@ -173,13 +173,3 @@ func NewDataframeAnalysisOutlierDetection() *DataframeAnalysisOutlierDetection { return r } - -// true - -type DataframeAnalysisOutlierDetectionVariant interface { - DataframeAnalysisOutlierDetectionCaster() *DataframeAnalysisOutlierDetection -} - -func (s *DataframeAnalysisOutlierDetection) DataframeAnalysisOutlierDetectionCaster() *DataframeAnalysisOutlierDetection { - return s -} diff --git a/typedapi/types/dataframeanalysisregression.go b/typedapi/types/dataframeanalysisregression.go index c536931fc4..c7b8b403ae 100644 --- a/typedapi/types/dataframeanalysisregression.go +++ b/typedapi/types/dataframeanalysisregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L215-L225 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L215-L225 type DataframeAnalysisRegression struct { // Alpha Advanced configuration option. Machine learning uses loss guided tree // growing, which means that the decision trees grow where the regularized loss @@ -457,13 +457,3 @@ func NewDataframeAnalysisRegression() *DataframeAnalysisRegression { return r } - -// true - -type DataframeAnalysisRegressionVariant interface { - DataframeAnalysisRegressionCaster() *DataframeAnalysisRegression -} - -func (s *DataframeAnalysisRegression) DataframeAnalysisRegressionCaster() *DataframeAnalysisRegression { - return s -} diff --git a/typedapi/types/dataframeanalytics.go b/typedapi/types/dataframeanalytics.go index 7ef5c033d8..39ff7c3b5e 100644 --- a/typedapi/types/dataframeanalytics.go +++ b/typedapi/types/dataframeanalytics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DataframeAnalytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L325-L345 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L325-L345 type DataframeAnalytics struct { // AnalysisStats An object containing information about the analysis job. AnalysisStats *DataframeAnalyticsStatsContainer `json:"analysis_stats,omitempty"` @@ -131,5 +131,3 @@ func NewDataframeAnalytics() *DataframeAnalytics { return r } - -// false diff --git a/typedapi/types/dataframeanalyticsauthorization.go b/typedapi/types/dataframeanalyticsauthorization.go index 754fc20585..5c57b65992 100644 --- a/typedapi/types/dataframeanalyticsauthorization.go +++ b/typedapi/types/dataframeanalyticsauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Authorization.ts#L45-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Authorization.ts#L45-L57 type DataframeAnalyticsAuthorization struct { // ApiKey If an API key was used for the most recent update to the job, its name and // identifier are listed in the response. @@ -92,5 +92,3 @@ func NewDataframeAnalyticsAuthorization() *DataframeAnalyticsAuthorization { return r } - -// false diff --git a/typedapi/types/dataframeanalyticsdestination.go b/typedapi/types/dataframeanalyticsdestination.go index d7d9d3cd8e..062483e663 100644 --- a/typedapi/types/dataframeanalyticsdestination.go +++ b/typedapi/types/dataframeanalyticsdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L77-L82 type DataframeAnalyticsDestination struct { // Index Defines the destination index to store the results of the data frame // analytics job. @@ -76,13 +76,3 @@ func NewDataframeAnalyticsDestination() *DataframeAnalyticsDestination { return r } - -// true - -type DataframeAnalyticsDestinationVariant interface { - DataframeAnalyticsDestinationCaster() *DataframeAnalyticsDestination -} - -func (s *DataframeAnalyticsDestination) DataframeAnalyticsDestinationCaster() *DataframeAnalyticsDestination { - return s -} diff --git a/typedapi/types/dataframeanalyticsfieldselection.go b/typedapi/types/dataframeanalyticsfieldselection.go index 3a4c6a6ebb..562bed1bfc 100644 --- a/typedapi/types/dataframeanalyticsfieldselection.go +++ b/typedapi/types/dataframeanalyticsfieldselection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsFieldSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L55-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L55-L68 type DataframeAnalyticsFieldSelection struct { // FeatureType The feature type of this field for the analysis. May be categorical or // numerical. @@ -136,5 +136,3 @@ func NewDataframeAnalyticsFieldSelection() *DataframeAnalyticsFieldSelection { return r } - -// false diff --git a/typedapi/types/dataframeanalyticsmemoryestimation.go b/typedapi/types/dataframeanalyticsmemoryestimation.go index 1d4b5ed7c9..dc79f93051 100644 --- a/typedapi/types/dataframeanalyticsmemoryestimation.go +++ b/typedapi/types/dataframeanalyticsmemoryestimation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsMemoryEstimation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L70-L75 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L70-L75 type DataframeAnalyticsMemoryEstimation struct { // ExpectedMemoryWithDisk Estimated memory usage under the assumption that overflowing to disk is // allowed during data frame analytics. expected_memory_with_disk is usually @@ -93,5 +93,3 @@ func NewDataframeAnalyticsMemoryEstimation() *DataframeAnalyticsMemoryEstimation return r } - -// false diff --git a/typedapi/types/dataframeanalyticsrecord.go b/typedapi/types/dataframeanalyticsrecord.go index 5da38f8c69..bb693a7cc1 100644 --- a/typedapi/types/dataframeanalyticsrecord.go +++ b/typedapi/types/dataframeanalyticsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataFrameAnalyticsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_data_frame_analytics/types.ts#L22-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_data_frame_analytics/types.ts#L22-L102 type DataFrameAnalyticsRecord struct { // AssignmentExplanation Messages related to the selection of a node. AssignmentExplanation *string `json:"assignment_explanation,omitempty"` @@ -237,5 +237,3 @@ func NewDataFrameAnalyticsRecord() *DataFrameAnalyticsRecord { return r } - -// false diff --git a/typedapi/types/dataframeanalyticssource.go b/typedapi/types/dataframeanalyticssource.go index ea1d3d2462..0b63ee8a60 100644 --- a/typedapi/types/dataframeanalyticssource.go +++ b/typedapi/types/dataframeanalyticssource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L39-L53 type DataframeAnalyticsSource struct { // Index Index or indices on which to perform the analysis. It can be a single index // or index pattern as well as an array of indices or patterns. NOTE: If your @@ -109,13 +109,3 @@ func NewDataframeAnalyticsSource() *DataframeAnalyticsSource { return r } - -// true - -type DataframeAnalyticsSourceVariant interface { - DataframeAnalyticsSourceCaster() *DataframeAnalyticsSource -} - -func (s *DataframeAnalyticsSource) DataframeAnalyticsSourceCaster() *DataframeAnalyticsSource { - return s -} diff --git a/typedapi/types/dataframeanalyticsstatscontainer.go b/typedapi/types/dataframeanalyticsstatscontainer.go index 7263afacc8..916046c96f 100644 --- a/typedapi/types/dataframeanalyticsstatscontainer.go +++ b/typedapi/types/dataframeanalyticsstatscontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // DataframeAnalyticsStatsContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L374-L382 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L374-L382 type DataframeAnalyticsStatsContainer struct { AdditionalDataframeAnalyticsStatsContainerProperty map[string]json.RawMessage `json:"-"` // ClassificationStats An object containing information about the classification analysis job. @@ -75,5 +75,3 @@ func NewDataframeAnalyticsStatsContainer() *DataframeAnalyticsStatsContainer { return r } - -// false diff --git a/typedapi/types/dataframeanalyticsstatsdatacounts.go b/typedapi/types/dataframeanalyticsstatsdatacounts.go index 5d2144662c..c576310e6b 100644 --- a/typedapi/types/dataframeanalyticsstatsdatacounts.go +++ b/typedapi/types/dataframeanalyticsstatsdatacounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsDataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L365-L372 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L365-L372 type DataframeAnalyticsStatsDataCounts struct { // SkippedDocsCount The number of documents that are skipped during the analysis because they // contained values that are not supported by the analysis. For example, outlier @@ -120,5 +120,3 @@ func NewDataframeAnalyticsStatsDataCounts() *DataframeAnalyticsStatsDataCounts { return r } - -// false diff --git a/typedapi/types/dataframeanalyticsstatshyperparameters.go b/typedapi/types/dataframeanalyticsstatshyperparameters.go index 6dcd0cbb41..9802d2b4a3 100644 --- a/typedapi/types/dataframeanalyticsstatshyperparameters.go +++ b/typedapi/types/dataframeanalyticsstatshyperparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsHyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L384-L403 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L384-L403 type DataframeAnalyticsStatsHyperparameters struct { // Hyperparameters An object containing the parameters of the classification analysis job. Hyperparameters Hyperparameters `json:"hyperparameters"` @@ -108,5 +108,3 @@ func NewDataframeAnalyticsStatsHyperparameters() *DataframeAnalyticsStatsHyperpa return r } - -// false diff --git a/typedapi/types/dataframeanalyticsstatsmemoryusage.go b/typedapi/types/dataframeanalyticsstatsmemoryusage.go index 0748e972ce..d0283553ea 100644 --- a/typedapi/types/dataframeanalyticsstatsmemoryusage.go +++ b/typedapi/types/dataframeanalyticsstatsmemoryusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L354-L363 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L354-L363 type DataframeAnalyticsStatsMemoryUsage struct { // MemoryReestimateBytes This value is present when the status is hard_limit and it is a new estimate // of how much memory the job needs. @@ -117,5 +117,3 @@ func NewDataframeAnalyticsStatsMemoryUsage() *DataframeAnalyticsStatsMemoryUsage return r } - -// false diff --git a/typedapi/types/dataframeanalyticsstatsoutlierdetection.go b/typedapi/types/dataframeanalyticsstatsoutlierdetection.go index 8cf24596cd..5fe034c36b 100644 --- a/typedapi/types/dataframeanalyticsstatsoutlierdetection.go +++ b/typedapi/types/dataframeanalyticsstatsoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsStatsOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L405-L418 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L405-L418 type DataframeAnalyticsStatsOutlierDetection struct { // Parameters The list of job parameters specified by the user or determined by algorithmic // heuristics. @@ -83,5 +83,3 @@ func NewDataframeAnalyticsStatsOutlierDetection() *DataframeAnalyticsStatsOutlie return r } - -// false diff --git a/typedapi/types/dataframeanalyticsstatsprogress.go b/typedapi/types/dataframeanalyticsstatsprogress.go index 2ae7ae2c68..ecda2d5641 100644 --- a/typedapi/types/dataframeanalyticsstatsprogress.go +++ b/typedapi/types/dataframeanalyticsstatsprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L347-L352 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L347-L352 type DataframeAnalyticsStatsProgress struct { // Phase Defines the phase of the data frame analytics job. Phase string `json:"phase"` @@ -94,5 +94,3 @@ func NewDataframeAnalyticsStatsProgress() *DataframeAnalyticsStatsProgress { return r } - -// false diff --git a/typedapi/types/dataframeanalyticssummary.go b/typedapi/types/dataframeanalyticssummary.go index 661e27a064..b4bb95734b 100644 --- a/typedapi/types/dataframeanalyticssummary.go +++ b/typedapi/types/dataframeanalyticssummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L306-L323 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L306-L323 type DataframeAnalyticsSummary struct { AllowLazyStart *bool `json:"allow_lazy_start,omitempty"` Analysis DataframeAnalysisContainer `json:"analysis"` @@ -176,5 +176,3 @@ func NewDataframeAnalyticsSummary() *DataframeAnalyticsSummary { return r } - -// false diff --git a/typedapi/types/dataframeclassificationsummary.go b/typedapi/types/dataframeclassificationsummary.go index 033a68f746..e83bbcff96 100644 --- a/typedapi/types/dataframeclassificationsummary.go +++ b/typedapi/types/dataframeclassificationsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DataframeClassificationSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L44-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L44-L66 type DataframeClassificationSummary struct { // Accuracy Accuracy of predictions (per-class and overall). Accuracy *DataframeClassificationSummaryAccuracy `json:"accuracy,omitempty"` @@ -45,5 +45,3 @@ func NewDataframeClassificationSummary() *DataframeClassificationSummary { return r } - -// false diff --git a/typedapi/types/dataframeclassificationsummaryaccuracy.go b/typedapi/types/dataframeclassificationsummaryaccuracy.go index 21d333400f..c6ee21a7fb 100644 --- a/typedapi/types/dataframeclassificationsummaryaccuracy.go +++ b/typedapi/types/dataframeclassificationsummaryaccuracy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryAccuracy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L111-L114 type DataframeClassificationSummaryAccuracy struct { Classes []DataframeEvaluationClass `json:"classes"` OverallAccuracy Float64 `json:"overall_accuracy"` @@ -84,5 +84,3 @@ func NewDataframeClassificationSummaryAccuracy() *DataframeClassificationSummary return r } - -// false diff --git a/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go b/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go index 244136c787..6de97d63e9 100644 --- a/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go +++ b/typedapi/types/dataframeclassificationsummarymulticlassconfusionmatrix.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryMulticlassConfusionMatrix type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L120-L123 type DataframeClassificationSummaryMulticlassConfusionMatrix struct { ConfusionMatrix []ConfusionMatrixItem `json:"confusion_matrix"` OtherActualClassCount int `json:"other_actual_class_count"` @@ -84,5 +84,3 @@ func NewDataframeClassificationSummaryMulticlassConfusionMatrix() *DataframeClas return r } - -// false diff --git a/typedapi/types/dataframeclassificationsummaryprecision.go b/typedapi/types/dataframeclassificationsummaryprecision.go index d5332cea4f..6b6373a624 100644 --- a/typedapi/types/dataframeclassificationsummaryprecision.go +++ b/typedapi/types/dataframeclassificationsummaryprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L101-L104 type DataframeClassificationSummaryPrecision struct { AvgPrecision Float64 `json:"avg_precision"` Classes []DataframeEvaluationClass `json:"classes"` @@ -84,5 +84,3 @@ func NewDataframeClassificationSummaryPrecision() *DataframeClassificationSummar return r } - -// false diff --git a/typedapi/types/dataframeclassificationsummaryrecall.go b/typedapi/types/dataframeclassificationsummaryrecall.go index 91607efeb7..f5db39a202 100644 --- a/typedapi/types/dataframeclassificationsummaryrecall.go +++ b/typedapi/types/dataframeclassificationsummaryrecall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L106-L109 type DataframeClassificationSummaryRecall struct { AvgRecall Float64 `json:"avg_recall"` Classes []DataframeEvaluationClass `json:"classes"` @@ -84,5 +84,3 @@ func NewDataframeClassificationSummaryRecall() *DataframeClassificationSummaryRe return r } - -// false diff --git a/typedapi/types/dataframeevaluationclass.go b/typedapi/types/dataframeevaluationclass.go index 229aa860cf..f5834fafa8 100644 --- a/typedapi/types/dataframeevaluationclass.go +++ b/typedapi/types/dataframeevaluationclass.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L116-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L116-L118 type DataframeEvaluationClass struct { ClassName string `json:"class_name"` Value Float64 `json:"value"` @@ -84,5 +84,3 @@ func NewDataframeEvaluationClass() *DataframeEvaluationClass { return r } - -// false diff --git a/typedapi/types/dataframeevaluationclassification.go b/typedapi/types/dataframeevaluationclassification.go index be5cecb73b..328b431f7e 100644 --- a/typedapi/types/dataframeevaluationclassification.go +++ b/typedapi/types/dataframeevaluationclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L35-L44 type DataframeEvaluationClassification struct { // ActualField The field of the index which contains the ground truth. The data type of this // field can be boolean or integer. If the data type is integer, the value has @@ -93,13 +93,3 @@ func NewDataframeEvaluationClassification() *DataframeEvaluationClassification { return r } - -// true - -type DataframeEvaluationClassificationVariant interface { - DataframeEvaluationClassificationCaster() *DataframeEvaluationClassification -} - -func (s *DataframeEvaluationClassification) DataframeEvaluationClassificationCaster() *DataframeEvaluationClassification { - return s -} diff --git a/typedapi/types/dataframeevaluationclassificationmetrics.go b/typedapi/types/dataframeevaluationclassificationmetrics.go index b05171f7ad..9ef26a0a2a 100644 --- a/typedapi/types/dataframeevaluationclassificationmetrics.go +++ b/typedapi/types/dataframeevaluationclassificationmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationClassificationMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L73-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L73-L78 type DataframeEvaluationClassificationMetrics struct { // Accuracy Accuracy of predictions (per-class and overall). Accuracy map[string]json.RawMessage `json:"accuracy,omitempty"` @@ -53,13 +53,3 @@ func NewDataframeEvaluationClassificationMetrics() *DataframeEvaluationClassific return r } - -// true - -type DataframeEvaluationClassificationMetricsVariant interface { - DataframeEvaluationClassificationMetricsCaster() *DataframeEvaluationClassificationMetrics -} - -func (s *DataframeEvaluationClassificationMetrics) DataframeEvaluationClassificationMetricsCaster() *DataframeEvaluationClassificationMetrics { - return s -} diff --git a/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go b/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go index 3b30381f99..d8660b29c5 100644 --- a/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go +++ b/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClassificationMetricsAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L85-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L85-L90 type DataframeEvaluationClassificationMetricsAucRoc struct { // ClassName Name of the only class that is treated as positive during AUC ROC // calculation. Other classes are treated as negative ("one-vs-all" strategy). @@ -88,13 +88,3 @@ func NewDataframeEvaluationClassificationMetricsAucRoc() *DataframeEvaluationCla return r } - -// true - -type DataframeEvaluationClassificationMetricsAucRocVariant interface { - DataframeEvaluationClassificationMetricsAucRocCaster() *DataframeEvaluationClassificationMetricsAucRoc -} - -func (s *DataframeEvaluationClassificationMetricsAucRoc) DataframeEvaluationClassificationMetricsAucRocCaster() *DataframeEvaluationClassificationMetricsAucRoc { - return s -} diff --git a/typedapi/types/dataframeevaluationcontainer.go b/typedapi/types/dataframeevaluationcontainer.go index 5cc834df31..158d66e393 100644 --- a/typedapi/types/dataframeevaluationcontainer.go +++ b/typedapi/types/dataframeevaluationcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // DataframeEvaluationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L25-L33 type DataframeEvaluationContainer struct { AdditionalDataframeEvaluationContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification evaluation evaluates the results of a classification analysis @@ -79,13 +79,3 @@ func NewDataframeEvaluationContainer() *DataframeEvaluationContainer { return r } - -// true - -type DataframeEvaluationContainerVariant interface { - DataframeEvaluationContainerCaster() *DataframeEvaluationContainer -} - -func (s *DataframeEvaluationContainer) DataframeEvaluationContainerCaster() *DataframeEvaluationContainer { - return s -} diff --git a/typedapi/types/dataframeevaluationoutlierdetection.go b/typedapi/types/dataframeevaluationoutlierdetection.go index 13c7b8f3ac..9232cb47aa 100644 --- a/typedapi/types/dataframeevaluationoutlierdetection.go +++ b/typedapi/types/dataframeevaluationoutlierdetection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L46-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L46-L53 type DataframeEvaluationOutlierDetection struct { // ActualField The field of the index which contains the ground truth. The data type of this // field can be boolean or integer. If the data type is integer, the value has @@ -85,13 +85,3 @@ func NewDataframeEvaluationOutlierDetection() *DataframeEvaluationOutlierDetecti return r } - -// true - -type DataframeEvaluationOutlierDetectionVariant interface { - DataframeEvaluationOutlierDetectionCaster() *DataframeEvaluationOutlierDetection -} - -func (s *DataframeEvaluationOutlierDetection) DataframeEvaluationOutlierDetectionCaster() *DataframeEvaluationOutlierDetection { - return s -} diff --git a/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go b/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go index 4913c0391e..303471fc18 100644 --- a/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go +++ b/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationOutlierDetectionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L80-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L80-L83 type DataframeEvaluationOutlierDetectionMetrics struct { // AucRoc The AUC ROC (area under the curve of the receiver operating characteristic) // score and optionally the curve. It is calculated for a specific class @@ -50,13 +50,3 @@ func NewDataframeEvaluationOutlierDetectionMetrics() *DataframeEvaluationOutlier return r } - -// true - -type DataframeEvaluationOutlierDetectionMetricsVariant interface { - DataframeEvaluationOutlierDetectionMetricsCaster() *DataframeEvaluationOutlierDetectionMetrics -} - -func (s *DataframeEvaluationOutlierDetectionMetrics) DataframeEvaluationOutlierDetectionMetricsCaster() *DataframeEvaluationOutlierDetectionMetrics { - return s -} diff --git a/typedapi/types/dataframeevaluationregression.go b/typedapi/types/dataframeevaluationregression.go index 96fbafcf8b..6be017d77e 100644 --- a/typedapi/types/dataframeevaluationregression.go +++ b/typedapi/types/dataframeevaluationregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L55-L62 type DataframeEvaluationRegression struct { // ActualField The field of the index which contains the ground truth. The data type of this // field must be numerical. @@ -85,13 +85,3 @@ func NewDataframeEvaluationRegression() *DataframeEvaluationRegression { return r } - -// true - -type DataframeEvaluationRegressionVariant interface { - DataframeEvaluationRegressionCaster() *DataframeEvaluationRegression -} - -func (s *DataframeEvaluationRegression) DataframeEvaluationRegressionCaster() *DataframeEvaluationRegression { - return s -} diff --git a/typedapi/types/dataframeevaluationregressionmetrics.go b/typedapi/types/dataframeevaluationregressionmetrics.go index db77d90519..13ba6b4da1 100644 --- a/typedapi/types/dataframeevaluationregressionmetrics.go +++ b/typedapi/types/dataframeevaluationregressionmetrics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationRegressionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L92-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L92-L110 type DataframeEvaluationRegressionMetrics struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationRegressionMetricsHuber `json:"huber,omitempty"` @@ -50,13 +50,3 @@ func NewDataframeEvaluationRegressionMetrics() *DataframeEvaluationRegressionMet return r } - -// true - -type DataframeEvaluationRegressionMetricsVariant interface { - DataframeEvaluationRegressionMetricsCaster() *DataframeEvaluationRegressionMetrics -} - -func (s *DataframeEvaluationRegressionMetrics) DataframeEvaluationRegressionMetricsCaster() *DataframeEvaluationRegressionMetrics { - return s -} diff --git a/typedapi/types/dataframeevaluationregressionmetricshuber.go b/typedapi/types/dataframeevaluationregressionmetricshuber.go index 872fb057e3..a4c8142e04 100644 --- a/typedapi/types/dataframeevaluationregressionmetricshuber.go +++ b/typedapi/types/dataframeevaluationregressionmetricshuber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsHuber type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L117-L120 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L117-L120 type DataframeEvaluationRegressionMetricsHuber struct { // Delta Approximates 1/2 (prediction - actual)2 for values much less than delta and // approximates a straight line with slope delta for values much larger than @@ -81,13 +81,3 @@ func NewDataframeEvaluationRegressionMetricsHuber() *DataframeEvaluationRegressi return r } - -// true - -type DataframeEvaluationRegressionMetricsHuberVariant interface { - DataframeEvaluationRegressionMetricsHuberCaster() *DataframeEvaluationRegressionMetricsHuber -} - -func (s *DataframeEvaluationRegressionMetricsHuber) DataframeEvaluationRegressionMetricsHuberCaster() *DataframeEvaluationRegressionMetricsHuber { - return s -} diff --git a/typedapi/types/dataframeevaluationregressionmetricsmsle.go b/typedapi/types/dataframeevaluationregressionmetricsmsle.go index 276127105c..fa5da1d5c9 100644 --- a/typedapi/types/dataframeevaluationregressionmetricsmsle.go +++ b/typedapi/types/dataframeevaluationregressionmetricsmsle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsMsle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeEvaluation.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeEvaluation.ts#L112-L115 type DataframeEvaluationRegressionMetricsMsle struct { // Offset Defines the transition point at which you switch from minimizing quadratic // error to minimizing quadratic log error. Defaults to 1. @@ -80,13 +80,3 @@ func NewDataframeEvaluationRegressionMetricsMsle() *DataframeEvaluationRegressio return r } - -// true - -type DataframeEvaluationRegressionMetricsMsleVariant interface { - DataframeEvaluationRegressionMetricsMsleCaster() *DataframeEvaluationRegressionMetricsMsle -} - -func (s *DataframeEvaluationRegressionMetricsMsle) DataframeEvaluationRegressionMetricsMsleCaster() *DataframeEvaluationRegressionMetricsMsle { - return s -} diff --git a/typedapi/types/dataframeevaluationsummaryaucroc.go b/typedapi/types/dataframeevaluationsummaryaucroc.go index 62b555511b..47f3ed24ca 100644 --- a/typedapi/types/dataframeevaluationsummaryaucroc.go +++ b/typedapi/types/dataframeevaluationsummaryaucroc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L91-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L91-L93 type DataframeEvaluationSummaryAucRoc struct { Curve []DataframeEvaluationSummaryAucRocCurveItem `json:"curve,omitempty"` Value Float64 `json:"value"` @@ -84,5 +84,3 @@ func NewDataframeEvaluationSummaryAucRoc() *DataframeEvaluationSummaryAucRoc { return r } - -// false diff --git a/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go b/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go index c6f25b4f60..2ac6937aee 100644 --- a/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go +++ b/typedapi/types/dataframeevaluationsummaryaucroccurveitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRocCurveItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L95-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L95-L99 type DataframeEvaluationSummaryAucRocCurveItem struct { Fpr Float64 `json:"fpr"` Threshold Float64 `json:"threshold"` @@ -112,5 +112,3 @@ func NewDataframeEvaluationSummaryAucRocCurveItem() *DataframeEvaluationSummaryA return r } - -// false diff --git a/typedapi/types/dataframeevaluationvalue.go b/typedapi/types/dataframeevaluationvalue.go index 3fbeba2ccd..0e34018d32 100644 --- a/typedapi/types/dataframeevaluationvalue.go +++ b/typedapi/types/dataframeevaluationvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L87-L89 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L87-L89 type DataframeEvaluationValue struct { Value Float64 `json:"value"` } @@ -78,5 +78,3 @@ func NewDataframeEvaluationValue() *DataframeEvaluationValue { return r } - -// false diff --git a/typedapi/types/dataframeoutlierdetectionsummary.go b/typedapi/types/dataframeoutlierdetectionsummary.go index 266c984566..cc631fcb87 100644 --- a/typedapi/types/dataframeoutlierdetectionsummary.go +++ b/typedapi/types/dataframeoutlierdetectionsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DataframeOutlierDetectionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L24-L42 type DataframeOutlierDetectionSummary struct { // AucRoc The AUC ROC (area under the curve of the receiver operating characteristic) // score and optionally the curve. @@ -49,5 +49,3 @@ func NewDataframeOutlierDetectionSummary() *DataframeOutlierDetectionSummary { return r } - -// false diff --git a/typedapi/types/dataframepreviewconfig.go b/typedapi/types/dataframepreviewconfig.go index 600c1bfa30..bc0f677fad 100644 --- a/typedapi/types/dataframepreviewconfig.go +++ b/typedapi/types/dataframepreviewconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataframePreviewConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 type DataframePreviewConfig struct { Analysis DataframeAnalysisContainer `json:"analysis"` AnalyzedFields *DataframeAnalysisAnalyzedFields `json:"analyzed_fields,omitempty"` @@ -109,13 +109,3 @@ func NewDataframePreviewConfig() *DataframePreviewConfig { return r } - -// true - -type DataframePreviewConfigVariant interface { - DataframePreviewConfigCaster() *DataframePreviewConfig -} - -func (s *DataframePreviewConfig) DataframePreviewConfigCaster() *DataframePreviewConfig { - return s -} diff --git a/typedapi/types/dataframeregressionsummary.go b/typedapi/types/dataframeregressionsummary.go index 316d45c294..bdcaa43866 100644 --- a/typedapi/types/dataframeregressionsummary.go +++ b/typedapi/types/dataframeregressionsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DataframeRegressionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/evaluate_data_frame/types.ts#L68-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/evaluate_data_frame/types.ts#L68-L85 type DataframeRegressionSummary struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationValue `json:"huber,omitempty"` @@ -43,5 +43,3 @@ func NewDataframeRegressionSummary() *DataframeRegressionSummary { return r } - -// false diff --git a/typedapi/types/datapathstats.go b/typedapi/types/datapathstats.go index 56f0eecc9b..9fdcbb3f73 100644 --- a/typedapi/types/datapathstats.go +++ b/typedapi/types/datapathstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataPathStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L586-L630 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L588-L632 type DataPathStats struct { // Available Total amount of disk space available to this Java virtual machine on this // file store. @@ -301,5 +301,3 @@ func NewDataPathStats() *DataPathStats { return r } - -// false diff --git a/typedapi/types/datastream.go b/typedapi/types/datastream.go index cbe1438a59..df9a023ef7 100644 --- a/typedapi/types/datastream.go +++ b/typedapi/types/datastream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // DataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStream.ts#L45-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStream.ts#L45-L127 type DataStream struct { // AllowCustomRouting If `true`, the data stream allows custom routing on write request. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` @@ -271,5 +271,3 @@ func NewDataStream() *DataStream { return r } - -// false diff --git a/typedapi/types/datastreamindex.go b/typedapi/types/datastreamindex.go index 165f818525..eb2d78132f 100644 --- a/typedapi/types/datastreamindex.go +++ b/typedapi/types/datastreamindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DataStreamIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStream.ts#L136-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStream.ts#L136-L157 type DataStreamIndex struct { // IlmPolicy Name of the current ILM lifecycle policy configured for this backing index. IlmPolicy *string `json:"ilm_policy,omitempty"` @@ -108,5 +108,3 @@ func NewDataStreamIndex() *DataStreamIndex { return r } - -// false diff --git a/typedapi/types/datastreamlifecycle.go b/typedapi/types/datastreamlifecycle.go index 0a5f01aa0d..a30e38df87 100644 --- a/typedapi/types/datastreamlifecycle.go +++ b/typedapi/types/datastreamlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStreamLifecycle.ts#L25-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStreamLifecycle.ts#L25-L45 type DataStreamLifecycle struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. @@ -97,13 +97,3 @@ func NewDataStreamLifecycle() *DataStreamLifecycle { return r } - -// true - -type DataStreamLifecycleVariant interface { - DataStreamLifecycleCaster() *DataStreamLifecycle -} - -func (s *DataStreamLifecycle) DataStreamLifecycleCaster() *DataStreamLifecycle { - return s -} diff --git a/typedapi/types/datastreamlifecycledetails.go b/typedapi/types/datastreamlifecycledetails.go index 8f6ac1b57c..3380d1cd3e 100644 --- a/typedapi/types/datastreamlifecycledetails.go +++ b/typedapi/types/datastreamlifecycledetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L152-L156 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L153-L157 type DataStreamLifecycleDetails struct { StagnatingBackingIndices []StagnatingBackingIndices `json:"stagnating_backing_indices,omitempty"` StagnatingBackingIndicesCount int `json:"stagnating_backing_indices_count"` @@ -101,5 +101,3 @@ func NewDataStreamLifecycleDetails() *DataStreamLifecycleDetails { return r } - -// false diff --git a/typedapi/types/datastreamlifecycledownsampling.go b/typedapi/types/datastreamlifecycledownsampling.go index 04fb3e6c5d..c40f6d30a4 100644 --- a/typedapi/types/datastreamlifecycledownsampling.go +++ b/typedapi/types/datastreamlifecycledownsampling.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DataStreamLifecycleDownsampling type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 type DataStreamLifecycleDownsampling struct { // Rounds The list of downsampling rounds to execute as part of this downsampling // configuration @@ -35,13 +35,3 @@ func NewDataStreamLifecycleDownsampling() *DataStreamLifecycleDownsampling { return r } - -// true - -type DataStreamLifecycleDownsamplingVariant interface { - DataStreamLifecycleDownsamplingCaster() *DataStreamLifecycleDownsampling -} - -func (s *DataStreamLifecycleDownsampling) DataStreamLifecycleDownsamplingCaster() *DataStreamLifecycleDownsampling { - return s -} diff --git a/typedapi/types/datastreamlifecycleexplain.go b/typedapi/types/datastreamlifecycleexplain.go index 3e59fd2ea5..7b0d16d28c 100644 --- a/typedapi/types/datastreamlifecycleexplain.go +++ b/typedapi/types/datastreamlifecycleexplain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleExplain type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 type DataStreamLifecycleExplain struct { Error *string `json:"error,omitempty"` GenerationTime Duration `json:"generation_time,omitempty"` @@ -131,5 +131,3 @@ func NewDataStreamLifecycleExplain() *DataStreamLifecycleExplain { return r } - -// false diff --git a/typedapi/types/datastreamlifecycleindicator.go b/typedapi/types/datastreamlifecycleindicator.go index 54efc4f909..95b5a01edf 100644 --- a/typedapi/types/datastreamlifecycleindicator.go +++ b/typedapi/types/datastreamlifecycleindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DataStreamLifecycleIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L147-L151 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L148-L152 type DataStreamLifecycleIndicator struct { Details *DataStreamLifecycleDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewDataStreamLifecycleIndicator() *DataStreamLifecycleIndicator { return r } - -// false diff --git a/typedapi/types/datastreamlifecyclerolloverconditions.go b/typedapi/types/datastreamlifecyclerolloverconditions.go index 0f99271db6..70bf6c9940 100644 --- a/typedapi/types/datastreamlifecyclerolloverconditions.go +++ b/typedapi/types/datastreamlifecyclerolloverconditions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleRolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStreamLifecycle.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStreamLifecycle.ts#L60-L72 type DataStreamLifecycleRolloverConditions struct { MaxAge *string `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` @@ -168,13 +168,3 @@ func NewDataStreamLifecycleRolloverConditions() *DataStreamLifecycleRolloverCond return r } - -// true - -type DataStreamLifecycleRolloverConditionsVariant interface { - DataStreamLifecycleRolloverConditionsCaster() *DataStreamLifecycleRolloverConditions -} - -func (s *DataStreamLifecycleRolloverConditions) DataStreamLifecycleRolloverConditionsCaster() *DataStreamLifecycleRolloverConditions { - return s -} diff --git a/typedapi/types/datastreamlifecyclewithrollover.go b/typedapi/types/datastreamlifecyclewithrollover.go index 29de67cd16..053a717721 100644 --- a/typedapi/types/datastreamlifecyclewithrollover.go +++ b/typedapi/types/datastreamlifecyclewithrollover.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleWithRollover type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStreamLifecycle.ts#L47-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStreamLifecycle.ts#L47-L58 type DataStreamLifecycleWithRollover struct { // DataRetention If defined, every document added to this data stream will be stored at least // for this time frame. @@ -108,13 +108,3 @@ func NewDataStreamLifecycleWithRollover() *DataStreamLifecycleWithRollover { return r } - -// true - -type DataStreamLifecycleWithRolloverVariant interface { - DataStreamLifecycleWithRolloverCaster() *DataStreamLifecycleWithRollover -} - -func (s *DataStreamLifecycleWithRollover) DataStreamLifecycleWithRolloverCaster() *DataStreamLifecycleWithRollover { - return s -} diff --git a/typedapi/types/datastreamnames.go b/typedapi/types/datastreamnames.go index edd792e18c..07b03d495c 100644 --- a/typedapi/types/datastreamnames.go +++ b/typedapi/types/datastreamnames.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DataStreamNames type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L95-L95 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L95-L95 type DataStreamNames []string diff --git a/typedapi/types/datastreams.go b/typedapi/types/datastreams.go index 09d27edf7e..02eeb2f89b 100644 --- a/typedapi/types/datastreams.go +++ b/typedapi/types/datastreams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreams type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L78-L81 type DataStreams struct { Available bool `json:"available"` DataStreams int64 `json:"data_streams"` @@ -123,5 +123,3 @@ func NewDataStreams() *DataStreams { return r } - -// false diff --git a/typedapi/types/datastreamsstatsitem.go b/typedapi/types/datastreamsstatsitem.go index 7bb42faa85..b6bc9477a8 100644 --- a/typedapi/types/datastreamsstatsitem.go +++ b/typedapi/types/datastreamsstatsitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamsStatsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65 type DataStreamsStatsItem struct { // BackingIndices Current number of backing indices for the data stream. BackingIndices int `json:"backing_indices"` @@ -124,5 +124,3 @@ func NewDataStreamsStatsItem() *DataStreamsStatsItem { return r } - -// false diff --git a/typedapi/types/datastreamstats.go b/typedapi/types/datastreamstats.go index 3856e6cce7..b1bf0cf401 100644 --- a/typedapi/types/datastreamstats.go +++ b/typedapi/types/datastreamstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59 type DataStreamStats struct { // BackingIndicesInError The count of the backing indices for the data stream. BackingIndicesInError int `json:"backing_indices_in_error"` @@ -105,5 +105,3 @@ func NewDataStreamStats() *DataStreamStats { return r } - -// false diff --git a/typedapi/types/datastreamtimestamp.go b/typedapi/types/datastreamtimestamp.go index a733b02a73..32d1564e89 100644 --- a/typedapi/types/datastreamtimestamp.go +++ b/typedapi/types/datastreamtimestamp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamTimestamp type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/TypeMapping.ts#L59-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/TypeMapping.ts#L59-L61 type DataStreamTimestamp struct { Enabled bool `json:"enabled"` } @@ -76,13 +76,3 @@ func NewDataStreamTimestamp() *DataStreamTimestamp { return r } - -// true - -type DataStreamTimestampVariant interface { - DataStreamTimestampCaster() *DataStreamTimestamp -} - -func (s *DataStreamTimestamp) DataStreamTimestampCaster() *DataStreamTimestamp { - return s -} diff --git a/typedapi/types/datastreamtimestampfield.go b/typedapi/types/datastreamtimestampfield.go index 9f10699c4b..d2b6e74e99 100644 --- a/typedapi/types/datastreamtimestampfield.go +++ b/typedapi/types/datastreamtimestampfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataStreamTimestampField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStream.ts#L129-L134 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStream.ts#L129-L134 type DataStreamTimestampField struct { // Name Name of the timestamp field for the data stream, which must be `@timestamp`. // The `@timestamp` field must be included in every document indexed to the data @@ -69,5 +69,3 @@ func NewDataStreamTimestampField() *DataStreamTimestampField { return r } - -// false diff --git a/typedapi/types/datastreamvisibility.go b/typedapi/types/datastreamvisibility.go index c8ff49f203..3278613a3b 100644 --- a/typedapi/types/datastreamvisibility.go +++ b/typedapi/types/datastreamvisibility.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataStreamVisibility type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStream.ts#L159-L162 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStream.ts#L159-L162 type DataStreamVisibility struct { AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` Hidden *bool `json:"hidden,omitempty"` @@ -91,13 +91,3 @@ func NewDataStreamVisibility() *DataStreamVisibility { return r } - -// true - -type DataStreamVisibilityVariant interface { - DataStreamVisibilityCaster() *DataStreamVisibility -} - -func (s *DataStreamVisibility) DataStreamVisibilityCaster() *DataStreamVisibility { - return s -} diff --git a/typedapi/types/datastreamwithlifecycle.go b/typedapi/types/datastreamwithlifecycle.go index 69b2f46812..e153e53d96 100644 --- a/typedapi/types/datastreamwithlifecycle.go +++ b/typedapi/types/datastreamwithlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DataStreamWithLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 type DataStreamWithLifecycle struct { Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` Name string `json:"name"` @@ -72,5 +72,3 @@ func NewDataStreamWithLifecycle() *DataStreamWithLifecycle { return r } - -// false diff --git a/typedapi/types/datatierphasestatistics.go b/typedapi/types/datatierphasestatistics.go index 9513a07f61..9b3781bdf8 100644 --- a/typedapi/types/datatierphasestatistics.go +++ b/typedapi/types/datatierphasestatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataTierPhaseStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L83-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L83-L94 type DataTierPhaseStatistics struct { DocCount int64 `json:"doc_count"` IndexCount int64 `json:"index_count"` @@ -221,5 +221,3 @@ func NewDataTierPhaseStatistics() *DataTierPhaseStatistics { return r } - -// false diff --git a/typedapi/types/datatiers.go b/typedapi/types/datatiers.go index 3cf22e8ef0..e417a14777 100644 --- a/typedapi/types/datatiers.go +++ b/typedapi/types/datatiers.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DataTiers type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L349-L359 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L349-L359 type DataTiers struct { Available bool `json:"available"` DataCold DataTierPhaseStatistics `json:"data_cold"` @@ -121,5 +121,3 @@ func NewDataTiers() *DataTiers { return r } - -// false diff --git a/typedapi/types/datedecayfunction.go b/typedapi/types/datedecayfunction.go index c93c101426..241fc63f29 100644 --- a/typedapi/types/datedecayfunction.go +++ b/typedapi/types/datedecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // DateDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L209-L209 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L209-L209 type DateDecayFunction struct { DecayFunctionBaseDateMathDuration map[string]DecayPlacementDateMathDuration `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the @@ -74,13 +74,3 @@ func NewDateDecayFunction() *DateDecayFunction { return r } - -// true - -type DateDecayFunctionVariant interface { - DateDecayFunctionCaster() *DateDecayFunction -} - -func (s *DateDecayFunction) DateDecayFunctionCaster() *DateDecayFunction { - return s -} diff --git a/typedapi/types/datedistancefeaturequery.go b/typedapi/types/datedistancefeaturequery.go index 2e62ef7579..5bb2b4393e 100644 --- a/typedapi/types/datedistancefeaturequery.go +++ b/typedapi/types/datedistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DateDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L71-L74 type DateDistanceFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -131,13 +131,3 @@ func NewDateDistanceFeatureQuery() *DateDistanceFeatureQuery { return r } - -// true - -type DateDistanceFeatureQueryVariant interface { - DateDistanceFeatureQueryCaster() *DateDistanceFeatureQuery -} - -func (s *DateDistanceFeatureQuery) DateDistanceFeatureQueryCaster() *DateDistanceFeatureQuery { - return s -} diff --git a/typedapi/types/datehistogramaggregate.go b/typedapi/types/datehistogramaggregate.go index 549fdafa9d..f315e940ff 100644 --- a/typedapi/types/datehistogramaggregate.go +++ b/typedapi/types/datehistogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L383-L386 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L383-L386 type DateHistogramAggregate struct { Buckets BucketsDateHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewDateHistogramAggregate() *DateHistogramAggregate { return r } - -// false diff --git a/typedapi/types/datehistogramaggregation.go b/typedapi/types/datehistogramaggregation.go index ee6533ab52..5283cda35f 100644 --- a/typedapi/types/datehistogramaggregation.go +++ b/typedapi/types/datehistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // DateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L202-L260 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L202-L260 type DateHistogramAggregation struct { // CalendarInterval Calendar-aware interval. // Can be specified using the unit name, such as `month`, or as a single unit @@ -225,13 +225,3 @@ func NewDateHistogramAggregation() *DateHistogramAggregation { return r } - -// true - -type DateHistogramAggregationVariant interface { - DateHistogramAggregationCaster() *DateHistogramAggregation -} - -func (s *DateHistogramAggregation) DateHistogramAggregationCaster() *DateHistogramAggregation { - return s -} diff --git a/typedapi/types/datehistogrambucket.go b/typedapi/types/datehistogrambucket.go index 10c267192c..def04bff37 100644 --- a/typedapi/types/datehistogrambucket.go +++ b/typedapi/types/datehistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // DateHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L388-L391 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L388-L391 type DateHistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -649,5 +649,3 @@ func NewDateHistogramBucket() *DateHistogramBucket { return r } - -// false diff --git a/typedapi/types/datehistogramgrouping.go b/typedapi/types/datehistogramgrouping.go index c217918f19..aa96be2dea 100644 --- a/typedapi/types/datehistogramgrouping.go +++ b/typedapi/types/datehistogramgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DateHistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/_types/Groupings.ts#L42-L73 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/_types/Groupings.ts#L42-L73 type DateHistogramGrouping struct { // CalendarInterval The interval of time buckets to be generated when rolling up. CalendarInterval Duration `json:"calendar_interval,omitempty"` @@ -124,13 +124,3 @@ func NewDateHistogramGrouping() *DateHistogramGrouping { return r } - -// true - -type DateHistogramGroupingVariant interface { - DateHistogramGroupingCaster() *DateHistogramGrouping -} - -func (s *DateHistogramGrouping) DateHistogramGroupingCaster() *DateHistogramGrouping { - return s -} diff --git a/typedapi/types/dateindexnameprocessor.go b/typedapi/types/dateindexnameprocessor.go index 94f77108bf..e35fe771f9 100644 --- a/typedapi/types/dateindexnameprocessor.go +++ b/typedapi/types/dateindexnameprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DateIndexNameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L729-L767 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L729-L767 type DateIndexNameProcessor struct { // DateFormats An array of the expected date formats for parsing dates / timestamps in the // document being preprocessed. @@ -224,13 +224,3 @@ func NewDateIndexNameProcessor() *DateIndexNameProcessor { return r } - -// true - -type DateIndexNameProcessorVariant interface { - DateIndexNameProcessorCaster() *DateIndexNameProcessor -} - -func (s *DateIndexNameProcessor) DateIndexNameProcessorCaster() *DateIndexNameProcessor { - return s -} diff --git a/typedapi/types/datenanosproperty.go b/typedapi/types/datenanosproperty.go index 24683142fe..d40934865b 100644 --- a/typedapi/types/datenanosproperty.go +++ b/typedapi/types/datenanosproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // DateNanosProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L90-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L92-L102 type DateNanosProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -266,6 +266,12 @@ func (s *DateNanosProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -687,6 +693,12 @@ func (s *DateNanosProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -949,13 +961,3 @@ func NewDateNanosProperty() *DateNanosProperty { return r } - -// true - -type DateNanosPropertyVariant interface { - DateNanosPropertyCaster() *DateNanosProperty -} - -func (s *DateNanosProperty) DateNanosPropertyCaster() *DateNanosProperty { - return s -} diff --git a/typedapi/types/dateprocessor.go b/typedapi/types/dateprocessor.go index 28996ddbe7..4fd8f98a83 100644 --- a/typedapi/types/dateprocessor.go +++ b/typedapi/types/dateprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L769-L802 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L769-L802 type DateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -197,13 +197,3 @@ func NewDateProcessor() *DateProcessor { return r } - -// true - -type DateProcessorVariant interface { - DateProcessorCaster() *DateProcessor -} - -func (s *DateProcessor) DateProcessorCaster() *DateProcessor { - return s -} diff --git a/typedapi/types/dateproperty.go b/typedapi/types/dateproperty.go index 482dfc29bf..84bd6984fe 100644 --- a/typedapi/types/dateproperty.go +++ b/typedapi/types/dateproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // DateProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L76-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L78-L90 type DateProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -273,6 +273,12 @@ func (s *DateProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -706,6 +712,12 @@ func (s *DateProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -970,13 +982,3 @@ func NewDateProperty() *DateProperty { return r } - -// true - -type DatePropertyVariant interface { - DatePropertyCaster() *DateProperty -} - -func (s *DateProperty) DatePropertyCaster() *DateProperty { - return s -} diff --git a/typedapi/types/daterangeaggregate.go b/typedapi/types/daterangeaggregate.go index 2811c832f9..6ec8c12277 100644 --- a/typedapi/types/daterangeaggregate.go +++ b/typedapi/types/daterangeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DateRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L609-L615 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L609-L615 type DateRangeAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewDateRangeAggregate() *DateRangeAggregate { return r } - -// false diff --git a/typedapi/types/daterangeaggregation.go b/typedapi/types/daterangeaggregation.go index 348944633e..bbd158f846 100644 --- a/typedapi/types/daterangeaggregation.go +++ b/typedapi/types/daterangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DateRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L281-L307 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L281-L307 type DateRangeAggregation struct { // Field The date field whose values are use to build ranges. Field *string `json:"field,omitempty"` @@ -121,13 +121,3 @@ func NewDateRangeAggregation() *DateRangeAggregation { return r } - -// true - -type DateRangeAggregationVariant interface { - DateRangeAggregationCaster() *DateRangeAggregation -} - -func (s *DateRangeAggregation) DateRangeAggregationCaster() *DateRangeAggregation { - return s -} diff --git a/typedapi/types/daterangeexpression.go b/typedapi/types/daterangeexpression.go index aa491a88e6..b1bae1fc7a 100644 --- a/typedapi/types/daterangeexpression.go +++ b/typedapi/types/daterangeexpression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DateRangeExpression type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L318-L331 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L318-L331 type DateRangeExpression struct { // From Start of the range (inclusive). From FieldDateMath `json:"from,omitempty"` @@ -89,13 +89,3 @@ func NewDateRangeExpression() *DateRangeExpression { return r } - -// true - -type DateRangeExpressionVariant interface { - DateRangeExpressionCaster() *DateRangeExpression -} - -func (s *DateRangeExpression) DateRangeExpressionCaster() *DateRangeExpression { - return s -} diff --git a/typedapi/types/daterangeproperty.go b/typedapi/types/daterangeproperty.go index 698561eec9..f1b0d1c018 100644 --- a/typedapi/types/daterangeproperty.go +++ b/typedapi/types/daterangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // DateRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/range.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/range.ts#L29-L32 type DateRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -275,6 +275,12 @@ func (s *DateRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -656,6 +662,12 @@ func (s *DateRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -909,13 +921,3 @@ func NewDateRangeProperty() *DateRangeProperty { return r } - -// true - -type DateRangePropertyVariant interface { - DateRangePropertyCaster() *DateRangeProperty -} - -func (s *DateRangeProperty) DateRangePropertyCaster() *DateRangeProperty { - return s -} diff --git a/typedapi/types/daterangequery.go b/typedapi/types/daterangequery.go index 447be0693c..a61e6f834a 100644 --- a/typedapi/types/daterangequery.go +++ b/typedapi/types/daterangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DateRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L161-L170 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L161-L170 type DateRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -160,13 +160,3 @@ func NewDateRangeQuery() *DateRangeQuery { return r } - -// true - -type DateRangeQueryVariant interface { - DateRangeQueryCaster() *DateRangeQuery -} - -func (s *DateRangeQuery) DateRangeQueryCaster() *DateRangeQuery { - return s -} diff --git a/typedapi/types/datetime.go b/typedapi/types/datetime.go index b0cd9260a7..bab80e4feb 100644 --- a/typedapi/types/datetime.go +++ b/typedapi/types/datetime.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // int64 // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L22-L27 type DateTime any - -type DateTimeVariant interface { - DateTimeCaster() *DateTime -} diff --git a/typedapi/types/decayfunction.go b/typedapi/types/decayfunction.go index db97a90a08..9465007502 100644 --- a/typedapi/types/decayfunction.go +++ b/typedapi/types/decayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,9 +27,5 @@ package types // NumericDecayFunction // GeoDecayFunction // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L215-L224 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L215-L224 type DecayFunction any - -type DecayFunctionVariant interface { - DecayFunctionCaster() *DecayFunction -} diff --git a/typedapi/types/decayplacement.go b/typedapi/types/decayplacement.go index 4a07cc205a..353e01b945 100644 --- a/typedapi/types/decayplacement.go +++ b/typedapi/types/decayplacement.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DecayPlacement type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L170-L189 type DecayPlacement struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` @@ -103,13 +103,3 @@ func NewDecayPlacement() *DecayPlacement { return r } - -// true - -type DecayPlacementVariant interface { - DecayPlacementCaster() *DecayPlacement -} - -func (s *DecayPlacement) DecayPlacementCaster() *DecayPlacement { - return s -} diff --git a/typedapi/types/decayplacementdatemathduration.go b/typedapi/types/decayplacementdatemathduration.go index 4894d2710d..b7a841aa75 100644 --- a/typedapi/types/decayplacementdatemathduration.go +++ b/typedapi/types/decayplacementdatemathduration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DecayPlacementDateMathDuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L170-L189 type DecayPlacementDateMathDuration struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` @@ -103,13 +103,3 @@ func NewDecayPlacementDateMathDuration() *DecayPlacementDateMathDuration { return r } - -// true - -type DecayPlacementDateMathDurationVariant interface { - DecayPlacementDateMathDurationCaster() *DecayPlacementDateMathDuration -} - -func (s *DecayPlacementDateMathDuration) DecayPlacementDateMathDurationCaster() *DecayPlacementDateMathDuration { - return s -} diff --git a/typedapi/types/decayplacementdoubledouble.go b/typedapi/types/decayplacementdoubledouble.go index cb849c0b39..4be5ed7b00 100644 --- a/typedapi/types/decayplacementdoubledouble.go +++ b/typedapi/types/decayplacementdoubledouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DecayPlacementdoubledouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L170-L189 type DecayPlacementdoubledouble struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` @@ -136,13 +136,3 @@ func NewDecayPlacementdoubledouble() *DecayPlacementdoubledouble { return r } - -// true - -type DecayPlacementdoubledoubleVariant interface { - DecayPlacementdoubledoubleCaster() *DecayPlacementdoubledouble -} - -func (s *DecayPlacementdoubledouble) DecayPlacementdoubledoubleCaster() *DecayPlacementdoubledouble { - return s -} diff --git a/typedapi/types/decayplacementgeolocationdistance.go b/typedapi/types/decayplacementgeolocationdistance.go index ca413e4ce0..5099966d7e 100644 --- a/typedapi/types/decayplacementgeolocationdistance.go +++ b/typedapi/types/decayplacementgeolocationdistance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DecayPlacementGeoLocationDistance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L170-L189 type DecayPlacementGeoLocationDistance struct { // Decay Defines how documents are scored at the distance given at scale. Decay *Float64 `json:"decay,omitempty"` @@ -143,13 +143,3 @@ func NewDecayPlacementGeoLocationDistance() *DecayPlacementGeoLocationDistance { return r } - -// true - -type DecayPlacementGeoLocationDistanceVariant interface { - DecayPlacementGeoLocationDistanceCaster() *DecayPlacementGeoLocationDistance -} - -func (s *DecayPlacementGeoLocationDistance) DecayPlacementGeoLocationDistanceCaster() *DecayPlacementGeoLocationDistance { - return s -} diff --git a/typedapi/types/decimaldigittokenfilter.go b/typedapi/types/decimaldigittokenfilter.go new file mode 100644 index 0000000000..06a5fd1cf3 --- /dev/null +++ b/typedapi/types/decimaldigittokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DecimalDigitTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L482-L484 +type DecimalDigitTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *DecimalDigitTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s DecimalDigitTokenFilter) MarshalJSON() ([]byte, error) { + type innerDecimalDigitTokenFilter DecimalDigitTokenFilter + tmp := innerDecimalDigitTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "decimal_digit" + + return json.Marshal(tmp) +} + +// NewDecimalDigitTokenFilter returns a DecimalDigitTokenFilter. +func NewDecimalDigitTokenFilter() *DecimalDigitTokenFilter { + r := &DecimalDigitTokenFilter{} + + return r +} diff --git a/typedapi/types/deepseekservicesettings.go b/typedapi/types/deepseekservicesettings.go new file mode 100644 index 0000000000..027fb564ad --- /dev/null +++ b/typedapi/types/deepseekservicesettings.go @@ -0,0 +1,119 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DeepSeekServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1166-L1188 +type DeepSeekServiceSettings struct { + // ApiKey A valid API key for your DeepSeek account. + // You can find or create your DeepSeek API keys on the DeepSeek API key page. + // + // IMPORTANT: You need to provide the API key only once, during the inference + // model creation. + // The get inference endpoint API does not retrieve your API key. + // After creating the inference model, you cannot change the associated API key. + // If you want to use a different API key, delete the inference model and + // recreate it with the same name and the updated API key. + ApiKey string `json:"api_key"` + // ModelId For a `completion` or `chat_completion` task, the name of the model to use + // for the inference task. + // + // For the available `completion` and `chat_completion` models, refer to the + // [DeepSeek Models & Pricing + // docs](https://api-docs.deepseek.com/quick_start/pricing). + ModelId string `json:"model_id"` + // Url The URL endpoint to use for the requests. Defaults to + // `https://api.deepseek.com/chat/completions`. + Url *string `json:"url,omitempty"` +} + +func (s *DeepSeekServiceSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "api_key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ApiKey", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ApiKey = o + + case "model_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelId = o + + case "url": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Url", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Url = &o + + } + } + return nil +} + +// NewDeepSeekServiceSettings returns a DeepSeekServiceSettings. +func NewDeepSeekServiceSettings() *DeepSeekServiceSettings { + r := &DeepSeekServiceSettings{} + + return r +} diff --git a/typedapi/types/defaults.go b/typedapi/types/defaults.go index 256bec0dc1..b44acb4e11 100644 --- a/typedapi/types/defaults.go +++ b/typedapi/types/defaults.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Defaults type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/info/types.ts#L24-L27 type Defaults struct { AnomalyDetectors AnomalyDetectors `json:"anomaly_detectors"` Datafeeds Datafeeds `json:"datafeeds"` @@ -34,5 +34,3 @@ func NewDefaults() *Defaults { return r } - -// false diff --git a/typedapi/types/definition.go b/typedapi/types/definition.go index f7239dc7be..c96824493b 100644 --- a/typedapi/types/definition.go +++ b/typedapi/types/definition.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Definition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L24-L29 type Definition struct { // Preprocessors Collection of preprocessors Preprocessors []Preprocessor `json:"preprocessors,omitempty"` @@ -36,13 +36,3 @@ func NewDefinition() *Definition { return r } - -// true - -type DefinitionVariant interface { - DefinitionCaster() *Definition -} - -func (s *Definition) DefinitionCaster() *Definition { - return s -} diff --git a/typedapi/types/delayeddatacheckconfig.go b/typedapi/types/delayeddatacheckconfig.go index 87bcfece65..13fbafb782 100644 --- a/typedapi/types/delayeddatacheckconfig.go +++ b/typedapi/types/delayeddatacheckconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DelayedDataCheckConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L122-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L122-L133 type DelayedDataCheckConfig struct { // CheckWindow The window of time that is searched for late data. This window of time ends // with the latest finalized bucket. @@ -89,13 +89,3 @@ func NewDelayedDataCheckConfig() *DelayedDataCheckConfig { return r } - -// true - -type DelayedDataCheckConfigVariant interface { - DelayedDataCheckConfigCaster() *DelayedDataCheckConfig -} - -func (s *DelayedDataCheckConfig) DelayedDataCheckConfigCaster() *DelayedDataCheckConfig { - return s -} diff --git a/typedapi/types/deleteaction.go b/typedapi/types/deleteaction.go index cf2d80b8f0..a8433975da 100644 --- a/typedapi/types/deleteaction.go +++ b/typedapi/types/deleteaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DeleteAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L149-L151 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L149-L151 type DeleteAction struct { DeleteSearchableSnapshot *bool `json:"delete_searchable_snapshot,omitempty"` } @@ -76,13 +76,3 @@ func NewDeleteAction() *DeleteAction { return r } - -// true - -type DeleteActionVariant interface { - DeleteActionCaster() *DeleteAction -} - -func (s *DeleteAction) DeleteActionCaster() *DeleteAction { - return s -} diff --git a/typedapi/types/deleteoperation.go b/typedapi/types/deleteoperation.go index c5b93036a9..9f9c21aa27 100644 --- a/typedapi/types/deleteoperation.go +++ b/typedapi/types/deleteoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DeleteOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L144-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L144-L144 type DeleteOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` @@ -118,13 +118,3 @@ func NewDeleteOperation() *DeleteOperation { return r } - -// true - -type DeleteOperationVariant interface { - DeleteOperationCaster() *DeleteOperation -} - -func (s *DeleteOperation) DeleteOperationCaster() *DeleteOperation { - return s -} diff --git a/typedapi/types/delimitedpayloadtokenfilter.go b/typedapi/types/delimitedpayloadtokenfilter.go index 1f2f4ffec4..b86951c917 100644 --- a/typedapi/types/delimitedpayloadtokenfilter.go +++ b/typedapi/types/delimitedpayloadtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,12 +33,14 @@ import ( // DelimitedPayloadTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L67-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L84-L90 type DelimitedPayloadTokenFilter struct { - Delimiter *string `json:"delimiter,omitempty"` - Encoding *delimitedpayloadencoding.DelimitedPayloadEncoding `json:"encoding,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // Delimiter Character used to separate tokens from payloads. Defaults to `|`. + Delimiter *string `json:"delimiter,omitempty"` + // Encoding Data type for the stored payload. + Encoding *delimitedpayloadencoding.DelimitedPayloadEncoding `json:"encoding,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *DelimitedPayloadTokenFilter) UnmarshalJSON(data []byte) error { @@ -109,13 +111,3 @@ func NewDelimitedPayloadTokenFilter() *DelimitedPayloadTokenFilter { return r } - -// true - -type DelimitedPayloadTokenFilterVariant interface { - DelimitedPayloadTokenFilterCaster() *DelimitedPayloadTokenFilter -} - -func (s *DelimitedPayloadTokenFilter) DelimitedPayloadTokenFilterCaster() *DelimitedPayloadTokenFilter { - return s -} diff --git a/typedapi/types/densevectorindexoptions.go b/typedapi/types/densevectorindexoptions.go index f0be25a267..ac85748eb4 100644 --- a/typedapi/types/densevectorindexoptions.go +++ b/typedapi/types/densevectorindexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DenseVectorIndexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/DenseVectorProperty.ts#L129-L162 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/DenseVectorProperty.ts#L129-L162 type DenseVectorIndexOptions struct { // ConfidenceInterval The confidence interval to use when quantizing the vectors. Can be any value // between and including `0.90` and @@ -147,13 +147,3 @@ func NewDenseVectorIndexOptions() *DenseVectorIndexOptions { return r } - -// true - -type DenseVectorIndexOptionsVariant interface { - DenseVectorIndexOptionsCaster() *DenseVectorIndexOptions -} - -func (s *DenseVectorIndexOptions) DenseVectorIndexOptionsCaster() *DenseVectorIndexOptions { - return s -} diff --git a/typedapi/types/densevectoroffheapstats.go b/typedapi/types/densevectoroffheapstats.go new file mode 100644 index 0000000000..287d087d96 --- /dev/null +++ b/typedapi/types/densevectoroffheapstats.go @@ -0,0 +1,184 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DenseVectorOffHeapStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L166-L178 +type DenseVectorOffHeapStats struct { + Fielddata map[string]map[string]int64 `json:"fielddata,omitempty"` + TotalSize ByteSize `json:"total_size,omitempty"` + TotalSizeBytes int64 `json:"total_size_bytes"` + TotalVebSize ByteSize `json:"total_veb_size,omitempty"` + TotalVebSizeBytes int64 `json:"total_veb_size_bytes"` + TotalVecSize ByteSize `json:"total_vec_size,omitempty"` + TotalVecSizeBytes int64 `json:"total_vec_size_bytes"` + TotalVeqSize ByteSize `json:"total_veq_size,omitempty"` + TotalVeqSizeBytes int64 `json:"total_veq_size_bytes"` + TotalVexSize ByteSize `json:"total_vex_size,omitempty"` + TotalVexSizeBytes int64 `json:"total_vex_size_bytes"` +} + +func (s *DenseVectorOffHeapStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "fielddata": + if s.Fielddata == nil { + s.Fielddata = make(map[string]map[string]int64, 0) + } + if err := dec.Decode(&s.Fielddata); err != nil { + return fmt.Errorf("%s | %w", "Fielddata", err) + } + + case "total_size": + if err := dec.Decode(&s.TotalSize); err != nil { + return fmt.Errorf("%s | %w", "TotalSize", err) + } + + case "total_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalSizeBytes", err) + } + s.TotalSizeBytes = value + case float64: + f := int64(v) + s.TotalSizeBytes = f + } + + case "total_veb_size": + if err := dec.Decode(&s.TotalVebSize); err != nil { + return fmt.Errorf("%s | %w", "TotalVebSize", err) + } + + case "total_veb_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalVebSizeBytes", err) + } + s.TotalVebSizeBytes = value + case float64: + f := int64(v) + s.TotalVebSizeBytes = f + } + + case "total_vec_size": + if err := dec.Decode(&s.TotalVecSize); err != nil { + return fmt.Errorf("%s | %w", "TotalVecSize", err) + } + + case "total_vec_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalVecSizeBytes", err) + } + s.TotalVecSizeBytes = value + case float64: + f := int64(v) + s.TotalVecSizeBytes = f + } + + case "total_veq_size": + if err := dec.Decode(&s.TotalVeqSize); err != nil { + return fmt.Errorf("%s | %w", "TotalVeqSize", err) + } + + case "total_veq_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalVeqSizeBytes", err) + } + s.TotalVeqSizeBytes = value + case float64: + f := int64(v) + s.TotalVeqSizeBytes = f + } + + case "total_vex_size": + if err := dec.Decode(&s.TotalVexSize); err != nil { + return fmt.Errorf("%s | %w", "TotalVexSize", err) + } + + case "total_vex_size_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalVexSizeBytes", err) + } + s.TotalVexSizeBytes = value + case float64: + f := int64(v) + s.TotalVexSizeBytes = f + } + + } + } + return nil +} + +// NewDenseVectorOffHeapStats returns a DenseVectorOffHeapStats. +func NewDenseVectorOffHeapStats() *DenseVectorOffHeapStats { + r := &DenseVectorOffHeapStats{ + Fielddata: make(map[string]map[string]int64), + } + + return r +} diff --git a/typedapi/types/densevectorproperty.go b/typedapi/types/densevectorproperty.go index 3feb97dab6..49eb47005f 100644 --- a/typedapi/types/densevectorproperty.go +++ b/typedapi/types/densevectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // DenseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/DenseVectorProperty.ts#L23-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/DenseVectorProperty.ts#L23-L62 type DenseVectorProperty struct { // Dims Number of vector dimensions. Can't exceed `4096`. If `dims` is not specified, // it will be set to the length of @@ -263,6 +263,12 @@ func (s *DenseVectorProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -637,6 +643,12 @@ func (s *DenseVectorProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -879,13 +891,3 @@ func NewDenseVectorProperty() *DenseVectorProperty { return r } - -// true - -type DenseVectorPropertyVariant interface { - DenseVectorPropertyCaster() *DenseVectorProperty -} - -func (s *DenseVectorProperty) DenseVectorPropertyCaster() *DenseVectorProperty { - return s -} diff --git a/typedapi/types/clusterpressurememory.go b/typedapi/types/densevectorstats.go similarity index 55% rename from typedapi/types/clusterpressurememory.go rename to typedapi/types/densevectorstats.go index 50b83035a1..9d55ca5901 100644 --- a/typedapi/types/clusterpressurememory.go +++ b/typedapi/types/densevectorstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,16 +29,15 @@ import ( "strconv" ) -// ClusterPressureMemory type. +// DenseVectorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L574-L578 -type ClusterPressureMemory struct { - Current IndexingPressureMemorySummary `json:"current"` - LimitInBytes int64 `json:"limit_in_bytes"` - Total IndexingPressureMemorySummary `json:"total"` +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L157-L160 +type DenseVectorStats struct { + OffHeap *DenseVectorOffHeapStats `json:"off_heap,omitempty"` + ValueCount int64 `json:"value_count"` } -func (s *ClusterPressureMemory) UnmarshalJSON(data []byte) error { +func (s *DenseVectorStats) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -53,29 +52,24 @@ func (s *ClusterPressureMemory) UnmarshalJSON(data []byte) error { switch t { - case "current": - if err := dec.Decode(&s.Current); err != nil { - return fmt.Errorf("%s | %w", "Current", err) + case "off_heap": + if err := dec.Decode(&s.OffHeap); err != nil { + return fmt.Errorf("%s | %w", "OffHeap", err) } - case "limit_in_bytes": + case "value_count": var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: value, err := strconv.ParseInt(v, 10, 64) if err != nil { - return fmt.Errorf("%s | %w", "LimitInBytes", err) + return fmt.Errorf("%s | %w", "ValueCount", err) } - s.LimitInBytes = value + s.ValueCount = value case float64: f := int64(v) - s.LimitInBytes = f - } - - case "total": - if err := dec.Decode(&s.Total); err != nil { - return fmt.Errorf("%s | %w", "Total", err) + s.ValueCount = f } } @@ -83,11 +77,9 @@ func (s *ClusterPressureMemory) UnmarshalJSON(data []byte) error { return nil } -// NewClusterPressureMemory returns a ClusterPressureMemory. -func NewClusterPressureMemory() *ClusterPressureMemory { - r := &ClusterPressureMemory{} +// NewDenseVectorStats returns a DenseVectorStats. +func NewDenseVectorStats() *DenseVectorStats { + r := &DenseVectorStats{} return r } - -// false diff --git a/typedapi/types/dependency.go b/typedapi/types/dependency.go index 783035ac76..6d0bf8b6fa 100644 --- a/typedapi/types/dependency.go +++ b/typedapi/types/dependency.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Dependency type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L30-L33 type Dependency struct { Field string `json:"field"` Value ScalarValue `json:"value"` @@ -80,13 +80,3 @@ func NewDependency() *Dependency { return r } - -// true - -type DependencyVariant interface { - DependencyCaster() *Dependency -} - -func (s *Dependency) DependencyCaster() *Dependency { - return s -} diff --git a/typedapi/types/deprecation.go b/typedapi/types/deprecation.go index 0f395ecd6e..7bb56f0140 100644 --- a/typedapi/types/deprecation.go +++ b/typedapi/types/deprecation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Deprecation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/deprecations/types.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/deprecations/types.ts#L32-L47 type Deprecation struct { // Details Optional details about the deprecation warning. Details *string `json:"details,omitempty"` @@ -139,5 +139,3 @@ func NewDeprecation() *Deprecation { return r } - -// false diff --git a/typedapi/types/deprecationindexing.go b/typedapi/types/deprecationindexing.go index bc2ee878ff..7a6206a527 100644 --- a/typedapi/types/deprecationindexing.go +++ b/typedapi/types/deprecationindexing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DeprecationIndexing type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L144-L146 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L154-L156 type DeprecationIndexing struct { Enabled string `json:"enabled"` } @@ -74,5 +74,3 @@ func NewDeprecationIndexing() *DeprecationIndexing { return r } - -// false diff --git a/typedapi/types/derivativeaggregate.go b/typedapi/types/derivativeaggregate.go index f896f9f2b4..73b2ebd38d 100644 --- a/typedapi/types/derivativeaggregate.go +++ b/typedapi/types/derivativeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DerivativeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L241-L248 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L241-L248 type DerivativeAggregate struct { Meta Metadata `json:"meta,omitempty"` NormalizedValue *Float64 `json:"normalized_value,omitempty"` @@ -119,5 +119,3 @@ func NewDerivativeAggregate() *DerivativeAggregate { return r } - -// false diff --git a/typedapi/types/derivativeaggregation.go b/typedapi/types/derivativeaggregation.go index 40f35177c4..287eae3bf1 100644 --- a/typedapi/types/derivativeaggregation.go +++ b/typedapi/types/derivativeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DerivativeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L216-L216 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L216-L216 type DerivativeAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewDerivativeAggregation() *DerivativeAggregation { return r } - -// true - -type DerivativeAggregationVariant interface { - DerivativeAggregationCaster() *DerivativeAggregation -} - -func (s *DerivativeAggregation) DerivativeAggregationCaster() *DerivativeAggregation { - return s -} diff --git a/typedapi/types/detailsinfo.go b/typedapi/types/detailsinfo.go index 0d183bc757..64b0679983 100644 --- a/typedapi/types/detailsinfo.go +++ b/typedapi/types/detailsinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DetailsInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321 type DetailsInfo struct { // Blob A description of the blob that was written and read. Blob BlobDetails `json:"blob"` @@ -122,5 +122,3 @@ func NewDetailsInfo() *DetailsInfo { return r } - -// false diff --git a/typedapi/types/detectionrule.go b/typedapi/types/detectionrule.go index 80b63430f5..f21dca51b2 100644 --- a/typedapi/types/detectionrule.go +++ b/typedapi/types/detectionrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // DetectionRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Rule.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Rule.ts#L25-L39 type DetectionRule struct { // Actions The set of actions to be triggered when the rule applies. If more than one // action is specified the effects of all actions are combined. @@ -50,13 +50,3 @@ func NewDetectionRule() *DetectionRule { return r } - -// true - -type DetectionRuleVariant interface { - DetectionRuleCaster() *DetectionRule -} - -func (s *DetectionRule) DetectionRuleCaster() *DetectionRule { - return s -} diff --git a/typedapi/types/detector.go b/typedapi/types/detector.go index d09afcfaa1..dd0e3e2460 100644 --- a/typedapi/types/detector.go +++ b/typedapi/types/detector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Detector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Detector.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Detector.ts#L25-L67 type Detector struct { // ByFieldName The field used to split the data. In particular, this property is used for // analyzing the splits with respect to their own history. It is used for @@ -183,13 +183,3 @@ func NewDetector() *Detector { return r } - -// true - -type DetectorVariant interface { - DetectorCaster() *Detector -} - -func (s *Detector) DetectorCaster() *Detector { - return s -} diff --git a/typedapi/types/detectorread.go b/typedapi/types/detectorread.go index e123aaab09..75e95e4efc 100644 --- a/typedapi/types/detectorread.go +++ b/typedapi/types/detectorread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DetectorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Detector.ts#L69-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Detector.ts#L69-L125 type DetectorRead struct { // ByFieldName The field used to split the data. // In particular, this property is used for analyzing the splits with respect to @@ -190,5 +190,3 @@ func NewDetectorRead() *DetectorRead { return r } - -// false diff --git a/typedapi/types/detectorupdate.go b/typedapi/types/detectorupdate.go index 13bc3a0cfe..4de5bcc294 100644 --- a/typedapi/types/detectorupdate.go +++ b/typedapi/types/detectorupdate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DetectorUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Detector.ts#L127-L143 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Detector.ts#L127-L143 type DetectorUpdate struct { // CustomRules An array of custom rule objects, which enable you to customize the way // detectors operate. @@ -106,13 +106,3 @@ func NewDetectorUpdate() *DetectorUpdate { return r } - -// true - -type DetectorUpdateVariant interface { - DetectorUpdateCaster() *DetectorUpdate -} - -func (s *DetectorUpdate) DetectorUpdateCaster() *DetectorUpdate { - return s -} diff --git a/typedapi/types/dfsknnprofile.go b/typedapi/types/dfsknnprofile.go index 4b4501a1df..5e2b1ef068 100644 --- a/typedapi/types/dfsknnprofile.go +++ b/typedapi/types/dfsknnprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DfsKnnProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L181-L186 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L181-L186 type DfsKnnProfile struct { Collector []KnnCollectorResult `json:"collector"` Query []KnnQueryProfileResult `json:"query"` @@ -105,5 +105,3 @@ func NewDfsKnnProfile() *DfsKnnProfile { return r } - -// false diff --git a/typedapi/types/dfsprofile.go b/typedapi/types/dfsprofile.go index d9471fe32e..d2c0294d98 100644 --- a/typedapi/types/dfsprofile.go +++ b/typedapi/types/dfsprofile.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DfsProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L154-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L154-L157 type DfsProfile struct { Knn []DfsKnnProfile `json:"knn,omitempty"` Statistics *DfsStatisticsProfile `json:"statistics,omitempty"` @@ -34,5 +34,3 @@ func NewDfsProfile() *DfsProfile { return r } - -// false diff --git a/typedapi/types/dfsstatisticsbreakdown.go b/typedapi/types/dfsstatisticsbreakdown.go index ab45e1296d..e719480c0b 100644 --- a/typedapi/types/dfsstatisticsbreakdown.go +++ b/typedapi/types/dfsstatisticsbreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DfsStatisticsBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L170-L179 type DfsStatisticsBreakdown struct { CollectionStatistics int64 `json:"collection_statistics"` CollectionStatisticsCount int64 `json:"collection_statistics_count"` @@ -189,5 +189,3 @@ func NewDfsStatisticsBreakdown() *DfsStatisticsBreakdown { return r } - -// false diff --git a/typedapi/types/dfsstatisticsprofile.go b/typedapi/types/dfsstatisticsprofile.go index 6ed0642ace..1042c3d867 100644 --- a/typedapi/types/dfsstatisticsprofile.go +++ b/typedapi/types/dfsstatisticsprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DfsStatisticsProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L159-L167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L159-L167 type DfsStatisticsProfile struct { Breakdown DfsStatisticsBreakdown `json:"breakdown"` Children []DfsStatisticsProfile `json:"children,omitempty"` @@ -122,5 +122,3 @@ func NewDfsStatisticsProfile() *DfsStatisticsProfile { return r } - -// false diff --git a/typedapi/types/diagnosis.go b/typedapi/types/diagnosis.go index 6d732bfa0a..6c1319c8cb 100644 --- a/typedapi/types/diagnosis.go +++ b/typedapi/types/diagnosis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Diagnosis type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L50-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L51-L57 type Diagnosis struct { Action string `json:"action"` AffectedResources DiagnosisAffectedResources `json:"affected_resources"` @@ -119,5 +119,3 @@ func NewDiagnosis() *Diagnosis { return r } - -// false diff --git a/typedapi/types/diagnosisaffectedresources.go b/typedapi/types/diagnosisaffectedresources.go index 3ff920f070..9486811c00 100644 --- a/typedapi/types/diagnosisaffectedresources.go +++ b/typedapi/types/diagnosisaffectedresources.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DiagnosisAffectedResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L58-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L59-L65 type DiagnosisAffectedResources struct { FeatureStates []string `json:"feature_states,omitempty"` Indices []string `json:"indices,omitempty"` @@ -101,5 +101,3 @@ func NewDiagnosisAffectedResources() *DiagnosisAffectedResources { return r } - -// false diff --git a/typedapi/types/dictionarydecompoundertokenfilter.go b/typedapi/types/dictionarydecompoundertokenfilter.go index 2355b88f16..ecb1e38f3e 100644 --- a/typedapi/types/dictionarydecompoundertokenfilter.go +++ b/typedapi/types/dictionarydecompoundertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,17 +31,32 @@ import ( // DictionaryDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L53-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L63-L65 type DictionaryDecompounderTokenFilter struct { - HyphenationPatternsPath *string `json:"hyphenation_patterns_path,omitempty"` - MaxSubwordSize *int `json:"max_subword_size,omitempty"` - MinSubwordSize *int `json:"min_subword_size,omitempty"` - MinWordSize *int `json:"min_word_size,omitempty"` - OnlyLongestMatch *bool `json:"only_longest_match,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` - WordList []string `json:"word_list,omitempty"` - WordListPath *string `json:"word_list_path,omitempty"` + // MaxSubwordSize Maximum subword character length. Longer subword tokens are excluded from the + // output. Defaults to `15`. + MaxSubwordSize *int `json:"max_subword_size,omitempty"` + // MinSubwordSize Minimum subword character length. Shorter subword tokens are excluded from + // the output. Defaults to `2`. + MinSubwordSize *int `json:"min_subword_size,omitempty"` + // MinWordSize Minimum word character length. Shorter word tokens are excluded from the + // output. Defaults to `5`. + MinWordSize *int `json:"min_word_size,omitempty"` + // OnlyLongestMatch If `true`, only include the longest matching subword. Defaults to `false`. + OnlyLongestMatch *bool `json:"only_longest_match,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` + // WordList A list of subwords to look for in the token stream. If found, the subword is + // included in the token output. + // Either this parameter or `word_list_path` must be specified. + WordList []string `json:"word_list,omitempty"` + // WordListPath Path to a file that contains a list of subwords to find in the token stream. + // If found, the subword is included in the token output. + // This path must be absolute or relative to the config location, and the file + // must be UTF-8 encoded. Each token in the file must be separated by a line + // break. + // Either this parameter or `word_list` must be specified. + WordListPath *string `json:"word_list_path,omitempty"` } func (s *DictionaryDecompounderTokenFilter) UnmarshalJSON(data []byte) error { @@ -59,18 +74,6 @@ func (s *DictionaryDecompounderTokenFilter) UnmarshalJSON(data []byte) error { switch t { - case "hyphenation_patterns_path": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "HyphenationPatternsPath", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.HyphenationPatternsPath = &o - case "max_subword_size": var tmp any @@ -169,15 +172,14 @@ func (s *DictionaryDecompounderTokenFilter) UnmarshalJSON(data []byte) error { func (s DictionaryDecompounderTokenFilter) MarshalJSON() ([]byte, error) { type innerDictionaryDecompounderTokenFilter DictionaryDecompounderTokenFilter tmp := innerDictionaryDecompounderTokenFilter{ - HyphenationPatternsPath: s.HyphenationPatternsPath, - MaxSubwordSize: s.MaxSubwordSize, - MinSubwordSize: s.MinSubwordSize, - MinWordSize: s.MinWordSize, - OnlyLongestMatch: s.OnlyLongestMatch, - Type: s.Type, - Version: s.Version, - WordList: s.WordList, - WordListPath: s.WordListPath, + MaxSubwordSize: s.MaxSubwordSize, + MinSubwordSize: s.MinSubwordSize, + MinWordSize: s.MinWordSize, + OnlyLongestMatch: s.OnlyLongestMatch, + Type: s.Type, + Version: s.Version, + WordList: s.WordList, + WordListPath: s.WordListPath, } tmp.Type = "dictionary_decompounder" @@ -191,13 +193,3 @@ func NewDictionaryDecompounderTokenFilter() *DictionaryDecompounderTokenFilter { return r } - -// true - -type DictionaryDecompounderTokenFilterVariant interface { - DictionaryDecompounderTokenFilterCaster() *DictionaryDecompounderTokenFilter -} - -func (s *DictionaryDecompounderTokenFilter) DictionaryDecompounderTokenFilterCaster() *DictionaryDecompounderTokenFilter { - return s -} diff --git a/typedapi/types/directgenerator.go b/typedapi/types/directgenerator.go index 1de838d25b..bb3ab9ceaa 100644 --- a/typedapi/types/directgenerator.go +++ b/typedapi/types/directgenerator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DirectGenerator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L268-L331 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L268-L331 type DirectGenerator struct { // Field The field to fetch the candidate suggestions from. // Needs to be set globally or per suggestion. @@ -252,13 +252,3 @@ func NewDirectGenerator() *DirectGenerator { return r } - -// true - -type DirectGeneratorVariant interface { - DirectGeneratorCaster() *DirectGenerator -} - -func (s *DirectGenerator) DirectGeneratorCaster() *DirectGenerator { - return s -} diff --git a/typedapi/types/discovery.go b/typedapi/types/discovery.go index a584feb164..f2f2821a18 100644 --- a/typedapi/types/discovery.go +++ b/typedapi/types/discovery.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Discovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L201-L219 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L203-L221 type Discovery struct { ClusterApplierStats *ClusterAppliedStats `json:"cluster_applier_stats,omitempty"` // ClusterStateQueue Contains statistics for the cluster state queue of the node. @@ -48,5 +48,3 @@ func NewDiscovery() *Discovery { return r } - -// false diff --git a/typedapi/types/discoverynode.go b/typedapi/types/discoverynode.go index 09b040e24d..0cf719e80d 100644 --- a/typedapi/types/discoverynode.go +++ b/typedapi/types/discoverynode.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DiscoveryNode type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DiscoveryNode.ts#L25-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DiscoveryNode.ts#L25-L25 type DiscoveryNode map[string]DiscoveryNodeContent diff --git a/typedapi/types/discoverynodecompact.go b/typedapi/types/discoverynodecompact.go index 410adfca39..50c18264d9 100644 --- a/typedapi/types/discoverynodecompact.go +++ b/typedapi/types/discoverynodecompact.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DiscoveryNodeCompact type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DiscoveryNode.ts#L39-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DiscoveryNode.ts#L39-L48 type DiscoveryNodeCompact struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` @@ -95,5 +95,3 @@ func NewDiscoveryNodeCompact() *DiscoveryNodeCompact { return r } - -// false diff --git a/typedapi/types/discoverynodecontent.go b/typedapi/types/discoverynodecontent.go index 819f1d1f35..ad1e094ef9 100644 --- a/typedapi/types/discoverynodecontent.go +++ b/typedapi/types/discoverynodecontent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DiscoveryNodeContent type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DiscoveryNode.ts#L27-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DiscoveryNode.ts#L27-L37 type DiscoveryNodeContent struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` @@ -149,5 +149,3 @@ func NewDiscoveryNodeContent() *DiscoveryNodeContent { return r } - -// false diff --git a/typedapi/types/diskindicator.go b/typedapi/types/diskindicator.go index f507dbfb34..164f1d2c34 100644 --- a/typedapi/types/diskindicator.go +++ b/typedapi/types/diskindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DiskIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L123-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L124-L128 type DiskIndicator struct { Details *DiskIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewDiskIndicator() *DiskIndicator { return r } - -// false diff --git a/typedapi/types/diskindicatordetails.go b/typedapi/types/diskindicatordetails.go index a35c87423b..ce7dcd6e66 100644 --- a/typedapi/types/diskindicatordetails.go +++ b/typedapi/types/diskindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DiskIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L128-L134 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L129-L135 type DiskIndicatorDetails struct { IndicesWithReadonlyBlock int64 `json:"indices_with_readonly_block"` NodesOverFloodStageWatermark int64 `json:"nodes_over_flood_stage_watermark"` @@ -141,5 +141,3 @@ func NewDiskIndicatorDetails() *DiskIndicatorDetails { return r } - -// false diff --git a/typedapi/types/diskusage.go b/typedapi/types/diskusage.go index c3f56f4705..26a61b27ea 100644 --- a/typedapi/types/diskusage.go +++ b/typedapi/types/diskusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L63-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L63-L70 type DiskUsage struct { FreeBytes int64 `json:"free_bytes"` FreeDiskPercent Float64 `json:"free_disk_percent"` @@ -156,5 +156,3 @@ func NewDiskUsage() *DiskUsage { return r } - -// false diff --git a/typedapi/types/dismaxquery.go b/typedapi/types/dismaxquery.go index c791938b7e..1e588d4b67 100644 --- a/typedapi/types/dismaxquery.go +++ b/typedapi/types/dismaxquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DisMaxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L88-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L88-L103 type DisMaxQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -125,13 +125,3 @@ func NewDisMaxQuery() *DisMaxQuery { return r } - -// true - -type DisMaxQueryVariant interface { - DisMaxQueryCaster() *DisMaxQuery -} - -func (s *DisMaxQuery) DisMaxQueryCaster() *DisMaxQuery { - return s -} diff --git a/typedapi/types/dissectprocessor.go b/typedapi/types/dissectprocessor.go index baa1aec62d..7ea646d546 100644 --- a/typedapi/types/dissectprocessor.go +++ b/typedapi/types/dissectprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DissectProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L804-L823 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L804-L823 type DissectProcessor struct { // AppendSeparator The character(s) that separate the appended fields. AppendSeparator *string `json:"append_separator,omitempty"` @@ -180,13 +180,3 @@ func NewDissectProcessor() *DissectProcessor { return r } - -// true - -type DissectProcessorVariant interface { - DissectProcessorCaster() *DissectProcessor -} - -func (s *DissectProcessor) DissectProcessorCaster() *DissectProcessor { - return s -} diff --git a/typedapi/types/distancefeaturequery.go b/typedapi/types/distancefeaturequery.go index 02cc2492b4..c66d1491c6 100644 --- a/typedapi/types/distancefeaturequery.go +++ b/typedapi/types/distancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,9 +26,5 @@ package types // GeoDistanceFeatureQuery // DateDistanceFeatureQuery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L76-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L76-L85 type DistanceFeatureQuery any - -type DistanceFeatureQueryVariant interface { - DistanceFeatureQueryCaster() *DistanceFeatureQuery -} diff --git a/typedapi/types/diversifiedsampleraggregation.go b/typedapi/types/diversifiedsampleraggregation.go index 4861ef9b4b..3051a7ff9c 100644 --- a/typedapi/types/diversifiedsampleraggregation.go +++ b/typedapi/types/diversifiedsampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DiversifiedSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L333-L357 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L333-L357 type DiversifiedSamplerAggregation struct { // ExecutionHint The type of value used for de-duplication. ExecutionHint *sampleraggregationexecutionhint.SamplerAggregationExecutionHint `json:"execution_hint,omitempty"` @@ -120,13 +120,3 @@ func NewDiversifiedSamplerAggregation() *DiversifiedSamplerAggregation { return r } - -// true - -type DiversifiedSamplerAggregationVariant interface { - DiversifiedSamplerAggregationCaster() *DiversifiedSamplerAggregation -} - -func (s *DiversifiedSamplerAggregation) DiversifiedSamplerAggregationCaster() *DiversifiedSamplerAggregation { - return s -} diff --git a/typedapi/types/docstats.go b/typedapi/types/docstats.go index 9e1cc078f2..2a7255089a 100644 --- a/typedapi/types/docstats.go +++ b/typedapi/types/docstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DocStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L100-L112 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L100-L121 type DocStats struct { // Count Total number of non-deleted documents across all primary shards assigned to // selected nodes. @@ -44,6 +44,12 @@ type DocStats struct { // Elasticsearch reclaims the disk space of deleted Lucene documents when a // segment is merged. Deleted *int64 `json:"deleted,omitempty"` + // TotalSize Human readable total_size_in_bytes + TotalSize ByteSize `json:"total_size,omitempty"` + // TotalSizeInBytes Returns the total size in bytes of all documents in this stats. + // This value may be more reliable than store_stats.size_in_bytes in estimating + // the index size. + TotalSizeInBytes int64 `json:"total_size_in_bytes"` } func (s *DocStats) UnmarshalJSON(data []byte) error { @@ -91,6 +97,26 @@ func (s *DocStats) UnmarshalJSON(data []byte) error { s.Deleted = &f } + case "total_size": + if err := dec.Decode(&s.TotalSize); err != nil { + return fmt.Errorf("%s | %w", "TotalSize", err) + } + + case "total_size_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "TotalSizeInBytes", err) + } + s.TotalSizeInBytes = value + case float64: + f := int64(v) + s.TotalSizeInBytes = f + } + } } return nil @@ -102,5 +128,3 @@ func NewDocStats() *DocStats { return r } - -// false diff --git a/typedapi/types/document.go b/typedapi/types/document.go index 3c06577ede..80a971819b 100644 --- a/typedapi/types/document.go +++ b/typedapi/types/document.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Document type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Simulation.ts#L62-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L69-L83 type Document struct { // Id_ Unique identifier for the document. // This ID must be unique within the `_index`. @@ -82,13 +82,3 @@ func NewDocument() *Document { return r } - -// true - -type DocumentVariant interface { - DocumentCaster() *Document -} - -func (s *Document) DocumentCaster() *Document { - return s -} diff --git a/typedapi/types/documentrating.go b/typedapi/types/documentrating.go index 02004a117a..6720127832 100644 --- a/typedapi/types/documentrating.go +++ b/typedapi/types/documentrating.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DocumentRating type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L119-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L119-L126 type DocumentRating struct { // Id_ The document ID. Id_ string `json:"_id"` @@ -94,13 +94,3 @@ func NewDocumentRating() *DocumentRating { return r } - -// true - -type DocumentRatingVariant interface { - DocumentRatingCaster() *DocumentRating -} - -func (s *DocumentRating) DocumentRatingCaster() *DocumentRating { - return s -} diff --git a/typedapi/types/documentsimulation.go b/typedapi/types/documentsimulation.go index 08c4985911..d90b3e41de 100644 --- a/typedapi/types/documentsimulation.go +++ b/typedapi/types/documentsimulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // DocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Simulation.ts#L78-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L85-L115 type DocumentSimulation struct { DocumentSimulation map[string]string `json:"-"` // Id_ Unique identifier for the document. This ID must be unique within the @@ -166,5 +166,3 @@ func NewDocumentSimulation() *DocumentSimulation { return r } - -// false diff --git a/typedapi/types/dotexpanderprocessor.go b/typedapi/types/dotexpanderprocessor.go index 164164ad36..f0452c4ae7 100644 --- a/typedapi/types/dotexpanderprocessor.go +++ b/typedapi/types/dotexpanderprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DotExpanderProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L825-L843 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L825-L843 type DotExpanderProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -173,13 +173,3 @@ func NewDotExpanderProcessor() *DotExpanderProcessor { return r } - -// true - -type DotExpanderProcessorVariant interface { - DotExpanderProcessorCaster() *DotExpanderProcessor -} - -func (s *DotExpanderProcessor) DotExpanderProcessorCaster() *DotExpanderProcessor { - return s -} diff --git a/typedapi/types/doublenumberproperty.go b/typedapi/types/doublenumberproperty.go index f9c522e9be..5769cb837b 100644 --- a/typedapi/types/doublenumberproperty.go +++ b/typedapi/types/doublenumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // DoubleNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L166-L169 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L168-L171 type DoubleNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *DoubleNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -690,6 +696,12 @@ func (s *DoubleNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -972,13 +984,3 @@ func NewDoubleNumberProperty() *DoubleNumberProperty { return r } - -// true - -type DoubleNumberPropertyVariant interface { - DoubleNumberPropertyCaster() *DoubleNumberProperty -} - -func (s *DoubleNumberProperty) DoubleNumberPropertyCaster() *DoubleNumberProperty { - return s -} diff --git a/typedapi/types/doublerangeproperty.go b/typedapi/types/doublerangeproperty.go index 09f075d788..15aefda236 100644 --- a/typedapi/types/doublerangeproperty.go +++ b/typedapi/types/doublerangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // DoubleRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/range.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/range.ts#L34-L36 type DoubleRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -274,6 +274,12 @@ func (s *DoubleRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -643,6 +649,12 @@ func (s *DoubleRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -895,13 +907,3 @@ func NewDoubleRangeProperty() *DoubleRangeProperty { return r } - -// true - -type DoubleRangePropertyVariant interface { - DoubleRangePropertyCaster() *DoubleRangeProperty -} - -func (s *DoubleRangeProperty) DoubleRangePropertyCaster() *DoubleRangeProperty { - return s -} diff --git a/typedapi/types/doubletermsaggregate.go b/typedapi/types/doubletermsaggregate.go index afd6cd22b7..49c694c887 100644 --- a/typedapi/types/doubletermsaggregate.go +++ b/typedapi/types/doubletermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DoubleTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L451-L456 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L451-L456 type DoubleTermsAggregate struct { Buckets BucketsDoubleTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` @@ -121,5 +121,3 @@ func NewDoubleTermsAggregate() *DoubleTermsAggregate { return r } - -// false diff --git a/typedapi/types/doubletermsbucket.go b/typedapi/types/doubletermsbucket.go index ac0fca146a..c168cfb48a 100644 --- a/typedapi/types/doubletermsbucket.go +++ b/typedapi/types/doubletermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // DoubleTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L458-L461 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L458-L461 type DoubleTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -676,5 +676,3 @@ func NewDoubleTermsBucket() *DoubleTermsBucket { return r } - -// false diff --git a/typedapi/types/downsampleaction.go b/typedapi/types/downsampleaction.go index f71a3db401..49dba32463 100644 --- a/typedapi/types/downsampleaction.go +++ b/typedapi/types/downsampleaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DownsampleAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L112-L115 type DownsampleAction struct { FixedInterval string `json:"fixed_interval"` WaitTimeout Duration `json:"wait_timeout,omitempty"` @@ -72,13 +72,3 @@ func NewDownsampleAction() *DownsampleAction { return r } - -// true - -type DownsampleActionVariant interface { - DownsampleActionCaster() *DownsampleAction -} - -func (s *DownsampleAction) DownsampleActionCaster() *DownsampleAction { - return s -} diff --git a/typedapi/types/downsampleconfig.go b/typedapi/types/downsampleconfig.go index 4ad7f142b0..1dd5f73280 100644 --- a/typedapi/types/downsampleconfig.go +++ b/typedapi/types/downsampleconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DownsampleConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/Downsample.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/Downsample.ts#L22-L27 type DownsampleConfig struct { // FixedInterval The interval at which to aggregate the original time series index. FixedInterval string `json:"fixed_interval"` @@ -67,13 +67,3 @@ func NewDownsampleConfig() *DownsampleConfig { return r } - -// true - -type DownsampleConfigVariant interface { - DownsampleConfigCaster() *DownsampleConfig -} - -func (s *DownsampleConfig) DownsampleConfigCaster() *DownsampleConfig { - return s -} diff --git a/typedapi/types/downsamplinground.go b/typedapi/types/downsamplinground.go index 716a5366b4..57d1464ac6 100644 --- a/typedapi/types/downsamplinground.go +++ b/typedapi/types/downsamplinground.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // DownsamplingRound type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DownsamplingRound.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DownsamplingRound.ts#L23-L32 type DownsamplingRound struct { // After The duration since rollover when this downsampling round should execute After Duration `json:"after"` @@ -74,13 +74,3 @@ func NewDownsamplingRound() *DownsamplingRound { return r } - -// true - -type DownsamplingRoundVariant interface { - DownsamplingRoundCaster() *DownsamplingRound -} - -func (s *DownsamplingRound) DownsamplingRoundCaster() *DownsamplingRound { - return s -} diff --git a/typedapi/types/dropprocessor.go b/typedapi/types/dropprocessor.go index c37bddff42..514ae65c8d 100644 --- a/typedapi/types/dropprocessor.go +++ b/typedapi/types/dropprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // DropProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L845-L845 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L845-L845 type DropProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -128,13 +128,3 @@ func NewDropProcessor() *DropProcessor { return r } - -// true - -type DropProcessorVariant interface { - DropProcessorCaster() *DropProcessor -} - -func (s *DropProcessor) DropProcessorCaster() *DropProcessor { - return s -} diff --git a/typedapi/types/duration.go b/typedapi/types/duration.go index f41ebcca5a..70032015e8 100644 --- a/typedapi/types/duration.go +++ b/typedapi/types/duration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -24,9 +24,5 @@ package types // // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L52-L58 type Duration any - -type DurationVariant interface { - DurationCaster() *Duration -} diff --git a/typedapi/types/durationvalueunitfloatmillis.go b/typedapi/types/durationvalueunitfloatmillis.go index db1f70b846..0e264d3ea9 100644 --- a/typedapi/types/durationvalueunitfloatmillis.go +++ b/typedapi/types/durationvalueunitfloatmillis.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DurationValueUnitFloatMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L67-L67 type DurationValueUnitFloatMillis Float64 diff --git a/typedapi/types/durationvalueunitmillis.go b/typedapi/types/durationvalueunitmillis.go index 69a1adae4c..84a5a2d5e5 100644 --- a/typedapi/types/durationvalueunitmillis.go +++ b/typedapi/types/durationvalueunitmillis.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DurationValueUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L67-L67 type DurationValueUnitMillis int64 - -type DurationValueUnitMillisVariant interface { - DurationValueUnitMillisCaster() *DurationValueUnitMillis -} diff --git a/typedapi/types/durationvalueunitnanos.go b/typedapi/types/durationvalueunitnanos.go index 1d947120be..52650f1dcd 100644 --- a/typedapi/types/durationvalueunitnanos.go +++ b/typedapi/types/durationvalueunitnanos.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DurationValueUnitNanos type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L67-L67 type DurationValueUnitNanos int64 diff --git a/typedapi/types/durationvalueunitseconds.go b/typedapi/types/durationvalueunitseconds.go index 1d7e520098..a3f9fc3d0f 100644 --- a/typedapi/types/durationvalueunitseconds.go +++ b/typedapi/types/durationvalueunitseconds.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // DurationValueUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L67-L67 type DurationValueUnitSeconds int64 diff --git a/typedapi/types/dutchanalyzer.go b/typedapi/types/dutchanalyzer.go index 6d96e1fcca..6ddc015bdc 100644 --- a/typedapi/types/dutchanalyzer.go +++ b/typedapi/types/dutchanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // DutchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L125-L130 type DutchAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *DutchAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *DutchAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewDutchAnalyzer() *DutchAnalyzer { return r } - -// true - -type DutchAnalyzerVariant interface { - DutchAnalyzerCaster() *DutchAnalyzer -} - -func (s *DutchAnalyzer) DutchAnalyzerCaster() *DutchAnalyzer { - return s -} diff --git a/typedapi/types/dutchstemtokenfilter.go b/typedapi/types/dutchstemtokenfilter.go new file mode 100644 index 0000000000..d9d920e0ad --- /dev/null +++ b/typedapi/types/dutchstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DutchStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L559-L561 +type DutchStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *DutchStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s DutchStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerDutchStemTokenFilter DutchStemTokenFilter + tmp := innerDutchStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "dutch_stem" + + return json.Marshal(tmp) +} + +// NewDutchStemTokenFilter returns a DutchStemTokenFilter. +func NewDutchStemTokenFilter() *DutchStemTokenFilter { + r := &DutchStemTokenFilter{} + + return r +} diff --git a/typedapi/types/dynamicproperty.go b/typedapi/types/dynamicproperty.go index 38dedb1c63..83db3d70ee 100644 --- a/typedapi/types/dynamicproperty.go +++ b/typedapi/types/dynamicproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -38,7 +38,7 @@ import ( // DynamicProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L335-L366 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L360-L391 type DynamicProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` @@ -337,6 +337,12 @@ func (s *DynamicProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -824,6 +830,12 @@ func (s *DynamicProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -1134,13 +1146,3 @@ func NewDynamicProperty() *DynamicProperty { return r } - -// true - -type DynamicPropertyVariant interface { - DynamicPropertyCaster() *DynamicProperty -} - -func (s *DynamicProperty) DynamicPropertyCaster() *DynamicProperty { - return s -} diff --git a/typedapi/types/dynamictemplate.go b/typedapi/types/dynamictemplate.go index 6320a43d72..2460c5ac42 100644 --- a/typedapi/types/dynamictemplate.go +++ b/typedapi/types/dynamictemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // DynamicTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/dynamic-template.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/dynamic-template.ts#L23-L43 type DynamicTemplate struct { AdditionalDynamicTemplateProperty map[string]json.RawMessage `json:"-"` Mapping Property `json:"mapping,omitempty"` @@ -201,6 +201,12 @@ func (s *DynamicTemplate) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "passthrough", err) } s.Mapping = *o + case "rank_vectors": + o := NewRankVectorProperty() + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "rank_vectors", err) + } + s.Mapping = *o case "semantic_text": o := NewSemanticTextProperty() if err := localDec.Decode(&o); err != nil { @@ -548,13 +554,3 @@ func NewDynamicTemplate() *DynamicTemplate { return r } - -// true - -type DynamicTemplateVariant interface { - DynamicTemplateCaster() *DynamicTemplate -} - -func (s *DynamicTemplate) DynamicTemplateCaster() *DynamicTemplate { - return s -} diff --git a/typedapi/types/edgengramtokenfilter.go b/typedapi/types/edgengramtokenfilter.go index 6f449df90b..d2eb471173 100644 --- a/typedapi/types/edgengramtokenfilter.go +++ b/typedapi/types/edgengramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,14 +33,20 @@ import ( // EdgeNGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L97-L107 type EdgeNGramTokenFilter struct { - MaxGram *int `json:"max_gram,omitempty"` - MinGram *int `json:"min_gram,omitempty"` - PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` - Side *edgengramside.EdgeNGramSide `json:"side,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // MaxGram Maximum character length of a gram. For custom token filters, defaults to + // `2`. For the built-in edge_ngram filter, defaults to `1`. + MaxGram *int `json:"max_gram,omitempty"` + // MinGram Minimum character length of a gram. Defaults to `1`. + MinGram *int `json:"min_gram,omitempty"` + // PreserveOriginal Emits original token when set to `true`. Defaults to `false`. + PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` + // Side Indicates whether to truncate tokens from the `front` or `back`. Defaults to + // `front`. + Side *edgengramside.EdgeNGramSide `json:"side,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *EdgeNGramTokenFilter) UnmarshalJSON(data []byte) error { @@ -138,13 +144,3 @@ func NewEdgeNGramTokenFilter() *EdgeNGramTokenFilter { return r } - -// true - -type EdgeNGramTokenFilterVariant interface { - EdgeNGramTokenFilterCaster() *EdgeNGramTokenFilter -} - -func (s *EdgeNGramTokenFilter) EdgeNGramTokenFilterCaster() *EdgeNGramTokenFilter { - return s -} diff --git a/typedapi/types/edgengramtokenizer.go b/typedapi/types/edgengramtokenizer.go index 3f1d723fe5..3862745687 100644 --- a/typedapi/types/edgengramtokenizer.go +++ b/typedapi/types/edgengramtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // EdgeNGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L48-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L48-L58 type EdgeNGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` MaxGram *int `json:"max_gram,omitempty"` @@ -145,13 +145,3 @@ func NewEdgeNGramTokenizer() *EdgeNGramTokenizer { return r } - -// true - -type EdgeNGramTokenizerVariant interface { - EdgeNGramTokenizerCaster() *EdgeNGramTokenizer -} - -func (s *EdgeNGramTokenizer) EdgeNGramTokenizerCaster() *EdgeNGramTokenizer { - return s -} diff --git a/typedapi/types/elasticsearcherror.go b/typedapi/types/elasticsearcherror.go index eb756a5c12..7c6d5a5542 100755 --- a/typedapi/types/elasticsearcherror.go +++ b/typedapi/types/elasticsearcherror.go @@ -18,7 +18,11 @@ package types import ( + "bytes" + "encoding/json" + "errors" "fmt" + "io" "strings" ) @@ -59,3 +63,55 @@ func NewElasticsearchError() *ElasticsearchError { return r } + +func (e *ElasticsearchError) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + + // Expect start object + t, err := dec.Token() + if err != nil { + return err + } + if delim, ok := t.(json.Delim); !ok || delim != '{' { + return fmt.Errorf("expected start object") + } + + for dec.More() { + t, err := dec.Token() + if err != nil { + return err + } + key, ok := t.(string) + if !ok { + return fmt.Errorf("expected string key") + } + + switch key { + case "error": + if err := dec.Decode(&e.ErrorCause); err != nil { + return fmt.Errorf("error decoding error: %w", err) + } + case "status": + if err := dec.Decode(&e.Status); err != nil { + return fmt.Errorf("error decoding status: %w", err) + } + default: + // Unknown field: store in ErrorCause.Metadata + if e.ErrorCause.Metadata == nil { + e.ErrorCause.Metadata = make(map[string]json.RawMessage) + } + var raw json.RawMessage + if err := dec.Decode(&raw); err != nil { + return fmt.Errorf("error decoding unknown field %s: %w", key, err) + } + e.ErrorCause.Metadata[key] = raw + } + } + + // Expect end object + _, err = dec.Token() + if err != nil && !errors.Is(err, io.EOF) { + return err + } + return nil +} diff --git a/typedapi/types/elasticsearcherror_test.go b/typedapi/types/elasticsearcherror_test.go new file mode 100755 index 0000000000..0ae7fd4bda --- /dev/null +++ b/typedapi/types/elasticsearcherror_test.go @@ -0,0 +1,124 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package types + +import ( + "reflect" + "testing" +) + +func TestElasticsearchError_UnmarshalJSON(t *testing.T) { + tests := []struct { + name string + data string + wantStatus int + wantType string + wantReason *string + wantMetadata map[string]string + wantErr bool + }{ + { + name: "valid error and status", + data: `{"error": {"type": "some_type", "reason": "some_reason"}, "status": 404}`, + wantStatus: 404, + wantType: "some_type", + wantReason: &[]string{"some_reason"}[0], + wantMetadata: map[string]string{}, + wantErr: false, + }, + { + name: "no shard failure", + data: `{ + "error": { + "type": "exception", + "reason": "foo", + "caused_by": { + "type": "illegal_state_exception", + "reason": "bar" + } + } + }`, + wantStatus: 0, + wantType: "exception", + wantReason: &[]string{"foo"}[0], + wantMetadata: map[string]string{}, + wantErr: false, + }, + { + name: "unknown field stored in metadata", + data: `{"error": {"type": "some_type"}, "status": 404, "foo": "bar"}`, + wantStatus: 404, + wantType: "some_type", + wantReason: nil, + wantMetadata: map[string]string{ + "foo": `"bar"`, + }, + wantErr: false, + }, + { + name: "invalid json", + data: `{"error": {"type": "some_type", "reason": "some_reason", "status": 404`, + wantErr: true, + }, + { + name: "empty object", + data: `{}`, + wantStatus: 0, + wantType: "", + wantReason: nil, + wantMetadata: map[string]string{}, + wantErr: false, + }, + { + name: "non-object json", + data: `[]`, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var e ElasticsearchError + err := e.UnmarshalJSON([]byte(tt.data)) + if (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + return + } + if tt.wantErr { + return + } + if e.Status != tt.wantStatus { + t.Errorf("Status = %v, want %v", e.Status, tt.wantStatus) + } + if e.ErrorCause.Type != tt.wantType { + t.Errorf("Type = %v, want %v", e.ErrorCause.Type, tt.wantType) + } + if (e.ErrorCause.Reason == nil) != (tt.wantReason == nil) || + (e.ErrorCause.Reason != nil && tt.wantReason != nil && *e.ErrorCause.Reason != *tt.wantReason) { + t.Errorf("Reason = %v, want %v", e.ErrorCause.Reason, tt.wantReason) + } + gotMetadata := map[string]string{} + for k, v := range e.ErrorCause.Metadata { + gotMetadata[k] = string(v) + } + if !reflect.DeepEqual(gotMetadata, tt.wantMetadata) { + t.Errorf("Metadata = %v, want %v", gotMetadata, tt.wantMetadata) + } + }) + } +} diff --git a/typedapi/types/elasticsearchservicesettings.go b/typedapi/types/elasticsearchservicesettings.go index 7be5916501..cf935f6b07 100644 --- a/typedapi/types/elasticsearchservicesettings.go +++ b/typedapi/types/elasticsearchservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ElasticsearchServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L704-L738 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1215-L1249 type ElasticsearchServiceSettings struct { // AdaptiveAllocations Adaptive allocations configuration details. // If `enabled` is true, the number of allocations of the model is set based on @@ -152,13 +152,3 @@ func NewElasticsearchServiceSettings() *ElasticsearchServiceSettings { return r } - -// true - -type ElasticsearchServiceSettingsVariant interface { - ElasticsearchServiceSettingsCaster() *ElasticsearchServiceSettings -} - -func (s *ElasticsearchServiceSettings) ElasticsearchServiceSettingsCaster() *ElasticsearchServiceSettings { - return s -} diff --git a/typedapi/types/elasticsearchtasksettings.go b/typedapi/types/elasticsearchtasksettings.go index 0b26b1cf26..ebce7b6f7c 100644 --- a/typedapi/types/elasticsearchtasksettings.go +++ b/typedapi/types/elasticsearchtasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ElasticsearchTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L740-L746 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1251-L1257 type ElasticsearchTaskSettings struct { // ReturnDocuments For a `rerank` task, return the document instead of only the index. ReturnDocuments *bool `json:"return_documents,omitempty"` @@ -77,13 +77,3 @@ func NewElasticsearchTaskSettings() *ElasticsearchTaskSettings { return r } - -// true - -type ElasticsearchTaskSettingsVariant interface { - ElasticsearchTaskSettingsCaster() *ElasticsearchTaskSettings -} - -func (s *ElasticsearchTaskSettings) ElasticsearchTaskSettingsCaster() *ElasticsearchTaskSettings { - return s -} diff --git a/typedapi/types/elasticsearchversioninfo.go b/typedapi/types/elasticsearchversioninfo.go index b0d83a1add..f2f4055b15 100644 --- a/typedapi/types/elasticsearchversioninfo.go +++ b/typedapi/types/elasticsearchversioninfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Base.ts#L76-L115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Base.ts#L76-L118 type ElasticsearchVersionInfo struct { // BuildDate The Elasticsearch Git commit's date. BuildDate DateTime `json:"build_date"` @@ -45,6 +45,13 @@ type ElasticsearchVersionInfo struct { // For example, `docker`, `rpm`, or `tar`. BuildType string `json:"build_type"` // Int The Elasticsearch version number. + // + // ::: IMPORTANT: For Serverless deployments, this static value is always + // `8.11.0` and is used solely for backward compatibility with legacy clients. + // + // Serverless environments are versionless and automatically upgraded, so this + // + // value can be safely ignored. Int string `json:"number"` // LuceneVersion The version number of Elasticsearch's underlying Lucene software. LuceneVersion string `json:"lucene_version"` @@ -163,5 +170,3 @@ func NewElasticsearchVersionInfo() *ElasticsearchVersionInfo { return r } - -// false diff --git a/typedapi/types/elasticsearchversionmininfo.go b/typedapi/types/elasticsearchversionmininfo.go index a2d8ac9617..85f50b4e64 100644 --- a/typedapi/types/elasticsearchversionmininfo.go +++ b/typedapi/types/elasticsearchversionmininfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionMinInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Base.ts#L117-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Base.ts#L120-L128 type ElasticsearchVersionMinInfo struct { BuildFlavor string `json:"build_flavor"` Int string `json:"number"` @@ -99,5 +99,3 @@ func NewElasticsearchVersionMinInfo() *ElasticsearchVersionMinInfo { return r } - -// false diff --git a/typedapi/types/elisiontokenfilter.go b/typedapi/types/elisiontokenfilter.go index 6e077ee3a6..635fe5ec36 100644 --- a/typedapi/types/elisiontokenfilter.go +++ b/typedapi/types/elisiontokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,13 +31,30 @@ import ( // ElisionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L188-L193 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L245-L258 type ElisionTokenFilter struct { - Articles []string `json:"articles,omitempty"` + // Articles List of elisions to remove. + // To be removed, the elision must be at the beginning of a token and be + // immediately followed by an apostrophe. Both the elision and apostrophe are + // removed. + // For custom `elision` filters, either this parameter or `articles_path` must + // be specified. + Articles []string `json:"articles,omitempty"` + // ArticlesCase If `true`, elision matching is case insensitive. If `false`, elision matching + // is case sensitive. Defaults to `false`. ArticlesCase Stringifiedboolean `json:"articles_case,omitempty"` - ArticlesPath *string `json:"articles_path,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // ArticlesPath Path to a file that contains a list of elisions to remove. + // This path must be absolute or relative to the `config` location, and the file + // must be UTF-8 encoded. Each elision in the file must be separated by a line + // break. + // To be removed, the elision must be at the beginning of a token and be + // immediately followed by an apostrophe. Both the elision and apostrophe are + // removed. + // For custom `elision` filters, either this parameter or `articles` must be + // specified. + ArticlesPath *string `json:"articles_path,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *ElisionTokenFilter) UnmarshalJSON(data []byte) error { @@ -114,13 +131,3 @@ func NewElisionTokenFilter() *ElisionTokenFilter { return r } - -// true - -type ElisionTokenFilterVariant interface { - ElisionTokenFilterCaster() *ElisionTokenFilter -} - -func (s *ElisionTokenFilter) ElisionTokenFilterCaster() *ElisionTokenFilter { - return s -} diff --git a/typedapi/types/elserservicesettings.go b/typedapi/types/elserservicesettings.go index 5a62a06f09..af52a5fd9a 100644 --- a/typedapi/types/elserservicesettings.go +++ b/typedapi/types/elserservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ElserServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L758-L784 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1269-L1295 type ElserServiceSettings struct { // AdaptiveAllocations Adaptive allocations configuration details. // If `enabled` is true, the number of allocations of the model is set based on @@ -125,13 +125,3 @@ func NewElserServiceSettings() *ElserServiceSettings { return r } - -// true - -type ElserServiceSettingsVariant interface { - ElserServiceSettingsCaster() *ElserServiceSettings -} - -func (s *ElserServiceSettings) ElserServiceSettingsCaster() *ElserServiceSettings { - return s -} diff --git a/typedapi/types/email.go b/typedapi/types/email.go index 1bce38f98a..92780db186 100644 --- a/typedapi/types/email.go +++ b/typedapi/types/email.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Email type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L238-L250 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L238-L250 type Email struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` @@ -192,5 +192,3 @@ func NewEmail() *Email { return r } - -// false diff --git a/typedapi/types/emailaction.go b/typedapi/types/emailaction.go index 1d6c651ae7..8a0237441a 100644 --- a/typedapi/types/emailaction.go +++ b/typedapi/types/emailaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // EmailAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L252-L252 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L252-L252 type EmailAction struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` @@ -192,13 +192,3 @@ func NewEmailAction() *EmailAction { return r } - -// true - -type EmailActionVariant interface { - EmailActionCaster() *EmailAction -} - -func (s *EmailAction) EmailActionCaster() *EmailAction { - return s -} diff --git a/typedapi/types/emailattachmentcontainer.go b/typedapi/types/emailattachmentcontainer.go index f65ee25f2f..d234aa8b40 100644 --- a/typedapi/types/emailattachmentcontainer.go +++ b/typedapi/types/emailattachmentcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // EmailAttachmentContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L211-L216 type EmailAttachmentContainer struct { AdditionalEmailAttachmentContainerProperty map[string]json.RawMessage `json:"-"` Data *DataEmailAttachment `json:"data,omitempty"` @@ -72,13 +72,3 @@ func NewEmailAttachmentContainer() *EmailAttachmentContainer { return r } - -// true - -type EmailAttachmentContainerVariant interface { - EmailAttachmentContainerCaster() *EmailAttachmentContainer -} - -func (s *EmailAttachmentContainer) EmailAttachmentContainerCaster() *EmailAttachmentContainer { - return s -} diff --git a/typedapi/types/emailbody.go b/typedapi/types/emailbody.go index 9ac3a24424..4ff4b592d3 100644 --- a/typedapi/types/emailbody.go +++ b/typedapi/types/emailbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // EmailBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L192-L195 type EmailBody struct { Html *string `json:"html,omitempty"` Text *string `json:"text,omitempty"` @@ -87,13 +87,3 @@ func NewEmailBody() *EmailBody { return r } - -// true - -type EmailBodyVariant interface { - EmailBodyCaster() *EmailBody -} - -func (s *EmailBody) EmailBodyCaster() *EmailBody { - return s -} diff --git a/typedapi/types/emailresult.go b/typedapi/types/emailresult.go index 544068ba91..f68421dd38 100644 --- a/typedapi/types/emailresult.go +++ b/typedapi/types/emailresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // EmailResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L205-L209 type EmailResult struct { Account *string `json:"account,omitempty"` Message Email `json:"message"` @@ -93,5 +93,3 @@ func NewEmailResult() *EmailResult { return r } - -// false diff --git a/typedapi/types/emptyobject.go b/typedapi/types/emptyobject.go index c872dbeb1a..24520bc833 100644 --- a/typedapi/types/emptyobject.go +++ b/typedapi/types/emptyobject.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EmptyObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L164-L165 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L164-L165 type EmptyObject struct { } @@ -32,13 +32,3 @@ func NewEmptyObject() *EmptyObject { return r } - -// true - -type EmptyObjectVariant interface { - EmptyObjectCaster() *EmptyObject -} - -func (s *EmptyObject) EmptyObjectCaster() *EmptyObject { - return s -} diff --git a/typedapi/types/englishanalyzer.go b/typedapi/types/englishanalyzer.go index 1d8d57bb96..c9161438d7 100644 --- a/typedapi/types/englishanalyzer.go +++ b/typedapi/types/englishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // EnglishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L132-L137 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L132-L137 type EnglishAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *EnglishAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *EnglishAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewEnglishAnalyzer() *EnglishAnalyzer { return r } - -// true - -type EnglishAnalyzerVariant interface { - EnglishAnalyzerCaster() *EnglishAnalyzer -} - -func (s *EnglishAnalyzer) EnglishAnalyzerCaster() *EnglishAnalyzer { - return s -} diff --git a/typedapi/types/enrichpolicy.go b/typedapi/types/enrichpolicy.go index 5cf0ca7c03..224e7fa250 100644 --- a/typedapi/types/enrichpolicy.go +++ b/typedapi/types/enrichpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // EnrichPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/_types/Policy.ts#L34-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/_types/Policy.ts#L34-L41 type EnrichPolicy struct { ElasticsearchVersion *string `json:"elasticsearch_version,omitempty"` EnrichFields []string `json:"enrich_fields"` @@ -126,13 +126,3 @@ func NewEnrichPolicy() *EnrichPolicy { return r } - -// true - -type EnrichPolicyVariant interface { - EnrichPolicyCaster() *EnrichPolicy -} - -func (s *EnrichPolicy) EnrichPolicyCaster() *EnrichPolicy { - return s -} diff --git a/typedapi/types/enrichprocessor.go b/typedapi/types/enrichprocessor.go index 387065ace5..f7613cb8d6 100644 --- a/typedapi/types/enrichprocessor.go +++ b/typedapi/types/enrichprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // EnrichProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L847-L886 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L847-L886 type EnrichProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -228,13 +228,3 @@ func NewEnrichProcessor() *EnrichProcessor { return r } - -// true - -type EnrichProcessorVariant interface { - EnrichProcessorCaster() *EnrichProcessor -} - -func (s *EnrichProcessor) EnrichProcessorCaster() *EnrichProcessor { - return s -} diff --git a/typedapi/types/ensemble.go b/typedapi/types/ensemble.go index 936e64fc20..1de6e15048 100644 --- a/typedapi/types/ensemble.go +++ b/typedapi/types/ensemble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Ensemble type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L93-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L93-L99 type Ensemble struct { AggregateOutput *AggregateOutput `json:"aggregate_output,omitempty"` ClassificationLabels []string `json:"classification_labels,omitempty"` @@ -98,13 +98,3 @@ func NewEnsemble() *Ensemble { return r } - -// true - -type EnsembleVariant interface { - EnsembleCaster() *Ensemble -} - -func (s *Ensemble) EnsembleCaster() *Ensemble { - return s -} diff --git a/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go b/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go index 98a9e9a24f..2ca5287028 100644 --- a/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go +++ b/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package accesstokengranttype package accesstokengranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_token/types.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_token/types.ts#L23-L48 type AccessTokenGrantType struct { Name string } diff --git a/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go b/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go index b2d858050f..d4634b9f5f 100644 --- a/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go +++ b/typedapi/types/enums/acknowledgementoptions/acknowledgementoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package acknowledgementoptions package acknowledgementoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L103-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L103-L107 type AcknowledgementOptions struct { Name string } diff --git a/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go b/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go index edc260f132..1fbe1b6685 100644 --- a/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go +++ b/typedapi/types/enums/actionexecutionmode/actionexecutionmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package actionexecutionmode package actionexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L67-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L67-L88 type ActionExecutionMode struct { Name string } diff --git a/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go b/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go index a321373c15..8955cb3bc1 100644 --- a/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go +++ b/typedapi/types/enums/actionstatusoptions/actionstatusoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package actionstatusoptions package actionstatusoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L96-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L96-L101 type ActionStatusOptions struct { Name string } diff --git a/typedapi/types/enums/actiontype/actiontype.go b/typedapi/types/enums/actiontype/actiontype.go index 1328cc7abe..8ef0be18ed 100644 --- a/typedapi/types/enums/actiontype/actiontype.go +++ b/typedapi/types/enums/actiontype/actiontype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package actiontype package actiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L58-L65 type ActionType struct { Name string } diff --git a/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go b/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go index e56ff6823d..283cfc9f3b 100644 --- a/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go +++ b/typedapi/types/enums/alibabacloudservicetype/alibabacloudservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package alibabacloudservicetype package alibabacloudservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L289-L291 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L362-L364 type AlibabaCloudServiceType struct { Name string } diff --git a/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go b/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go index 156410e774..95b4f8cb48 100644 --- a/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go +++ b/typedapi/types/enums/alibabacloudtasktype/alibabacloudtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package alibabacloudtasktype package alibabacloudtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L282-L287 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L355-L360 type AlibabaCloudTaskType struct { Name string } diff --git a/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go b/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go index 13409f0c68..d1b32b54cf 100644 --- a/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go +++ b/typedapi/types/enums/allocationexplaindecision/allocationexplaindecision.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package allocationexplaindecision package allocationexplaindecision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L33-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L33-L38 type AllocationExplainDecision struct { Name string } diff --git a/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go b/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go index 959ff3599f..e731970569 100644 --- a/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go +++ b/typedapi/types/enums/amazonbedrockservicetype/amazonbedrockservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package amazonbedrockservicetype package amazonbedrockservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L368-L370 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L441-L443 type AmazonBedrockServiceType struct { Name string } diff --git a/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go b/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go index 4a00517405..3313fdef59 100644 --- a/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go +++ b/typedapi/types/enums/amazonbedrocktasktype/amazonbedrocktasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package amazonbedrocktasktype package amazonbedrocktasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L363-L366 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L436-L439 type AmazonBedrockTaskType struct { Name string } diff --git a/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go b/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go new file mode 100644 index 0000000000..aa614ee815 --- /dev/null +++ b/typedapi/types/enums/amazonsagemakerapi/amazonsagemakerapi.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package amazonsagemakerapi +package amazonsagemakerapi + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L501-L504 +type AmazonSageMakerApi struct { + Name string +} + +var ( + Openai = AmazonSageMakerApi{"openai"} + + Elastic = AmazonSageMakerApi{"elastic"} +) + +func (a AmazonSageMakerApi) MarshalText() (text []byte, err error) { + return []byte(a.String()), nil +} + +func (a *AmazonSageMakerApi) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "openai": + *a = Openai + case "elastic": + *a = Elastic + default: + *a = AmazonSageMakerApi{string(text)} + } + + return nil +} + +func (a AmazonSageMakerApi) String() string { + return a.Name +} diff --git a/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go b/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go new file mode 100644 index 0000000000..7c6f8cff74 --- /dev/null +++ b/typedapi/types/enums/amazonsagemakerservicetype/amazonsagemakerservicetype.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package amazonsagemakerservicetype +package amazonsagemakerservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L584-L586 +type AmazonSageMakerServiceType struct { + Name string +} + +var ( + Amazonsagemaker = AmazonSageMakerServiceType{"amazon_sagemaker"} +) + +func (a AmazonSageMakerServiceType) MarshalText() (text []byte, err error) { + return []byte(a.String()), nil +} + +func (a *AmazonSageMakerServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "amazon_sagemaker": + *a = Amazonsagemaker + default: + *a = AmazonSageMakerServiceType{string(text)} + } + + return nil +} + +func (a AmazonSageMakerServiceType) String() string { + return a.Name +} diff --git a/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go b/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go index efba482f46..957856be52 100644 --- a/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go +++ b/typedapi/types/enums/anthropicservicetype/anthropicservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package anthropicservicetype package anthropicservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L421-L423 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L637-L639 type AnthropicServiceType struct { Name string } diff --git a/typedapi/types/enums/anthropictasktype/anthropictasktype.go b/typedapi/types/enums/anthropictasktype/anthropictasktype.go index 44aa6deaa2..1b13735710 100644 --- a/typedapi/types/enums/anthropictasktype/anthropictasktype.go +++ b/typedapi/types/enums/anthropictasktype/anthropictasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package anthropictasktype package anthropictasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L417-L419 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L633-L635 type AnthropicTaskType struct { Name string } diff --git a/typedapi/types/enums/apikeygranttype/apikeygranttype.go b/typedapi/types/enums/apikeygranttype/apikeygranttype.go index 07a6ec7503..22ff3e8de9 100644 --- a/typedapi/types/enums/apikeygranttype/apikeygranttype.go +++ b/typedapi/types/enums/apikeygranttype/apikeygranttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package apikeygranttype package apikeygranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/grant_api_key/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/grant_api_key/types.ts#L47-L50 type ApiKeyGrantType struct { Name string } diff --git a/typedapi/types/enums/apikeytype/apikeytype.go b/typedapi/types/enums/apikeytype/apikeytype.go index f442a5f9cf..4b691c9f84 100644 --- a/typedapi/types/enums/apikeytype/apikeytype.go +++ b/typedapi/types/enums/apikeytype/apikeytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package apikeytype package apikeytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/ApiKey.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/ApiKey.ts#L115-L118 type ApiKeyType struct { Name string } diff --git a/typedapi/types/enums/appliesto/appliesto.go b/typedapi/types/enums/appliesto/appliesto.go index d05745c873..91a88cd4c4 100644 --- a/typedapi/types/enums/appliesto/appliesto.go +++ b/typedapi/types/enums/appliesto/appliesto.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package appliesto package appliesto import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Rule.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Rule.ts#L67-L72 type AppliesTo struct { Name string } diff --git a/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go b/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go index 906e2c599a..03b8752012 100644 --- a/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go +++ b/typedapi/types/enums/azureaistudioservicetype/azureaistudioservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package azureaistudioservicetype package azureaistudioservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L504-L506 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L720-L722 type AzureAiStudioServiceType struct { Name string } diff --git a/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go b/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go index 77bfd4893b..f8aadccb92 100644 --- a/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go +++ b/typedapi/types/enums/azureaistudiotasktype/azureaistudiotasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package azureaistudiotasktype package azureaistudiotasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L499-L502 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L715-L718 type AzureAiStudioTaskType struct { Name string } diff --git a/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go b/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go index 80edaad9da..0176048400 100644 --- a/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go +++ b/typedapi/types/enums/azureopenaiservicetype/azureopenaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package azureopenaiservicetype package azureopenaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L568-L570 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L784-L786 type AzureOpenAIServiceType struct { Name string } diff --git a/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go b/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go index 031d37bbb2..4e93d4f618 100644 --- a/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go +++ b/typedapi/types/enums/azureopenaitasktype/azureopenaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package azureopenaitasktype package azureopenaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L563-L566 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L779-L782 type AzureOpenAITaskType struct { Name string } diff --git a/typedapi/types/enums/boundaryscanner/boundaryscanner.go b/typedapi/types/enums/boundaryscanner/boundaryscanner.go index 7db7283e9b..7a6f357217 100644 --- a/typedapi/types/enums/boundaryscanner/boundaryscanner.go +++ b/typedapi/types/enums/boundaryscanner/boundaryscanner.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package boundaryscanner package boundaryscanner import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L26-L45 type BoundaryScanner struct { Name string } diff --git a/typedapi/types/enums/bytes/bytes.go b/typedapi/types/enums/bytes/bytes.go index 6588fdb429..449c24e620 100644 --- a/typedapi/types/enums/bytes/bytes.go +++ b/typedapi/types/enums/bytes/bytes.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package bytes package bytes import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L173-L185 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L173-L185 type Bytes struct { Name string } diff --git a/typedapi/types/enums/calendarinterval/calendarinterval.go b/typedapi/types/enums/calendarinterval/calendarinterval.go index 4f03f45c80..285efb6b66 100644 --- a/typedapi/types/enums/calendarinterval/calendarinterval.go +++ b/typedapi/types/enums/calendarinterval/calendarinterval.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package calendarinterval package calendarinterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L262-L279 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L262-L279 type CalendarInterval struct { Name string } diff --git a/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go b/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go index e95f636d46..8270e0aed8 100644 --- a/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go +++ b/typedapi/types/enums/cardinalityexecutionmode/cardinalityexecutionmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package cardinalityexecutionmode package cardinalityexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L64-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L70-L91 type CardinalityExecutionMode struct { Name string } diff --git a/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go b/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go index 516458ccc9..20ffadc74d 100644 --- a/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go +++ b/typedapi/types/enums/catanomalydetectorcolumn/catanomalydetectorcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package catanomalydetectorcolumn package catanomalydetectorcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L32-L401 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L32-L401 type CatAnomalyDetectorColumn struct { Name string } diff --git a/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go b/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go index b1b53300e2..fbf344206d 100644 --- a/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go +++ b/typedapi/types/enums/catdatafeedcolumn/catdatafeedcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package catdatafeedcolumn package catdatafeedcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L405-L471 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L405-L471 type CatDatafeedColumn struct { Name string } diff --git a/typedapi/types/enums/catdfacolumn/catdfacolumn.go b/typedapi/types/enums/catdfacolumn/catdfacolumn.go index c32ebc6d11..eceb8ea36c 100644 --- a/typedapi/types/enums/catdfacolumn/catdfacolumn.go +++ b/typedapi/types/enums/catdfacolumn/catdfacolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package catdfacolumn package catdfacolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L472-L557 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L473-L558 type CatDfaColumn struct { Name string } diff --git a/typedapi/types/enums/categorizationstatus/categorizationstatus.go b/typedapi/types/enums/categorizationstatus/categorizationstatus.go index 6477edc52d..aa3b5d01d4 100644 --- a/typedapi/types/enums/categorizationstatus/categorizationstatus.go +++ b/typedapi/types/enums/categorizationstatus/categorizationstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package categorizationstatus package categorizationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Model.ts#L84-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Model.ts#L84-L87 type CategorizationStatus struct { Name string } diff --git a/typedapi/types/enums/catnodecolumn/catnodecolumn.go b/typedapi/types/enums/catnodecolumn/catnodecolumn.go new file mode 100644 index 0000000000..de6cc7c0d2 --- /dev/null +++ b/typedapi/types/enums/catnodecolumn/catnodecolumn.go @@ -0,0 +1,405 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package catnodecolumn +package catnodecolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L560-L1012 +type CatNodeColumn struct { + Name string +} + +var ( + Build = CatNodeColumn{"build"} + + Completionsize = CatNodeColumn{"completion.size"} + + Cpu = CatNodeColumn{"cpu"} + + Diskavail = CatNodeColumn{"disk.avail"} + + Disktotal = CatNodeColumn{"disk.total"} + + Diskused = CatNodeColumn{"disk.used"} + + Diskusedpercent = CatNodeColumn{"disk.used_percent"} + + Fielddataevictions = CatNodeColumn{"fielddata.evictions"} + + Fielddatamemorysize = CatNodeColumn{"fielddata.memory_size"} + + Filedesccurrent = CatNodeColumn{"file_desc.current"} + + Filedescmax = CatNodeColumn{"file_desc.max"} + + Filedescpercent = CatNodeColumn{"file_desc.percent"} + + Flushtotal = CatNodeColumn{"flush.total"} + + Flushtotaltime = CatNodeColumn{"flush.total_time"} + + Getcurrent = CatNodeColumn{"get.current"} + + Getexiststime = CatNodeColumn{"get.exists_time"} + + Getexiststotal = CatNodeColumn{"get.exists_total"} + + Getmissingtime = CatNodeColumn{"get.missing_time"} + + Getmissingtotal = CatNodeColumn{"get.missing_total"} + + Gettime = CatNodeColumn{"get.time"} + + Gettotal = CatNodeColumn{"get.total"} + + Heapcurrent = CatNodeColumn{"heap.current"} + + Heapmax = CatNodeColumn{"heap.max"} + + Heappercent = CatNodeColumn{"heap.percent"} + + Httpaddress = CatNodeColumn{"http_address"} + + Id = CatNodeColumn{"id"} + + Indexingdeletecurrent = CatNodeColumn{"indexing.delete_current"} + + Indexingdeletetime = CatNodeColumn{"indexing.delete_time"} + + Indexingdeletetotal = CatNodeColumn{"indexing.delete_total"} + + Indexingindexcurrent = CatNodeColumn{"indexing.index_current"} + + Indexingindexfailed = CatNodeColumn{"indexing.index_failed"} + + Indexingindexfailedduetoversionconflict = CatNodeColumn{"indexing.index_failed_due_to_version_conflict"} + + Indexingindextime = CatNodeColumn{"indexing.index_time"} + + Indexingindextotal = CatNodeColumn{"indexing.index_total"} + + Ip = CatNodeColumn{"ip"} + + Jdk = CatNodeColumn{"jdk"} + + Load1m = CatNodeColumn{"load_1m"} + + Load5m = CatNodeColumn{"load_5m"} + + Load15m = CatNodeColumn{"load_15m"} + + Mappingstotalcount = CatNodeColumn{"mappings.total_count"} + + Mappingstotalestimatedoverheadinbytes = CatNodeColumn{"mappings.total_estimated_overhead_in_bytes"} + + Master = CatNodeColumn{"master"} + + Mergescurrent = CatNodeColumn{"merges.current"} + + Mergescurrentdocs = CatNodeColumn{"merges.current_docs"} + + Mergescurrentsize = CatNodeColumn{"merges.current_size"} + + Mergestotal = CatNodeColumn{"merges.total"} + + Mergestotaldocs = CatNodeColumn{"merges.total_docs"} + + Mergestotalsize = CatNodeColumn{"merges.total_size"} + + Mergestotaltime = CatNodeColumn{"merges.total_time"} + + Name = CatNodeColumn{"name"} + + Noderole = CatNodeColumn{"node.role"} + + Pid = CatNodeColumn{"pid"} + + Port = CatNodeColumn{"port"} + + Querycachememorysize = CatNodeColumn{"query_cache.memory_size"} + + Querycacheevictions = CatNodeColumn{"query_cache.evictions"} + + Querycachehitcount = CatNodeColumn{"query_cache.hit_count"} + + Querycachemisscount = CatNodeColumn{"query_cache.miss_count"} + + Ramcurrent = CatNodeColumn{"ram.current"} + + Rammax = CatNodeColumn{"ram.max"} + + Rampercent = CatNodeColumn{"ram.percent"} + + Refreshtotal = CatNodeColumn{"refresh.total"} + + Refreshtime = CatNodeColumn{"refresh.time"} + + Requestcachememorysize = CatNodeColumn{"request_cache.memory_size"} + + Requestcacheevictions = CatNodeColumn{"request_cache.evictions"} + + Requestcachehitcount = CatNodeColumn{"request_cache.hit_count"} + + Requestcachemisscount = CatNodeColumn{"request_cache.miss_count"} + + Scriptcompilations = CatNodeColumn{"script.compilations"} + + Scriptcacheevictions = CatNodeColumn{"script.cache_evictions"} + + Searchfetchcurrent = CatNodeColumn{"search.fetch_current"} + + Searchfetchtime = CatNodeColumn{"search.fetch_time"} + + Searchfetchtotal = CatNodeColumn{"search.fetch_total"} + + Searchopencontexts = CatNodeColumn{"search.open_contexts"} + + Searchquerycurrent = CatNodeColumn{"search.query_current"} + + Searchquerytime = CatNodeColumn{"search.query_time"} + + Searchquerytotal = CatNodeColumn{"search.query_total"} + + Searchscrollcurrent = CatNodeColumn{"search.scroll_current"} + + Searchscrolltime = CatNodeColumn{"search.scroll_time"} + + Searchscrolltotal = CatNodeColumn{"search.scroll_total"} + + Segmentscount = CatNodeColumn{"segments.count"} + + Segmentsfixedbitsetmemory = CatNodeColumn{"segments.fixed_bitset_memory"} + + Segmentsindexwritermemory = CatNodeColumn{"segments.index_writer_memory"} + + Segmentsmemory = CatNodeColumn{"segments.memory"} + + Segmentsversionmapmemory = CatNodeColumn{"segments.version_map_memory"} + + Shardstatstotalcount = CatNodeColumn{"shard_stats.total_count"} + + Suggestcurrent = CatNodeColumn{"suggest.current"} + + Suggesttime = CatNodeColumn{"suggest.time"} + + Suggesttotal = CatNodeColumn{"suggest.total"} + + Uptime = CatNodeColumn{"uptime"} + + Version = CatNodeColumn{"version"} +) + +func (c CatNodeColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatNodeColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "build": + *c = Build + case "completion.size": + *c = Completionsize + case "cpu": + *c = Cpu + case "disk.avail": + *c = Diskavail + case "disk.total": + *c = Disktotal + case "disk.used": + *c = Diskused + case "disk.used_percent": + *c = Diskusedpercent + case "fielddata.evictions": + *c = Fielddataevictions + case "fielddata.memory_size": + *c = Fielddatamemorysize + case "file_desc.current": + *c = Filedesccurrent + case "file_desc.max": + *c = Filedescmax + case "file_desc.percent": + *c = Filedescpercent + case "flush.total": + *c = Flushtotal + case "flush.total_time": + *c = Flushtotaltime + case "get.current": + *c = Getcurrent + case "get.exists_time": + *c = Getexiststime + case "get.exists_total": + *c = Getexiststotal + case "get.missing_time": + *c = Getmissingtime + case "get.missing_total": + *c = Getmissingtotal + case "get.time": + *c = Gettime + case "get.total": + *c = Gettotal + case "heap.current": + *c = Heapcurrent + case "heap.max": + *c = Heapmax + case "heap.percent": + *c = Heappercent + case "http_address": + *c = Httpaddress + case "id": + *c = Id + case "indexing.delete_current": + *c = Indexingdeletecurrent + case "indexing.delete_time": + *c = Indexingdeletetime + case "indexing.delete_total": + *c = Indexingdeletetotal + case "indexing.index_current": + *c = Indexingindexcurrent + case "indexing.index_failed": + *c = Indexingindexfailed + case "indexing.index_failed_due_to_version_conflict": + *c = Indexingindexfailedduetoversionconflict + case "indexing.index_time": + *c = Indexingindextime + case "indexing.index_total": + *c = Indexingindextotal + case "ip": + *c = Ip + case "jdk": + *c = Jdk + case "load_1m": + *c = Load1m + case "load_5m": + *c = Load5m + case "load_15m": + *c = Load15m + case "mappings.total_count": + *c = Mappingstotalcount + case "mappings.total_estimated_overhead_in_bytes": + *c = Mappingstotalestimatedoverheadinbytes + case "master": + *c = Master + case "merges.current": + *c = Mergescurrent + case "merges.current_docs": + *c = Mergescurrentdocs + case "merges.current_size": + *c = Mergescurrentsize + case "merges.total": + *c = Mergestotal + case "merges.total_docs": + *c = Mergestotaldocs + case "merges.total_size": + *c = Mergestotalsize + case "merges.total_time": + *c = Mergestotaltime + case "name": + *c = Name + case "node.role": + *c = Noderole + case "pid": + *c = Pid + case "port": + *c = Port + case "query_cache.memory_size": + *c = Querycachememorysize + case "query_cache.evictions": + *c = Querycacheevictions + case "query_cache.hit_count": + *c = Querycachehitcount + case "query_cache.miss_count": + *c = Querycachemisscount + case "ram.current": + *c = Ramcurrent + case "ram.max": + *c = Rammax + case "ram.percent": + *c = Rampercent + case "refresh.total": + *c = Refreshtotal + case "refresh.time": + *c = Refreshtime + case "request_cache.memory_size": + *c = Requestcachememorysize + case "request_cache.evictions": + *c = Requestcacheevictions + case "request_cache.hit_count": + *c = Requestcachehitcount + case "request_cache.miss_count": + *c = Requestcachemisscount + case "script.compilations": + *c = Scriptcompilations + case "script.cache_evictions": + *c = Scriptcacheevictions + case "search.fetch_current": + *c = Searchfetchcurrent + case "search.fetch_time": + *c = Searchfetchtime + case "search.fetch_total": + *c = Searchfetchtotal + case "search.open_contexts": + *c = Searchopencontexts + case "search.query_current": + *c = Searchquerycurrent + case "search.query_time": + *c = Searchquerytime + case "search.query_total": + *c = Searchquerytotal + case "search.scroll_current": + *c = Searchscrollcurrent + case "search.scroll_time": + *c = Searchscrolltime + case "search.scroll_total": + *c = Searchscrolltotal + case "segments.count": + *c = Segmentscount + case "segments.fixed_bitset_memory": + *c = Segmentsfixedbitsetmemory + case "segments.index_writer_memory": + *c = Segmentsindexwritermemory + case "segments.memory": + *c = Segmentsmemory + case "segments.version_map_memory": + *c = Segmentsversionmapmemory + case "shard_stats.total_count": + *c = Shardstatstotalcount + case "suggest.current": + *c = Suggestcurrent + case "suggest.time": + *c = Suggesttime + case "suggest.total": + *c = Suggesttotal + case "uptime": + *c = Uptime + case "version": + *c = Version + default: + *c = CatNodeColumn{string(text)} + } + + return nil +} + +func (c CatNodeColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go b/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go new file mode 100644 index 0000000000..569d15db3e --- /dev/null +++ b/typedapi/types/enums/catrecoverycolumn/catrecoverycolumn.go @@ -0,0 +1,153 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package catrecoverycolumn +package catrecoverycolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1014-L1145 +type CatRecoveryColumn struct { + Name string +} + +var ( + Index = CatRecoveryColumn{"index"} + + Shard = CatRecoveryColumn{"shard"} + + Time = CatRecoveryColumn{"time"} + + Type = CatRecoveryColumn{"type"} + + Stage = CatRecoveryColumn{"stage"} + + Sourcehost = CatRecoveryColumn{"source_host"} + + Sourcenode = CatRecoveryColumn{"source_node"} + + Targethost = CatRecoveryColumn{"target_host"} + + Targetnode = CatRecoveryColumn{"target_node"} + + Repository = CatRecoveryColumn{"repository"} + + Snapshot = CatRecoveryColumn{"snapshot"} + + Files = CatRecoveryColumn{"files"} + + Filesrecovered = CatRecoveryColumn{"files_recovered"} + + Filespercent = CatRecoveryColumn{"files_percent"} + + Filestotal = CatRecoveryColumn{"files_total"} + + Bytes = CatRecoveryColumn{"bytes"} + + Bytesrecovered = CatRecoveryColumn{"bytes_recovered"} + + Bytespercent = CatRecoveryColumn{"bytes_percent"} + + Bytestotal = CatRecoveryColumn{"bytes_total"} + + Translogops = CatRecoveryColumn{"translog_ops"} + + Translogopsrecovered = CatRecoveryColumn{"translog_ops_recovered"} + + Translogopspercent = CatRecoveryColumn{"translog_ops_percent"} + + Starttime = CatRecoveryColumn{"start_time"} + + Starttimemillis = CatRecoveryColumn{"start_time_millis"} + + Stoptime = CatRecoveryColumn{"stop_time"} + + Stoptimemillis = CatRecoveryColumn{"stop_time_millis"} +) + +func (c CatRecoveryColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatRecoveryColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "index": + *c = Index + case "shard": + *c = Shard + case "time": + *c = Time + case "type": + *c = Type + case "stage": + *c = Stage + case "source_host": + *c = Sourcehost + case "source_node": + *c = Sourcenode + case "target_host": + *c = Targethost + case "target_node": + *c = Targetnode + case "repository": + *c = Repository + case "snapshot": + *c = Snapshot + case "files": + *c = Files + case "files_recovered": + *c = Filesrecovered + case "files_percent": + *c = Filespercent + case "files_total": + *c = Filestotal + case "bytes": + *c = Bytes + case "bytes_recovered": + *c = Bytesrecovered + case "bytes_percent": + *c = Bytespercent + case "bytes_total": + *c = Bytestotal + case "translog_ops": + *c = Translogops + case "translog_ops_recovered": + *c = Translogopsrecovered + case "translog_ops_percent": + *c = Translogopspercent + case "start_time": + *c = Starttime + case "start_time_millis": + *c = Starttimemillis + case "stop_time": + *c = Stoptime + case "stop_time_millis": + *c = Stoptimemillis + default: + *c = CatRecoveryColumn{string(text)} + } + + return nil +} + +func (c CatRecoveryColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go b/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go new file mode 100644 index 0000000000..146248f360 --- /dev/null +++ b/typedapi/types/enums/catsegmentscolumn/catsegmentscolumn.go @@ -0,0 +1,109 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package catsegmentscolumn +package catsegmentscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1147-L1212 +type CatSegmentsColumn struct { + Name string +} + +var ( + Index = CatSegmentsColumn{"index"} + + Shard = CatSegmentsColumn{"shard"} + + Prirep = CatSegmentsColumn{"prirep"} + + Ip = CatSegmentsColumn{"ip"} + + Segment = CatSegmentsColumn{"segment"} + + Generation = CatSegmentsColumn{"generation"} + + Docscount = CatSegmentsColumn{"docs.count"} + + Docsdeleted = CatSegmentsColumn{"docs.deleted"} + + Size = CatSegmentsColumn{"size"} + + Sizememory = CatSegmentsColumn{"size.memory"} + + Committed = CatSegmentsColumn{"committed"} + + Searchable = CatSegmentsColumn{"searchable"} + + Version = CatSegmentsColumn{"version"} + + Compound = CatSegmentsColumn{"compound"} + + Id = CatSegmentsColumn{"id"} +) + +func (c CatSegmentsColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatSegmentsColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "index": + *c = Index + case "shard": + *c = Shard + case "prirep": + *c = Prirep + case "ip": + *c = Ip + case "segment": + *c = Segment + case "generation": + *c = Generation + case "docs.count": + *c = Docscount + case "docs.deleted": + *c = Docsdeleted + case "size": + *c = Size + case "size.memory": + *c = Sizememory + case "committed": + *c = Committed + case "searchable": + *c = Searchable + case "version": + *c = Version + case "compound": + *c = Compound + case "id": + *c = Id + default: + *c = CatSegmentsColumn{string(text)} + } + + return nil +} + +func (c CatSegmentsColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catshardcolumn/catshardcolumn.go b/typedapi/types/enums/catshardcolumn/catshardcolumn.go new file mode 100644 index 0000000000..de8e532777 --- /dev/null +++ b/typedapi/types/enums/catshardcolumn/catshardcolumn.go @@ -0,0 +1,329 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package catshardcolumn +package catshardcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1576-L1949 +type CatShardColumn struct { + Name string +} + +var ( + Completionsize = CatShardColumn{"completion.size"} + + Datasetsize = CatShardColumn{"dataset.size"} + + Densevectorvaluecount = CatShardColumn{"dense_vector.value_count"} + + Docs = CatShardColumn{"docs"} + + Fielddataevictions = CatShardColumn{"fielddata.evictions"} + + Fielddatamemorysize = CatShardColumn{"fielddata.memory_size"} + + Flushtotal = CatShardColumn{"flush.total"} + + Flushtotaltime = CatShardColumn{"flush.total_time"} + + Getcurrent = CatShardColumn{"get.current"} + + Getexiststime = CatShardColumn{"get.exists_time"} + + Getexiststotal = CatShardColumn{"get.exists_total"} + + Getmissingtime = CatShardColumn{"get.missing_time"} + + Getmissingtotal = CatShardColumn{"get.missing_total"} + + Gettime = CatShardColumn{"get.time"} + + Gettotal = CatShardColumn{"get.total"} + + Id = CatShardColumn{"id"} + + Index = CatShardColumn{"index"} + + Indexingdeletecurrent = CatShardColumn{"indexing.delete_current"} + + Indexingdeletetime = CatShardColumn{"indexing.delete_time"} + + Indexingdeletetotal = CatShardColumn{"indexing.delete_total"} + + Indexingindexcurrent = CatShardColumn{"indexing.index_current"} + + Indexingindexfailedduetoversionconflict = CatShardColumn{"indexing.index_failed_due_to_version_conflict"} + + Indexingindexfailed = CatShardColumn{"indexing.index_failed"} + + Indexingindextime = CatShardColumn{"indexing.index_time"} + + Indexingindextotal = CatShardColumn{"indexing.index_total"} + + Ip = CatShardColumn{"ip"} + + Mergescurrent = CatShardColumn{"merges.current"} + + Mergescurrentdocs = CatShardColumn{"merges.current_docs"} + + Mergescurrentsize = CatShardColumn{"merges.current_size"} + + Mergestotal = CatShardColumn{"merges.total"} + + Mergestotaldocs = CatShardColumn{"merges.total_docs"} + + Mergestotalsize = CatShardColumn{"merges.total_size"} + + Mergestotaltime = CatShardColumn{"merges.total_time"} + + Node = CatShardColumn{"node"} + + Prirep = CatShardColumn{"prirep"} + + Querycacheevictions = CatShardColumn{"query_cache.evictions"} + + Querycachememorysize = CatShardColumn{"query_cache.memory_size"} + + Recoverysourcetype = CatShardColumn{"recoverysource.type"} + + Refreshtime = CatShardColumn{"refresh.time"} + + Refreshtotal = CatShardColumn{"refresh.total"} + + Searchfetchcurrent = CatShardColumn{"search.fetch_current"} + + Searchfetchtime = CatShardColumn{"search.fetch_time"} + + Searchfetchtotal = CatShardColumn{"search.fetch_total"} + + Searchopencontexts = CatShardColumn{"search.open_contexts"} + + Searchquerycurrent = CatShardColumn{"search.query_current"} + + Searchquerytime = CatShardColumn{"search.query_time"} + + Searchquerytotal = CatShardColumn{"search.query_total"} + + Searchscrollcurrent = CatShardColumn{"search.scroll_current"} + + Searchscrolltime = CatShardColumn{"search.scroll_time"} + + Searchscrolltotal = CatShardColumn{"search.scroll_total"} + + Segmentscount = CatShardColumn{"segments.count"} + + Segmentsfixedbitsetmemory = CatShardColumn{"segments.fixed_bitset_memory"} + + Segmentsindexwritermemory = CatShardColumn{"segments.index_writer_memory"} + + Segmentsmemory = CatShardColumn{"segments.memory"} + + Segmentsversionmapmemory = CatShardColumn{"segments.version_map_memory"} + + Seqnoglobalcheckpoint = CatShardColumn{"seq_no.global_checkpoint"} + + Seqnolocalcheckpoint = CatShardColumn{"seq_no.local_checkpoint"} + + Seqnomax = CatShardColumn{"seq_no.max"} + + Shard = CatShardColumn{"shard"} + + Dsparsevectorvaluecount = CatShardColumn{"dsparse_vector.value_count"} + + State = CatShardColumn{"state"} + + Store = CatShardColumn{"store"} + + Suggestcurrent = CatShardColumn{"suggest.current"} + + Suggesttime = CatShardColumn{"suggest.time"} + + Suggesttotal = CatShardColumn{"suggest.total"} + + Syncid = CatShardColumn{"sync_id"} + + Unassignedat = CatShardColumn{"unassigned.at"} + + Unassigneddetails = CatShardColumn{"unassigned.details"} + + Unassignedfor = CatShardColumn{"unassigned.for"} + + Unassignedreason = CatShardColumn{"unassigned.reason"} +) + +func (c CatShardColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatShardColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "completion.size": + *c = Completionsize + case "dataset.size": + *c = Datasetsize + case "dense_vector.value_count": + *c = Densevectorvaluecount + case "docs": + *c = Docs + case "fielddata.evictions": + *c = Fielddataevictions + case "fielddata.memory_size": + *c = Fielddatamemorysize + case "flush.total": + *c = Flushtotal + case "flush.total_time": + *c = Flushtotaltime + case "get.current": + *c = Getcurrent + case "get.exists_time": + *c = Getexiststime + case "get.exists_total": + *c = Getexiststotal + case "get.missing_time": + *c = Getmissingtime + case "get.missing_total": + *c = Getmissingtotal + case "get.time": + *c = Gettime + case "get.total": + *c = Gettotal + case "id": + *c = Id + case "index": + *c = Index + case "indexing.delete_current": + *c = Indexingdeletecurrent + case "indexing.delete_time": + *c = Indexingdeletetime + case "indexing.delete_total": + *c = Indexingdeletetotal + case "indexing.index_current": + *c = Indexingindexcurrent + case "indexing.index_failed_due_to_version_conflict": + *c = Indexingindexfailedduetoversionconflict + case "indexing.index_failed": + *c = Indexingindexfailed + case "indexing.index_time": + *c = Indexingindextime + case "indexing.index_total": + *c = Indexingindextotal + case "ip": + *c = Ip + case "merges.current": + *c = Mergescurrent + case "merges.current_docs": + *c = Mergescurrentdocs + case "merges.current_size": + *c = Mergescurrentsize + case "merges.total": + *c = Mergestotal + case "merges.total_docs": + *c = Mergestotaldocs + case "merges.total_size": + *c = Mergestotalsize + case "merges.total_time": + *c = Mergestotaltime + case "node": + *c = Node + case "prirep": + *c = Prirep + case "query_cache.evictions": + *c = Querycacheevictions + case "query_cache.memory_size": + *c = Querycachememorysize + case "recoverysource.type": + *c = Recoverysourcetype + case "refresh.time": + *c = Refreshtime + case "refresh.total": + *c = Refreshtotal + case "search.fetch_current": + *c = Searchfetchcurrent + case "search.fetch_time": + *c = Searchfetchtime + case "search.fetch_total": + *c = Searchfetchtotal + case "search.open_contexts": + *c = Searchopencontexts + case "search.query_current": + *c = Searchquerycurrent + case "search.query_time": + *c = Searchquerytime + case "search.query_total": + *c = Searchquerytotal + case "search.scroll_current": + *c = Searchscrollcurrent + case "search.scroll_time": + *c = Searchscrolltime + case "search.scroll_total": + *c = Searchscrolltotal + case "segments.count": + *c = Segmentscount + case "segments.fixed_bitset_memory": + *c = Segmentsfixedbitsetmemory + case "segments.index_writer_memory": + *c = Segmentsindexwritermemory + case "segments.memory": + *c = Segmentsmemory + case "segments.version_map_memory": + *c = Segmentsversionmapmemory + case "seq_no.global_checkpoint": + *c = Seqnoglobalcheckpoint + case "seq_no.local_checkpoint": + *c = Seqnolocalcheckpoint + case "seq_no.max": + *c = Seqnomax + case "shard": + *c = Shard + case "dsparse_vector.value_count": + *c = Dsparsevectorvaluecount + case "state": + *c = State + case "store": + *c = Store + case "suggest.current": + *c = Suggestcurrent + case "suggest.time": + *c = Suggesttime + case "suggest.total": + *c = Suggesttotal + case "sync_id": + *c = Syncid + case "unassigned.at": + *c = Unassignedat + case "unassigned.details": + *c = Unassigneddetails + case "unassigned.for": + *c = Unassignedfor + case "unassigned.reason": + *c = Unassignedreason + default: + *c = CatShardColumn{string(text)} + } + + return nil +} + +func (c CatShardColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go b/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go new file mode 100644 index 0000000000..d60d04f9f8 --- /dev/null +++ b/typedapi/types/enums/catsnapshotscolumn/catsnapshotscolumn.go @@ -0,0 +1,101 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package catsnapshotscolumn +package catsnapshotscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1214-L1281 +type CatSnapshotsColumn struct { + Name string +} + +var ( + Id = CatSnapshotsColumn{"id"} + + Repository = CatSnapshotsColumn{"repository"} + + Status = CatSnapshotsColumn{"status"} + + Startepoch = CatSnapshotsColumn{"start_epoch"} + + Starttime = CatSnapshotsColumn{"start_time"} + + Endepoch = CatSnapshotsColumn{"end_epoch"} + + Endtime = CatSnapshotsColumn{"end_time"} + + Duration = CatSnapshotsColumn{"duration"} + + Indices = CatSnapshotsColumn{"indices"} + + Successfulshards = CatSnapshotsColumn{"successful_shards"} + + Failedshards = CatSnapshotsColumn{"failed_shards"} + + Totalshards = CatSnapshotsColumn{"total_shards"} + + Reason = CatSnapshotsColumn{"reason"} +) + +func (c CatSnapshotsColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatSnapshotsColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "id": + *c = Id + case "repository": + *c = Repository + case "status": + *c = Status + case "start_epoch": + *c = Startepoch + case "start_time": + *c = Starttime + case "end_epoch": + *c = Endepoch + case "end_time": + *c = Endtime + case "duration": + *c = Duration + case "indices": + *c = Indices + case "successful_shards": + *c = Successfulshards + case "failed_shards": + *c = Failedshards + case "total_shards": + *c = Totalshards + case "reason": + *c = Reason + default: + *c = CatSnapshotsColumn{string(text)} + } + + return nil +} + +func (c CatSnapshotsColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go b/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go new file mode 100644 index 0000000000..8a1a36ba9f --- /dev/null +++ b/typedapi/types/enums/catthreadpoolcolumn/catthreadpoolcolumn.go @@ -0,0 +1,129 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package catthreadpoolcolumn +package catthreadpoolcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1952-L2052 +type CatThreadPoolColumn struct { + Name string +} + +var ( + Active = CatThreadPoolColumn{"active"} + + Completed = CatThreadPoolColumn{"completed"} + + Core = CatThreadPoolColumn{"core"} + + Ephemeralid = CatThreadPoolColumn{"ephemeral_id"} + + Host = CatThreadPoolColumn{"host"} + + Ip = CatThreadPoolColumn{"ip"} + + Keepalive = CatThreadPoolColumn{"keep_alive"} + + Largest = CatThreadPoolColumn{"largest"} + + Max = CatThreadPoolColumn{"max"} + + Name = CatThreadPoolColumn{"name"} + + Nodeid = CatThreadPoolColumn{"node_id"} + + Nodename = CatThreadPoolColumn{"node_name"} + + Pid = CatThreadPoolColumn{"pid"} + + Poolsize = CatThreadPoolColumn{"pool_size"} + + Port = CatThreadPoolColumn{"port"} + + Queue = CatThreadPoolColumn{"queue"} + + Queuesize = CatThreadPoolColumn{"queue_size"} + + Rejected = CatThreadPoolColumn{"rejected"} + + Size = CatThreadPoolColumn{"size"} + + Type = CatThreadPoolColumn{"type"} +) + +func (c CatThreadPoolColumn) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CatThreadPoolColumn) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "active": + *c = Active + case "completed": + *c = Completed + case "core": + *c = Core + case "ephemeral_id": + *c = Ephemeralid + case "host": + *c = Host + case "ip": + *c = Ip + case "keep_alive": + *c = Keepalive + case "largest": + *c = Largest + case "max": + *c = Max + case "name": + *c = Name + case "node_id": + *c = Nodeid + case "node_name": + *c = Nodename + case "pid": + *c = Pid + case "pool_size": + *c = Poolsize + case "port": + *c = Port + case "queue": + *c = Queue + case "queue_size": + *c = Queuesize + case "rejected": + *c = Rejected + case "size": + *c = Size + case "type": + *c = Type + default: + *c = CatThreadPoolColumn{string(text)} + } + + return nil +} + +func (c CatThreadPoolColumn) String() string { + return c.Name +} diff --git a/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go b/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go index 3213f3bcfd..526724976f 100644 --- a/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go +++ b/typedapi/types/enums/cattrainedmodelscolumn/cattrainedmodelscolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package cattrainedmodelscolumn package cattrainedmodelscolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L561-L635 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1290-L1364 type CatTrainedModelsColumn struct { Name string } diff --git a/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go b/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go index 056707b484..d7973de228 100644 --- a/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go +++ b/typedapi/types/enums/cattransformcolumn/cattransformcolumn.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package cattransformcolumn package cattransformcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/_types/CatBase.ts#L640-L844 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/_types/CatBase.ts#L1369-L1573 type CatTransformColumn struct { Name string } diff --git a/typedapi/types/enums/childscoremode/childscoremode.go b/typedapi/types/enums/childscoremode/childscoremode.go index b46014ee3f..6cfee5dded 100644 --- a/typedapi/types/enums/childscoremode/childscoremode.go +++ b/typedapi/types/enums/childscoremode/childscoremode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package childscoremode package childscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/joining.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/joining.ts#L25-L39 type ChildScoreMode struct { Name string } diff --git a/typedapi/types/enums/chunkingmode/chunkingmode.go b/typedapi/types/enums/chunkingmode/chunkingmode.go index 06334adb08..7fd585aa86 100644 --- a/typedapi/types/enums/chunkingmode/chunkingmode.go +++ b/typedapi/types/enums/chunkingmode/chunkingmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package chunkingmode package chunkingmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L245-L249 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L245-L249 type ChunkingMode struct { Name string } diff --git a/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go b/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go new file mode 100644 index 0000000000..5e1437a492 --- /dev/null +++ b/typedapi/types/enums/cjkbigramignoredscript/cjkbigramignoredscript.go @@ -0,0 +1,65 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package cjkbigramignoredscript +package cjkbigramignoredscript + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L459-L464 +type CjkBigramIgnoredScript struct { + Name string +} + +var ( + Han = CjkBigramIgnoredScript{"han"} + + Hangul = CjkBigramIgnoredScript{"hangul"} + + Hiragana = CjkBigramIgnoredScript{"hiragana"} + + Katakana = CjkBigramIgnoredScript{"katakana"} +) + +func (c CjkBigramIgnoredScript) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CjkBigramIgnoredScript) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "han": + *c = Han + case "hangul": + *c = Hangul + case "hiragana": + *c = Hiragana + case "katakana": + *c = Katakana + default: + *c = CjkBigramIgnoredScript{string(text)} + } + + return nil +} + +func (c CjkBigramIgnoredScript) String() string { + return c.Name +} diff --git a/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go b/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go index 9265f4fa41..c61dd3cd76 100644 --- a/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go +++ b/typedapi/types/enums/clusterinfotarget/clusterinfotarget.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package clusterinfotarget package clusterinfotarget import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L385-L391 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L387-L393 type ClusterInfoTarget struct { Name string } diff --git a/typedapi/types/enums/clusterprivilege/clusterprivilege.go b/typedapi/types/enums/clusterprivilege/clusterprivilege.go index 5134520d40..36009ceb93 100644 --- a/typedapi/types/enums/clusterprivilege/clusterprivilege.go +++ b/typedapi/types/enums/clusterprivilege/clusterprivilege.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package clusterprivilege package clusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L42-L199 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L42-L199 type ClusterPrivilege struct { Name string } diff --git a/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go b/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go index db8fa8402c..cc85d0fead 100644 --- a/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go +++ b/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package clustersearchstatus package clustersearchstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L37-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L37-L43 type ClusterSearchStatus struct { Name string } diff --git a/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go b/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go index d98ea97c29..a95226eb28 100644 --- a/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go +++ b/typedapi/types/enums/cohereembeddingtype/cohereembeddingtype.go @@ -16,19 +16,23 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package cohereembeddingtype package cohereembeddingtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L625-L629 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L843-L849 type CohereEmbeddingType struct { Name string } var ( + Binary = CohereEmbeddingType{"binary"} + + Bit = CohereEmbeddingType{"bit"} + Byte = CohereEmbeddingType{"byte"} Float = CohereEmbeddingType{"float"} @@ -43,6 +47,10 @@ func (c CohereEmbeddingType) MarshalText() (text []byte, err error) { func (c *CohereEmbeddingType) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + case "binary": + *c = Binary + case "bit": + *c = Bit case "byte": *c = Byte case "float": diff --git a/typedapi/types/enums/cohereinputtype/cohereinputtype.go b/typedapi/types/enums/cohereinputtype/cohereinputtype.go index 1b1e164d88..732f272fec 100644 --- a/typedapi/types/enums/cohereinputtype/cohereinputtype.go +++ b/typedapi/types/enums/cohereinputtype/cohereinputtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package cohereinputtype package cohereinputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L631-L636 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L851-L856 type CohereInputType struct { Name string } diff --git a/typedapi/types/enums/cohereservicetype/cohereservicetype.go b/typedapi/types/enums/cohereservicetype/cohereservicetype.go index ae9330fb9d..1239ae0c18 100644 --- a/typedapi/types/enums/cohereservicetype/cohereservicetype.go +++ b/typedapi/types/enums/cohereservicetype/cohereservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package cohereservicetype package cohereservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L621-L623 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L839-L841 type CohereServiceType struct { Name string } diff --git a/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go b/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go index 67e77895a4..b4f9f6ebd0 100644 --- a/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go +++ b/typedapi/types/enums/coheresimilaritytype/coheresimilaritytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package coheresimilaritytype package coheresimilaritytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L638-L642 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L858-L862 type CohereSimilarityType struct { Name string } diff --git a/typedapi/types/enums/coheretasktype/coheretasktype.go b/typedapi/types/enums/coheretasktype/coheretasktype.go index 9ebba1f633..c8c17c51d7 100644 --- a/typedapi/types/enums/coheretasktype/coheretasktype.go +++ b/typedapi/types/enums/coheretasktype/coheretasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package coheretasktype package coheretasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L615-L619 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L833-L837 type CohereTaskType struct { Name string } diff --git a/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go b/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go index 679d185e7a..0eb497ed3b 100644 --- a/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go +++ b/typedapi/types/enums/coheretruncatetype/coheretruncatetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package coheretruncatetype package coheretruncatetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L644-L648 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L864-L868 type CohereTruncateType struct { Name string } diff --git a/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go b/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go index 8037307818..baf1929bce 100644 --- a/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go +++ b/typedapi/types/enums/combinedfieldsoperator/combinedfieldsoperator.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package combinedfieldsoperator package combinedfieldsoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L519-L522 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L519-L522 type CombinedFieldsOperator struct { Name string } diff --git a/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go b/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go index da56d69e20..44533f4446 100644 --- a/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go +++ b/typedapi/types/enums/combinedfieldszeroterms/combinedfieldszeroterms.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package combinedfieldszeroterms package combinedfieldszeroterms import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L524-L533 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L524-L533 type CombinedFieldsZeroTerms struct { Name string } diff --git a/typedapi/types/enums/conditionop/conditionop.go b/typedapi/types/enums/conditionop/conditionop.go index eb53ff0ba7..e1199b4db7 100644 --- a/typedapi/types/enums/conditionop/conditionop.go +++ b/typedapi/types/enums/conditionop/conditionop.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package conditionop package conditionop import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L41-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L41-L48 type ConditionOp struct { Name string } diff --git a/typedapi/types/enums/conditionoperator/conditionoperator.go b/typedapi/types/enums/conditionoperator/conditionoperator.go index f585f93e8a..bccedc5839 100644 --- a/typedapi/types/enums/conditionoperator/conditionoperator.go +++ b/typedapi/types/enums/conditionoperator/conditionoperator.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package conditionoperator package conditionoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Rule.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Rule.ts#L74-L79 type ConditionOperator struct { Name string } diff --git a/typedapi/types/enums/conditiontype/conditiontype.go b/typedapi/types/enums/conditiontype/conditiontype.go index d828ad3d83..677a04dd07 100644 --- a/typedapi/types/enums/conditiontype/conditiontype.go +++ b/typedapi/types/enums/conditiontype/conditiontype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package conditiontype package conditiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L64-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L64-L70 type ConditionType struct { Name string } diff --git a/typedapi/types/enums/conflicts/conflicts.go b/typedapi/types/enums/conflicts/conflicts.go index 9a1e9b2d16..f8ffb1fb59 100644 --- a/typedapi/types/enums/conflicts/conflicts.go +++ b/typedapi/types/enums/conflicts/conflicts.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package conflicts package conflicts import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L187-L196 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L187-L196 type Conflicts struct { Name string } diff --git a/typedapi/types/enums/connectionscheme/connectionscheme.go b/typedapi/types/enums/connectionscheme/connectionscheme.go index 25d73af0fa..b2de81eec4 100644 --- a/typedapi/types/enums/connectionscheme/connectionscheme.go +++ b/typedapi/types/enums/connectionscheme/connectionscheme.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package connectionscheme package connectionscheme import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L39-L42 type ConnectionScheme struct { Name string } diff --git a/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go b/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go index 403aebf51a..85a9f2d2c2 100644 --- a/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go +++ b/typedapi/types/enums/connectorfieldtype/connectorfieldtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package connectorfieldtype package connectorfieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L43-L48 type ConnectorFieldType struct { Name string } diff --git a/typedapi/types/enums/connectorstatus/connectorstatus.go b/typedapi/types/enums/connectorstatus/connectorstatus.go index 15366c97e8..dc069bdbbc 100644 --- a/typedapi/types/enums/connectorstatus/connectorstatus.go +++ b/typedapi/types/enums/connectorstatus/connectorstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package connectorstatus package connectorstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L130-L136 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L130-L136 type ConnectorStatus struct { Name string } diff --git a/typedapi/types/enums/converttype/converttype.go b/typedapi/types/enums/converttype/converttype.go index e27296986f..0bf7578d4c 100644 --- a/typedapi/types/enums/converttype/converttype.go +++ b/typedapi/types/enums/converttype/converttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package converttype package converttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L661-L670 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L661-L670 type ConvertType struct { Name string } diff --git a/typedapi/types/enums/customservicetype/customservicetype.go b/typedapi/types/enums/customservicetype/customservicetype.go new file mode 100644 index 0000000000..a0475ce10f --- /dev/null +++ b/typedapi/types/enums/customservicetype/customservicetype.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package customservicetype +package customservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1134-L1136 +type CustomServiceType struct { + Name string +} + +var ( + Custom = CustomServiceType{"custom"} +) + +func (c CustomServiceType) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CustomServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "custom": + *c = Custom + default: + *c = CustomServiceType{string(text)} + } + + return nil +} + +func (c CustomServiceType) String() string { + return c.Name +} diff --git a/typedapi/types/enums/customtasktype/customtasktype.go b/typedapi/types/enums/customtasktype/customtasktype.go new file mode 100644 index 0000000000..b6e64a167e --- /dev/null +++ b/typedapi/types/enums/customtasktype/customtasktype.go @@ -0,0 +1,65 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package customtasktype +package customtasktype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1127-L1132 +type CustomTaskType struct { + Name string +} + +var ( + Textembedding = CustomTaskType{"text_embedding"} + + Sparseembedding = CustomTaskType{"sparse_embedding"} + + Rerank = CustomTaskType{"rerank"} + + Completion = CustomTaskType{"completion"} +) + +func (c CustomTaskType) MarshalText() (text []byte, err error) { + return []byte(c.String()), nil +} + +func (c *CustomTaskType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *c = Textembedding + case "sparse_embedding": + *c = Sparseembedding + case "rerank": + *c = Rerank + case "completion": + *c = Completion + default: + *c = CustomTaskType{string(text)} + } + + return nil +} + +func (c CustomTaskType) String() string { + return c.Name +} diff --git a/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go b/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go index 86078b76ad..f174be7c90 100644 --- a/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go +++ b/typedapi/types/enums/dataattachmentformat/dataattachmentformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package dataattachmentformat package dataattachmentformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L187-L190 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L187-L190 type DataAttachmentFormat struct { Name string } diff --git a/typedapi/types/enums/datafeedstate/datafeedstate.go b/typedapi/types/enums/datafeedstate/datafeedstate.go index 2066977f94..0388673a46 100644 --- a/typedapi/types/enums/datafeedstate/datafeedstate.go +++ b/typedapi/types/enums/datafeedstate/datafeedstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package datafeedstate package datafeedstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L136-L141 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L136-L141 type DatafeedState struct { Name string } diff --git a/typedapi/types/enums/dataframestate/dataframestate.go b/typedapi/types/enums/dataframestate/dataframestate.go index c9dc880903..94f892843d 100644 --- a/typedapi/types/enums/dataframestate/dataframestate.go +++ b/typedapi/types/enums/dataframestate/dataframestate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package dataframestate package dataframestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Dataframe.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Dataframe.ts#L20-L26 type DataframeState struct { Name string } diff --git a/typedapi/types/enums/day/day.go b/typedapi/types/enums/day/day.go index 98ae37d980..0239942d2f 100644 --- a/typedapi/types/enums/day/day.go +++ b/typedapi/types/enums/day/day.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package day package day import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L37-L45 type Day struct { Name string } diff --git a/typedapi/types/enums/decision/decision.go b/typedapi/types/enums/decision/decision.go index 6dba2d00e1..47006152b9 100644 --- a/typedapi/types/enums/decision/decision.go +++ b/typedapi/types/enums/decision/decision.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package decision package decision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L92-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L92-L101 type Decision struct { Name string } diff --git a/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go b/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go new file mode 100644 index 0000000000..9a2dae8718 --- /dev/null +++ b/typedapi/types/enums/deepseekservicetype/deepseekservicetype.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package deepseekservicetype +package deepseekservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1190-L1192 +type DeepSeekServiceType struct { + Name string +} + +var ( + Deepseek = DeepSeekServiceType{"deepseek"} +) + +func (d DeepSeekServiceType) MarshalText() (text []byte, err error) { + return []byte(d.String()), nil +} + +func (d *DeepSeekServiceType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "deepseek": + *d = Deepseek + default: + *d = DeepSeekServiceType{string(text)} + } + + return nil +} + +func (d DeepSeekServiceType) String() string { + return d.Name +} diff --git a/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go b/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go index 43d6439290..178bc178e1 100644 --- a/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go +++ b/typedapi/types/enums/delimitedpayloadencoding/delimitedpayloadencoding.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package delimitedpayloadencoding package delimitedpayloadencoding import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L78-L82 type DelimitedPayloadEncoding struct { Name string } diff --git a/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go b/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go index 4fa88ddf59..43335f3031 100644 --- a/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go +++ b/typedapi/types/enums/densevectorelementtype/densevectorelementtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package densevectorelementtype package densevectorelementtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/DenseVectorProperty.ts#L64-L80 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/DenseVectorProperty.ts#L64-L80 type DenseVectorElementType struct { Name string } diff --git a/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go b/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go index 67dc14e757..2d86a2d786 100644 --- a/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go +++ b/typedapi/types/enums/densevectorindexoptionstype/densevectorindexoptionstype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package densevectorindexoptionstype package densevectorindexoptionstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/DenseVectorProperty.ts#L164-L209 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/DenseVectorProperty.ts#L164-L209 type DenseVectorIndexOptionsType struct { Name string } diff --git a/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go b/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go index 5fe23d4517..88d488ffb5 100644 --- a/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go +++ b/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package densevectorsimilarity package densevectorsimilarity import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/DenseVectorProperty.ts#L82-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/DenseVectorProperty.ts#L82-L127 type DenseVectorSimilarity struct { Name string } diff --git a/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go b/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go index a6ecaafb7d..8434ecdbfd 100644 --- a/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go +++ b/typedapi/types/enums/deploymentallocationstate/deploymentallocationstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package deploymentallocationstate package deploymentallocationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L331-L344 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L331-L344 type DeploymentAllocationState struct { Name string } diff --git a/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go b/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go index ab2a985067..5af57789b1 100644 --- a/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go +++ b/typedapi/types/enums/deploymentassignmentstate/deploymentassignmentstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package deploymentassignmentstate package deploymentassignmentstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L346-L363 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L346-L363 type DeploymentAssignmentState struct { Name string } diff --git a/typedapi/types/enums/deprecationlevel/deprecationlevel.go b/typedapi/types/enums/deprecationlevel/deprecationlevel.go index b0bc23573b..a65224f9cd 100644 --- a/typedapi/types/enums/deprecationlevel/deprecationlevel.go +++ b/typedapi/types/enums/deprecationlevel/deprecationlevel.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package deprecationlevel package deprecationlevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/deprecations/types.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/deprecations/types.ts#L23-L30 type DeprecationLevel struct { Name string } diff --git a/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go b/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go index 65bf65c9f6..47970f6a38 100644 --- a/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go +++ b/typedapi/types/enums/dfiindependencemeasure/dfiindependencemeasure.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package dfiindependencemeasure package dfiindependencemeasure import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Similarity.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Similarity.ts#L20-L24 type DFIIndependenceMeasure struct { Name string } diff --git a/typedapi/types/enums/dfraftereffect/dfraftereffect.go b/typedapi/types/enums/dfraftereffect/dfraftereffect.go index f1ecf0f57c..00851aa61d 100644 --- a/typedapi/types/enums/dfraftereffect/dfraftereffect.go +++ b/typedapi/types/enums/dfraftereffect/dfraftereffect.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package dfraftereffect package dfraftereffect import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Similarity.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Similarity.ts#L26-L30 type DFRAfterEffect struct { Name string } diff --git a/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go b/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go index 7b02b18423..951d049557 100644 --- a/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go +++ b/typedapi/types/enums/dfrbasicmodel/dfrbasicmodel.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package dfrbasicmodel package dfrbasicmodel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Similarity.ts#L32-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Similarity.ts#L32-L40 type DFRBasicModel struct { Name string } diff --git a/typedapi/types/enums/displaytype/displaytype.go b/typedapi/types/enums/displaytype/displaytype.go index 3d927c342c..28b29f81ed 100644 --- a/typedapi/types/enums/displaytype/displaytype.go +++ b/typedapi/types/enums/displaytype/displaytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package displaytype package displaytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L35-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L35-L41 type DisplayType struct { Name string } diff --git a/typedapi/types/enums/distanceunit/distanceunit.go b/typedapi/types/enums/distanceunit/distanceunit.go index 29761b242d..1e982a1059 100644 --- a/typedapi/types/enums/distanceunit/distanceunit.go +++ b/typedapi/types/enums/distanceunit/distanceunit.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package distanceunit package distanceunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L30-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L30-L40 type DistanceUnit struct { Name string } diff --git a/typedapi/types/enums/dynamicmapping/dynamicmapping.go b/typedapi/types/enums/dynamicmapping/dynamicmapping.go index 0e95f19e08..ce1681bbf9 100644 --- a/typedapi/types/enums/dynamicmapping/dynamicmapping.go +++ b/typedapi/types/enums/dynamicmapping/dynamicmapping.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package dynamicmapping package dynamicmapping import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/dynamic-template.ts#L50-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/dynamic-template.ts#L50-L59 type DynamicMapping struct { Name string } diff --git a/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go b/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go index 70e993b736..cdbf44fb28 100644 --- a/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go +++ b/typedapi/types/enums/ecscompatibilitytype/ecscompatibilitytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package ecscompatibilitytype package ecscompatibilitytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/_types/Structure.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/_types/Structure.ts#L40-L43 type EcsCompatibilityType struct { Name string } diff --git a/typedapi/types/enums/edgengramside/edgengramside.go b/typedapi/types/enums/edgengramside/edgengramside.go index bc1a9cdacc..7cb480e096 100644 --- a/typedapi/types/enums/edgengramside/edgengramside.go +++ b/typedapi/types/enums/edgengramside/edgengramside.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package edgengramside package edgengramside import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L92-L95 type EdgeNGramSide struct { Name string } diff --git a/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go b/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go index 517fa383a5..24cb0fb4a0 100644 --- a/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go +++ b/typedapi/types/enums/elasticsearchservicetype/elasticsearchservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package elasticsearchservicetype package elasticsearchservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L754-L756 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1265-L1267 type ElasticsearchServiceType struct { Name string } diff --git a/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go b/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go index f1741b2496..baaf15ee42 100644 --- a/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go +++ b/typedapi/types/enums/elasticsearchtasktype/elasticsearchtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package elasticsearchtasktype package elasticsearchtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L748-L752 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1259-L1263 type ElasticsearchTaskType struct { Name string } diff --git a/typedapi/types/enums/elserservicetype/elserservicetype.go b/typedapi/types/enums/elserservicetype/elserservicetype.go index aafb5d1a46..485ec9fd8c 100644 --- a/typedapi/types/enums/elserservicetype/elserservicetype.go +++ b/typedapi/types/enums/elserservicetype/elserservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package elserservicetype package elserservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L790-L792 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1301-L1303 type ElserServiceType struct { Name string } diff --git a/typedapi/types/enums/elsertasktype/elsertasktype.go b/typedapi/types/enums/elsertasktype/elsertasktype.go index 17d59f5023..8cd4facc17 100644 --- a/typedapi/types/enums/elsertasktype/elsertasktype.go +++ b/typedapi/types/enums/elsertasktype/elsertasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package elsertasktype package elsertasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L786-L788 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1297-L1299 type ElserTaskType struct { Name string } diff --git a/typedapi/types/enums/emailpriority/emailpriority.go b/typedapi/types/enums/emailpriority/emailpriority.go index 439b3ea905..0ce0546730 100644 --- a/typedapi/types/enums/emailpriority/emailpriority.go +++ b/typedapi/types/enums/emailpriority/emailpriority.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package emailpriority package emailpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L197-L203 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L197-L203 type EmailPriority struct { Name string } diff --git a/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go b/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go index c29e36cf1e..9fbae5bdac 100644 --- a/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go +++ b/typedapi/types/enums/enrichpolicyphase/enrichpolicyphase.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package enrichpolicyphase package enrichpolicyphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/execute_policy/types.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/execute_policy/types.ts#L25-L31 type EnrichPolicyPhase struct { Name string } diff --git a/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go b/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go new file mode 100644 index 0000000000..92952355b3 --- /dev/null +++ b/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go @@ -0,0 +1,69 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package esqlclusterstatus +package esqlclusterstatus + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/EsqlResult.ts#L82-L88 +type EsqlClusterStatus struct { + Name string +} + +var ( + Running = EsqlClusterStatus{"running"} + + Successful = EsqlClusterStatus{"successful"} + + Partial = EsqlClusterStatus{"partial"} + + Skipped = EsqlClusterStatus{"skipped"} + + Failed = EsqlClusterStatus{"failed"} +) + +func (e EsqlClusterStatus) MarshalText() (text []byte, err error) { + return []byte(e.String()), nil +} + +func (e *EsqlClusterStatus) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "running": + *e = Running + case "successful": + *e = Successful + case "partial": + *e = Partial + case "skipped": + *e = Skipped + case "failed": + *e = Failed + default: + *e = EsqlClusterStatus{string(text)} + } + + return nil +} + +func (e EsqlClusterStatus) String() string { + return e.Name +} diff --git a/typedapi/types/enums/esqlformat/esqlformat.go b/typedapi/types/enums/esqlformat/esqlformat.go index 6c58909b1a..253d8779a2 100644 --- a/typedapi/types/enums/esqlformat/esqlformat.go +++ b/typedapi/types/enums/esqlformat/esqlformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package esqlformat package esqlformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/query/QueryParameters.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/query/QueryParameters.ts#L20-L29 type EsqlFormat struct { Name string } diff --git a/typedapi/types/enums/eventtype/eventtype.go b/typedapi/types/enums/eventtype/eventtype.go index af7d251921..4665c86b62 100644 --- a/typedapi/types/enums/eventtype/eventtype.go +++ b/typedapi/types/enums/eventtype/eventtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package eventtype package eventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/_types/AnalyticsEvent.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/_types/AnalyticsEvent.ts#L22-L26 type EventType struct { Name string } diff --git a/typedapi/types/enums/excludefrequent/excludefrequent.go b/typedapi/types/enums/excludefrequent/excludefrequent.go index c97c5f1a47..62c7b26b59 100644 --- a/typedapi/types/enums/excludefrequent/excludefrequent.go +++ b/typedapi/types/enums/excludefrequent/excludefrequent.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package excludefrequent package excludefrequent import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Detector.ts#L145-L150 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Detector.ts#L145-L150 type ExcludeFrequent struct { Name string } diff --git a/typedapi/types/enums/executionphase/executionphase.go b/typedapi/types/enums/executionphase/executionphase.go index da14ab911f..4eb750e749 100644 --- a/typedapi/types/enums/executionphase/executionphase.go +++ b/typedapi/types/enums/executionphase/executionphase.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package executionphase package executionphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L49-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L49-L58 type ExecutionPhase struct { Name string } diff --git a/typedapi/types/enums/executionstatus/executionstatus.go b/typedapi/types/enums/executionstatus/executionstatus.go index 1c1032975d..dbad05b532 100644 --- a/typedapi/types/enums/executionstatus/executionstatus.go +++ b/typedapi/types/enums/executionstatus/executionstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package executionstatus package executionstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L38-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L38-L47 type ExecutionStatus struct { Name string } diff --git a/typedapi/types/enums/expandwildcard/expandwildcard.go b/typedapi/types/enums/expandwildcard/expandwildcard.go index 75cea43dfe..a1f63e2baa 100644 --- a/typedapi/types/enums/expandwildcard/expandwildcard.go +++ b/typedapi/types/enums/expandwildcard/expandwildcard.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package expandwildcard package expandwildcard import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L205-L219 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L205-L219 type ExpandWildcard struct { Name string } diff --git a/typedapi/types/enums/failurestorestatus/failurestorestatus.go b/typedapi/types/enums/failurestorestatus/failurestorestatus.go index 81c0b9ec37..c69006529b 100644 --- a/typedapi/types/enums/failurestorestatus/failurestorestatus.go +++ b/typedapi/types/enums/failurestorestatus/failurestorestatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package failurestorestatus package failurestorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L86-L91 type FailureStoreStatus struct { Name string } diff --git a/typedapi/types/enums/feature/feature.go b/typedapi/types/enums/feature/feature.go index 025e2e3d59..c2ad042fd6 100644 --- a/typedapi/types/enums/feature/feature.go +++ b/typedapi/types/enums/feature/feature.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package feature package feature import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get/IndicesGetRequest.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get/IndicesGetRequest.ts#L98-L102 type Feature struct { Name string } diff --git a/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go b/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go index 6f6eeb6510..fa959516fd 100644 --- a/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go +++ b/typedapi/types/enums/fieldsortnumerictype/fieldsortnumerictype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package fieldsortnumerictype package fieldsortnumerictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L36-L41 type FieldSortNumericType struct { Name string } diff --git a/typedapi/types/enums/fieldtype/fieldtype.go b/typedapi/types/enums/fieldtype/fieldtype.go index e7a3024556..6eddf02976 100644 --- a/typedapi/types/enums/fieldtype/fieldtype.go +++ b/typedapi/types/enums/fieldtype/fieldtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package fieldtype package fieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/Property.ts#L191-L240 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/Property.ts#L193-L242 type FieldType struct { Name string } diff --git a/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go b/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go index c0b7892ace..8eaa7a9cee 100644 --- a/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go +++ b/typedapi/types/enums/fieldvaluefactormodifier/fieldvaluefactormodifier.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package fieldvaluefactormodifier package fieldvaluefactormodifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L323-L366 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L323-L366 type FieldValueFactorModifier struct { Name string } diff --git a/typedapi/types/enums/filteringpolicy/filteringpolicy.go b/typedapi/types/enums/filteringpolicy/filteringpolicy.go index c7a729be56..094acda8c6 100644 --- a/typedapi/types/enums/filteringpolicy/filteringpolicy.go +++ b/typedapi/types/enums/filteringpolicy/filteringpolicy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package filteringpolicy package filteringpolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L155-L158 type FilteringPolicy struct { Name string } diff --git a/typedapi/types/enums/filteringrulerule/filteringrulerule.go b/typedapi/types/enums/filteringrulerule/filteringrulerule.go index b2f63ce091..22b8c07a58 100644 --- a/typedapi/types/enums/filteringrulerule/filteringrulerule.go +++ b/typedapi/types/enums/filteringrulerule/filteringrulerule.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package filteringrulerule package filteringrulerule import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L160-L168 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L160-L168 type FilteringRuleRule struct { Name string } diff --git a/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go b/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go index e9cd904a7d..f40e3222a5 100644 --- a/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go +++ b/typedapi/types/enums/filteringvalidationstate/filteringvalidationstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package filteringvalidationstate package filteringvalidationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L186-L190 type FilteringValidationState struct { Name string } diff --git a/typedapi/types/enums/filtertype/filtertype.go b/typedapi/types/enums/filtertype/filtertype.go index 9305bbf1d4..6560a5c9e3 100644 --- a/typedapi/types/enums/filtertype/filtertype.go +++ b/typedapi/types/enums/filtertype/filtertype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package filtertype package filtertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Filter.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Filter.ts#L43-L46 type FilterType struct { Name string } diff --git a/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go b/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go index 8cdd78b356..18114dadd1 100644 --- a/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go +++ b/typedapi/types/enums/fingerprintdigest/fingerprintdigest.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package fingerprintdigest package fingerprintdigest import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L896-L902 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L896-L902 type FingerprintDigest struct { Name string } diff --git a/typedapi/types/enums/followerindexstatus/followerindexstatus.go b/typedapi/types/enums/followerindexstatus/followerindexstatus.go index d3b16ef59f..10170f4fa0 100644 --- a/typedapi/types/enums/followerindexstatus/followerindexstatus.go +++ b/typedapi/types/enums/followerindexstatus/followerindexstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package followerindexstatus package followerindexstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow_info/types.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow_info/types.ts#L37-L40 type FollowerIndexStatus struct { Name string } diff --git a/typedapi/types/enums/formattype/formattype.go b/typedapi/types/enums/formattype/formattype.go index aa9366c6c5..3152a88667 100644 --- a/typedapi/types/enums/formattype/formattype.go +++ b/typedapi/types/enums/formattype/formattype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package formattype package formattype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/_types/Structure.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/_types/Structure.ts#L45-L50 type FormatType struct { Name string } diff --git a/typedapi/types/enums/functionboostmode/functionboostmode.go b/typedapi/types/enums/functionboostmode/functionboostmode.go index 01bd71849e..032fab1926 100644 --- a/typedapi/types/enums/functionboostmode/functionboostmode.go +++ b/typedapi/types/enums/functionboostmode/functionboostmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package functionboostmode package functionboostmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L295-L321 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L295-L321 type FunctionBoostMode struct { Name string } diff --git a/typedapi/types/enums/functionscoremode/functionscoremode.go b/typedapi/types/enums/functionscoremode/functionscoremode.go index 21700a7197..5b0516f073 100644 --- a/typedapi/types/enums/functionscoremode/functionscoremode.go +++ b/typedapi/types/enums/functionscoremode/functionscoremode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package functionscoremode package functionscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L268-L293 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L268-L293 type FunctionScoreMode struct { Name string } diff --git a/typedapi/types/enums/gappolicy/gappolicy.go b/typedapi/types/enums/gappolicy/gappolicy.go index 5e288d81d6..d911063516 100644 --- a/typedapi/types/enums/gappolicy/gappolicy.go +++ b/typedapi/types/enums/gappolicy/gappolicy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package gappolicy package gappolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L61-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L61-L76 type GapPolicy struct { Name string } diff --git a/typedapi/types/enums/geodistancetype/geodistancetype.go b/typedapi/types/enums/geodistancetype/geodistancetype.go index 2c7d04329a..c3d8f1247d 100644 --- a/typedapi/types/enums/geodistancetype/geodistancetype.go +++ b/typedapi/types/enums/geodistancetype/geodistancetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geodistancetype package geodistancetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L42-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L42-L51 type GeoDistanceType struct { Name string } diff --git a/typedapi/types/enums/geoexecution/geoexecution.go b/typedapi/types/enums/geoexecution/geoexecution.go index 14e11e0fb5..890faeb449 100644 --- a/typedapi/types/enums/geoexecution/geoexecution.go +++ b/typedapi/types/enums/geoexecution/geoexecution.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geoexecution package geoexecution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L59-L62 type GeoExecution struct { Name string } diff --git a/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go b/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go index a8eb04f662..8f8846b920 100644 --- a/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go +++ b/typedapi/types/enums/geogridtargetformat/geogridtargetformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geogridtargetformat package geogridtargetformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L437-L440 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L437-L440 type GeoGridTargetFormat struct { Name string } diff --git a/typedapi/types/enums/geogridtiletype/geogridtiletype.go b/typedapi/types/enums/geogridtiletype/geogridtiletype.go index 88eb1ec7d5..aad8de07c5 100644 --- a/typedapi/types/enums/geogridtiletype/geogridtiletype.go +++ b/typedapi/types/enums/geogridtiletype/geogridtiletype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geogridtiletype package geogridtiletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L431-L435 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L431-L435 type GeoGridTileType struct { Name string } diff --git a/typedapi/types/enums/geoorientation/geoorientation.go b/typedapi/types/enums/geoorientation/geoorientation.go index 38f60cc75a..27e92b03f0 100644 --- a/typedapi/types/enums/geoorientation/geoorientation.go +++ b/typedapi/types/enums/geoorientation/geoorientation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geoorientation package geoorientation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/geo.ts#L34-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L41-L46 type GeoOrientation struct { Name string } diff --git a/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go b/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go new file mode 100644 index 0000000000..19c486ac5c --- /dev/null +++ b/typedapi/types/enums/geopointmetrictype/geopointmetrictype.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package geopointmetrictype +package geopointmetrictype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L35-L39 +type GeoPointMetricType struct { + Name string +} + +var ( + Gauge = GeoPointMetricType{"gauge"} + + Counter = GeoPointMetricType{"counter"} + + Position = GeoPointMetricType{"position"} +) + +func (g GeoPointMetricType) MarshalText() (text []byte, err error) { + return []byte(g.String()), nil +} + +func (g *GeoPointMetricType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "gauge": + *g = Gauge + case "counter": + *g = Counter + case "position": + *g = Position + default: + *g = GeoPointMetricType{string(text)} + } + + return nil +} + +func (g GeoPointMetricType) String() string { + return g.Name +} diff --git a/typedapi/types/enums/geoshaperelation/geoshaperelation.go b/typedapi/types/enums/geoshaperelation/geoshaperelation.go index eade0ea507..b87e1e76bd 100644 --- a/typedapi/types/enums/geoshaperelation/geoshaperelation.go +++ b/typedapi/types/enums/geoshaperelation/geoshaperelation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geoshaperelation package geoshaperelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L64-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L64-L82 type GeoShapeRelation struct { Name string } diff --git a/typedapi/types/enums/geostrategy/geostrategy.go b/typedapi/types/enums/geostrategy/geostrategy.go index 0b2095172c..e4b1f1b75c 100644 --- a/typedapi/types/enums/geostrategy/geostrategy.go +++ b/typedapi/types/enums/geostrategy/geostrategy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geostrategy package geostrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/geo.ts#L57-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L64-L67 type GeoStrategy struct { Name string } diff --git a/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go b/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go index 52c9b6ba26..6b3bab5278 100644 --- a/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go +++ b/typedapi/types/enums/geovalidationmethod/geovalidationmethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package geovalidationmethod package geovalidationmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L173-L183 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L173-L183 type GeoValidationMethod struct { Name string } diff --git a/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go b/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go index 3449929796..c5b03d2447 100644 --- a/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go +++ b/typedapi/types/enums/googleaiservicetype/googleaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package googleaiservicetype package googleaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L817-L819 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1328-L1330 type GoogleAiServiceType struct { Name string } diff --git a/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go b/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go index 5e4d778396..d77b7a6043 100644 --- a/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go +++ b/typedapi/types/enums/googleaistudiotasktype/googleaistudiotasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package googleaistudiotasktype package googleaistudiotasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L812-L815 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1323-L1326 type GoogleAiStudioTaskType struct { Name string } diff --git a/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go b/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go index 459e5d11db..44f36c37ad 100644 --- a/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go +++ b/typedapi/types/enums/googlevertexaiservicetype/googlevertexaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package googlevertexaiservicetype package googlevertexaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L865-L867 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1378-L1380 type GoogleVertexAIServiceType struct { Name string } diff --git a/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go b/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go index 0d41a82d0f..a273654f8c 100644 --- a/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go +++ b/typedapi/types/enums/googlevertexaitasktype/googlevertexaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package googlevertexaitasktype package googlevertexaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L860-L863 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1371-L1376 type GoogleVertexAITaskType struct { Name string } @@ -32,6 +32,10 @@ var ( Rerank = GoogleVertexAITaskType{"rerank"} Textembedding = GoogleVertexAITaskType{"text_embedding"} + + Completion = GoogleVertexAITaskType{"completion"} + + Chatcompletion = GoogleVertexAITaskType{"chat_completion"} ) func (g GoogleVertexAITaskType) MarshalText() (text []byte, err error) { @@ -45,6 +49,10 @@ func (g *GoogleVertexAITaskType) UnmarshalText(text []byte) error { *g = Rerank case "text_embedding": *g = Textembedding + case "completion": + *g = Completion + case "chat_completion": + *g = Chatcompletion default: *g = GoogleVertexAITaskType{string(text)} } diff --git a/typedapi/types/enums/granttype/granttype.go b/typedapi/types/enums/granttype/granttype.go index 42f6426117..419380d83a 100644 --- a/typedapi/types/enums/granttype/granttype.go +++ b/typedapi/types/enums/granttype/granttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package granttype package granttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/GrantType.ts#L20-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/GrantType.ts#L20-L30 type GrantType struct { Name string } diff --git a/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go b/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go index 8fd7f13dd3..37e2f9b44f 100644 --- a/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go +++ b/typedapi/types/enums/gridaggregationtype/gridaggregationtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package gridaggregationtype package gridaggregationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_mvt/_types/GridType.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_mvt/_types/GridType.ts#L30-L33 type GridAggregationType struct { Name string } diff --git a/typedapi/types/enums/gridtype/gridtype.go b/typedapi/types/enums/gridtype/gridtype.go index 50ef30b820..624dc8331d 100644 --- a/typedapi/types/enums/gridtype/gridtype.go +++ b/typedapi/types/enums/gridtype/gridtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package gridtype package gridtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_mvt/_types/GridType.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_mvt/_types/GridType.ts#L20-L28 type GridType struct { Name string } diff --git a/typedapi/types/enums/groupby/groupby.go b/typedapi/types/enums/groupby/groupby.go index eb7f9d94e6..953ad693d5 100644 --- a/typedapi/types/enums/groupby/groupby.go +++ b/typedapi/types/enums/groupby/groupby.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package groupby package groupby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/_types/GroupBy.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/_types/GroupBy.ts#L20-L27 type GroupBy struct { Name string } diff --git a/typedapi/types/enums/healthstatus/healthstatus.go b/typedapi/types/enums/healthstatus/healthstatus.go index af4decfdcc..1607f55db6 100644 --- a/typedapi/types/enums/healthstatus/healthstatus.go +++ b/typedapi/types/enums/healthstatus/healthstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package healthstatus package healthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L223-L243 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L223-L245 type HealthStatus struct { Name string } @@ -34,6 +34,10 @@ var ( Yellow = HealthStatus{"yellow"} Red = HealthStatus{"red"} + + Unknown = HealthStatus{"unknown"} + + Unavailable = HealthStatus{"unavailable"} ) func (h HealthStatus) MarshalText() (text []byte, err error) { @@ -49,6 +53,10 @@ func (h *HealthStatus) UnmarshalText(text []byte) error { *h = Yellow case "red": *h = Red + case "unknown": + *h = Unknown + case "unavailable": + *h = Unavailable default: *h = HealthStatus{string(text)} } diff --git a/typedapi/types/enums/highlighterencoder/highlighterencoder.go b/typedapi/types/enums/highlighterencoder/highlighterencoder.go index 084a0d83bb..096bbed70d 100644 --- a/typedapi/types/enums/highlighterencoder/highlighterencoder.go +++ b/typedapi/types/enums/highlighterencoder/highlighterencoder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package highlighterencoder package highlighterencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L157-L160 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L157-L160 type HighlighterEncoder struct { Name string } diff --git a/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go b/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go index e8654ffda5..46f2ec2702 100644 --- a/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go +++ b/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package highlighterfragmenter package highlighterfragmenter import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L162-L165 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L162-L165 type HighlighterFragmenter struct { Name string } diff --git a/typedapi/types/enums/highlighterorder/highlighterorder.go b/typedapi/types/enums/highlighterorder/highlighterorder.go index 62ce77c331..44d7eca2da 100644 --- a/typedapi/types/enums/highlighterorder/highlighterorder.go +++ b/typedapi/types/enums/highlighterorder/highlighterorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package highlighterorder package highlighterorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L167-L169 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L167-L169 type HighlighterOrder struct { Name string } diff --git a/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go b/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go index ef2a339d4e..f6930d8d79 100644 --- a/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go +++ b/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package highlightertagsschema package highlightertagsschema import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L171-L173 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L171-L173 type HighlighterTagsSchema struct { Name string } diff --git a/typedapi/types/enums/highlightertype/highlightertype.go b/typedapi/types/enums/highlightertype/highlightertype.go index 0eaa3a76df..47a442765e 100644 --- a/typedapi/types/enums/highlightertype/highlightertype.go +++ b/typedapi/types/enums/highlightertype/highlightertype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package highlightertype package highlightertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L175-L190 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L175-L190 type HighlighterType struct { Name string } diff --git a/typedapi/types/enums/holtwinterstype/holtwinterstype.go b/typedapi/types/enums/holtwinterstype/holtwinterstype.go index 19cabd0b67..975c9c4ed6 100644 --- a/typedapi/types/enums/holtwinterstype/holtwinterstype.go +++ b/typedapi/types/enums/holtwinterstype/holtwinterstype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package holtwinterstype package holtwinterstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L309-L312 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L309-L312 type HoltWintersType struct { Name string } diff --git a/typedapi/types/enums/httpinputmethod/httpinputmethod.go b/typedapi/types/enums/httpinputmethod/httpinputmethod.go index c62d35ca9f..31e8f35d4c 100644 --- a/typedapi/types/enums/httpinputmethod/httpinputmethod.go +++ b/typedapi/types/enums/httpinputmethod/httpinputmethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package httpinputmethod package httpinputmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L59-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L59-L65 type HttpInputMethod struct { Name string } diff --git a/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go b/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go index 553d2c24ab..425c71b73a 100644 --- a/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go +++ b/typedapi/types/enums/huggingfaceservicetype/huggingfaceservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package huggingfaceservicetype package huggingfaceservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L896-L898 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1435-L1437 type HuggingFaceServiceType struct { Name string } diff --git a/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go b/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go index d53eec381b..8581bcc84a 100644 --- a/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go +++ b/typedapi/types/enums/huggingfacetasktype/huggingfacetasktype.go @@ -16,19 +16,25 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package huggingfacetasktype package huggingfacetasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L892-L894 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1428-L1433 type HuggingFaceTaskType struct { Name string } var ( + Chatcompletion = HuggingFaceTaskType{"chat_completion"} + + Completion = HuggingFaceTaskType{"completion"} + + Rerank = HuggingFaceTaskType{"rerank"} + Textembedding = HuggingFaceTaskType{"text_embedding"} ) @@ -39,6 +45,12 @@ func (h HuggingFaceTaskType) MarshalText() (text []byte, err error) { func (h *HuggingFaceTaskType) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + case "chat_completion": + *h = Chatcompletion + case "completion": + *h = Completion + case "rerank": + *h = Rerank case "text_embedding": *h = Textembedding default: diff --git a/typedapi/types/enums/ibdistribution/ibdistribution.go b/typedapi/types/enums/ibdistribution/ibdistribution.go index bc44600eba..6f1bb32141 100644 --- a/typedapi/types/enums/ibdistribution/ibdistribution.go +++ b/typedapi/types/enums/ibdistribution/ibdistribution.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package ibdistribution package ibdistribution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Similarity.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Similarity.ts#L42-L45 type IBDistribution struct { Name string } diff --git a/typedapi/types/enums/iblambda/iblambda.go b/typedapi/types/enums/iblambda/iblambda.go index 3c53c926e1..a7f51c747b 100644 --- a/typedapi/types/enums/iblambda/iblambda.go +++ b/typedapi/types/enums/iblambda/iblambda.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package iblambda package iblambda import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Similarity.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Similarity.ts#L47-L50 type IBLambda struct { Name string } diff --git a/typedapi/types/enums/icucollationalternate/icucollationalternate.go b/typedapi/types/enums/icucollationalternate/icucollationalternate.go index e9780182d9..051613586b 100644 --- a/typedapi/types/enums/icucollationalternate/icucollationalternate.go +++ b/typedapi/types/enums/icucollationalternate/icucollationalternate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icucollationalternate package icucollationalternate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L89-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L90-L93 type IcuCollationAlternate struct { Name string } diff --git a/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go b/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go index 2f94a4b58c..273c0904d0 100644 --- a/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go +++ b/typedapi/types/enums/icucollationcasefirst/icucollationcasefirst.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icucollationcasefirst package icucollationcasefirst import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L95-L98 type IcuCollationCaseFirst struct { Name string } diff --git a/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go b/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go index b10e69e465..9938c19bdb 100644 --- a/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go +++ b/typedapi/types/enums/icucollationdecomposition/icucollationdecomposition.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icucollationdecomposition package icucollationdecomposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L99-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L100-L103 type IcuCollationDecomposition struct { Name string } diff --git a/typedapi/types/enums/icucollationstrength/icucollationstrength.go b/typedapi/types/enums/icucollationstrength/icucollationstrength.go index bbf68711ae..71cd0de9cc 100644 --- a/typedapi/types/enums/icucollationstrength/icucollationstrength.go +++ b/typedapi/types/enums/icucollationstrength/icucollationstrength.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icucollationstrength package icucollationstrength import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L104-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L105-L111 type IcuCollationStrength struct { Name string } diff --git a/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go b/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go index dff7935b80..aae6f6156a 100644 --- a/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go +++ b/typedapi/types/enums/icunormalizationmode/icunormalizationmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icunormalizationmode package icunormalizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L79-L82 type IcuNormalizationMode struct { Name string } diff --git a/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go b/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go index 4b757c9a57..f110499428 100644 --- a/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go +++ b/typedapi/types/enums/icunormalizationtype/icunormalizationtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icunormalizationtype package icunormalizationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L83-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L84-L88 type IcuNormalizationType struct { Name string } diff --git a/typedapi/types/enums/icutransformdirection/icutransformdirection.go b/typedapi/types/enums/icutransformdirection/icutransformdirection.go index 47917caf8a..57071578f0 100644 --- a/typedapi/types/enums/icutransformdirection/icutransformdirection.go +++ b/typedapi/types/enums/icutransformdirection/icutransformdirection.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package icutransformdirection package icutransformdirection import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L74-L77 type IcuTransformDirection struct { Name string } diff --git a/typedapi/types/enums/impactarea/impactarea.go b/typedapi/types/enums/impactarea/impactarea.go index 1ac1baa997..0f747d0413 100644 --- a/typedapi/types/enums/impactarea/impactarea.go +++ b/typedapi/types/enums/impactarea/impactarea.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package impactarea package impactarea import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L73-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L74-L79 type ImpactArea struct { Name string } diff --git a/typedapi/types/enums/include/include.go b/typedapi/types/enums/include/include.go index 22eb4e96cb..8a68f221c5 100644 --- a/typedapi/types/enums/include/include.go +++ b/typedapi/types/enums/include/include.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package include package include import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Include.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Include.ts#L20-L47 type Include struct { Name string } diff --git a/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go b/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go index 79c37c25ee..2d97c5ef38 100644 --- a/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go +++ b/typedapi/types/enums/indexcheckonstartup/indexcheckonstartup.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexcheckonstartup package indexcheckonstartup import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L270-L277 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L270-L277 type IndexCheckOnStartup struct { Name string } diff --git a/typedapi/types/enums/indexingjobstate/indexingjobstate.go b/typedapi/types/enums/indexingjobstate/indexingjobstate.go index 91531f596e..249b13ea98 100644 --- a/typedapi/types/enums/indexingjobstate/indexingjobstate.go +++ b/typedapi/types/enums/indexingjobstate/indexingjobstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexingjobstate package indexingjobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_jobs/types.ts#L77-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_jobs/types.ts#L77-L83 type IndexingJobState struct { Name string } diff --git a/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go b/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go index 9c203cf86a..c62c382d66 100644 --- a/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go +++ b/typedapi/types/enums/indexmetadatastate/indexmetadatastate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexmetadatastate package indexmetadatastate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L225-L232 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L225-L232 type IndexMetadataState struct { Name string } diff --git a/typedapi/types/enums/indexoptions/indexoptions.go b/typedapi/types/enums/indexoptions/indexoptions.go index 094778f779..cfe8f08580 100644 --- a/typedapi/types/enums/indexoptions/indexoptions.go +++ b/typedapi/types/enums/indexoptions/indexoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexoptions package indexoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L291-L296 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L316-L321 type IndexOptions struct { Name string } diff --git a/typedapi/types/enums/indexprivilege/indexprivilege.go b/typedapi/types/enums/indexprivilege/indexprivilege.go index e4e0d69f2c..c703783485 100644 --- a/typedapi/types/enums/indexprivilege/indexprivilege.go +++ b/typedapi/types/enums/indexprivilege/indexprivilege.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexprivilege package indexprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L386-L428 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L386-L428 type IndexPrivilege struct { Name string } diff --git a/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go b/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go index ef31b7232e..54cfc04869 100644 --- a/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go +++ b/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexroutingallocationoptions package indexroutingallocationoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L38-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L38-L43 type IndexRoutingAllocationOptions struct { Name string } diff --git a/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go b/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go index 6333549b63..9d80d174a5 100644 --- a/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go +++ b/typedapi/types/enums/indexroutingrebalanceoptions/indexroutingrebalanceoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indexroutingrebalanceoptions package indexroutingrebalanceoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L45-L50 type IndexRoutingRebalanceOptions struct { Name string } diff --git a/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go b/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go index 0382af04ca..3b39be0f99 100644 --- a/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go +++ b/typedapi/types/enums/indicatorhealthstatus/indicatorhealthstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indicatorhealthstatus package indicatorhealthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L25-L31 type IndicatorHealthStatus struct { Name string } @@ -36,6 +36,8 @@ var ( Red = IndicatorHealthStatus{"red"} Unknown = IndicatorHealthStatus{"unknown"} + + Unavailable = IndicatorHealthStatus{"unavailable"} ) func (i IndicatorHealthStatus) MarshalText() (text []byte, err error) { @@ -53,6 +55,8 @@ func (i *IndicatorHealthStatus) UnmarshalText(text []byte) error { *i = Red case "unknown": *i = Unknown + case "unavailable": + *i = Unavailable default: *i = IndicatorHealthStatus{string(text)} } diff --git a/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go b/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go index 62d3588715..58db032b25 100644 --- a/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go +++ b/typedapi/types/enums/indicesblockoptions/indicesblockoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package indicesblockoptions package indicesblockoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/add_block/IndicesAddBlockRequest.ts#L91-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/add_block/IndicesAddBlockRequest.ts#L91-L100 type IndicesBlockOptions struct { Name string } diff --git a/typedapi/types/enums/inputtype/inputtype.go b/typedapi/types/enums/inputtype/inputtype.go index dfe75792eb..4a964ef214 100644 --- a/typedapi/types/enums/inputtype/inputtype.go +++ b/typedapi/types/enums/inputtype/inputtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package inputtype package inputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L97-L101 type InputType struct { Name string } diff --git a/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go b/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go index 8fa9ac30b5..5e221ad827 100644 --- a/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go +++ b/typedapi/types/enums/jinaaiservicetype/jinaaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jinaaiservicetype package jinaaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L959-L961 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1498-L1500 type JinaAIServiceType struct { Name string } diff --git a/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go b/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go index cad3bd1137..a2a1b39a1a 100644 --- a/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go +++ b/typedapi/types/enums/jinaaisimilaritytype/jinaaisimilaritytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jinaaisimilaritytype package jinaaisimilaritytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L963-L967 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1502-L1506 type JinaAISimilarityType struct { Name string } diff --git a/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go b/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go index 4adcac0528..fb51565ba2 100644 --- a/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go +++ b/typedapi/types/enums/jinaaitasktype/jinaaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jinaaitasktype package jinaaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L954-L957 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1493-L1496 type JinaAITaskType struct { Name string } diff --git a/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go b/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go index 077d40946f..347b77615e 100644 --- a/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go +++ b/typedapi/types/enums/jinaaitextembeddingtask/jinaaitextembeddingtask.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jinaaitextembeddingtask package jinaaitextembeddingtask import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L969-L974 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1508-L1513 type JinaAITextEmbeddingTask struct { Name string } diff --git a/typedapi/types/enums/jobblockedreason/jobblockedreason.go b/typedapi/types/enums/jobblockedreason/jobblockedreason.go index c766c1c5e7..b1d3de888a 100644 --- a/typedapi/types/enums/jobblockedreason/jobblockedreason.go +++ b/typedapi/types/enums/jobblockedreason/jobblockedreason.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jobblockedreason package jobblockedreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L397-L401 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L397-L401 type JobBlockedReason struct { Name string } diff --git a/typedapi/types/enums/jobstate/jobstate.go b/typedapi/types/enums/jobstate/jobstate.go index 3b8375cf87..dedf9d1f40 100644 --- a/typedapi/types/enums/jobstate/jobstate.go +++ b/typedapi/types/enums/jobstate/jobstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jobstate package jobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L36-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L36-L52 type JobState struct { Name string } diff --git a/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go b/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go index e14669cdf8..e2c50d2eeb 100644 --- a/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go +++ b/typedapi/types/enums/jsonprocessorconflictstrategy/jsonprocessorconflictstrategy.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package jsonprocessorconflictstrategy package jsonprocessorconflictstrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1169-L1174 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1169-L1174 type JsonProcessorConflictStrategy struct { Name string } diff --git a/typedapi/types/enums/keeptypesmode/keeptypesmode.go b/typedapi/types/enums/keeptypesmode/keeptypesmode.go index 69443c3851..5d41110256 100644 --- a/typedapi/types/enums/keeptypesmode/keeptypesmode.go +++ b/typedapi/types/enums/keeptypesmode/keeptypesmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package keeptypesmode package keeptypesmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L282-L285 type KeepTypesMode struct { Name string } diff --git a/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go b/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go index 42b85dc524..23f8e2cae7 100644 --- a/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go +++ b/typedapi/types/enums/kuromojitokenizationmode/kuromojitokenizationmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package kuromojitokenizationmode package kuromojitokenizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L58-L62 type KuromojiTokenizationMode struct { Name string } diff --git a/typedapi/types/enums/level/level.go b/typedapi/types/enums/level/level.go index b137ebf714..0db8c0920c 100644 --- a/typedapi/types/enums/level/level.go +++ b/typedapi/types/enums/level/level.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package level package level import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L253-L257 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L255-L259 type Level struct { Name string } diff --git a/typedapi/types/enums/licensestatus/licensestatus.go b/typedapi/types/enums/licensestatus/licensestatus.go index 0dd58cffaf..dcbfa79de7 100644 --- a/typedapi/types/enums/licensestatus/licensestatus.go +++ b/typedapi/types/enums/licensestatus/licensestatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package licensestatus package licensestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/_types/License.ts#L35-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/_types/License.ts#L35-L40 type LicenseStatus struct { Name string } diff --git a/typedapi/types/enums/licensetype/licensetype.go b/typedapi/types/enums/licensetype/licensetype.go index bfdd7b0a18..d959537c95 100644 --- a/typedapi/types/enums/licensetype/licensetype.go +++ b/typedapi/types/enums/licensetype/licensetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package licensetype package licensetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/_types/License.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/_types/License.ts#L23-L33 type LicenseType struct { Name string } diff --git a/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go b/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go index 1e845728f0..5dfd448a78 100644 --- a/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go +++ b/typedapi/types/enums/lifecycleoperationmode/lifecycleoperationmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package lifecycleoperationmode package lifecycleoperationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Lifecycle.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Lifecycle.ts#L20-L24 type LifecycleOperationMode struct { Name string } diff --git a/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go b/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go new file mode 100644 index 0000000000..7f6e2d9740 --- /dev/null +++ b/typedapi/types/enums/lowercasetokenfilterlanguages/lowercasetokenfilterlanguages.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package lowercasetokenfilterlanguages +package lowercasetokenfilterlanguages + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L344-L348 +type LowercaseTokenFilterLanguages struct { + Name string +} + +var ( + Greek = LowercaseTokenFilterLanguages{"greek"} + + Irish = LowercaseTokenFilterLanguages{"irish"} + + Turkish = LowercaseTokenFilterLanguages{"turkish"} +) + +func (l LowercaseTokenFilterLanguages) MarshalText() (text []byte, err error) { + return []byte(l.String()), nil +} + +func (l *LowercaseTokenFilterLanguages) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "greek": + *l = Greek + case "irish": + *l = Irish + case "turkish": + *l = Turkish + default: + *l = LowercaseTokenFilterLanguages{string(text)} + } + + return nil +} + +func (l LowercaseTokenFilterLanguages) String() string { + return l.Name +} diff --git a/typedapi/types/enums/managedby/managedby.go b/typedapi/types/enums/managedby/managedby.go index b0441b2e9e..4980c19101 100644 --- a/typedapi/types/enums/managedby/managedby.go +++ b/typedapi/types/enums/managedby/managedby.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package managedby package managedby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStream.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStream.ts#L32-L37 type ManagedBy struct { Name string } diff --git a/typedapi/types/enums/matchtype/matchtype.go b/typedapi/types/enums/matchtype/matchtype.go index 92a5d878b8..0cb125799f 100644 --- a/typedapi/types/enums/matchtype/matchtype.go +++ b/typedapi/types/enums/matchtype/matchtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package matchtype package matchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/dynamic-template.ts#L45-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/dynamic-template.ts#L45-L48 type MatchType struct { Name string } diff --git a/typedapi/types/enums/memorystatus/memorystatus.go b/typedapi/types/enums/memorystatus/memorystatus.go index ab057192cc..64398b61a5 100644 --- a/typedapi/types/enums/memorystatus/memorystatus.go +++ b/typedapi/types/enums/memorystatus/memorystatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package memorystatus package memorystatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Model.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Model.ts#L89-L93 type MemoryStatus struct { Name string } diff --git a/typedapi/types/enums/metric/metric.go b/typedapi/types/enums/metric/metric.go index c2ecb8bf69..7d61a89298 100644 --- a/typedapi/types/enums/metric/metric.go +++ b/typedapi/types/enums/metric/metric.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package metric package metric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/_types/Metric.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/_types/Metric.ts#L22-L28 type Metric struct { Name string } diff --git a/typedapi/types/enums/migrationstatus/migrationstatus.go b/typedapi/types/enums/migrationstatus/migrationstatus.go index 2647d00725..03877d4948 100644 --- a/typedapi/types/enums/migrationstatus/migrationstatus.go +++ b/typedapi/types/enums/migrationstatus/migrationstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package migrationstatus package migrationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35 type MigrationStatus struct { Name string } diff --git a/typedapi/types/enums/minimuminterval/minimuminterval.go b/typedapi/types/enums/minimuminterval/minimuminterval.go index 7e99c0dd89..12ceec8d6f 100644 --- a/typedapi/types/enums/minimuminterval/minimuminterval.go +++ b/typedapi/types/enums/minimuminterval/minimuminterval.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package minimuminterval package minimuminterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L112-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L112-L119 type MinimumInterval struct { Name string } diff --git a/typedapi/types/enums/missingorder/missingorder.go b/typedapi/types/enums/missingorder/missingorder.go index 5db3bf102f..138d0f6e70 100644 --- a/typedapi/types/enums/missingorder/missingorder.go +++ b/typedapi/types/enums/missingorder/missingorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package missingorder package missingorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/AggregationContainer.ts#L536-L540 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/AggregationContainer.ts#L536-L540 type MissingOrder struct { Name string } diff --git a/typedapi/types/enums/mistralservicetype/mistralservicetype.go b/typedapi/types/enums/mistralservicetype/mistralservicetype.go index 547d95fc99..a8619aca16 100644 --- a/typedapi/types/enums/mistralservicetype/mistralservicetype.go +++ b/typedapi/types/enums/mistralservicetype/mistralservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package mistralservicetype package mistralservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1009-L1011 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1550-L1552 type MistralServiceType struct { Name string } diff --git a/typedapi/types/enums/mistraltasktype/mistraltasktype.go b/typedapi/types/enums/mistraltasktype/mistraltasktype.go index 7a9ad7528e..a4cf748352 100644 --- a/typedapi/types/enums/mistraltasktype/mistraltasktype.go +++ b/typedapi/types/enums/mistraltasktype/mistraltasktype.go @@ -16,20 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package mistraltasktype package mistraltasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1005-L1007 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1544-L1548 type MistralTaskType struct { Name string } var ( Textembedding = MistralTaskType{"text_embedding"} + + Completion = MistralTaskType{"completion"} + + Chatcompletion = MistralTaskType{"chat_completion"} ) func (m MistralTaskType) MarshalText() (text []byte, err error) { @@ -41,6 +45,10 @@ func (m *MistralTaskType) UnmarshalText(text []byte) error { case "text_embedding": *m = Textembedding + case "completion": + *m = Completion + case "chat_completion": + *m = Chatcompletion default: *m = MistralTaskType{string(text)} } diff --git a/typedapi/types/enums/modeenum/modeenum.go b/typedapi/types/enums/modeenum/modeenum.go index f9e9f64c3d..d719ac0841 100644 --- a/typedapi/types/enums/modeenum/modeenum.go +++ b/typedapi/types/enums/modeenum/modeenum.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package modeenum package modeenum import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L54-L56 type ModeEnum struct { Name string } diff --git a/typedapi/types/enums/month/month.go b/typedapi/types/enums/month/month.go index aa22025de4..1ab80573d7 100644 --- a/typedapi/types/enums/month/month.go +++ b/typedapi/types/enums/month/month.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package month package month import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L65-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L65-L78 type Month struct { Name string } diff --git a/typedapi/types/enums/multivaluemode/multivaluemode.go b/typedapi/types/enums/multivaluemode/multivaluemode.go index d54931d7c9..377fbee1e9 100644 --- a/typedapi/types/enums/multivaluemode/multivaluemode.go +++ b/typedapi/types/enums/multivaluemode/multivaluemode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package multivaluemode package multivaluemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L368-L385 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L368-L385 type MultiValueMode struct { Name string } diff --git a/typedapi/types/enums/noderole/noderole.go b/typedapi/types/enums/noderole/noderole.go index 1148d48474..88106f1131 100644 --- a/typedapi/types/enums/noderole/noderole.go +++ b/typedapi/types/enums/noderole/noderole.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package noderole package noderole import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Node.ts#L71-L89 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Node.ts#L71-L89 type NodeRole struct { Name string } diff --git a/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go b/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go index 4ed2605712..abab8aab6f 100644 --- a/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go +++ b/typedapi/types/enums/noridecompoundmode/noridecompoundmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package noridecompoundmode package noridecompoundmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/nori-plugin.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/nori-plugin.ts#L23-L27 type NoriDecompoundMode struct { Name string } diff --git a/typedapi/types/enums/normalization/normalization.go b/typedapi/types/enums/normalization/normalization.go index a628c2f1cb..479d6db92c 100644 --- a/typedapi/types/enums/normalization/normalization.go +++ b/typedapi/types/enums/normalization/normalization.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package normalization package normalization import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Similarity.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Similarity.ts#L52-L58 type Normalization struct { Name string } diff --git a/typedapi/types/enums/normalizemethod/normalizemethod.go b/typedapi/types/enums/normalizemethod/normalizemethod.go index c8efb10db8..b31dc74941 100644 --- a/typedapi/types/enums/normalizemethod/normalizemethod.go +++ b/typedapi/types/enums/normalizemethod/normalizemethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package normalizemethod package normalizemethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L361-L387 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L361-L387 type NormalizeMethod struct { Name string } diff --git a/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go b/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go index ed033c508f..c46e40af64 100644 --- a/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go +++ b/typedapi/types/enums/numericfielddataformat/numericfielddataformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package numericfielddataformat package numericfielddataformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/NumericFielddataFormat.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/NumericFielddataFormat.ts#L20-L23 type NumericFielddataFormat struct { Name string } diff --git a/typedapi/types/enums/onscripterror/onscripterror.go b/typedapi/types/enums/onscripterror/onscripterror.go index 42245eb523..0d216d99c4 100644 --- a/typedapi/types/enums/onscripterror/onscripterror.go +++ b/typedapi/types/enums/onscripterror/onscripterror.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package onscripterror package onscripterror import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L151-L154 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L153-L156 type OnScriptError struct { Name string } diff --git a/typedapi/types/enums/openaiservicetype/openaiservicetype.go b/typedapi/types/enums/openaiservicetype/openaiservicetype.go index c2ac54d01a..1548452a60 100644 --- a/typedapi/types/enums/openaiservicetype/openaiservicetype.go +++ b/typedapi/types/enums/openaiservicetype/openaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package openaiservicetype package openaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1071-L1073 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1612-L1614 type OpenAIServiceType struct { Name string } diff --git a/typedapi/types/enums/openaitasktype/openaitasktype.go b/typedapi/types/enums/openaitasktype/openaitasktype.go index 70ccf4338c..17fc4372ec 100644 --- a/typedapi/types/enums/openaitasktype/openaitasktype.go +++ b/typedapi/types/enums/openaitasktype/openaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package openaitasktype package openaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1065-L1069 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1606-L1610 type OpenAITaskType struct { Name string } diff --git a/typedapi/types/enums/operationtype/operationtype.go b/typedapi/types/enums/operationtype/operationtype.go index 04b1af33b5..f9400b3471 100644 --- a/typedapi/types/enums/operationtype/operationtype.go +++ b/typedapi/types/enums/operationtype/operationtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package operationtype package operationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L93-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L93-L98 type OperationType struct { Name string } diff --git a/typedapi/types/enums/operator/operator.go b/typedapi/types/enums/operator/operator.go index dfb44ff6b7..ad00c39b8d 100644 --- a/typedapi/types/enums/operator/operator.go +++ b/typedapi/types/enums/operator/operator.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package operator package operator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/Operator.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/Operator.ts#L22-L27 type Operator struct { Name string } diff --git a/typedapi/types/enums/optype/optype.go b/typedapi/types/enums/optype/optype.go index 6bf4d4ae80..14fa5d9232 100644 --- a/typedapi/types/enums/optype/optype.go +++ b/typedapi/types/enums/optype/optype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package optype package optype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L259-L268 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L261-L270 type OpType struct { Name string } diff --git a/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go b/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go index e8f9b592c6..124dbc86a0 100644 --- a/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go +++ b/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package pagerdutycontexttype package pagerdutycontexttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L67-L70 type PagerDutyContextType struct { Name string } diff --git a/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go b/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go index ce6d1e6eda..8cd675cd6c 100644 --- a/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go +++ b/typedapi/types/enums/pagerdutyeventtype/pagerdutyeventtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package pagerdutyeventtype package pagerdutyeventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L72-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L72-L76 type PagerDutyEventType struct { Name string } diff --git a/typedapi/types/enums/painlesscontext/painlesscontext.go b/typedapi/types/enums/painlesscontext/painlesscontext.go index 59d78d7399..6cb26d8f15 100644 --- a/typedapi/types/enums/painlesscontext/painlesscontext.go +++ b/typedapi/types/enums/painlesscontext/painlesscontext.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package painlesscontext package painlesscontext import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/scripts_painless_execute/types.ts#L57-L80 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/scripts_painless_execute/types.ts#L57-L80 type PainlessContext struct { Name string } diff --git a/typedapi/types/enums/phoneticencoder/phoneticencoder.go b/typedapi/types/enums/phoneticencoder/phoneticencoder.go index 6648284dc0..ab5ccbf1aa 100644 --- a/typedapi/types/enums/phoneticencoder/phoneticencoder.go +++ b/typedapi/types/enums/phoneticencoder/phoneticencoder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package phoneticencoder package phoneticencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/phonetic-plugin.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/phonetic-plugin.ts#L23-L36 type PhoneticEncoder struct { Name string } diff --git a/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go b/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go index 5f3146f6cb..a0b01a3e78 100644 --- a/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go +++ b/typedapi/types/enums/phoneticlanguage/phoneticlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package phoneticlanguage package phoneticlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/phonetic-plugin.ts#L38-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/phonetic-plugin.ts#L38-L51 type PhoneticLanguage struct { Name string } diff --git a/typedapi/types/enums/phoneticnametype/phoneticnametype.go b/typedapi/types/enums/phoneticnametype/phoneticnametype.go index 222780bd37..b1a0ceb557 100644 --- a/typedapi/types/enums/phoneticnametype/phoneticnametype.go +++ b/typedapi/types/enums/phoneticnametype/phoneticnametype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package phoneticnametype package phoneticnametype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/phonetic-plugin.ts#L53-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/phonetic-plugin.ts#L53-L57 type PhoneticNameType struct { Name string } diff --git a/typedapi/types/enums/phoneticruletype/phoneticruletype.go b/typedapi/types/enums/phoneticruletype/phoneticruletype.go index 67a9d8513c..3cc43c3fab 100644 --- a/typedapi/types/enums/phoneticruletype/phoneticruletype.go +++ b/typedapi/types/enums/phoneticruletype/phoneticruletype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package phoneticruletype package phoneticruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/phonetic-plugin.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/phonetic-plugin.ts#L59-L62 type PhoneticRuleType struct { Name string } diff --git a/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go b/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go new file mode 100644 index 0000000000..f1761095f6 --- /dev/null +++ b/typedapi/types/enums/pipelinesimulationstatusoptions/pipelinesimulationstatusoptions.go @@ -0,0 +1,69 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package pipelinesimulationstatusoptions +package pipelinesimulationstatusoptions + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L51-L57 +type PipelineSimulationStatusOptions struct { + Name string +} + +var ( + Success = PipelineSimulationStatusOptions{"success"} + + Error = PipelineSimulationStatusOptions{"error"} + + Errorignored = PipelineSimulationStatusOptions{"error_ignored"} + + Skipped = PipelineSimulationStatusOptions{"skipped"} + + Dropped = PipelineSimulationStatusOptions{"dropped"} +) + +func (p PipelineSimulationStatusOptions) MarshalText() (text []byte, err error) { + return []byte(p.String()), nil +} + +func (p *PipelineSimulationStatusOptions) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "success": + *p = Success + case "error": + *p = Error + case "error_ignored": + *p = Errorignored + case "skipped": + *p = Skipped + case "dropped": + *p = Dropped + default: + *p = PipelineSimulationStatusOptions{string(text)} + } + + return nil +} + +func (p PipelineSimulationStatusOptions) String() string { + return p.Name +} diff --git a/typedapi/types/enums/policytype/policytype.go b/typedapi/types/enums/policytype/policytype.go index ffd9af7220..9614902b91 100644 --- a/typedapi/types/enums/policytype/policytype.go +++ b/typedapi/types/enums/policytype/policytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package policytype package policytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/_types/Policy.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/_types/Policy.ts#L28-L32 type PolicyType struct { Name string } diff --git a/typedapi/types/enums/quantifier/quantifier.go b/typedapi/types/enums/quantifier/quantifier.go index c0391c8fc7..3e5bdd68a6 100644 --- a/typedapi/types/enums/quantifier/quantifier.go +++ b/typedapi/types/enums/quantifier/quantifier.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package quantifier package quantifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L74-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L74-L77 type Quantifier struct { Name string } diff --git a/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go b/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go index 553887d879..cb7b8735d9 100644 --- a/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go +++ b/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package queryrulecriteriatype package queryrulecriteriatype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/_types/QueryRuleset.ts#L95-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/_types/QueryRuleset.ts#L95-L108 type QueryRuleCriteriaType struct { Name string } diff --git a/typedapi/types/enums/queryruletype/queryruletype.go b/typedapi/types/enums/queryruletype/queryruletype.go index 61aff69de4..be6a67803e 100644 --- a/typedapi/types/enums/queryruletype/queryruletype.go +++ b/typedapi/types/enums/queryruletype/queryruletype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package queryruletype package queryruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/_types/QueryRuleset.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/_types/QueryRuleset.ts#L60-L63 type QueryRuleType struct { Name string } diff --git a/typedapi/types/enums/rangerelation/rangerelation.go b/typedapi/types/enums/rangerelation/rangerelation.go index 8d61888f90..da656a0090 100644 --- a/typedapi/types/enums/rangerelation/rangerelation.go +++ b/typedapi/types/enums/rangerelation/rangerelation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package rangerelation package rangerelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L188-L201 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L188-L201 type RangeRelation struct { Name string } diff --git a/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go b/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go new file mode 100644 index 0000000000..530aa673cf --- /dev/null +++ b/typedapi/types/enums/rankvectorelementtype/rankvectorelementtype.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package rankvectorelementtype +package rankvectorelementtype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L393-L397 +type RankVectorElementType struct { + Name string +} + +var ( + Byte = RankVectorElementType{"byte"} + + Float = RankVectorElementType{"float"} + + Bit = RankVectorElementType{"bit"} +) + +func (r RankVectorElementType) MarshalText() (text []byte, err error) { + return []byte(r.String()), nil +} + +func (r *RankVectorElementType) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "byte": + *r = Byte + case "float": + *r = Float + case "bit": + *r = Bit + default: + *r = RankVectorElementType{string(text)} + } + + return nil +} + +func (r RankVectorElementType) String() string { + return r.Name +} diff --git a/typedapi/types/enums/ratemode/ratemode.go b/typedapi/types/enums/ratemode/ratemode.go index 6e76927347..79be5d5839 100644 --- a/typedapi/types/enums/ratemode/ratemode.go +++ b/typedapi/types/enums/ratemode/ratemode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package ratemode package ratemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L252-L261 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L275-L284 type RateMode struct { Name string } diff --git a/typedapi/types/enums/refresh/refresh.go b/typedapi/types/enums/refresh/refresh.go index 672e80ebc0..31cc34d9da 100644 --- a/typedapi/types/enums/refresh/refresh.go +++ b/typedapi/types/enums/refresh/refresh.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package refresh package refresh import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L270-L277 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L272-L279 type Refresh struct { Name string } diff --git a/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go index 79fb57aed0..4eeb175963 100644 --- a/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go +++ b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package remoteclusterprivilege package remoteclusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L201-L213 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L201-L213 type RemoteClusterPrivilege struct { Name string } diff --git a/typedapi/types/enums/responsecontenttype/responsecontenttype.go b/typedapi/types/enums/responsecontenttype/responsecontenttype.go index e21515fb6e..a6a3724609 100644 --- a/typedapi/types/enums/responsecontenttype/responsecontenttype.go +++ b/typedapi/types/enums/responsecontenttype/responsecontenttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package responsecontenttype package responsecontenttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L103-L107 type ResponseContentType struct { Name string } diff --git a/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go b/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go index 729b92e980..6a85d4acff 100644 --- a/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go +++ b/typedapi/types/enums/restrictionworkflow/restrictionworkflow.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package restrictionworkflow package restrictionworkflow import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleDescriptor.ts#L143-L146 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleDescriptor.ts#L143-L146 type RestrictionWorkflow struct { Name string } diff --git a/typedapi/types/enums/result/result.go b/typedapi/types/enums/result/result.go index 895e27b6f7..7125a667d6 100644 --- a/typedapi/types/enums/result/result.go +++ b/typedapi/types/enums/result/result.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package result package result import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Result.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Result.ts#L20-L26 type Result struct { Name string } diff --git a/typedapi/types/enums/resultposition/resultposition.go b/typedapi/types/enums/resultposition/resultposition.go index 76007be885..1ff9bb41ca 100644 --- a/typedapi/types/enums/resultposition/resultposition.go +++ b/typedapi/types/enums/resultposition/resultposition.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package resultposition package resultposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/search/types.ts#L20-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/search/types.ts#L20-L32 type ResultPosition struct { Name string } diff --git a/typedapi/types/enums/routingstate/routingstate.go b/typedapi/types/enums/routingstate/routingstate.go index fc92fd378d..1572e9d8c4 100644 --- a/typedapi/types/enums/routingstate/routingstate.go +++ b/typedapi/types/enums/routingstate/routingstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package routingstate package routingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L408-L429 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L408-L429 type RoutingState struct { Name string } diff --git a/typedapi/types/enums/ruleaction/ruleaction.go b/typedapi/types/enums/ruleaction/ruleaction.go index 58decd30ac..c515a0a57f 100644 --- a/typedapi/types/enums/ruleaction/ruleaction.go +++ b/typedapi/types/enums/ruleaction/ruleaction.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package ruleaction package ruleaction import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Rule.ts#L41-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Rule.ts#L41-L50 type RuleAction struct { Name string } diff --git a/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go b/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go index b7098482e1..b5f7616639 100644 --- a/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go +++ b/typedapi/types/enums/runtimefieldtype/runtimefieldtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package runtimefieldtype package runtimefieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/RuntimeFields.ts#L62-L73 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/RuntimeFields.ts#L62-L73 type RuntimeFieldType struct { Name string } diff --git a/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go b/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go index 102e7cd2b4..e74c247217 100644 --- a/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go +++ b/typedapi/types/enums/sampleraggregationexecutionhint/sampleraggregationexecutionhint.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package sampleraggregationexecutionhint package sampleraggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L359-L372 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L359-L372 type SamplerAggregationExecutionHint struct { Name string } diff --git a/typedapi/types/enums/scoremode/scoremode.go b/typedapi/types/enums/scoremode/scoremode.go index 2e02e56346..e183a85beb 100644 --- a/typedapi/types/enums/scoremode/scoremode.go +++ b/typedapi/types/enums/scoremode/scoremode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package scoremode package scoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/rescoring.ts#L64-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/rescoring.ts#L64-L86 type ScoreMode struct { Name string } diff --git a/typedapi/types/enums/scorenormalizer/scorenormalizer.go b/typedapi/types/enums/scorenormalizer/scorenormalizer.go new file mode 100644 index 0000000000..aa6abd5dc1 --- /dev/null +++ b/typedapi/types/enums/scorenormalizer/scorenormalizer.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package scorenormalizer +package scorenormalizer + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L91-L95 +type ScoreNormalizer struct { + Name string +} + +var ( + None = ScoreNormalizer{"none"} + + Minmax = ScoreNormalizer{"minmax"} + + L2norm = ScoreNormalizer{"l2_norm"} +) + +func (s ScoreNormalizer) MarshalText() (text []byte, err error) { + return []byte(s.String()), nil +} + +func (s *ScoreNormalizer) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "none": + *s = None + case "minmax": + *s = Minmax + case "l2_norm": + *s = L2norm + default: + *s = ScoreNormalizer{string(text)} + } + + return nil +} + +func (s ScoreNormalizer) String() string { + return s.Name +} diff --git a/typedapi/types/enums/scriptlanguage/scriptlanguage.go b/typedapi/types/enums/scriptlanguage/scriptlanguage.go index dc21e61404..2270237e9e 100644 --- a/typedapi/types/enums/scriptlanguage/scriptlanguage.go +++ b/typedapi/types/enums/scriptlanguage/scriptlanguage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package scriptlanguage package scriptlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Scripting.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Scripting.ts#L24-L45 type ScriptLanguage struct { Name string } diff --git a/typedapi/types/enums/scriptsorttype/scriptsorttype.go b/typedapi/types/enums/scriptsorttype/scriptsorttype.go index b1de23dd0b..0d0a8bec10 100644 --- a/typedapi/types/enums/scriptsorttype/scriptsorttype.go +++ b/typedapi/types/enums/scriptsorttype/scriptsorttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package scriptsorttype package scriptsorttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L80-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L80-L84 type ScriptSortType struct { Name string } diff --git a/typedapi/types/enums/searchtype/searchtype.go b/typedapi/types/enums/searchtype/searchtype.go index 1388344a6e..8dc9c19940 100644 --- a/typedapi/types/enums/searchtype/searchtype.go +++ b/typedapi/types/enums/searchtype/searchtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package searchtype package searchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L279-L284 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L281-L286 type SearchType struct { Name string } diff --git a/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go b/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go index 09e527f530..341ad3c943 100644 --- a/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go +++ b/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package segmentsortmissing package segmentsortmissing import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSegmentSort.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSegmentSort.ts#L43-L46 type SegmentSortMissing struct { Name string } diff --git a/typedapi/types/enums/segmentsortmode/segmentsortmode.go b/typedapi/types/enums/segmentsortmode/segmentsortmode.go index 438fe38c1f..88b2202046 100644 --- a/typedapi/types/enums/segmentsortmode/segmentsortmode.go +++ b/typedapi/types/enums/segmentsortmode/segmentsortmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package segmentsortmode package segmentsortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSegmentSort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSegmentSort.ts#L36-L41 type SegmentSortMode struct { Name string } diff --git a/typedapi/types/enums/segmentsortorder/segmentsortorder.go b/typedapi/types/enums/segmentsortorder/segmentsortorder.go index ada9c9eda0..a3d4b4dede 100644 --- a/typedapi/types/enums/segmentsortorder/segmentsortorder.go +++ b/typedapi/types/enums/segmentsortorder/segmentsortorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package segmentsortorder package segmentsortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSegmentSort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSegmentSort.ts#L29-L34 type SegmentSortOrder struct { Name string } diff --git a/typedapi/types/enums/shapetype/shapetype.go b/typedapi/types/enums/shapetype/shapetype.go index 03c5b4a06f..2339da6d31 100644 --- a/typedapi/types/enums/shapetype/shapetype.go +++ b/typedapi/types/enums/shapetype/shapetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shapetype package shapetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1491-L1494 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1491-L1494 type ShapeType struct { Name string } diff --git a/typedapi/types/enums/shardroutingstate/shardroutingstate.go b/typedapi/types/enums/shardroutingstate/shardroutingstate.go index e5bbdb25f2..a00e3066b9 100644 --- a/typedapi/types/enums/shardroutingstate/shardroutingstate.go +++ b/typedapi/types/enums/shardroutingstate/shardroutingstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shardroutingstate package shardroutingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L169-L174 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L169-L174 type ShardRoutingState struct { Name string } diff --git a/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go b/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go index ecd8bf2012..fa81433aec 100644 --- a/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go +++ b/typedapi/types/enums/shardsstatsstage/shardsstatsstage.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shardsstatsstage package shardsstatsstage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 type ShardsStatsStage struct { Name string } diff --git a/typedapi/types/enums/shardstate/shardstate.go b/typedapi/types/enums/shardstate/shardstate.go new file mode 100644 index 0000000000..56d45aa08c --- /dev/null +++ b/typedapi/types/enums/shardstate/shardstate.go @@ -0,0 +1,81 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package shardstate +package shardstate + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L689-L698 +type ShardState struct { + Name string +} + +var ( + INIT = ShardState{"INIT"} + + SUCCESS = ShardState{"SUCCESS"} + + FAILED = ShardState{"FAILED"} + + ABORTED = ShardState{"ABORTED"} + + MISSING = ShardState{"MISSING"} + + WAITING = ShardState{"WAITING"} + + QUEUED = ShardState{"QUEUED"} + + PAUSEDFORNODEREMOVAL = ShardState{"PAUSED_FOR_NODE_REMOVAL"} +) + +func (s ShardState) MarshalText() (text []byte, err error) { + return []byte(s.String()), nil +} + +func (s *ShardState) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "init": + *s = INIT + case "success": + *s = SUCCESS + case "failed": + *s = FAILED + case "aborted": + *s = ABORTED + case "missing": + *s = MISSING + case "waiting": + *s = WAITING + case "queued": + *s = QUEUED + case "paused_for_node_removal": + *s = PAUSEDFORNODEREMOVAL + default: + *s = ShardState{string(text)} + } + + return nil +} + +func (s ShardState) String() string { + return s.Name +} diff --git a/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go b/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go index e1a457d9a9..c8a1a147bd 100644 --- a/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go +++ b/typedapi/types/enums/shardstoreallocation/shardstoreallocation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shardstoreallocation package shardstoreallocation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L47-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L47-L51 type ShardStoreAllocation struct { Name string } diff --git a/typedapi/types/enums/shardstorestatus/shardstorestatus.go b/typedapi/types/enums/shardstorestatus/shardstorestatus.go index 6dc74035db..8791f9d727 100644 --- a/typedapi/types/enums/shardstorestatus/shardstorestatus.go +++ b/typedapi/types/enums/shardstorestatus/shardstorestatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shardstorestatus package shardstorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L62-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L62-L71 type ShardStoreStatus struct { Name string } diff --git a/typedapi/types/enums/shutdownstatus/shutdownstatus.go b/typedapi/types/enums/shutdownstatus/shutdownstatus.go index fbea1dc5b3..ba5f75b6d8 100644 --- a/typedapi/types/enums/shutdownstatus/shutdownstatus.go +++ b/typedapi/types/enums/shutdownstatus/shutdownstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shutdownstatus package shutdownstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50 type ShutdownStatus struct { Name string } diff --git a/typedapi/types/enums/shutdowntype/shutdowntype.go b/typedapi/types/enums/shutdowntype/shutdowntype.go index 8dda464bbf..a9fd0fc37d 100644 --- a/typedapi/types/enums/shutdowntype/shutdowntype.go +++ b/typedapi/types/enums/shutdowntype/shutdowntype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package shutdowntype package shutdowntype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43 type ShutdownType struct { Name string } diff --git a/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go b/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go index 50703409e4..0ae87d0b9d 100644 --- a/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go +++ b/typedapi/types/enums/simplequerystringflag/simplequerystringflag.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package simplequerystringflag package simplequerystringflag import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L729-L784 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L780-L835 type SimpleQueryStringFlag struct { Name string } diff --git a/typedapi/types/enums/slicescalculation/slicescalculation.go b/typedapi/types/enums/slicescalculation/slicescalculation.go index 0f33e40337..c1290ca78d 100644 --- a/typedapi/types/enums/slicescalculation/slicescalculation.go +++ b/typedapi/types/enums/slicescalculation/slicescalculation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package slicescalculation package slicescalculation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L375-L383 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L377-L385 type SlicesCalculation struct { Name string } diff --git a/typedapi/types/enums/snapshotsort/snapshotsort.go b/typedapi/types/enums/snapshotsort/snapshotsort.go index cc8d1d03b2..142af56c8a 100644 --- a/typedapi/types/enums/snapshotsort/snapshotsort.go +++ b/typedapi/types/enums/snapshotsort/snapshotsort.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package snapshotsort package snapshotsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 type SnapshotSort struct { Name string } diff --git a/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go b/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go index 2d9d1e3bc5..812b5edd23 100644 --- a/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go +++ b/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package snapshotupgradestate package snapshotupgradestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Model.ts#L95-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Model.ts#L95-L100 type SnapshotUpgradeState struct { Name string } diff --git a/typedapi/types/enums/snowballlanguage/snowballlanguage.go b/typedapi/types/enums/snowballlanguage/snowballlanguage.go index ebf1495a98..3bf3e717b5 100644 --- a/typedapi/types/enums/snowballlanguage/snowballlanguage.go +++ b/typedapi/types/enums/snowballlanguage/snowballlanguage.go @@ -16,19 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package snowballlanguage package snowballlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/languages.ts#L20-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/languages.ts#L20-L48 type SnowballLanguage struct { Name string } var ( + Arabic = SnowballLanguage{"Arabic"} + Armenian = SnowballLanguage{"Armenian"} Basque = SnowballLanguage{"Basque"} @@ -41,6 +43,8 @@ var ( English = SnowballLanguage{"English"} + Estonian = SnowballLanguage{"Estonian"} + Finnish = SnowballLanguage{"Finnish"} French = SnowballLanguage{"French"} @@ -53,8 +57,12 @@ var ( Italian = SnowballLanguage{"Italian"} + Irish = SnowballLanguage{"Irish"} + Kp = SnowballLanguage{"Kp"} + Lithuanian = SnowballLanguage{"Lithuanian"} + Lovins = SnowballLanguage{"Lovins"} Norwegian = SnowballLanguage{"Norwegian"} @@ -67,6 +75,8 @@ var ( Russian = SnowballLanguage{"Russian"} + Serbian = SnowballLanguage{"Serbian"} + Spanish = SnowballLanguage{"Spanish"} Swedish = SnowballLanguage{"Swedish"} @@ -81,6 +91,8 @@ func (s SnowballLanguage) MarshalText() (text []byte, err error) { func (s *SnowballLanguage) UnmarshalText(text []byte) error { switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + case "arabic": + *s = Arabic case "armenian": *s = Armenian case "basque": @@ -93,6 +105,8 @@ func (s *SnowballLanguage) UnmarshalText(text []byte) error { *s = Dutch case "english": *s = English + case "estonian": + *s = Estonian case "finnish": *s = Finnish case "french": @@ -105,8 +119,12 @@ func (s *SnowballLanguage) UnmarshalText(text []byte) error { *s = Hungarian case "italian": *s = Italian + case "irish": + *s = Irish case "kp": *s = Kp + case "lithuanian": + *s = Lithuanian case "lovins": *s = Lovins case "norwegian": @@ -119,6 +137,8 @@ func (s *SnowballLanguage) UnmarshalText(text []byte) error { *s = Romanian case "russian": *s = Russian + case "serbian": + *s = Serbian case "spanish": *s = Spanish case "swedish": diff --git a/typedapi/types/enums/sortmode/sortmode.go b/typedapi/types/enums/sortmode/sortmode.go index e73446f7aa..aaeb22f0a9 100644 --- a/typedapi/types/enums/sortmode/sortmode.go +++ b/typedapi/types/enums/sortmode/sortmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package sortmode package sortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L108-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L108-L117 type SortMode struct { Name string } diff --git a/typedapi/types/enums/sortorder/sortorder.go b/typedapi/types/enums/sortorder/sortorder.go index 888648496f..5f7deefbeb 100644 --- a/typedapi/types/enums/sortorder/sortorder.go +++ b/typedapi/types/enums/sortorder/sortorder.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package sortorder package sortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L119-L128 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L119-L128 type SortOrder struct { Name string } diff --git a/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go b/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go index 707c619b8e..8c3794bed1 100644 --- a/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go +++ b/typedapi/types/enums/sourcefieldmode/sourcefieldmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package sourcefieldmode package sourcefieldmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L67-L75 type SourceFieldMode struct { Name string } diff --git a/typedapi/types/enums/sourcemode/sourcemode.go b/typedapi/types/enums/sourcemode/sourcemode.go index 891e3a2652..5b912c6c7a 100644 --- a/typedapi/types/enums/sourcemode/sourcemode.go +++ b/typedapi/types/enums/sourcemode/sourcemode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package sourcemode package sourcemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L509-L513 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L509-L513 type SourceMode struct { Name string } diff --git a/typedapi/types/enums/sqlformat/sqlformat.go b/typedapi/types/enums/sqlformat/sqlformat.go index b265721658..1d3a53a371 100644 --- a/typedapi/types/enums/sqlformat/sqlformat.go +++ b/typedapi/types/enums/sqlformat/sqlformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package sqlformat package sqlformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/sql/query/QuerySqlRequest.ts#L154-L162 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/sql/query/QuerySqlRequest.ts#L153-L161 type SqlFormat struct { Name string } diff --git a/typedapi/types/enums/statslevel/statslevel.go b/typedapi/types/enums/statslevel/statslevel.go index 1575161ccd..1ad9208734 100644 --- a/typedapi/types/enums/statslevel/statslevel.go +++ b/typedapi/types/enums/statslevel/statslevel.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package statslevel package statslevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/_types/stats.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/_types/stats.ts#L20-L24 type StatsLevel struct { Name string } diff --git a/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go b/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go new file mode 100644 index 0000000000..fb95d47ccd --- /dev/null +++ b/typedapi/types/enums/stopwordlanguage/stopwordlanguage.go @@ -0,0 +1,197 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package stopwordlanguage +package stopwordlanguage + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/StopWords.ts#L20-L58 +type StopWordLanguage struct { + Name string +} + +var ( + Arabic = StopWordLanguage{"_arabic_"} + + Armenian = StopWordLanguage{"_armenian_"} + + Basque = StopWordLanguage{"_basque_"} + + Bengali = StopWordLanguage{"_bengali_"} + + Brazilian = StopWordLanguage{"_brazilian_"} + + Bulgarian = StopWordLanguage{"_bulgarian_"} + + Catalan = StopWordLanguage{"_catalan_"} + + Cjk = StopWordLanguage{"_cjk_"} + + Czech = StopWordLanguage{"_czech_"} + + Danish = StopWordLanguage{"_danish_"} + + Dutch = StopWordLanguage{"_dutch_"} + + English = StopWordLanguage{"_english_"} + + Estonian = StopWordLanguage{"_estonian_"} + + Finnish = StopWordLanguage{"_finnish_"} + + French = StopWordLanguage{"_french_"} + + Galician = StopWordLanguage{"_galician_"} + + German = StopWordLanguage{"_german_"} + + Greek = StopWordLanguage{"_greek_"} + + Hindi = StopWordLanguage{"_hindi_"} + + Hungarian = StopWordLanguage{"_hungarian_"} + + Indonesian = StopWordLanguage{"_indonesian_"} + + Irish = StopWordLanguage{"_irish_"} + + Italian = StopWordLanguage{"_italian_"} + + Latvian = StopWordLanguage{"_latvian_"} + + Lithuanian = StopWordLanguage{"_lithuanian_"} + + Norwegian = StopWordLanguage{"_norwegian_"} + + Persian = StopWordLanguage{"_persian_"} + + Portuguese = StopWordLanguage{"_portuguese_"} + + Romanian = StopWordLanguage{"_romanian_"} + + Russian = StopWordLanguage{"_russian_"} + + Serbian = StopWordLanguage{"_serbian_"} + + Sorani = StopWordLanguage{"_sorani_"} + + Spanish = StopWordLanguage{"_spanish_"} + + Swedish = StopWordLanguage{"_swedish_"} + + Thai = StopWordLanguage{"_thai_"} + + Turkish = StopWordLanguage{"_turkish_"} + + None = StopWordLanguage{"_none_"} +) + +func (s StopWordLanguage) MarshalText() (text []byte, err error) { + return []byte(s.String()), nil +} + +func (s *StopWordLanguage) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "_arabic_": + *s = Arabic + case "_armenian_": + *s = Armenian + case "_basque_": + *s = Basque + case "_bengali_": + *s = Bengali + case "_brazilian_": + *s = Brazilian + case "_bulgarian_": + *s = Bulgarian + case "_catalan_": + *s = Catalan + case "_cjk_": + *s = Cjk + case "_czech_": + *s = Czech + case "_danish_": + *s = Danish + case "_dutch_": + *s = Dutch + case "_english_": + *s = English + case "_estonian_": + *s = Estonian + case "_finnish_": + *s = Finnish + case "_french_": + *s = French + case "_galician_": + *s = Galician + case "_german_": + *s = German + case "_greek_": + *s = Greek + case "_hindi_": + *s = Hindi + case "_hungarian_": + *s = Hungarian + case "_indonesian_": + *s = Indonesian + case "_irish_": + *s = Irish + case "_italian_": + *s = Italian + case "_latvian_": + *s = Latvian + case "_lithuanian_": + *s = Lithuanian + case "_norwegian_": + *s = Norwegian + case "_persian_": + *s = Persian + case "_portuguese_": + *s = Portuguese + case "_romanian_": + *s = Romanian + case "_russian_": + *s = Russian + case "_serbian_": + *s = Serbian + case "_sorani_": + *s = Sorani + case "_spanish_": + *s = Spanish + case "_swedish_": + *s = Swedish + case "_thai_": + *s = Thai + case "_turkish_": + *s = Turkish + case "_none_": + *s = None + default: + *s = StopWordLanguage{string(text)} + } + + return nil +} + +func (s StopWordLanguage) String() string { + return s.Name +} diff --git a/typedapi/types/enums/storagetype/storagetype.go b/typedapi/types/enums/storagetype/storagetype.go index 4c50caf455..482f3f33d9 100644 --- a/typedapi/types/enums/storagetype/storagetype.go +++ b/typedapi/types/enums/storagetype/storagetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package storagetype package storagetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L545-L573 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L547-L575 type StorageType struct { Name string } diff --git a/typedapi/types/enums/stringdistance/stringdistance.go b/typedapi/types/enums/stringdistance/stringdistance.go index 4df3cb6220..bd35e7e644 100644 --- a/typedapi/types/enums/stringdistance/stringdistance.go +++ b/typedapi/types/enums/stringdistance/stringdistance.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package stringdistance package stringdistance import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L472-L493 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L472-L493 type StringDistance struct { Name string } diff --git a/typedapi/types/enums/subobjects/subobjects.go b/typedapi/types/enums/subobjects/subobjects.go index 548e67d0cf..6ca3f7ac92 100644 --- a/typedapi/types/enums/subobjects/subobjects.go +++ b/typedapi/types/enums/subobjects/subobjects.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package subobjects package subobjects import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/TypeMapping.ts#L63-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/TypeMapping.ts#L63-L74 type Subobjects struct { Name string } diff --git a/typedapi/types/enums/suggestmode/suggestmode.go b/typedapi/types/enums/suggestmode/suggestmode.go index 09f2442b7f..e798e7ab22 100644 --- a/typedapi/types/enums/suggestmode/suggestmode.go +++ b/typedapi/types/enums/suggestmode/suggestmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package suggestmode package suggestmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L286-L299 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L288-L301 type SuggestMode struct { Name string } diff --git a/typedapi/types/enums/suggestsort/suggestsort.go b/typedapi/types/enums/suggestsort/suggestsort.go index daf33b5e49..0da616fdaf 100644 --- a/typedapi/types/enums/suggestsort/suggestsort.go +++ b/typedapi/types/enums/suggestsort/suggestsort.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package suggestsort package suggestsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L495-L504 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L495-L504 type SuggestSort struct { Name string } diff --git a/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go b/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go index e137796560..1dc46c9eb2 100644 --- a/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go +++ b/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package syncjobtriggermethod package syncjobtriggermethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/SyncJob.ts#L48-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/SyncJob.ts#L48-L51 type SyncJobTriggerMethod struct { Name string } diff --git a/typedapi/types/enums/syncjobtype/syncjobtype.go b/typedapi/types/enums/syncjobtype/syncjobtype.go index 9a2f3a0908..83934f454f 100644 --- a/typedapi/types/enums/syncjobtype/syncjobtype.go +++ b/typedapi/types/enums/syncjobtype/syncjobtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package syncjobtype package syncjobtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/SyncJob.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/SyncJob.ts#L42-L46 type SyncJobType struct { Name string } diff --git a/typedapi/types/enums/syncstatus/syncstatus.go b/typedapi/types/enums/syncstatus/syncstatus.go index af90fab263..ca4be5f9b8 100644 --- a/typedapi/types/enums/syncstatus/syncstatus.go +++ b/typedapi/types/enums/syncstatus/syncstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package syncstatus package syncstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L138-L146 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L138-L146 type SyncStatus struct { Name string } diff --git a/typedapi/types/enums/synonymformat/synonymformat.go b/typedapi/types/enums/synonymformat/synonymformat.go index cae555910e..84a82c3fab 100644 --- a/typedapi/types/enums/synonymformat/synonymformat.go +++ b/typedapi/types/enums/synonymformat/synonymformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package synonymformat package synonymformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L104-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L138-L141 type SynonymFormat struct { Name string } diff --git a/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go b/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go index 673be6c3c3..7149ab242e 100644 --- a/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go +++ b/typedapi/types/enums/syntheticsourcekeepenum/syntheticsourcekeepenum.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package syntheticsourcekeepenum package syntheticsourcekeepenum import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/Property.ts#L99-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/Property.ts#L100-L118 type SyntheticSourceKeepEnum struct { Name string } diff --git a/typedapi/types/enums/tasktype/tasktype.go b/typedapi/types/enums/tasktype/tasktype.go index e5c32387d7..667954c56b 100644 --- a/typedapi/types/enums/tasktype/tasktype.go +++ b/typedapi/types/enums/tasktype/tasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package tasktype package tasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/TaskType.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L20-L29 type TaskType struct { Name string } diff --git a/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go b/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go new file mode 100644 index 0000000000..c63fc36cb7 --- /dev/null +++ b/typedapi/types/enums/tasktypealibabacloudai/tasktypealibabacloudai.go @@ -0,0 +1,65 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypealibabacloudai +package tasktypealibabacloudai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L36-L41 +type TaskTypeAlibabaCloudAI struct { + Name string +} + +var ( + Textembedding = TaskTypeAlibabaCloudAI{"text_embedding"} + + Rerank = TaskTypeAlibabaCloudAI{"rerank"} + + Completion = TaskTypeAlibabaCloudAI{"completion"} + + Sparseembedding = TaskTypeAlibabaCloudAI{"sparse_embedding"} +) + +func (t TaskTypeAlibabaCloudAI) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAlibabaCloudAI) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "rerank": + *t = Rerank + case "completion": + *t = Completion + case "sparse_embedding": + *t = Sparseembedding + default: + *t = TaskTypeAlibabaCloudAI{string(text)} + } + + return nil +} + +func (t TaskTypeAlibabaCloudAI) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go b/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go new file mode 100644 index 0000000000..34247db812 --- /dev/null +++ b/typedapi/types/enums/tasktypeamazonbedrock/tasktypeamazonbedrock.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeamazonbedrock +package tasktypeamazonbedrock + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L43-L46 +type TaskTypeAmazonBedrock struct { + Name string +} + +var ( + Textembedding = TaskTypeAmazonBedrock{"text_embedding"} + + Completion = TaskTypeAmazonBedrock{"completion"} +) + +func (t TaskTypeAmazonBedrock) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAmazonBedrock) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "completion": + *t = Completion + default: + *t = TaskTypeAmazonBedrock{string(text)} + } + + return nil +} + +func (t TaskTypeAmazonBedrock) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go b/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go new file mode 100644 index 0000000000..27014fa956 --- /dev/null +++ b/typedapi/types/enums/tasktypeamazonsagemaker/tasktypeamazonsagemaker.go @@ -0,0 +1,69 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeamazonsagemaker +package tasktypeamazonsagemaker + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L48-L54 +type TaskTypeAmazonSageMaker struct { + Name string +} + +var ( + Textembedding = TaskTypeAmazonSageMaker{"text_embedding"} + + Completion = TaskTypeAmazonSageMaker{"completion"} + + Chatcompletion = TaskTypeAmazonSageMaker{"chat_completion"} + + Sparseembedding = TaskTypeAmazonSageMaker{"sparse_embedding"} + + Rerank = TaskTypeAmazonSageMaker{"rerank"} +) + +func (t TaskTypeAmazonSageMaker) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAmazonSageMaker) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "completion": + *t = Completion + case "chat_completion": + *t = Chatcompletion + case "sparse_embedding": + *t = Sparseembedding + case "rerank": + *t = Rerank + default: + *t = TaskTypeAmazonSageMaker{string(text)} + } + + return nil +} + +func (t TaskTypeAmazonSageMaker) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go b/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go new file mode 100644 index 0000000000..7c3d6e7dd2 --- /dev/null +++ b/typedapi/types/enums/tasktypeanthropic/tasktypeanthropic.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeanthropic +package tasktypeanthropic + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L56-L58 +type TaskTypeAnthropic struct { + Name string +} + +var ( + Completion = TaskTypeAnthropic{"completion"} +) + +func (t TaskTypeAnthropic) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAnthropic) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "completion": + *t = Completion + default: + *t = TaskTypeAnthropic{string(text)} + } + + return nil +} + +func (t TaskTypeAnthropic) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go b/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go new file mode 100644 index 0000000000..d35f88fdda --- /dev/null +++ b/typedapi/types/enums/tasktypeazureaistudio/tasktypeazureaistudio.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeazureaistudio +package tasktypeazureaistudio + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L60-L63 +type TaskTypeAzureAIStudio struct { + Name string +} + +var ( + Textembedding = TaskTypeAzureAIStudio{"text_embedding"} + + Completion = TaskTypeAzureAIStudio{"completion"} +) + +func (t TaskTypeAzureAIStudio) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAzureAIStudio) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "completion": + *t = Completion + default: + *t = TaskTypeAzureAIStudio{string(text)} + } + + return nil +} + +func (t TaskTypeAzureAIStudio) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go b/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go new file mode 100644 index 0000000000..f371453cff --- /dev/null +++ b/typedapi/types/enums/tasktypeazureopenai/tasktypeazureopenai.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeazureopenai +package tasktypeazureopenai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L65-L68 +type TaskTypeAzureOpenAI struct { + Name string +} + +var ( + Textembedding = TaskTypeAzureOpenAI{"text_embedding"} + + Completion = TaskTypeAzureOpenAI{"completion"} +) + +func (t TaskTypeAzureOpenAI) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeAzureOpenAI) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "completion": + *t = Completion + default: + *t = TaskTypeAzureOpenAI{string(text)} + } + + return nil +} + +func (t TaskTypeAzureOpenAI) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypecohere/tasktypecohere.go b/typedapi/types/enums/tasktypecohere/tasktypecohere.go new file mode 100644 index 0000000000..7b31b5a421 --- /dev/null +++ b/typedapi/types/enums/tasktypecohere/tasktypecohere.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypecohere +package tasktypecohere + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L70-L74 +type TaskTypeCohere struct { + Name string +} + +var ( + Textembedding = TaskTypeCohere{"text_embedding"} + + Rerank = TaskTypeCohere{"rerank"} + + Completion = TaskTypeCohere{"completion"} +) + +func (t TaskTypeCohere) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeCohere) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "rerank": + *t = Rerank + case "completion": + *t = Completion + default: + *t = TaskTypeCohere{string(text)} + } + + return nil +} + +func (t TaskTypeCohere) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypecustom/tasktypecustom.go b/typedapi/types/enums/tasktypecustom/tasktypecustom.go new file mode 100644 index 0000000000..ffea82b461 --- /dev/null +++ b/typedapi/types/enums/tasktypecustom/tasktypecustom.go @@ -0,0 +1,65 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypecustom +package tasktypecustom + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L76-L81 +type TaskTypeCustom struct { + Name string +} + +var ( + Textembedding = TaskTypeCustom{"text_embedding"} + + Sparseembedding = TaskTypeCustom{"sparse_embedding"} + + Rerank = TaskTypeCustom{"rerank"} + + Completion = TaskTypeCustom{"completion"} +) + +func (t TaskTypeCustom) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeCustom) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "sparse_embedding": + *t = Sparseembedding + case "rerank": + *t = Rerank + case "completion": + *t = Completion + default: + *t = TaskTypeCustom{string(text)} + } + + return nil +} + +func (t TaskTypeCustom) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go b/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go new file mode 100644 index 0000000000..fc0cb1c960 --- /dev/null +++ b/typedapi/types/enums/tasktypedeepseek/tasktypedeepseek.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypedeepseek +package tasktypedeepseek + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L83-L86 +type TaskTypeDeepSeek struct { + Name string +} + +var ( + Completion = TaskTypeDeepSeek{"completion"} + + Chatcompletion = TaskTypeDeepSeek{"chat_completion"} +) + +func (t TaskTypeDeepSeek) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeDeepSeek) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "completion": + *t = Completion + case "chat_completion": + *t = Chatcompletion + default: + *t = TaskTypeDeepSeek{string(text)} + } + + return nil +} + +func (t TaskTypeDeepSeek) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go b/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go new file mode 100644 index 0000000000..6f54085437 --- /dev/null +++ b/typedapi/types/enums/tasktypeelasticsearch/tasktypeelasticsearch.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeelasticsearch +package tasktypeelasticsearch + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L88-L92 +type TaskTypeElasticsearch struct { + Name string +} + +var ( + Sparseembedding = TaskTypeElasticsearch{"sparse_embedding"} + + Textembedding = TaskTypeElasticsearch{"text_embedding"} + + Rerank = TaskTypeElasticsearch{"rerank"} +) + +func (t TaskTypeElasticsearch) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeElasticsearch) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "sparse_embedding": + *t = Sparseembedding + case "text_embedding": + *t = Textembedding + case "rerank": + *t = Rerank + default: + *t = TaskTypeElasticsearch{string(text)} + } + + return nil +} + +func (t TaskTypeElasticsearch) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeelser/tasktypeelser.go b/typedapi/types/enums/tasktypeelser/tasktypeelser.go new file mode 100644 index 0000000000..b90d53ddcc --- /dev/null +++ b/typedapi/types/enums/tasktypeelser/tasktypeelser.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeelser +package tasktypeelser + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L94-L96 +type TaskTypeELSER struct { + Name string +} + +var ( + Sparseembedding = TaskTypeELSER{"sparse_embedding"} +) + +func (t TaskTypeELSER) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeELSER) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "sparse_embedding": + *t = Sparseembedding + default: + *t = TaskTypeELSER{string(text)} + } + + return nil +} + +func (t TaskTypeELSER) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go b/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go new file mode 100644 index 0000000000..b45be6d773 --- /dev/null +++ b/typedapi/types/enums/tasktypegoogleaistudio/tasktypegoogleaistudio.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypegoogleaistudio +package tasktypegoogleaistudio + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L98-L101 +type TaskTypeGoogleAIStudio struct { + Name string +} + +var ( + Textembedding = TaskTypeGoogleAIStudio{"text_embedding"} + + Completion = TaskTypeGoogleAIStudio{"completion"} +) + +func (t TaskTypeGoogleAIStudio) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeGoogleAIStudio) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "completion": + *t = Completion + default: + *t = TaskTypeGoogleAIStudio{string(text)} + } + + return nil +} + +func (t TaskTypeGoogleAIStudio) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go b/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go new file mode 100644 index 0000000000..875e3e0e6d --- /dev/null +++ b/typedapi/types/enums/tasktypegooglevertexai/tasktypegooglevertexai.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypegooglevertexai +package tasktypegooglevertexai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L103-L106 +type TaskTypeGoogleVertexAI struct { + Name string +} + +var ( + Textembedding = TaskTypeGoogleVertexAI{"text_embedding"} + + Rerank = TaskTypeGoogleVertexAI{"rerank"} +) + +func (t TaskTypeGoogleVertexAI) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeGoogleVertexAI) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "rerank": + *t = Rerank + default: + *t = TaskTypeGoogleVertexAI{string(text)} + } + + return nil +} + +func (t TaskTypeGoogleVertexAI) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go b/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go new file mode 100644 index 0000000000..715a58854a --- /dev/null +++ b/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypehuggingface +package tasktypehuggingface + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L108-L110 +type TaskTypeHuggingFace struct { + Name string +} + +var ( + Textembedding = TaskTypeHuggingFace{"text_embedding"} +) + +func (t TaskTypeHuggingFace) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeHuggingFace) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + default: + *t = TaskTypeHuggingFace{string(text)} + } + + return nil +} + +func (t TaskTypeHuggingFace) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go b/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go new file mode 100644 index 0000000000..ac104bbd17 --- /dev/null +++ b/typedapi/types/enums/tasktypejinaai/tasktypejinaai.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypejinaai +package tasktypejinaai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L31-L34 +type TaskTypeJinaAi struct { + Name string +} + +var ( + Textembedding = TaskTypeJinaAi{"text_embedding"} + + Rerank = TaskTypeJinaAi{"rerank"} +) + +func (t TaskTypeJinaAi) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeJinaAi) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "rerank": + *t = Rerank + default: + *t = TaskTypeJinaAi{string(text)} + } + + return nil +} + +func (t TaskTypeJinaAi) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypemistral/tasktypemistral.go b/typedapi/types/enums/tasktypemistral/tasktypemistral.go new file mode 100644 index 0000000000..48bdbe1661 --- /dev/null +++ b/typedapi/types/enums/tasktypemistral/tasktypemistral.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypemistral +package tasktypemistral + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L112-L114 +type TaskTypeMistral struct { + Name string +} + +var ( + Textembedding = TaskTypeMistral{"text_embedding"} +) + +func (t TaskTypeMistral) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeMistral) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + default: + *t = TaskTypeMistral{string(text)} + } + + return nil +} + +func (t TaskTypeMistral) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go b/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go new file mode 100644 index 0000000000..4da58a5e0c --- /dev/null +++ b/typedapi/types/enums/tasktypeopenai/tasktypeopenai.go @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypeopenai +package tasktypeopenai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L116-L120 +type TaskTypeOpenAI struct { + Name string +} + +var ( + Textembedding = TaskTypeOpenAI{"text_embedding"} + + Chatcompletion = TaskTypeOpenAI{"chat_completion"} + + Completion = TaskTypeOpenAI{"completion"} +) + +func (t TaskTypeOpenAI) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeOpenAI) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion + default: + *t = TaskTypeOpenAI{string(text)} + } + + return nil +} + +func (t TaskTypeOpenAI) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go b/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go new file mode 100644 index 0000000000..63e383ac6b --- /dev/null +++ b/typedapi/types/enums/tasktypevoyageai/tasktypevoyageai.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypevoyageai +package tasktypevoyageai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L122-L125 +type TaskTypeVoyageAI struct { + Name string +} + +var ( + Textembedding = TaskTypeVoyageAI{"text_embedding"} + + Rerank = TaskTypeVoyageAI{"rerank"} +) + +func (t TaskTypeVoyageAI) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeVoyageAI) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + case "rerank": + *t = Rerank + default: + *t = TaskTypeVoyageAI{string(text)} + } + + return nil +} + +func (t TaskTypeVoyageAI) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go b/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go new file mode 100644 index 0000000000..5cbc5c9af7 --- /dev/null +++ b/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.go @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tasktypewatsonx +package tasktypewatsonx + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/TaskType.ts#L127-L129 +type TaskTypeWatsonx struct { + Name string +} + +var ( + Textembedding = TaskTypeWatsonx{"text_embedding"} +) + +func (t TaskTypeWatsonx) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TaskTypeWatsonx) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "text_embedding": + *t = Textembedding + default: + *t = TaskTypeWatsonx{string(text)} + } + + return nil +} + +func (t TaskTypeWatsonx) String() string { + return t.Name +} diff --git a/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go b/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go new file mode 100644 index 0000000000..c3c0b9640d --- /dev/null +++ b/typedapi/types/enums/tdigestexecutionhint/tdigestexecutionhint.go @@ -0,0 +1,57 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +// Package tdigestexecutionhint +package tdigestexecutionhint + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L257-L260 +type TDigestExecutionHint struct { + Name string +} + +var ( + Default = TDigestExecutionHint{"default"} + + Highaccuracy = TDigestExecutionHint{"high_accuracy"} +) + +func (t TDigestExecutionHint) MarshalText() (text []byte, err error) { + return []byte(t.String()), nil +} + +func (t *TDigestExecutionHint) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "default": + *t = Default + case "high_accuracy": + *t = Highaccuracy + default: + *t = TDigestExecutionHint{string(text)} + } + + return nil +} + +func (t TDigestExecutionHint) String() string { + return t.Name +} diff --git a/typedapi/types/enums/templateformat/templateformat.go b/typedapi/types/enums/templateformat/templateformat.go index 48753ec1d3..9287185560 100644 --- a/typedapi/types/enums/templateformat/templateformat.go +++ b/typedapi/types/enums/templateformat/templateformat.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package templateformat package templateformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleTemplate.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleTemplate.ts#L22-L25 type TemplateFormat struct { Name string } diff --git a/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go b/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go index 47af1db7cc..59510d6f36 100644 --- a/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go +++ b/typedapi/types/enums/termsaggregationcollectmode/termsaggregationcollectmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package termsaggregationcollectmode package termsaggregationcollectmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1056-L1065 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1056-L1065 type TermsAggregationCollectMode struct { Name string } diff --git a/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go b/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go index 321ee00aaf..7ed5466a9f 100644 --- a/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go +++ b/typedapi/types/enums/termsaggregationexecutionhint/termsaggregationexecutionhint.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package termsaggregationexecutionhint package termsaggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1067-L1072 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1067-L1072 type TermsAggregationExecutionHint struct { Name string } diff --git a/typedapi/types/enums/termvectoroption/termvectoroption.go b/typedapi/types/enums/termvectoroption/termvectoroption.go index 6e2946f20c..a3ff997357 100644 --- a/typedapi/types/enums/termvectoroption/termvectoroption.go +++ b/typedapi/types/enums/termvectoroption/termvectoroption.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package termvectoroption package termvectoroption import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/TermVectorOption.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/TermVectorOption.ts#L20-L28 type TermVectorOption struct { Name string } diff --git a/typedapi/types/enums/textquerytype/textquerytype.go b/typedapi/types/enums/textquerytype/textquerytype.go index e2e0e9a132..e853c2753b 100644 --- a/typedapi/types/enums/textquerytype/textquerytype.go +++ b/typedapi/types/enums/textquerytype/textquerytype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package textquerytype package textquerytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L559-L585 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L610-L636 type TextQueryType struct { Name string } diff --git a/typedapi/types/enums/threadtype/threadtype.go b/typedapi/types/enums/threadtype/threadtype.go index 457e65c14c..a8be8ad89b 100644 --- a/typedapi/types/enums/threadtype/threadtype.go +++ b/typedapi/types/enums/threadtype/threadtype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package threadtype package threadtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L301-L307 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L303-L309 type ThreadType struct { Name string } diff --git a/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go b/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go index 96b1027be5..173c9d8cdb 100644 --- a/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go +++ b/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package timeseriesmetrictype package timeseriesmetrictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/TimeSeriesMetricType.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/TimeSeriesMetricType.ts#L20-L26 type TimeSeriesMetricType struct { Name string } diff --git a/typedapi/types/enums/timeunit/timeunit.go b/typedapi/types/enums/timeunit/timeunit.go index 667a22a1c0..b5cf019fd4 100644 --- a/typedapi/types/enums/timeunit/timeunit.go +++ b/typedapi/types/enums/timeunit/timeunit.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package timeunit package timeunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L69-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L69-L77 type TimeUnit struct { Name string } diff --git a/typedapi/types/enums/tokenchar/tokenchar.go b/typedapi/types/enums/tokenchar/tokenchar.go index 4d92aa37b5..5070067943 100644 --- a/typedapi/types/enums/tokenchar/tokenchar.go +++ b/typedapi/types/enums/tokenchar/tokenchar.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package tokenchar package tokenchar import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L59-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L60-L67 type TokenChar struct { Name string } diff --git a/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go b/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go index 94df137cd5..a15f207196 100644 --- a/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go +++ b/typedapi/types/enums/tokenizationtruncate/tokenizationtruncate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package tokenizationtruncate package tokenizationtruncate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L369-L373 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L369-L373 type TokenizationTruncate struct { Name string } diff --git a/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go b/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go index 2680d4af9c..9e71d62f98 100644 --- a/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go +++ b/typedapi/types/enums/totalhitsrelation/totalhitsrelation.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package totalhitsrelation package totalhitsrelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L101-L106 type TotalHitsRelation struct { Name string } diff --git a/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go b/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go index f8889e191b..b2a1fddd7d 100644 --- a/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go +++ b/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package trainedmodeltype package trainedmodeltype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L315-L329 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L315-L329 type TrainedModelType struct { Name string } diff --git a/typedapi/types/enums/trainingpriority/trainingpriority.go b/typedapi/types/enums/trainingpriority/trainingpriority.go index ac9ee6e0be..8a96f67468 100644 --- a/typedapi/types/enums/trainingpriority/trainingpriority.go +++ b/typedapi/types/enums/trainingpriority/trainingpriority.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package trainingpriority package trainingpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L365-L368 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L365-L368 type TrainingPriority struct { Name string } diff --git a/typedapi/types/enums/translogdurability/translogdurability.go b/typedapi/types/enums/translogdurability/translogdurability.go index fe9db03321..bde4a00dbb 100644 --- a/typedapi/types/enums/translogdurability/translogdurability.go +++ b/typedapi/types/enums/translogdurability/translogdurability.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package translogdurability package translogdurability import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L379-L394 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L379-L394 type TranslogDurability struct { Name string } diff --git a/typedapi/types/enums/ttesttype/ttesttype.go b/typedapi/types/enums/ttesttype/ttesttype.go index 448932a1eb..f5d83672bc 100644 --- a/typedapi/types/enums/ttesttype/ttesttype.go +++ b/typedapi/types/enums/ttesttype/ttesttype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package ttesttype package ttesttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L331-L344 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L354-L367 type TTestType struct { Name string } diff --git a/typedapi/types/enums/type_/type_.go b/typedapi/types/enums/type_/type_.go index 1f4504fcb4..7de508343a 100644 --- a/typedapi/types/enums/type_/type_.go +++ b/typedapi/types/enums/type_/type_.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package type_ package type_ import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/_types/types.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/_types/types.ts#L20-L24 type Type struct { Name string } diff --git a/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go b/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go index c7e507abed..2dfa8a0bee 100644 --- a/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go +++ b/typedapi/types/enums/unassignedinformationreason/unassignedinformationreason.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package unassignedinformationreason package unassignedinformationreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L138-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L138-L157 type UnassignedInformationReason struct { Name string } diff --git a/typedapi/types/enums/useragentproperty/useragentproperty.go b/typedapi/types/enums/useragentproperty/useragentproperty.go index 700bb4d9c1..3c99b4431f 100644 --- a/typedapi/types/enums/useragentproperty/useragentproperty.go +++ b/typedapi/types/enums/useragentproperty/useragentproperty.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package useragentproperty package useragentproperty import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L547-L553 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L547-L553 type UserAgentProperty struct { Name string } diff --git a/typedapi/types/enums/valuetype/valuetype.go b/typedapi/types/enums/valuetype/valuetype.go index f32d93fe6e..8d2e586b85 100644 --- a/typedapi/types/enums/valuetype/valuetype.go +++ b/typedapi/types/enums/valuetype/valuetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package valuetype package valuetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L436-L447 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L459-L470 type ValueType struct { Name string } diff --git a/typedapi/types/enums/versiontype/versiontype.go b/typedapi/types/enums/versiontype/versiontype.go index 94add5347d..e85ef0a0e4 100644 --- a/typedapi/types/enums/versiontype/versiontype.go +++ b/typedapi/types/enums/versiontype/versiontype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package versiontype package versiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L107-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L107-L126 type VersionType struct { Name string } diff --git a/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go b/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go index 08bd70c19b..e96be99da2 100644 --- a/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go +++ b/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package voyageaiservicetype package voyageaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1139-L1141 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1680-L1682 type VoyageAIServiceType struct { Name string } diff --git a/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go b/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go index 04ec23eb01..a1bf3acda0 100644 --- a/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go +++ b/typedapi/types/enums/voyageaitasktype/voyageaitasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package voyageaitasktype package voyageaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1134-L1137 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1675-L1678 type VoyageAITaskType struct { Name string } diff --git a/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go b/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go index fa047b4c5e..f80b1bbd0a 100644 --- a/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go +++ b/typedapi/types/enums/waitforactiveshardoptions/waitforactiveshardoptions.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package waitforactiveshardoptions package waitforactiveshardoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L309-L313 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L311-L315 type WaitForActiveShardOptions struct { Name string } diff --git a/typedapi/types/enums/waitforevents/waitforevents.go b/typedapi/types/enums/waitforevents/waitforevents.go index 6f55a9f7f3..548d46cf88 100644 --- a/typedapi/types/enums/waitforevents/waitforevents.go +++ b/typedapi/types/enums/waitforevents/waitforevents.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package waitforevents package waitforevents import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L315-L322 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L317-L324 type WaitForEvents struct { Name string } diff --git a/typedapi/types/enums/watchermetric/watchermetric.go b/typedapi/types/enums/watchermetric/watchermetric.go index bcaf35066c..b5fa7a46c2 100644 --- a/typedapi/types/enums/watchermetric/watchermetric.go +++ b/typedapi/types/enums/watchermetric/watchermetric.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package watchermetric package watchermetric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stats/types.ts#L63-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stats/types.ts#L63-L69 type WatcherMetric struct { Name string } diff --git a/typedapi/types/enums/watcherstate/watcherstate.go b/typedapi/types/enums/watcherstate/watcherstate.go index 3dac4edc17..a6a23a7800 100644 --- a/typedapi/types/enums/watcherstate/watcherstate.go +++ b/typedapi/types/enums/watcherstate/watcherstate.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package watcherstate package watcherstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stats/types.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stats/types.ts#L26-L31 type WatcherState struct { Name string } diff --git a/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go b/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go index 10b751e873..b281d473c8 100644 --- a/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go +++ b/typedapi/types/enums/watsonxservicetype/watsonxservicetype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package watsonxservicetype package watsonxservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1186-L1188 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1727-L1729 type WatsonxServiceType struct { Name string } diff --git a/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go b/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go index 026ebc18b9..2f9c27c224 100644 --- a/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go +++ b/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package watsonxtasktype package watsonxtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1182-L1184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1723-L1725 type WatsonxTaskType struct { Name string } diff --git a/typedapi/types/enums/xpackcategory/xpackcategory.go b/typedapi/types/enums/xpackcategory/xpackcategory.go index 75f9ab8e01..bd4a45969c 100644 --- a/typedapi/types/enums/xpackcategory/xpackcategory.go +++ b/typedapi/types/enums/xpackcategory/xpackcategory.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package xpackcategory package xpackcategory import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/XPackInfoRequest.ts#L58-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/XPackInfoRequest.ts#L58-L62 type XPackCategory struct { Name string } diff --git a/typedapi/types/enums/zerotermsquery/zerotermsquery.go b/typedapi/types/enums/zerotermsquery/zerotermsquery.go index b1152893af..8612ea71c7 100644 --- a/typedapi/types/enums/zerotermsquery/zerotermsquery.go +++ b/typedapi/types/enums/zerotermsquery/zerotermsquery.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Package zerotermsquery package zerotermsquery import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L587-L596 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L638-L647 type ZeroTermsQuery struct { Name string } diff --git a/typedapi/types/epochtimeunitmillis.go b/typedapi/types/epochtimeunitmillis.go index 465c0e537d..a0d4f986e7 100644 --- a/typedapi/types/epochtimeunitmillis.go +++ b/typedapi/types/epochtimeunitmillis.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EpochTimeUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L40-L40 type EpochTimeUnitMillis int64 - -type EpochTimeUnitMillisVariant interface { - EpochTimeUnitMillisCaster() *EpochTimeUnitMillis -} diff --git a/typedapi/types/epochtimeunitseconds.go b/typedapi/types/epochtimeunitseconds.go index a94b0522b7..237cb436cd 100644 --- a/typedapi/types/epochtimeunitseconds.go +++ b/typedapi/types/epochtimeunitseconds.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EpochTimeUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Time.ts#L40-L40 type EpochTimeUnitSeconds int64 - -type EpochTimeUnitSecondsVariant interface { - EpochTimeUnitSecondsCaster() *EpochTimeUnitSeconds -} diff --git a/typedapi/types/eql.go b/typedapi/types/eql.go index fb60f205bd..81fd59587a 100644 --- a/typedapi/types/eql.go +++ b/typedapi/types/eql.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Eql type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L361-L364 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L361-L364 type Eql struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -108,5 +108,3 @@ func NewEql() *Eql { return r } - -// false diff --git a/typedapi/types/eqlfeatures.go b/typedapi/types/eqlfeatures.go index 99c8beb0be..1c0e28f720 100644 --- a/typedapi/types/eqlfeatures.go +++ b/typedapi/types/eqlfeatures.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EqlFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L96-L104 type EqlFeatures struct { Event uint `json:"event"` Join uint `json:"join"` @@ -39,5 +39,3 @@ func NewEqlFeatures() *EqlFeatures { return r } - -// false diff --git a/typedapi/types/eqlfeaturesjoin.go b/typedapi/types/eqlfeaturesjoin.go index 99e6e6de4e..00595e2229 100644 --- a/typedapi/types/eqlfeaturesjoin.go +++ b/typedapi/types/eqlfeaturesjoin.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EqlFeaturesJoin type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L106-L112 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L106-L112 type EqlFeaturesJoin struct { JoinQueriesFiveOrMore uint `json:"join_queries_five_or_more"` JoinQueriesFour uint `json:"join_queries_four"` @@ -37,5 +37,3 @@ func NewEqlFeaturesJoin() *EqlFeaturesJoin { return r } - -// false diff --git a/typedapi/types/eqlfeatureskeys.go b/typedapi/types/eqlfeatureskeys.go index 7e64f184c5..3eb1420ca6 100644 --- a/typedapi/types/eqlfeatureskeys.go +++ b/typedapi/types/eqlfeatureskeys.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EqlFeaturesKeys type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L114-L120 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L114-L120 type EqlFeaturesKeys struct { JoinKeysFiveOrMore uint `json:"join_keys_five_or_more"` JoinKeysFour uint `json:"join_keys_four"` @@ -37,5 +37,3 @@ func NewEqlFeaturesKeys() *EqlFeaturesKeys { return r } - -// false diff --git a/typedapi/types/eqlfeaturespipes.go b/typedapi/types/eqlfeaturespipes.go index 0e4b60266e..d0f6daa341 100644 --- a/typedapi/types/eqlfeaturespipes.go +++ b/typedapi/types/eqlfeaturespipes.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EqlFeaturesPipes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L122-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L122-L125 type EqlFeaturesPipes struct { PipeHead uint `json:"pipe_head"` PipeTail uint `json:"pipe_tail"` @@ -34,5 +34,3 @@ func NewEqlFeaturesPipes() *EqlFeaturesPipes { return r } - -// false diff --git a/typedapi/types/eqlfeaturessequences.go b/typedapi/types/eqlfeaturessequences.go index 172eefc9e3..bdc5c410dc 100644 --- a/typedapi/types/eqlfeaturessequences.go +++ b/typedapi/types/eqlfeaturessequences.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EqlFeaturesSequences type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L127-L134 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L127-L134 type EqlFeaturesSequences struct { SequenceMaxspan uint `json:"sequence_maxspan"` SequenceQueriesFiveOrMore uint `json:"sequence_queries_five_or_more"` @@ -38,5 +38,3 @@ func NewEqlFeaturesSequences() *EqlFeaturesSequences { return r } - -// false diff --git a/typedapi/types/eqlhits.go b/typedapi/types/eqlhits.go index 85ee87be76..f630d4317c 100644 --- a/typedapi/types/eqlhits.go +++ b/typedapi/types/eqlhits.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // EqlHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/_types/EqlHits.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/_types/EqlHits.ts#L25-L39 type EqlHits struct { // Events Contains events matching the query. Each object represents a matching event. Events []HitsEvent `json:"events,omitempty"` @@ -40,5 +40,3 @@ func NewEqlHits() *EqlHits { return r } - -// false diff --git a/typedapi/types/errorcause.go b/typedapi/types/errorcause.go index 1e480cf411..ddb4b595ff 100644 --- a/typedapi/types/errorcause.go +++ b/typedapi/types/errorcause.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ErrorCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Errors.ts#L25-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Errors.ts#L25-L50 type ErrorCause struct { CausedBy *ErrorCause `json:"caused_by,omitempty"` Metadata map[string]json.RawMessage `json:"-"` @@ -173,5 +173,3 @@ func NewErrorCause() *ErrorCause { return r } - -// false diff --git a/typedapi/types/errorresponsebase.go b/typedapi/types/errorresponsebase.go index 1a0a5a174e..5b010c5da6 100644 --- a/typedapi/types/errorresponsebase.go +++ b/typedapi/types/errorresponsebase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ErrorResponseBase type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Base.ts#L127-L136 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Base.ts#L130-L139 type ErrorResponseBase struct { Error ErrorCause `json:"error"` Status int `json:"status"` @@ -84,5 +84,3 @@ func NewErrorResponseBase() *ErrorResponseBase { return r } - -// false diff --git a/typedapi/types/esqlclusterdetails.go b/typedapi/types/esqlclusterdetails.go new file mode 100644 index 0000000000..767bcc25df --- /dev/null +++ b/typedapi/types/esqlclusterdetails.go @@ -0,0 +1,96 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/esqlclusterstatus" +) + +// EsqlClusterDetails type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/EsqlResult.ts#L75-L80 +type EsqlClusterDetails struct { + Indices string `json:"indices"` + Shards_ *EsqlShardInfo `json:"_shards,omitempty"` + Status esqlclusterstatus.EsqlClusterStatus `json:"status"` + Took *int64 `json:"took,omitempty"` +} + +func (s *EsqlClusterDetails) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "indices": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Indices", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Indices = o + + case "_shards": + if err := dec.Decode(&s.Shards_); err != nil { + return fmt.Errorf("%s | %w", "Shards_", err) + } + + case "status": + if err := dec.Decode(&s.Status); err != nil { + return fmt.Errorf("%s | %w", "Status", err) + } + + case "took": + if err := dec.Decode(&s.Took); err != nil { + return fmt.Errorf("%s | %w", "Took", err) + } + + } + } + return nil +} + +// NewEsqlClusterDetails returns a EsqlClusterDetails. +func NewEsqlClusterDetails() *EsqlClusterDetails { + r := &EsqlClusterDetails{} + + return r +} diff --git a/typedapi/types/esqlclusterinfo.go b/typedapi/types/esqlclusterinfo.go new file mode 100644 index 0000000000..52b2e8f5e4 --- /dev/null +++ b/typedapi/types/esqlclusterinfo.go @@ -0,0 +1,176 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// EsqlClusterInfo type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/EsqlResult.ts#L65-L73 +type EsqlClusterInfo struct { + Details map[string]EsqlClusterDetails `json:"details"` + Failed int `json:"failed"` + Partial int `json:"partial"` + Running int `json:"running"` + Skipped int `json:"skipped"` + Successful int `json:"successful"` + Total int `json:"total"` +} + +func (s *EsqlClusterInfo) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "details": + if s.Details == nil { + s.Details = make(map[string]EsqlClusterDetails, 0) + } + if err := dec.Decode(&s.Details); err != nil { + return fmt.Errorf("%s | %w", "Details", err) + } + + case "failed": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Failed", err) + } + s.Failed = value + case float64: + f := int(v) + s.Failed = f + } + + case "partial": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Partial", err) + } + s.Partial = value + case float64: + f := int(v) + s.Partial = f + } + + case "running": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Running", err) + } + s.Running = value + case float64: + f := int(v) + s.Running = f + } + + case "skipped": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Skipped", err) + } + s.Skipped = value + case float64: + f := int(v) + s.Skipped = f + } + + case "successful": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Successful", err) + } + s.Successful = value + case float64: + f := int(v) + s.Successful = f + } + + case "total": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + s.Total = value + case float64: + f := int(v) + s.Total = f + } + + } + } + return nil +} + +// NewEsqlClusterInfo returns a EsqlClusterInfo. +func NewEsqlClusterInfo() *EsqlClusterInfo { + r := &EsqlClusterInfo{ + Details: make(map[string]EsqlClusterDetails), + } + + return r +} diff --git a/typedapi/types/nodeinfonetworkinterface.go b/typedapi/types/esqlcolumninfo.go similarity index 63% rename from typedapi/types/nodeinfonetworkinterface.go rename to typedapi/types/esqlcolumninfo.go index 2d8e365838..843a84d16f 100644 --- a/typedapi/types/nodeinfonetworkinterface.go +++ b/typedapi/types/esqlcolumninfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,16 +29,15 @@ import ( "strconv" ) -// NodeInfoNetworkInterface type. +// EsqlColumnInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L341-L345 -type NodeInfoNetworkInterface struct { - Address string `json:"address"` - MacAddress string `json:"mac_address"` - Name string `json:"name"` +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/EsqlResult.ts#L60-L63 +type EsqlColumnInfo struct { + Name string `json:"name"` + Type string `json:"type"` } -func (s *NodeInfoNetworkInterface) UnmarshalJSON(data []byte) error { +func (s *EsqlColumnInfo) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -53,45 +52,38 @@ func (s *NodeInfoNetworkInterface) UnmarshalJSON(data []byte) error { switch t { - case "address": + case "name": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Address", err) + return fmt.Errorf("%s | %w", "Name", err) } o := string(tmp[:]) o, err = strconv.Unquote(o) if err != nil { o = string(tmp[:]) } - s.Address = o + s.Name = o - case "mac_address": + case "type": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "MacAddress", err) + return fmt.Errorf("%s | %w", "Type", err) } o := string(tmp[:]) o, err = strconv.Unquote(o) if err != nil { o = string(tmp[:]) } - s.MacAddress = o - - case "name": - if err := dec.Decode(&s.Name); err != nil { - return fmt.Errorf("%s | %w", "Name", err) - } + s.Type = o } } return nil } -// NewNodeInfoNetworkInterface returns a NodeInfoNetworkInterface. -func NewNodeInfoNetworkInterface() *NodeInfoNetworkInterface { - r := &NodeInfoNetworkInterface{} +// NewEsqlColumnInfo returns a EsqlColumnInfo. +func NewEsqlColumnInfo() *EsqlColumnInfo { + r := &EsqlColumnInfo{} return r } - -// false diff --git a/typedapi/types/esqlshardfailure.go b/typedapi/types/esqlshardfailure.go new file mode 100644 index 0000000000..e690bf22d5 --- /dev/null +++ b/typedapi/types/esqlshardfailure.go @@ -0,0 +1,86 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// EsqlShardFailure type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/EsqlResult.ts#L98-L103 +type EsqlShardFailure struct { + Index string `json:"index"` + Node *string `json:"node,omitempty"` + Reason ErrorCause `json:"reason"` + Shard string `json:"shard"` +} + +func (s *EsqlShardFailure) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "index": + if err := dec.Decode(&s.Index); err != nil { + return fmt.Errorf("%s | %w", "Index", err) + } + + case "node": + if err := dec.Decode(&s.Node); err != nil { + return fmt.Errorf("%s | %w", "Node", err) + } + + case "reason": + if err := dec.Decode(&s.Reason); err != nil { + return fmt.Errorf("%s | %w", "Reason", err) + } + + case "shard": + if err := dec.Decode(&s.Shard); err != nil { + return fmt.Errorf("%s | %w", "Shard", err) + } + + } + } + return nil +} + +// NewEsqlShardFailure returns a EsqlShardFailure. +func NewEsqlShardFailure() *EsqlShardFailure { + r := &EsqlShardFailure{} + + return r +} diff --git a/typedapi/types/esqlshardinfo.go b/typedapi/types/esqlshardinfo.go new file mode 100644 index 0000000000..02d54176d6 --- /dev/null +++ b/typedapi/types/esqlshardinfo.go @@ -0,0 +1,137 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// EsqlShardInfo type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/EsqlResult.ts#L90-L96 +type EsqlShardInfo struct { + Failed *int `json:"failed,omitempty"` + Failures []EsqlShardFailure `json:"failures,omitempty"` + Skipped *int `json:"skipped,omitempty"` + Successful *int `json:"successful,omitempty"` + Total int `json:"total"` +} + +func (s *EsqlShardInfo) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "failed": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Failed", err) + } + s.Failed = &value + case float64: + f := int(v) + s.Failed = &f + } + + case "failures": + if err := dec.Decode(&s.Failures); err != nil { + return fmt.Errorf("%s | %w", "Failures", err) + } + + case "skipped": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Skipped", err) + } + s.Skipped = &value + case float64: + f := int(v) + s.Skipped = &f + } + + case "successful": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Successful", err) + } + s.Successful = &value + case float64: + f := int(v) + s.Successful = &f + } + + case "total": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + s.Total = value + case float64: + f := int(v) + s.Total = f + } + + } + } + return nil +} + +// NewEsqlShardInfo returns a EsqlShardInfo. +func NewEsqlShardInfo() *EsqlShardInfo { + r := &EsqlShardInfo{} + + return r +} diff --git a/typedapi/types/estoniananalyzer.go b/typedapi/types/estoniananalyzer.go index 8c9168868d..58e45ad74a 100644 --- a/typedapi/types/estoniananalyzer.go +++ b/typedapi/types/estoniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // EstonianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L139-L143 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L139-L143 type EstonianAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *EstonianAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *EstonianAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewEstonianAnalyzer() *EstonianAnalyzer { return r } - -// true - -type EstonianAnalyzerVariant interface { - EstonianAnalyzerCaster() *EstonianAnalyzer -} - -func (s *EstonianAnalyzer) EstonianAnalyzerCaster() *EstonianAnalyzer { - return s -} diff --git a/typedapi/types/eventdatastream.go b/typedapi/types/eventdatastream.go index a8dc80e6c8..40b545d899 100644 --- a/typedapi/types/eventdatastream.go +++ b/typedapi/types/eventdatastream.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // EventDataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 type EventDataStream struct { Name string `json:"name"` } @@ -66,5 +66,3 @@ func NewEventDataStream() *EventDataStream { return r } - -// false diff --git a/typedapi/types/ewmamodelsettings.go b/typedapi/types/ewmamodelsettings.go index 19b9a5c245..018667330b 100644 --- a/typedapi/types/ewmamodelsettings.go +++ b/typedapi/types/ewmamodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // EwmaModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L293-L295 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L293-L295 type EwmaModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` } @@ -78,13 +78,3 @@ func NewEwmaModelSettings() *EwmaModelSettings { return r } - -// true - -type EwmaModelSettingsVariant interface { - EwmaModelSettingsCaster() *EwmaModelSettings -} - -func (s *EwmaModelSettings) EwmaModelSettingsCaster() *EwmaModelSettings { - return s -} diff --git a/typedapi/types/ewmamovingaverageaggregation.go b/typedapi/types/ewmamovingaverageaggregation.go index d3ee410932..2f0595f698 100644 --- a/typedapi/types/ewmamovingaverageaggregation.go +++ b/typedapi/types/ewmamovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // EwmaMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L278-L281 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L278-L281 type EwmaMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -173,13 +173,3 @@ func NewEwmaMovingAverageAggregation() *EwmaMovingAverageAggregation { return r } - -// true - -type EwmaMovingAverageAggregationVariant interface { - EwmaMovingAverageAggregationCaster() *EwmaMovingAverageAggregation -} - -func (s *EwmaMovingAverageAggregation) EwmaMovingAverageAggregationCaster() *EwmaMovingAverageAggregation { - return s -} diff --git a/typedapi/types/executeenrichpolicystatus.go b/typedapi/types/executeenrichpolicystatus.go index 2805aa3591..28b75276d8 100644 --- a/typedapi/types/executeenrichpolicystatus.go +++ b/typedapi/types/executeenrichpolicystatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ExecuteEnrichPolicyStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/execute_policy/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/execute_policy/types.ts#L20-L23 type ExecuteEnrichPolicyStatus struct { Phase enrichpolicyphase.EnrichPolicyPhase `json:"phase"` Step *string `json:"step,omitempty"` @@ -82,5 +82,3 @@ func NewExecuteEnrichPolicyStatus() *ExecuteEnrichPolicyStatus { return r } - -// false diff --git a/typedapi/types/executingpolicy.go b/typedapi/types/executingpolicy.go index a0cbb5cfae..ddc93a76e6 100644 --- a/typedapi/types/executingpolicy.go +++ b/typedapi/types/executingpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ExecutingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/stats/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/stats/types.ts#L25-L28 type ExecutingPolicy struct { Name string `json:"name"` Task TaskInfo `json:"task"` @@ -72,5 +72,3 @@ func NewExecutingPolicy() *ExecutingPolicy { return r } - -// false diff --git a/typedapi/types/executionresult.go b/typedapi/types/executionresult.go index 8711f5355b..6f7f380666 100644 --- a/typedapi/types/executionresult.go +++ b/typedapi/types/executionresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ExecutionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L60-L66 type ExecutionResult struct { Actions []ExecutionResultAction `json:"actions"` Condition ExecutionResultCondition `json:"condition"` @@ -90,5 +90,3 @@ func NewExecutionResult() *ExecutionResult { return r } - -// false diff --git a/typedapi/types/executionresultaction.go b/typedapi/types/executionresultaction.go index cb488a6c30..5a389e8c62 100644 --- a/typedapi/types/executionresultaction.go +++ b/typedapi/types/executionresultaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // ExecutionResultAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L74-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L74-L86 type ExecutionResultAction struct { Email *EmailResult `json:"email,omitempty"` Error *ErrorCause `json:"error,omitempty"` @@ -137,5 +137,3 @@ func NewExecutionResultAction() *ExecutionResultAction { return r } - -// false diff --git a/typedapi/types/executionresultcondition.go b/typedapi/types/executionresultcondition.go index bfd300791b..8ef32e7824 100644 --- a/typedapi/types/executionresultcondition.go +++ b/typedapi/types/executionresultcondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // ExecutionResultCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L68-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L68-L72 type ExecutionResultCondition struct { Met bool `json:"met"` Status actionstatusoptions.ActionStatusOptions `json:"status"` @@ -91,5 +91,3 @@ func NewExecutionResultCondition() *ExecutionResultCondition { return r } - -// false diff --git a/typedapi/types/executionresultinput.go b/typedapi/types/executionresultinput.go index 25bd957b77..44bed6fd8e 100644 --- a/typedapi/types/executionresultinput.go +++ b/typedapi/types/executionresultinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // ExecutionResultInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L88-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L88-L92 type ExecutionResultInput struct { Payload map[string]json.RawMessage `json:"payload"` Status actionstatusoptions.ActionStatusOptions `json:"status"` @@ -44,5 +44,3 @@ func NewExecutionResultInput() *ExecutionResultInput { return r } - -// false diff --git a/typedapi/types/executionstate.go b/typedapi/types/executionstate.go index 9621d41528..7f1e9f3915 100644 --- a/typedapi/types/executionstate.go +++ b/typedapi/types/executionstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExecutionState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L114-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L114-L118 type ExecutionState struct { Reason *string `json:"reason,omitempty"` Successful bool `json:"successful"` @@ -95,13 +95,3 @@ func NewExecutionState() *ExecutionState { return r } - -// true - -type ExecutionStateVariant interface { - ExecutionStateCaster() *ExecutionState -} - -func (s *ExecutionState) ExecutionStateCaster() *ExecutionState { - return s -} diff --git a/typedapi/types/executionthreadpool.go b/typedapi/types/executionthreadpool.go index 606ef2c93a..2094d8a3ac 100644 --- a/typedapi/types/executionthreadpool.go +++ b/typedapi/types/executionthreadpool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExecutionThreadPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Execution.ts#L94-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Execution.ts#L94-L103 type ExecutionThreadPool struct { // MaxSize The largest size of the execution thread pool, which indicates the largest // number of concurrent running watches. @@ -96,5 +96,3 @@ func NewExecutionThreadPool() *ExecutionThreadPool { return r } - -// false diff --git a/typedapi/types/existsquery.go b/typedapi/types/existsquery.go index 47443c9a12..f096e2465c 100644 --- a/typedapi/types/existsquery.go +++ b/typedapi/types/existsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExistsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L38-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L38-L46 type ExistsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -103,13 +103,3 @@ func NewExistsQuery() *ExistsQuery { return r } - -// true - -type ExistsQueryVariant interface { - ExistsQueryCaster() *ExistsQuery -} - -func (s *ExistsQuery) ExistsQueryCaster() *ExistsQuery { - return s -} diff --git a/typedapi/types/expandwildcards.go b/typedapi/types/expandwildcards.go index 5db5e27b13..bd014382b1 100644 --- a/typedapi/types/expandwildcards.go +++ b/typedapi/types/expandwildcards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,9 +26,5 @@ import ( // ExpandWildcards type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L221-L221 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L221-L221 type ExpandWildcards []expandwildcard.ExpandWildcard - -type ExpandWildcardsVariant interface { - ExpandWildcardsCaster() *ExpandWildcards -} diff --git a/typedapi/types/explainanalyzetoken.go b/typedapi/types/explainanalyzetoken.go index 0c04fc1bf9..949af8f3ae 100644 --- a/typedapi/types/explainanalyzetoken.go +++ b/typedapi/types/explainanalyzetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExplainAnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L52-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L52-L67 type ExplainAnalyzeToken struct { Bytes string `json:"bytes"` EndOffset int64 `json:"end_offset"` @@ -240,5 +240,3 @@ func NewExplainAnalyzeToken() *ExplainAnalyzeToken { return r } - -// false diff --git a/typedapi/types/explanation.go b/typedapi/types/explanation.go index 0a35da975f..7f1d9e564d 100644 --- a/typedapi/types/explanation.go +++ b/typedapi/types/explanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Explanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/explain/types.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/explain/types.ts#L22-L26 type Explanation struct { Description string `json:"description"` Details []ExplanationDetail `json:"details"` @@ -97,5 +97,3 @@ func NewExplanation() *Explanation { return r } - -// false diff --git a/typedapi/types/explanationdetail.go b/typedapi/types/explanationdetail.go index b54248932d..3ba7729ab3 100644 --- a/typedapi/types/explanationdetail.go +++ b/typedapi/types/explanationdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExplanationDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/explain/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/explain/types.ts#L28-L32 type ExplanationDetail struct { Description string `json:"description"` Details []ExplanationDetail `json:"details,omitempty"` @@ -97,5 +97,3 @@ func NewExplanationDetail() *ExplanationDetail { return r } - -// false diff --git a/typedapi/types/explorecontrols.go b/typedapi/types/explorecontrols.go index a3b6671a07..7ba0517cc5 100644 --- a/typedapi/types/explorecontrols.go +++ b/typedapi/types/explorecontrols.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExploreControls type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/ExploreControls.ts#L24-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/ExploreControls.ts#L24-L49 type ExploreControls struct { // SampleDiversity To avoid the top-matching documents sample being dominated by a single source // of results, it is sometimes necessary to request diversity in the sample. @@ -123,13 +123,3 @@ func NewExploreControls() *ExploreControls { return r } - -// true - -type ExploreControlsVariant interface { - ExploreControlsCaster() *ExploreControls -} - -func (s *ExploreControls) ExploreControlsCaster() *ExploreControls { - return s -} diff --git a/typedapi/types/exponentialaveragecalculationcontext.go b/typedapi/types/exponentialaveragecalculationcontext.go index b6675bb2fa..694408f250 100644 --- a/typedapi/types/exponentialaveragecalculationcontext.go +++ b/typedapi/types/exponentialaveragecalculationcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ExponentialAverageCalculationContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L204-L208 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L204-L208 type ExponentialAverageCalculationContext struct { IncrementalMetricValueMs Float64 `json:"incremental_metric_value_ms"` LatestTimestamp *int64 `json:"latest_timestamp,omitempty"` @@ -78,5 +78,3 @@ func NewExponentialAverageCalculationContext() *ExponentialAverageCalculationCon return r } - -// false diff --git a/typedapi/types/extendedboundsdouble.go b/typedapi/types/extendedboundsdouble.go index 2b50af9bdc..15e0e88f2e 100644 --- a/typedapi/types/extendedboundsdouble.go +++ b/typedapi/types/extendedboundsdouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExtendedBoundsdouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L508-L517 type ExtendedBoundsdouble struct { // Max Maximum value for the bound. Max *Float64 `json:"max,omitempty"` @@ -97,13 +97,3 @@ func NewExtendedBoundsdouble() *ExtendedBoundsdouble { return r } - -// true - -type ExtendedBoundsdoubleVariant interface { - ExtendedBoundsdoubleCaster() *ExtendedBoundsdouble -} - -func (s *ExtendedBoundsdouble) ExtendedBoundsdoubleCaster() *ExtendedBoundsdouble { - return s -} diff --git a/typedapi/types/extendedboundsfielddatemath.go b/typedapi/types/extendedboundsfielddatemath.go index 1879da0cf6..b06096df58 100644 --- a/typedapi/types/extendedboundsfielddatemath.go +++ b/typedapi/types/extendedboundsfielddatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ExtendedBoundsFieldDateMath type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L508-L517 type ExtendedBoundsFieldDateMath struct { // Max Maximum value for the bound. Max FieldDateMath `json:"max,omitempty"` @@ -74,13 +74,3 @@ func NewExtendedBoundsFieldDateMath() *ExtendedBoundsFieldDateMath { return r } - -// true - -type ExtendedBoundsFieldDateMathVariant interface { - ExtendedBoundsFieldDateMathCaster() *ExtendedBoundsFieldDateMath -} - -func (s *ExtendedBoundsFieldDateMath) ExtendedBoundsFieldDateMathCaster() *ExtendedBoundsFieldDateMath { - return s -} diff --git a/typedapi/types/extendedmemorystats.go b/typedapi/types/extendedmemorystats.go index d4bc5d56e8..9c9464fdea 100644 --- a/typedapi/types/extendedmemorystats.go +++ b/typedapi/types/extendedmemorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExtendedMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L658-L667 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L660-L669 type ExtendedMemoryStats struct { // AdjustedTotalInBytes If the amount of physical memory has been overridden using the // `es`.`total_memory_bytes` system property then this reports the overridden @@ -255,5 +255,3 @@ func NewExtendedMemoryStats() *ExtendedMemoryStats { return r } - -// false diff --git a/typedapi/types/extendedstatsaggregate.go b/typedapi/types/extendedstatsaggregate.go index 472ca312bb..67985f5cb1 100644 --- a/typedapi/types/extendedstatsaggregate.go +++ b/typedapi/types/extendedstatsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L299-L320 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L299-L320 type ExtendedStatsAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` @@ -289,5 +289,3 @@ func NewExtendedStatsAggregate() *ExtendedStatsAggregate { return r } - -// false diff --git a/typedapi/types/extendedstatsaggregation.go b/typedapi/types/extendedstatsaggregation.go index c3b8488299..eb4490e010 100644 --- a/typedapi/types/extendedstatsaggregation.go +++ b/typedapi/types/extendedstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L107-L112 type ExtendedStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -113,13 +113,3 @@ func NewExtendedStatsAggregation() *ExtendedStatsAggregation { return r } - -// true - -type ExtendedStatsAggregationVariant interface { - ExtendedStatsAggregationCaster() *ExtendedStatsAggregation -} - -func (s *ExtendedStatsAggregation) ExtendedStatsAggregationCaster() *ExtendedStatsAggregation { - return s -} diff --git a/typedapi/types/extendedstatsbucketaggregate.go b/typedapi/types/extendedstatsbucketaggregate.go index 20c0b1d9a1..2957b9d135 100644 --- a/typedapi/types/extendedstatsbucketaggregate.go +++ b/typedapi/types/extendedstatsbucketaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L322-L323 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L322-L323 type ExtendedStatsBucketAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` @@ -289,5 +289,3 @@ func NewExtendedStatsBucketAggregate() *ExtendedStatsBucketAggregate { return r } - -// false diff --git a/typedapi/types/extendedstatsbucketaggregation.go b/typedapi/types/extendedstatsbucketaggregation.go index 14a9472ba2..0b6e97338c 100644 --- a/typedapi/types/extendedstatsbucketaggregation.go +++ b/typedapi/types/extendedstatsbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ExtendedStatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L218-L223 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L218-L223 type ExtendedStatsBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -111,13 +111,3 @@ func NewExtendedStatsBucketAggregation() *ExtendedStatsBucketAggregation { return r } - -// true - -type ExtendedStatsBucketAggregationVariant interface { - ExtendedStatsBucketAggregationCaster() *ExtendedStatsBucketAggregation -} - -func (s *ExtendedStatsBucketAggregation) ExtendedStatsBucketAggregationCaster() *ExtendedStatsBucketAggregation { - return s -} diff --git a/typedapi/types/failprocessor.go b/typedapi/types/failprocessor.go index 73c7bba4e9..83c6cba089 100644 --- a/typedapi/types/failprocessor.go +++ b/typedapi/types/failprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FailProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L888-L894 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L888-L894 type FailProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -143,13 +143,3 @@ func NewFailProcessor() *FailProcessor { return r } - -// true - -type FailProcessorVariant interface { - FailProcessorCaster() *FailProcessor -} - -func (s *FailProcessor) FailProcessorCaster() *FailProcessor { - return s -} diff --git a/typedapi/types/failurestore.go b/typedapi/types/failurestore.go index d34490c974..46c7ed9e76 100644 --- a/typedapi/types/failurestore.go +++ b/typedapi/types/failurestore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FailureStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/DataStream.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/DataStream.ts#L39-L43 type FailureStore struct { Enabled bool `json:"enabled"` Indices []DataStreamIndex `json:"indices"` @@ -97,5 +97,3 @@ func NewFailureStore() *FailureStore { return r } - -// false diff --git a/typedapi/types/feature.go b/typedapi/types/feature.go index a01401e1cc..9140958ba4 100644 --- a/typedapi/types/feature.go +++ b/typedapi/types/feature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Feature type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/features/_types/Feature.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/features/_types/Feature.ts#L20-L23 type Feature struct { Description string `json:"description"` Name string `json:"name"` @@ -87,5 +87,3 @@ func NewFeature() *Feature { return r } - -// false diff --git a/typedapi/types/featureenabled.go b/typedapi/types/featureenabled.go index d1ad36e553..14942c7d0f 100644 --- a/typedapi/types/featureenabled.go +++ b/typedapi/types/featureenabled.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FeatureEnabled type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L215-L217 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L215-L217 type FeatureEnabled struct { Enabled bool `json:"enabled"` } @@ -76,13 +76,3 @@ func NewFeatureEnabled() *FeatureEnabled { return r } - -// true - -type FeatureEnabledVariant interface { - FeatureEnabledCaster() *FeatureEnabled -} - -func (s *FeatureEnabled) FeatureEnabledCaster() *FeatureEnabled { - return s -} diff --git a/typedapi/types/featureextractor.go b/typedapi/types/featureextractor.go index ee29227f75..fe4c01493c 100644 --- a/typedapi/types/featureextractor.go +++ b/typedapi/types/featureextractor.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // FeatureExtractor type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L93-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L93-L96 type FeatureExtractor QueryFeatureExtractor - -type FeatureExtractorVariant interface { - FeatureExtractorCaster() *FeatureExtractor -} diff --git a/typedapi/types/features.go b/typedapi/types/features.go index 4b288f9928..fee6ab351d 100644 --- a/typedapi/types/features.go +++ b/typedapi/types/features.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ import ( // Features type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get/IndicesGetRequest.ts#L103-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get/IndicesGetRequest.ts#L103-L103 type Features []feature.Feature diff --git a/typedapi/types/featuretoggle.go b/typedapi/types/featuretoggle.go index b90bf2c82d..67b42b5a26 100644 --- a/typedapi/types/featuretoggle.go +++ b/typedapi/types/featuretoggle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FeatureToggle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L37-L39 type FeatureToggle struct { Enabled bool `json:"enabled"` } @@ -76,5 +76,3 @@ func NewFeatureToggle() *FeatureToggle { return r } - -// false diff --git a/typedapi/types/fetchprofile.go b/typedapi/types/fetchprofile.go index 0d490357e7..ac6a7b00c1 100644 --- a/typedapi/types/fetchprofile.go +++ b/typedapi/types/fetchprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FetchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L230-L237 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L230-L237 type FetchProfile struct { Breakdown FetchProfileBreakdown `json:"breakdown"` Children []FetchProfile `json:"children,omitempty"` @@ -111,5 +111,3 @@ func NewFetchProfile() *FetchProfile { return r } - -// false diff --git a/typedapi/types/fetchprofilebreakdown.go b/typedapi/types/fetchprofilebreakdown.go index cdd85f72c9..0c0e9b85bb 100644 --- a/typedapi/types/fetchprofilebreakdown.go +++ b/typedapi/types/fetchprofilebreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FetchProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L239-L248 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L239-L248 type FetchProfileBreakdown struct { LoadSource *int `json:"load_source,omitempty"` LoadSourceCount *int `json:"load_source_count,omitempty"` @@ -197,5 +197,3 @@ func NewFetchProfileBreakdown() *FetchProfileBreakdown { return r } - -// false diff --git a/typedapi/types/fetchprofiledebug.go b/typedapi/types/fetchprofiledebug.go index 75bdb65f95..494b913507 100644 --- a/typedapi/types/fetchprofiledebug.go +++ b/typedapi/types/fetchprofiledebug.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FetchProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L250-L253 type FetchProfileDebug struct { FastPath *int `json:"fast_path,omitempty"` StoredFields []string `json:"stored_fields,omitempty"` @@ -84,5 +84,3 @@ func NewFetchProfileDebug() *FetchProfileDebug { return r } - -// false diff --git a/typedapi/types/fieldaliasproperty.go b/typedapi/types/fieldaliasproperty.go index dbe4b2bb39..362f182ed2 100644 --- a/typedapi/types/fieldaliasproperty.go +++ b/typedapi/types/fieldaliasproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // FieldAliasProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L64-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L64-L67 type FieldAliasProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -209,6 +209,12 @@ func (s *FieldAliasProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -569,6 +575,12 @@ func (s *FieldAliasProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -802,13 +814,3 @@ func NewFieldAliasProperty() *FieldAliasProperty { return r } - -// true - -type FieldAliasPropertyVariant interface { - FieldAliasPropertyCaster() *FieldAliasProperty -} - -func (s *FieldAliasProperty) FieldAliasPropertyCaster() *FieldAliasProperty { - return s -} diff --git a/typedapi/types/fieldandformat.go b/typedapi/types/fieldandformat.go index 08ef567307..15dff28bf4 100644 --- a/typedapi/types/fieldandformat.go +++ b/typedapi/types/fieldandformat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldAndFormat type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L535-L549 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L535-L549 type FieldAndFormat struct { // Field A wildcard pattern. The request returns values for field names matching this // pattern. @@ -110,13 +110,3 @@ func NewFieldAndFormat() *FieldAndFormat { return r } - -// true - -type FieldAndFormatVariant interface { - FieldAndFormatCaster() *FieldAndFormat -} - -func (s *FieldAndFormat) FieldAndFormatCaster() *FieldAndFormat { - return s -} diff --git a/typedapi/types/fieldcapability.go b/typedapi/types/fieldcapability.go index b2e493272f..9461b7aab8 100644 --- a/typedapi/types/fieldcapability.go +++ b/typedapi/types/fieldcapability.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // FieldCapability type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/field_caps/types.ts#L23-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/field_caps/types.ts#L23-L81 type FieldCapability struct { // Aggregatable Whether this field can be aggregated on all indices. Aggregatable bool `json:"aggregatable"` @@ -231,5 +231,3 @@ func NewFieldCapability() *FieldCapability { return r } - -// false diff --git a/typedapi/types/fieldcollapse.go b/typedapi/types/fieldcollapse.go index ee433a379f..7c6037108b 100644 --- a/typedapi/types/fieldcollapse.go +++ b/typedapi/types/fieldcollapse.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldCollapse type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/FieldCollapse.ts#L24-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/FieldCollapse.ts#L24-L41 type FieldCollapse struct { Collapse *FieldCollapse `json:"collapse,omitempty"` // Field The field to collapse the result set on @@ -111,13 +111,3 @@ func NewFieldCollapse() *FieldCollapse { return r } - -// true - -type FieldCollapseVariant interface { - FieldCollapseCaster() *FieldCollapse -} - -func (s *FieldCollapse) FieldCollapseCaster() *FieldCollapse { - return s -} diff --git a/typedapi/types/fielddatafrequencyfilter.go b/typedapi/types/fielddatafrequencyfilter.go index f76c5832cf..2b9c985ea9 100644 --- a/typedapi/types/fielddatafrequencyfilter.go +++ b/typedapi/types/fielddatafrequencyfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FielddataFrequencyFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 type FielddataFrequencyFilter struct { Max Float64 `json:"max"` Min Float64 `json:"min"` @@ -112,13 +112,3 @@ func NewFielddataFrequencyFilter() *FielddataFrequencyFilter { return r } - -// true - -type FielddataFrequencyFilterVariant interface { - FielddataFrequencyFilterCaster() *FielddataFrequencyFilter -} - -func (s *FielddataFrequencyFilter) FielddataFrequencyFilterCaster() *FielddataFrequencyFilter { - return s -} diff --git a/typedapi/types/fielddatarecord.go b/typedapi/types/fielddatarecord.go index 12ed788c9e..8a83021e1a 100644 --- a/typedapi/types/fielddatarecord.go +++ b/typedapi/types/fielddatarecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FielddataRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/fielddata/types.ts#L20-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/fielddata/types.ts#L20-L48 type FielddataRecord struct { // Field field name Field *string `json:"field,omitempty"` @@ -145,5 +145,3 @@ func NewFielddataRecord() *FielddataRecord { return r } - -// false diff --git a/typedapi/types/fielddatastats.go b/typedapi/types/fielddatastats.go index 04cf8f3458..5984bc8014 100644 --- a/typedapi/types/fielddatastats.go +++ b/typedapi/types/fielddatastats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,10 +31,11 @@ import ( // FielddataStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L114-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L123-L129 type FielddataStats struct { Evictions *int64 `json:"evictions,omitempty"` Fields map[string]FieldMemoryUsage `json:"fields,omitempty"` + GlobalOrdinals GlobalOrdinalsStats `json:"global_ordinals"` MemorySize ByteSize `json:"memory_size,omitempty"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` } @@ -77,6 +78,11 @@ func (s *FielddataStats) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Fields", err) } + case "global_ordinals": + if err := dec.Decode(&s.GlobalOrdinals); err != nil { + return fmt.Errorf("%s | %w", "GlobalOrdinals", err) + } + case "memory_size": if err := dec.Decode(&s.MemorySize); err != nil { return fmt.Errorf("%s | %w", "MemorySize", err) @@ -110,5 +116,3 @@ func NewFielddataStats() *FielddataStats { return r } - -// false diff --git a/typedapi/types/fielddatemath.go b/typedapi/types/fielddatemath.go index 3d6b752748..f9a1e28a2c 100644 --- a/typedapi/types/fielddatemath.go +++ b/typedapi/types/fielddatemath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // Float64 // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L309-L316 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L309-L316 type FieldDateMath any - -type FieldDateMathVariant interface { - FieldDateMathCaster() *FieldDateMath -} diff --git a/typedapi/types/fieldlookup.go b/typedapi/types/fieldlookup.go index 6291917fac..91236c5fcf 100644 --- a/typedapi/types/fieldlookup.go +++ b/typedapi/types/fieldlookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FieldLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L436-L453 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L436-L453 type FieldLookup struct { // Id `id` of the document. Id string `json:"id"` @@ -88,13 +88,3 @@ func NewFieldLookup() *FieldLookup { return r } - -// true - -type FieldLookupVariant interface { - FieldLookupCaster() *FieldLookup -} - -func (s *FieldLookup) FieldLookupCaster() *FieldLookup { - return s -} diff --git a/typedapi/types/fieldmapping.go b/typedapi/types/fieldmapping.go index e6b3f2b4df..6ca71004bc 100644 --- a/typedapi/types/fieldmapping.go +++ b/typedapi/types/fieldmapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L24-L27 type FieldMapping struct { FullName string `json:"full_name"` Mapping map[string]Property `json:"mapping"` @@ -206,6 +206,12 @@ func (s *FieldMapping) UnmarshalJSON(data []byte) error { return fmt.Errorf("Mapping | %w", err) } s.Mapping[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Mapping | %w", err) + } + s.Mapping[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -408,5 +414,3 @@ func NewFieldMapping() *FieldMapping { return r } - -// false diff --git a/typedapi/types/fieldmemoryusage.go b/typedapi/types/fieldmemoryusage.go index e3ba50da7f..804c4da62a 100644 --- a/typedapi/types/fieldmemoryusage.go +++ b/typedapi/types/fieldmemoryusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L121-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L143-L146 type FieldMemoryUsage struct { MemorySize ByteSize `json:"memory_size,omitempty"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` @@ -83,5 +83,3 @@ func NewFieldMemoryUsage() *FieldMemoryUsage { return r } - -// false diff --git a/typedapi/types/fieldmetric.go b/typedapi/types/fieldmetric.go index 5e73d84272..3e40b80869 100644 --- a/typedapi/types/fieldmetric.go +++ b/typedapi/types/fieldmetric.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // FieldMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/_types/Metric.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/_types/Metric.ts#L30-L35 type FieldMetric struct { // Field The field to collect metrics for. This must be a numeric of some kind. Field string `json:"field"` @@ -77,13 +77,3 @@ func NewFieldMetric() *FieldMetric { return r } - -// true - -type FieldMetricVariant interface { - FieldMetricCaster() *FieldMetric -} - -func (s *FieldMetric) FieldMetricCaster() *FieldMetric { - return s -} diff --git a/typedapi/types/fieldnamesfield.go b/typedapi/types/fieldnamesfield.go index e142886ed4..14e09720d5 100644 --- a/typedapi/types/fieldnamesfield.go +++ b/typedapi/types/fieldnamesfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldNamesField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L42-L44 type FieldNamesField struct { Enabled bool `json:"enabled"` } @@ -76,13 +76,3 @@ func NewFieldNamesField() *FieldNamesField { return r } - -// true - -type FieldNamesFieldVariant interface { - FieldNamesFieldCaster() *FieldNamesField -} - -func (s *FieldNamesField) FieldNamesFieldCaster() *FieldNamesField { - return s -} diff --git a/typedapi/types/fieldrule.go b/typedapi/types/fieldrule.go index 795e493cff..c2e6654d77 100644 --- a/typedapi/types/fieldrule.go +++ b/typedapi/types/fieldrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FieldRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleMappingRule.ts#L35-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleMappingRule.ts#L35-L43 type FieldRule struct { AdditionalFieldRuleProperty map[string]json.RawMessage `json:"-"` Dn []string `json:"dn,omitempty"` @@ -156,13 +156,3 @@ func NewFieldRule() *FieldRule { return r } - -// true - -type FieldRuleVariant interface { - FieldRuleCaster() *FieldRule -} - -func (s *FieldRule) FieldRuleCaster() *FieldRule { - return s -} diff --git a/typedapi/types/fields.go b/typedapi/types/fields.go index e60aed9d28..30def5b2c0 100644 --- a/typedapi/types/fields.go +++ b/typedapi/types/fields.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Fields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L144-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L144-L144 type Fields []string - -type FieldsVariant interface { - FieldsCaster() *Fields -} diff --git a/typedapi/types/fieldsecurity.go b/typedapi/types/fieldsecurity.go index 787e4643fe..a4c47ae1bd 100644 --- a/typedapi/types/fieldsecurity.go +++ b/typedapi/types/fieldsecurity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FieldSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/FieldSecurity.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/FieldSecurity.ts#L22-L25 type FieldSecurity struct { Except []string `json:"except,omitempty"` Grant []string `json:"grant,omitempty"` @@ -94,13 +94,3 @@ func NewFieldSecurity() *FieldSecurity { return r } - -// true - -type FieldSecurityVariant interface { - FieldSecurityCaster() *FieldSecurity -} - -func (s *FieldSecurity) FieldSecurityCaster() *FieldSecurity { - return s -} diff --git a/typedapi/types/fieldsizeusage.go b/typedapi/types/fieldsizeusage.go index c2634c8772..6c49dfc3e5 100644 --- a/typedapi/types/fieldsizeusage.go +++ b/typedapi/types/fieldsizeusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldSizeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L95-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L95-L98 type FieldSizeUsage struct { Size ByteSize `json:"size,omitempty"` SizeInBytes int64 `json:"size_in_bytes"` @@ -83,5 +83,3 @@ func NewFieldSizeUsage() *FieldSizeUsage { return r } - -// false diff --git a/typedapi/types/fieldsort.go b/typedapi/types/fieldsort.go index 4bb2d30cfa..6ff3d48895 100644 --- a/typedapi/types/fieldsort.go +++ b/typedapi/types/fieldsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // FieldSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L43-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L43-L52 type FieldSort struct { Format *string `json:"format,omitempty"` Missing Missing `json:"missing,omitempty"` @@ -120,13 +120,3 @@ func NewFieldSort() *FieldSort { return r } - -// true - -type FieldSortVariant interface { - FieldSortCaster() *FieldSort -} - -func (s *FieldSort) FieldSortCaster() *FieldSort { - return s -} diff --git a/typedapi/types/fieldstat.go b/typedapi/types/fieldstat.go index 69b59c5399..b06aefde52 100644 --- a/typedapi/types/fieldstat.go +++ b/typedapi/types/fieldstat.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/_types/Structure.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/_types/Structure.ts#L23-L33 type FieldStat struct { Cardinality int `json:"cardinality"` Count int `json:"count"` @@ -195,5 +195,3 @@ func NewFieldStat() *FieldStat { return r } - -// false diff --git a/typedapi/types/fieldstatistics.go b/typedapi/types/fieldstatistics.go index 6c12fb745e..a153741a38 100644 --- a/typedapi/types/fieldstatistics.go +++ b/typedapi/types/fieldstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/types.ts#L28-L32 type FieldStatistics struct { DocCount int `json:"doc_count"` SumDocFreq int64 `json:"sum_doc_freq"` @@ -110,5 +110,3 @@ func NewFieldStatistics() *FieldStatistics { return r } - -// false diff --git a/typedapi/types/fieldsuggester.go b/typedapi/types/fieldsuggester.go index 52324cc925..589ecd7beb 100644 --- a/typedapi/types/fieldsuggester.go +++ b/typedapi/types/fieldsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L109-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L109-L142 type FieldSuggester struct { AdditionalFieldSuggesterProperty map[string]json.RawMessage `json:"-"` // Completion Provides auto-complete/search-as-you-type functionality. @@ -171,13 +171,3 @@ func NewFieldSuggester() *FieldSuggester { return r } - -// true - -type FieldSuggesterVariant interface { - FieldSuggesterCaster() *FieldSuggester -} - -func (s *FieldSuggester) FieldSuggesterCaster() *FieldSuggester { - return s -} diff --git a/typedapi/types/fieldsummary.go b/typedapi/types/fieldsummary.go index 7c791eb173..d087fe7b38 100644 --- a/typedapi/types/fieldsummary.go +++ b/typedapi/types/fieldsummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // FieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L57-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L57-L66 type FieldSummary struct { Any uint `json:"any"` DocValues uint `json:"doc_values"` @@ -40,5 +40,3 @@ func NewFieldSummary() *FieldSummary { return r } - -// false diff --git a/typedapi/types/fieldtypes.go b/typedapi/types/fieldtypes.go index 3acd78ecaf..5277904205 100644 --- a/typedapi/types/fieldtypes.go +++ b/typedapi/types/fieldtypes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L136-L167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L211-L254 type FieldTypes struct { // Count The number of occurrences of the field type in selected nodes. Count int `json:"count"` @@ -39,17 +39,23 @@ type FieldTypes struct { IndexCount int `json:"index_count"` // IndexedVectorCount For dense_vector field types, number of indexed vector types in selected // nodes. - IndexedVectorCount *int64 `json:"indexed_vector_count,omitempty"` + IndexedVectorCount *int `json:"indexed_vector_count,omitempty"` // IndexedVectorDimMax For dense_vector field types, the maximum dimension of all indexed vector // types in selected nodes. - IndexedVectorDimMax *int64 `json:"indexed_vector_dim_max,omitempty"` + IndexedVectorDimMax *int `json:"indexed_vector_dim_max,omitempty"` // IndexedVectorDimMin For dense_vector field types, the minimum dimension of all indexed vector // types in selected nodes. - IndexedVectorDimMin *int64 `json:"indexed_vector_dim_min,omitempty"` + IndexedVectorDimMin *int `json:"indexed_vector_dim_min,omitempty"` // Name The name for the field type in selected nodes. Name string `json:"name"` // ScriptCount The number of fields that declare a script. ScriptCount *int `json:"script_count,omitempty"` + // VectorElementTypeCount For dense_vector field types, count of mappings by element type + VectorElementTypeCount map[string]int `json:"vector_element_type_count,omitempty"` + // VectorIndexTypeCount For dense_vector field types, count of mappings by index type + VectorIndexTypeCount map[string]int `json:"vector_index_type_count,omitempty"` + // VectorSimilarityTypeCount For dense_vector field types, count of mappings by similarity + VectorSimilarityTypeCount map[string]int `json:"vector_similarity_type_count,omitempty"` } func (s *FieldTypes) UnmarshalJSON(data []byte) error { @@ -100,47 +106,50 @@ func (s *FieldTypes) UnmarshalJSON(data []byte) error { } case "indexed_vector_count": + var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: - value, err := strconv.ParseInt(v, 10, 64) + value, err := strconv.Atoi(v) if err != nil { return fmt.Errorf("%s | %w", "IndexedVectorCount", err) } s.IndexedVectorCount = &value case float64: - f := int64(v) + f := int(v) s.IndexedVectorCount = &f } case "indexed_vector_dim_max": + var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: - value, err := strconv.ParseInt(v, 10, 64) + value, err := strconv.Atoi(v) if err != nil { return fmt.Errorf("%s | %w", "IndexedVectorDimMax", err) } s.IndexedVectorDimMax = &value case float64: - f := int64(v) + f := int(v) s.IndexedVectorDimMax = &f } case "indexed_vector_dim_min": + var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: - value, err := strconv.ParseInt(v, 10, 64) + value, err := strconv.Atoi(v) if err != nil { return fmt.Errorf("%s | %w", "IndexedVectorDimMin", err) } s.IndexedVectorDimMin = &value case float64: - f := int64(v) + f := int(v) s.IndexedVectorDimMin = &f } @@ -165,6 +174,30 @@ func (s *FieldTypes) UnmarshalJSON(data []byte) error { s.ScriptCount = &f } + case "vector_element_type_count": + if s.VectorElementTypeCount == nil { + s.VectorElementTypeCount = make(map[string]int, 0) + } + if err := dec.Decode(&s.VectorElementTypeCount); err != nil { + return fmt.Errorf("%s | %w", "VectorElementTypeCount", err) + } + + case "vector_index_type_count": + if s.VectorIndexTypeCount == nil { + s.VectorIndexTypeCount = make(map[string]int, 0) + } + if err := dec.Decode(&s.VectorIndexTypeCount); err != nil { + return fmt.Errorf("%s | %w", "VectorIndexTypeCount", err) + } + + case "vector_similarity_type_count": + if s.VectorSimilarityTypeCount == nil { + s.VectorSimilarityTypeCount = make(map[string]int, 0) + } + if err := dec.Decode(&s.VectorSimilarityTypeCount); err != nil { + return fmt.Errorf("%s | %w", "VectorSimilarityTypeCount", err) + } + } } return nil @@ -172,9 +205,11 @@ func (s *FieldTypes) UnmarshalJSON(data []byte) error { // NewFieldTypes returns a FieldTypes. func NewFieldTypes() *FieldTypes { - r := &FieldTypes{} + r := &FieldTypes{ + VectorElementTypeCount: make(map[string]int), + VectorIndexTypeCount: make(map[string]int), + VectorSimilarityTypeCount: make(map[string]int), + } return r } - -// false diff --git a/typedapi/types/fieldtypesmappings.go b/typedapi/types/fieldtypesmappings.go index 3336e5ec46..685febf8d5 100644 --- a/typedapi/types/fieldtypesmappings.go +++ b/typedapi/types/fieldtypesmappings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,21 +31,23 @@ import ( // FieldTypesMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L109-L134 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L180-L209 type FieldTypesMappings struct { // FieldTypes Contains statistics about field data types used in selected nodes. FieldTypes []FieldTypes `json:"field_types"` // RuntimeFieldTypes Contains statistics about runtime field data types used in selected nodes. - RuntimeFieldTypes []ClusterRuntimeFieldTypes `json:"runtime_field_types,omitempty"` + RuntimeFieldTypes []ClusterRuntimeFieldTypes `json:"runtime_field_types"` + // SourceModes Source mode usage count. + SourceModes map[string]int `json:"source_modes"` // TotalDeduplicatedFieldCount Total number of fields in all non-system indices, accounting for mapping // deduplication. - TotalDeduplicatedFieldCount *int `json:"total_deduplicated_field_count,omitempty"` + TotalDeduplicatedFieldCount *int64 `json:"total_deduplicated_field_count,omitempty"` // TotalDeduplicatedMappingSize Total size of all mappings after deduplication and compression. TotalDeduplicatedMappingSize ByteSize `json:"total_deduplicated_mapping_size,omitempty"` // TotalDeduplicatedMappingSizeInBytes Total size of all mappings, in bytes, after deduplication and compression. TotalDeduplicatedMappingSizeInBytes *int64 `json:"total_deduplicated_mapping_size_in_bytes,omitempty"` // TotalFieldCount Total number of fields in all non-system indices. - TotalFieldCount *int `json:"total_field_count,omitempty"` + TotalFieldCount *int64 `json:"total_field_count,omitempty"` } func (s *FieldTypesMappings) UnmarshalJSON(data []byte) error { @@ -73,19 +75,26 @@ func (s *FieldTypesMappings) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "RuntimeFieldTypes", err) } - case "total_deduplicated_field_count": + case "source_modes": + if s.SourceModes == nil { + s.SourceModes = make(map[string]int, 0) + } + if err := dec.Decode(&s.SourceModes); err != nil { + return fmt.Errorf("%s | %w", "SourceModes", err) + } + case "total_deduplicated_field_count": var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: - value, err := strconv.Atoi(v) + value, err := strconv.ParseInt(v, 10, 64) if err != nil { return fmt.Errorf("%s | %w", "TotalDeduplicatedFieldCount", err) } s.TotalDeduplicatedFieldCount = &value case float64: - f := int(v) + f := int64(v) s.TotalDeduplicatedFieldCount = &f } @@ -110,18 +119,17 @@ func (s *FieldTypesMappings) UnmarshalJSON(data []byte) error { } case "total_field_count": - var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: - value, err := strconv.Atoi(v) + value, err := strconv.ParseInt(v, 10, 64) if err != nil { return fmt.Errorf("%s | %w", "TotalFieldCount", err) } s.TotalFieldCount = &value case float64: - f := int(v) + f := int64(v) s.TotalFieldCount = &f } @@ -132,9 +140,9 @@ func (s *FieldTypesMappings) UnmarshalJSON(data []byte) error { // NewFieldTypesMappings returns a FieldTypesMappings. func NewFieldTypesMappings() *FieldTypesMappings { - r := &FieldTypesMappings{} + r := &FieldTypesMappings{ + SourceModes: make(map[string]int), + } return r } - -// false diff --git a/typedapi/types/fieldvalue.go b/typedapi/types/fieldvalue.go index 0400e478ab..0205a56784 100644 --- a/typedapi/types/fieldvalue.go +++ b/typedapi/types/fieldvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,9 +29,5 @@ package types // nil // json.RawMessage // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L25-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L25-L37 type FieldValue any - -type FieldValueVariant interface { - FieldValueCaster() *FieldValue -} diff --git a/typedapi/types/fieldvaluefactorscorefunction.go b/typedapi/types/fieldvaluefactorscorefunction.go index 61ccf41a3f..b9983905ea 100644 --- a/typedapi/types/fieldvaluefactorscorefunction.go +++ b/typedapi/types/fieldvaluefactorscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // FieldValueFactorScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L149-L168 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L149-L168 type FieldValueFactorScoreFunction struct { // Factor Optional factor to multiply the field value with. Factor *Float64 `json:"factor,omitempty"` @@ -115,13 +115,3 @@ func NewFieldValueFactorScoreFunction() *FieldValueFactorScoreFunction { return r } - -// true - -type FieldValueFactorScoreFunctionVariant interface { - FieldValueFactorScoreFunctionCaster() *FieldValueFactorScoreFunction -} - -func (s *FieldValueFactorScoreFunction) FieldValueFactorScoreFunctionCaster() *FieldValueFactorScoreFunction { - return s -} diff --git a/typedapi/types/filecountsnapshotstats.go b/typedapi/types/filecountsnapshotstats.go index 7cc804c05e..8702cb31b6 100644 --- a/typedapi/types/filecountsnapshotstats.go +++ b/typedapi/types/filecountsnapshotstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FileCountSnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 type FileCountSnapshotStats struct { FileCount int `json:"file_count"` SizeInBytes int64 `json:"size_in_bytes"` @@ -94,5 +94,3 @@ func NewFileCountSnapshotStats() *FileCountSnapshotStats { return r } - -// false diff --git a/typedapi/types/filedetails.go b/typedapi/types/filedetails.go index e519473d2e..1b967f863a 100644 --- a/typedapi/types/filedetails.go +++ b/typedapi/types/filedetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FileDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L50-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L50-L54 type FileDetails struct { Length int64 `json:"length"` Name string `json:"name"` @@ -106,5 +106,3 @@ func NewFileDetails() *FileDetails { return r } - -// false diff --git a/typedapi/types/filesystem.go b/typedapi/types/filesystem.go index 01972124a7..ed7aac8b33 100644 --- a/typedapi/types/filesystem.go +++ b/typedapi/types/filesystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L769-L787 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L771-L789 type FileSystem struct { // Data List of all file stores. Data []DataPathStats `json:"data,omitempty"` @@ -100,5 +100,3 @@ func NewFileSystem() *FileSystem { return r } - -// false diff --git a/typedapi/types/filesystemtotal.go b/typedapi/types/filesystemtotal.go index 13f511f0a9..0e7e905e4d 100644 --- a/typedapi/types/filesystemtotal.go +++ b/typedapi/types/filesystemtotal.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FileSystemTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L828-L857 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L830-L859 type FileSystemTotal struct { // Available Total disk space available to this Java virtual machine on all file stores. // Depending on OS or process level restrictions, this might appear less than @@ -163,5 +163,3 @@ func NewFileSystemTotal() *FileSystemTotal { return r } - -// false diff --git a/typedapi/types/fillmaskinferenceoptions.go b/typedapi/types/fillmaskinferenceoptions.go index c92137e02c..aa18a329f7 100644 --- a/typedapi/types/fillmaskinferenceoptions.go +++ b/typedapi/types/fillmaskinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L284-L299 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L284-L299 type FillMaskInferenceOptions struct { // MaskToken The string/token which will be removed from incoming documents and replaced // with the inference prediction(s). @@ -129,13 +129,3 @@ func NewFillMaskInferenceOptions() *FillMaskInferenceOptions { return r } - -// true - -type FillMaskInferenceOptionsVariant interface { - FillMaskInferenceOptionsCaster() *FillMaskInferenceOptions -} - -func (s *FillMaskInferenceOptions) FillMaskInferenceOptionsCaster() *FillMaskInferenceOptions { - return s -} diff --git a/typedapi/types/fillmaskinferenceupdateoptions.go b/typedapi/types/fillmaskinferenceupdateoptions.go index 5f642564e8..c7219642fa 100644 --- a/typedapi/types/fillmaskinferenceupdateoptions.go +++ b/typedapi/types/fillmaskinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L430-L437 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L430-L437 type FillMaskInferenceUpdateOptions struct { // NumTopClasses Specifies the number of top class predictions to return. Defaults to 0. NumTopClasses *int `json:"num_top_classes,omitempty"` @@ -101,13 +101,3 @@ func NewFillMaskInferenceUpdateOptions() *FillMaskInferenceUpdateOptions { return r } - -// true - -type FillMaskInferenceUpdateOptionsVariant interface { - FillMaskInferenceUpdateOptionsCaster() *FillMaskInferenceUpdateOptions -} - -func (s *FillMaskInferenceUpdateOptions) FillMaskInferenceUpdateOptionsCaster() *FillMaskInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/filteraggregate.go b/typedapi/types/filteraggregate.go index 77f509d02a..f3bda739c9 100644 --- a/typedapi/types/filteraggregate.go +++ b/typedapi/types/filteraggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // FilterAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L552-L556 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L552-L556 type FilterAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewFilterAggregate() *FilterAggregate { return r } - -// false diff --git a/typedapi/types/filteringadvancedsnippet.go b/typedapi/types/filteringadvancedsnippet.go index 132eaaa103..2c204b3c3b 100644 --- a/typedapi/types/filteringadvancedsnippet.go +++ b/typedapi/types/filteringadvancedsnippet.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FilteringAdvancedSnippet type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L192-L196 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L192-L196 type FilteringAdvancedSnippet struct { CreatedAt DateTime `json:"created_at,omitempty"` UpdatedAt DateTime `json:"updated_at,omitempty"` @@ -78,13 +78,3 @@ func NewFilteringAdvancedSnippet() *FilteringAdvancedSnippet { return r } - -// true - -type FilteringAdvancedSnippetVariant interface { - FilteringAdvancedSnippetCaster() *FilteringAdvancedSnippet -} - -func (s *FilteringAdvancedSnippet) FilteringAdvancedSnippetCaster() *FilteringAdvancedSnippet { - return s -} diff --git a/typedapi/types/filteringconfig.go b/typedapi/types/filteringconfig.go index 266570058c..586d09ae1a 100644 --- a/typedapi/types/filteringconfig.go +++ b/typedapi/types/filteringconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FilteringConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L209-L213 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L209-L213 type FilteringConfig struct { Active FilteringRules `json:"active"` Domain *string `json:"domain,omitempty"` @@ -86,13 +86,3 @@ func NewFilteringConfig() *FilteringConfig { return r } - -// true - -type FilteringConfigVariant interface { - FilteringConfigCaster() *FilteringConfig -} - -func (s *FilteringConfig) FilteringConfigCaster() *FilteringConfig { - return s -} diff --git a/typedapi/types/filteringrule.go b/typedapi/types/filteringrule.go index 283dd73f0b..d07a2faf18 100644 --- a/typedapi/types/filteringrule.go +++ b/typedapi/types/filteringrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // FilteringRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L170-L179 type FilteringRule struct { CreatedAt DateTime `json:"created_at,omitempty"` Field string `json:"field"` @@ -130,13 +130,3 @@ func NewFilteringRule() *FilteringRule { return r } - -// true - -type FilteringRuleVariant interface { - FilteringRuleCaster() *FilteringRule -} - -func (s *FilteringRule) FilteringRuleCaster() *FilteringRule { - return s -} diff --git a/typedapi/types/filteringrules.go b/typedapi/types/filteringrules.go index f837cac6a6..8524b343a2 100644 --- a/typedapi/types/filteringrules.go +++ b/typedapi/types/filteringrules.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // FilteringRules type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L203-L207 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L203-L207 type FilteringRules struct { AdvancedSnippet FilteringAdvancedSnippet `json:"advanced_snippet"` Rules []FilteringRule `json:"rules"` @@ -35,13 +35,3 @@ func NewFilteringRules() *FilteringRules { return r } - -// true - -type FilteringRulesVariant interface { - FilteringRulesCaster() *FilteringRules -} - -func (s *FilteringRules) FilteringRulesCaster() *FilteringRules { - return s -} diff --git a/typedapi/types/filteringrulesvalidation.go b/typedapi/types/filteringrulesvalidation.go index b54e3ce6a7..40a0c7866b 100644 --- a/typedapi/types/filteringrulesvalidation.go +++ b/typedapi/types/filteringrulesvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // FilteringRulesValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L198-L201 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L198-L201 type FilteringRulesValidation struct { Errors []FilteringValidation `json:"errors"` State filteringvalidationstate.FilteringValidationState `json:"state"` @@ -38,13 +38,3 @@ func NewFilteringRulesValidation() *FilteringRulesValidation { return r } - -// true - -type FilteringRulesValidationVariant interface { - FilteringRulesValidationCaster() *FilteringRulesValidation -} - -func (s *FilteringRulesValidation) FilteringRulesValidationCaster() *FilteringRulesValidation { - return s -} diff --git a/typedapi/types/filteringvalidation.go b/typedapi/types/filteringvalidation.go index a72c0d471b..a063ad889a 100644 --- a/typedapi/types/filteringvalidation.go +++ b/typedapi/types/filteringvalidation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // FilteringValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L181-L184 type FilteringValidation struct { Ids []string `json:"ids"` Messages []string `json:"messages"` @@ -34,13 +34,3 @@ func NewFilteringValidation() *FilteringValidation { return r } - -// true - -type FilteringValidationVariant interface { - FilteringValidationCaster() *FilteringValidation -} - -func (s *FilteringValidation) FilteringValidationCaster() *FilteringValidation { - return s -} diff --git a/typedapi/types/filterref.go b/typedapi/types/filterref.go index 79c34b1407..13c6371ce9 100644 --- a/typedapi/types/filterref.go +++ b/typedapi/types/filterref.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // FilterRef type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Filter.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Filter.ts#L31-L41 type FilterRef struct { // FilterId The identifier for the filter. FilterId string `json:"filter_id"` @@ -77,13 +77,3 @@ func NewFilterRef() *FilterRef { return r } - -// true - -type FilterRefVariant interface { - FilterRefCaster() *FilterRef -} - -func (s *FilterRef) FilterRefCaster() *FilterRef { - return s -} diff --git a/typedapi/types/filtersaggregate.go b/typedapi/types/filtersaggregate.go index c83b997379..ab0cce6df1 100644 --- a/typedapi/types/filtersaggregate.go +++ b/typedapi/types/filtersaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FiltersAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L639-L643 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L639-L643 type FiltersAggregate struct { Buckets BucketsFiltersBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewFiltersAggregate() *FiltersAggregate { return r } - -// false diff --git a/typedapi/types/filtersaggregation.go b/typedapi/types/filtersaggregation.go index 5a0f97596d..af474cf3a1 100644 --- a/typedapi/types/filtersaggregation.go +++ b/typedapi/types/filtersaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L374-L394 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L374-L394 type FiltersAggregation struct { // Filters Collection of queries from which to build buckets. Filters BucketsQuery `json:"filters,omitempty"` @@ -132,13 +132,3 @@ func NewFiltersAggregation() *FiltersAggregation { return r } - -// true - -type FiltersAggregationVariant interface { - FiltersAggregationCaster() *FiltersAggregation -} - -func (s *FiltersAggregation) FiltersAggregationCaster() *FiltersAggregation { - return s -} diff --git a/typedapi/types/filtersbucket.go b/typedapi/types/filtersbucket.go index bdabf7edd3..3722a7f9ff 100644 --- a/typedapi/types/filtersbucket.go +++ b/typedapi/types/filtersbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,10 +32,11 @@ import ( // FiltersBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L645-L645 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L645-L647 type FiltersBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` + Key *string `json:"key,omitempty"` } func (s *FiltersBucket) UnmarshalJSON(data []byte) error { @@ -68,6 +69,18 @@ func (s *FiltersBucket) UnmarshalJSON(data []byte) error { s.DocCount = f } + case "key": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Key", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Key = &o + default: if value, ok := t.(string); ok { @@ -630,5 +643,3 @@ func NewFiltersBucket() *FiltersBucket { return r } - -// false diff --git a/typedapi/types/fingerprintanalyzer.go b/typedapi/types/fingerprintanalyzer.go index 7348061794..1300102d58 100644 --- a/typedapi/types/fingerprintanalyzer.go +++ b/typedapi/types/fingerprintanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,15 +31,15 @@ import ( // FingerprintAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L37-L45 type FingerprintAnalyzer struct { - MaxOutputSize int `json:"max_output_size"` - PreserveOriginal bool `json:"preserve_original"` - Separator string `json:"separator"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + MaxOutputSize int `json:"max_output_size"` + PreserveOriginal bool `json:"preserve_original"` + Separator string `json:"separator"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *FingerprintAnalyzer) UnmarshalJSON(data []byte) error { @@ -100,19 +100,8 @@ func (s *FingerprintAnalyzer) UnmarshalJSON(data []byte) error { s.Separator = o case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -166,13 +155,3 @@ func NewFingerprintAnalyzer() *FingerprintAnalyzer { return r } - -// true - -type FingerprintAnalyzerVariant interface { - FingerprintAnalyzerCaster() *FingerprintAnalyzer -} - -func (s *FingerprintAnalyzer) FingerprintAnalyzerCaster() *FingerprintAnalyzer { - return s -} diff --git a/typedapi/types/fingerprintprocessor.go b/typedapi/types/fingerprintprocessor.go index 29100145f2..6f0d2a7603 100644 --- a/typedapi/types/fingerprintprocessor.go +++ b/typedapi/types/fingerprintprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // FingerprintProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L904-L932 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L904-L932 type FingerprintProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -196,13 +196,3 @@ func NewFingerprintProcessor() *FingerprintProcessor { return r } - -// true - -type FingerprintProcessorVariant interface { - FingerprintProcessorCaster() *FingerprintProcessor -} - -func (s *FingerprintProcessor) FingerprintProcessorCaster() *FingerprintProcessor { - return s -} diff --git a/typedapi/types/fingerprinttokenfilter.go b/typedapi/types/fingerprinttokenfilter.go index 92e6a906d5..b6d105cd85 100644 --- a/typedapi/types/fingerprinttokenfilter.go +++ b/typedapi/types/fingerprinttokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,16 @@ import ( // FingerprintTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L195-L199 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L260-L266 type FingerprintTokenFilter struct { - MaxOutputSize *int `json:"max_output_size,omitempty"` - Separator *string `json:"separator,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // MaxOutputSize Maximum character length, including whitespace, of the output token. Defaults + // to `255`. Concatenated tokens longer than this will result in no token + // output. + MaxOutputSize *int `json:"max_output_size,omitempty"` + // Separator Character to use to concatenate the token stream input. Defaults to a space. + Separator *string `json:"separator,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *FingerprintTokenFilter) UnmarshalJSON(data []byte) error { @@ -118,13 +122,3 @@ func NewFingerprintTokenFilter() *FingerprintTokenFilter { return r } - -// true - -type FingerprintTokenFilterVariant interface { - FingerprintTokenFilterCaster() *FingerprintTokenFilter -} - -func (s *FingerprintTokenFilter) FingerprintTokenFilterCaster() *FingerprintTokenFilter { - return s -} diff --git a/typedapi/types/finnishanalyzer.go b/typedapi/types/finnishanalyzer.go index ddb1a0960a..9bb3dc2cfe 100644 --- a/typedapi/types/finnishanalyzer.go +++ b/typedapi/types/finnishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // FinnishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L145-L150 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L145-L150 type FinnishAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *FinnishAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *FinnishAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewFinnishAnalyzer() *FinnishAnalyzer { return r } - -// true - -type FinnishAnalyzerVariant interface { - FinnishAnalyzerCaster() *FinnishAnalyzer -} - -func (s *FinnishAnalyzer) FinnishAnalyzerCaster() *FinnishAnalyzer { - return s -} diff --git a/typedapi/types/flattened.go b/typedapi/types/flattened.go index 8327a1bd90..bf72b6b649 100644 --- a/typedapi/types/flattened.go +++ b/typedapi/types/flattened.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Flattened type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L366-L368 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L366-L368 type Flattened struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -108,5 +108,3 @@ func NewFlattened() *Flattened { return r } - -// false diff --git a/typedapi/types/flattenedproperty.go b/typedapi/types/flattenedproperty.go index f2acb61ed4..56ba0aa996 100644 --- a/typedapi/types/flattenedproperty.go +++ b/typedapi/types/flattenedproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // FlattenedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/complex.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/complex.ts#L26-L38 type FlattenedProperty struct { Boost *Float64 `json:"boost,omitempty"` DepthLimit *int `json:"depth_limit,omitempty"` @@ -53,6 +53,7 @@ type FlattenedProperty struct { Similarity *string `json:"similarity,omitempty"` SplitQueriesOnWhitespace *bool `json:"split_queries_on_whitespace,omitempty"` SyntheticSourceKeep *syntheticsourcekeepenum.SyntheticSourceKeepEnum `json:"synthetic_source_keep,omitempty"` + TimeSeriesDimensions []string `json:"time_series_dimensions,omitempty"` Type string `json:"type,omitempty"` } @@ -278,6 +279,12 @@ func (s *FlattenedProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -664,6 +671,12 @@ func (s *FlattenedProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -884,6 +897,11 @@ func (s *FlattenedProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "SyntheticSourceKeep", err) } + case "time_series_dimensions": + if err := dec.Decode(&s.TimeSeriesDimensions); err != nil { + return fmt.Errorf("%s | %w", "TimeSeriesDimensions", err) + } + case "type": if err := dec.Decode(&s.Type); err != nil { return fmt.Errorf("%s | %w", "Type", err) @@ -913,6 +931,7 @@ func (s FlattenedProperty) MarshalJSON() ([]byte, error) { Similarity: s.Similarity, SplitQueriesOnWhitespace: s.SplitQueriesOnWhitespace, SyntheticSourceKeep: s.SyntheticSourceKeep, + TimeSeriesDimensions: s.TimeSeriesDimensions, Type: s.Type, } @@ -931,13 +950,3 @@ func NewFlattenedProperty() *FlattenedProperty { return r } - -// true - -type FlattenedPropertyVariant interface { - FlattenedPropertyCaster() *FlattenedProperty -} - -func (s *FlattenedProperty) FlattenedPropertyCaster() *FlattenedProperty { - return s -} diff --git a/typedapi/types/flattengraphtokenfilter.go b/typedapi/types/flattengraphtokenfilter.go new file mode 100644 index 0000000000..43d7602c47 --- /dev/null +++ b/typedapi/types/flattengraphtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// FlattenGraphTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L486-L488 +type FlattenGraphTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *FlattenGraphTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s FlattenGraphTokenFilter) MarshalJSON() ([]byte, error) { + type innerFlattenGraphTokenFilter FlattenGraphTokenFilter + tmp := innerFlattenGraphTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "flatten_graph" + + return json.Marshal(tmp) +} + +// NewFlattenGraphTokenFilter returns a FlattenGraphTokenFilter. +func NewFlattenGraphTokenFilter() *FlattenGraphTokenFilter { + r := &FlattenGraphTokenFilter{} + + return r +} diff --git a/typedapi/types/floatnumberproperty.go b/typedapi/types/floatnumberproperty.go index b62830bf17..9ab930610a 100644 --- a/typedapi/types/floatnumberproperty.go +++ b/typedapi/types/floatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // FloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L156-L159 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L158-L161 type FloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *FloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -690,6 +696,12 @@ func (s *FloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -972,13 +984,3 @@ func NewFloatNumberProperty() *FloatNumberProperty { return r } - -// true - -type FloatNumberPropertyVariant interface { - FloatNumberPropertyCaster() *FloatNumberProperty -} - -func (s *FloatNumberProperty) FloatNumberPropertyCaster() *FloatNumberProperty { - return s -} diff --git a/typedapi/types/floatrangeproperty.go b/typedapi/types/floatrangeproperty.go index 0b38df61ef..630afe180b 100644 --- a/typedapi/types/floatrangeproperty.go +++ b/typedapi/types/floatrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // FloatRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/range.ts#L38-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/range.ts#L38-L40 type FloatRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -274,6 +274,12 @@ func (s *FloatRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -643,6 +649,12 @@ func (s *FloatRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -895,13 +907,3 @@ func NewFloatRangeProperty() *FloatRangeProperty { return r } - -// true - -type FloatRangePropertyVariant interface { - FloatRangePropertyCaster() *FloatRangeProperty -} - -func (s *FloatRangeProperty) FloatRangePropertyCaster() *FloatRangeProperty { - return s -} diff --git a/typedapi/types/flushstats.go b/typedapi/types/flushstats.go index e12d2f6cf7..0e9acd6361 100644 --- a/typedapi/types/flushstats.go +++ b/typedapi/types/flushstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FlushStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L126-L131 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L148-L153 type FlushStats struct { Periodic int64 `json:"periodic"` Total int64 `json:"total"` @@ -105,5 +105,3 @@ func NewFlushStats() *FlushStats { return r } - -// false diff --git a/typedapi/types/followerindex.go b/typedapi/types/followerindex.go index 1e48195330..127d4a34fa 100644 --- a/typedapi/types/followerindex.go +++ b/typedapi/types/followerindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // FollowerIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow_info/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow_info/types.ts#L24-L35 type FollowerIndex struct { // FollowerIndex The name of the follower index. FollowerIndex string `json:"follower_index"` @@ -98,5 +98,3 @@ func NewFollowerIndex() *FollowerIndex { return r } - -// false diff --git a/typedapi/types/followerindexparameters.go b/typedapi/types/followerindexparameters.go index 921bec53b6..ac6028b532 100644 --- a/typedapi/types/followerindexparameters.go +++ b/typedapi/types/followerindexparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FollowerIndexParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/follow_info/types.ts#L42-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/follow_info/types.ts#L42-L88 type FollowerIndexParameters struct { // MaxOutstandingReadRequests The maximum number of outstanding reads requests from the remote cluster. MaxOutstandingReadRequests *int64 `json:"max_outstanding_read_requests,omitempty"` @@ -198,5 +198,3 @@ func NewFollowerIndexParameters() *FollowerIndexParameters { return r } - -// false diff --git a/typedapi/types/followindexstats.go b/typedapi/types/followindexstats.go index 1db31028e0..bb90c5cfec 100644 --- a/typedapi/types/followindexstats.go +++ b/typedapi/types/followindexstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FollowIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/_types/FollowIndexStats.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/_types/FollowIndexStats.ts#L30-L35 type FollowIndexStats struct { // Index The name of the follower index. Index string `json:"index"` @@ -74,5 +74,3 @@ func NewFollowIndexStats() *FollowIndexStats { return r } - -// false diff --git a/typedapi/types/followstats.go b/typedapi/types/followstats.go index 9eecef7e5f..ceb631e951 100644 --- a/typedapi/types/followstats.go +++ b/typedapi/types/followstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // FollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/stats/types.ts.ts#L49-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/stats/types.ts.ts#L49-L51 type FollowStats struct { Indices []FollowIndexStats `json:"indices"` } @@ -33,5 +33,3 @@ func NewFollowStats() *FollowStats { return r } - -// false diff --git a/typedapi/types/forcemergeaction.go b/typedapi/types/forcemergeaction.go index a6820ebe2d..4728133b84 100644 --- a/typedapi/types/forcemergeaction.go +++ b/typedapi/types/forcemergeaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ForceMergeAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L123-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L123-L126 type ForceMergeAction struct { IndexCodec *string `json:"index_codec,omitempty"` MaxNumSegments int `json:"max_num_segments"` @@ -91,13 +91,3 @@ func NewForceMergeAction() *ForceMergeAction { return r } - -// true - -type ForceMergeActionVariant interface { - ForceMergeActionCaster() *ForceMergeAction -} - -func (s *ForceMergeAction) ForceMergeActionCaster() *ForceMergeAction { - return s -} diff --git a/typedapi/types/foreachprocessor.go b/typedapi/types/foreachprocessor.go index aa9d34924b..c849e70446 100644 --- a/typedapi/types/foreachprocessor.go +++ b/typedapi/types/foreachprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ForeachProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L934-L948 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L934-L948 type ForeachProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -159,13 +159,3 @@ func NewForeachProcessor() *ForeachProcessor { return r } - -// true - -type ForeachProcessorVariant interface { - ForeachProcessorCaster() *ForeachProcessor -} - -func (s *ForeachProcessor) ForeachProcessorCaster() *ForeachProcessor { - return s -} diff --git a/typedapi/types/foundstatus.go b/typedapi/types/foundstatus.go index e094b1a225..55aa0020c6 100644 --- a/typedapi/types/foundstatus.go +++ b/typedapi/types/foundstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FoundStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/delete_privileges/types.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/delete_privileges/types.ts#L20-L22 type FoundStatus struct { Found bool `json:"found"` } @@ -76,5 +76,3 @@ func NewFoundStatus() *FoundStatus { return r } - -// false diff --git a/typedapi/types/frenchanalyzer.go b/typedapi/types/frenchanalyzer.go index 3679449f0e..e19eae5321 100644 --- a/typedapi/types/frenchanalyzer.go +++ b/typedapi/types/frenchanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // FrenchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L152-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L152-L157 type FrenchAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *FrenchAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *FrenchAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewFrenchAnalyzer() *FrenchAnalyzer { return r } - -// true - -type FrenchAnalyzerVariant interface { - FrenchAnalyzerCaster() *FrenchAnalyzer -} - -func (s *FrenchAnalyzer) FrenchAnalyzerCaster() *FrenchAnalyzer { - return s -} diff --git a/typedapi/types/frenchstemtokenfilter.go b/typedapi/types/frenchstemtokenfilter.go new file mode 100644 index 0000000000..df9c936ad0 --- /dev/null +++ b/typedapi/types/frenchstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// FrenchStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L555-L557 +type FrenchStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *FrenchStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s FrenchStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerFrenchStemTokenFilter FrenchStemTokenFilter + tmp := innerFrenchStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "french_stem" + + return json.Marshal(tmp) +} + +// NewFrenchStemTokenFilter returns a FrenchStemTokenFilter. +func NewFrenchStemTokenFilter() *FrenchStemTokenFilter { + r := &FrenchStemTokenFilter{} + + return r +} diff --git a/typedapi/types/frequencyencodingpreprocessor.go b/typedapi/types/frequencyencodingpreprocessor.go index b53c90161a..83eaed8bee 100644 --- a/typedapi/types/frequencyencodingpreprocessor.go +++ b/typedapi/types/frequencyencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FrequencyEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L38-L42 type FrequencyEncodingPreprocessor struct { FeatureName string `json:"feature_name"` Field string `json:"field"` @@ -98,13 +98,3 @@ func NewFrequencyEncodingPreprocessor() *FrequencyEncodingPreprocessor { return r } - -// true - -type FrequencyEncodingPreprocessorVariant interface { - FrequencyEncodingPreprocessorCaster() *FrequencyEncodingPreprocessor -} - -func (s *FrequencyEncodingPreprocessor) FrequencyEncodingPreprocessorCaster() *FrequencyEncodingPreprocessor { - return s -} diff --git a/typedapi/types/frequentitemsetsaggregate.go b/typedapi/types/frequentitemsetsaggregate.go index 1d2b759b20..ecb7c9363c 100644 --- a/typedapi/types/frequentitemsetsaggregate.go +++ b/typedapi/types/frequentitemsetsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L722-L723 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L724-L725 type FrequentItemSetsAggregate struct { Buckets BucketsFrequentItemSetsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewFrequentItemSetsAggregate() *FrequentItemSetsAggregate { return r } - -// false diff --git a/typedapi/types/frequentitemsetsaggregation.go b/typedapi/types/frequentitemsetsaggregation.go index 27f7b2b3cc..eae637d88d 100644 --- a/typedapi/types/frequentitemsetsaggregation.go +++ b/typedapi/types/frequentitemsetsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FrequentItemSetsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1240-L1267 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1241-L1268 type FrequentItemSetsAggregation struct { // Fields Fields to analyze. Fields []FrequentItemSetsField `json:"fields"` @@ -129,13 +129,3 @@ func NewFrequentItemSetsAggregation() *FrequentItemSetsAggregation { return r } - -// true - -type FrequentItemSetsAggregationVariant interface { - FrequentItemSetsAggregationCaster() *FrequentItemSetsAggregation -} - -func (s *FrequentItemSetsAggregation) FrequentItemSetsAggregationCaster() *FrequentItemSetsAggregation { - return s -} diff --git a/typedapi/types/frequentitemsetsbucket.go b/typedapi/types/frequentitemsetsbucket.go index 3f33ff84c0..a1ea403461 100644 --- a/typedapi/types/frequentitemsetsbucket.go +++ b/typedapi/types/frequentitemsetsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // FrequentItemSetsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L725-L728 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L727-L730 type FrequentItemSetsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -657,5 +657,3 @@ func NewFrequentItemSetsBucket() *FrequentItemSetsBucket { return r } - -// false diff --git a/typedapi/types/frequentitemsetsfield.go b/typedapi/types/frequentitemsetsfield.go index 4b5e0ec241..0db3fa0f72 100644 --- a/typedapi/types/frequentitemsetsfield.go +++ b/typedapi/types/frequentitemsetsfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1226-L1238 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1227-L1239 type FrequentItemSetsField struct { // Exclude Values to exclude. // Can be regular expression strings or arrays of strings of exact terms. @@ -124,13 +124,3 @@ func NewFrequentItemSetsField() *FrequentItemSetsField { return r } - -// true - -type FrequentItemSetsFieldVariant interface { - FrequentItemSetsFieldCaster() *FrequentItemSetsField -} - -func (s *FrequentItemSetsField) FrequentItemSetsFieldCaster() *FrequentItemSetsField { - return s -} diff --git a/typedapi/types/frozenindices.go b/typedapi/types/frozenindices.go index 1f320a8fea..58d857ba55 100644 --- a/typedapi/types/frozenindices.go +++ b/typedapi/types/frozenindices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FrozenIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L370-L372 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L370-L372 type FrozenIndices struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -107,5 +107,3 @@ func NewFrozenIndices() *FrozenIndices { return r } - -// false diff --git a/typedapi/types/functionscore.go b/typedapi/types/functionscore.go index 427f1a469c..6ecfdc1829 100644 --- a/typedapi/types/functionscore.go +++ b/typedapi/types/functionscore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FunctionScore type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L226-L266 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L226-L266 type FunctionScore struct { AdditionalFunctionScoreProperty map[string]json.RawMessage `json:"-"` // Exp Function that scores a document with a exponential decay, depending on the @@ -208,13 +208,3 @@ func NewFunctionScore() *FunctionScore { return r } - -// true - -type FunctionScoreVariant interface { - FunctionScoreCaster() *FunctionScore -} - -func (s *FunctionScore) FunctionScoreCaster() *FunctionScore { - return s -} diff --git a/typedapi/types/functionscorequery.go b/typedapi/types/functionscorequery.go index dffde24b99..62a487330a 100644 --- a/typedapi/types/functionscorequery.go +++ b/typedapi/types/functionscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // FunctionScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L105-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L105-L135 type FunctionScoreQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -169,13 +169,3 @@ func NewFunctionScoreQuery() *FunctionScoreQuery { return r } - -// true - -type FunctionScoreQueryVariant interface { - FunctionScoreQueryCaster() *FunctionScoreQuery -} - -func (s *FunctionScoreQuery) FunctionScoreQueryCaster() *FunctionScoreQuery { - return s -} diff --git a/typedapi/types/fuzziness.go b/typedapi/types/fuzziness.go index 9f995926bb..a2f522548f 100644 --- a/typedapi/types/fuzziness.go +++ b/typedapi/types/fuzziness.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L137-L138 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L137-L138 type Fuzziness any - -type FuzzinessVariant interface { - FuzzinessCaster() *Fuzziness -} diff --git a/typedapi/types/fuzzyquery.go b/typedapi/types/fuzzyquery.go index 7540b2957e..4444ea627c 100644 --- a/typedapi/types/fuzzyquery.go +++ b/typedapi/types/fuzzyquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // FuzzyQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L48-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L48-L86 type FuzzyQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -189,13 +189,3 @@ func NewFuzzyQuery() *FuzzyQuery { return r } - -// true - -type FuzzyQueryVariant interface { - FuzzyQueryCaster() *FuzzyQuery -} - -func (s *FuzzyQuery) FuzzyQueryCaster() *FuzzyQuery { - return s -} diff --git a/typedapi/types/galiciananalyzer.go b/typedapi/types/galiciananalyzer.go index 75a84a2be0..cc6d7e44ab 100644 --- a/typedapi/types/galiciananalyzer.go +++ b/typedapi/types/galiciananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // GalicianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L159-L164 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L159-L164 type GalicianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *GalicianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *GalicianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewGalicianAnalyzer() *GalicianAnalyzer { return r } - -// true - -type GalicianAnalyzerVariant interface { - GalicianAnalyzerCaster() *GalicianAnalyzer -} - -func (s *GalicianAnalyzer) GalicianAnalyzerCaster() *GalicianAnalyzer { - return s -} diff --git a/typedapi/types/garbagecollector.go b/typedapi/types/garbagecollector.go index fc31f656a4..a950a732b7 100644 --- a/typedapi/types/garbagecollector.go +++ b/typedapi/types/garbagecollector.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // GarbageCollector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L994-L999 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1001-L1006 type GarbageCollector struct { // Collectors Contains statistics about JVM garbage collectors for the node. Collectors map[string]GarbageCollectorTotal `json:"collectors,omitempty"` @@ -36,5 +36,3 @@ func NewGarbageCollector() *GarbageCollector { return r } - -// false diff --git a/typedapi/types/garbagecollectortotal.go b/typedapi/types/garbagecollectortotal.go index 72fb252cef..4bc5e33e7e 100644 --- a/typedapi/types/garbagecollectortotal.go +++ b/typedapi/types/garbagecollectortotal.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GarbageCollectorTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1001-L1014 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1008-L1021 type GarbageCollectorTotal struct { // CollectionCount Total number of JVM garbage collectors that collect objects. CollectionCount *int64 `json:"collection_count,omitempty"` @@ -109,5 +109,3 @@ func NewGarbageCollectorTotal() *GarbageCollectorTotal { return r } - -// false diff --git a/typedapi/types/gcsrepository.go b/typedapi/types/gcsrepository.go index 2658625a50..49f6feecac 100644 --- a/typedapi/types/gcsrepository.go +++ b/typedapi/types/gcsrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GcsRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L45-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L45-L48 type GcsRepository struct { Settings GcsRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewGcsRepository() *GcsRepository { return r } - -// true - -type GcsRepositoryVariant interface { - GcsRepositoryCaster() *GcsRepository -} - -func (s *GcsRepository) GcsRepositoryCaster() *GcsRepository { - return s -} diff --git a/typedapi/types/gcsrepositorysettings.go b/typedapi/types/gcsrepositorysettings.go index d6286c69c4..f16332d5eb 100644 --- a/typedapi/types/gcsrepositorysettings.go +++ b/typedapi/types/gcsrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GcsRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L85-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L85-L91 type GcsRepositorySettings struct { ApplicationName *string `json:"application_name,omitempty"` BasePath *string `json:"base_path,omitempty"` @@ -161,13 +161,3 @@ func NewGcsRepositorySettings() *GcsRepositorySettings { return r } - -// true - -type GcsRepositorySettingsVariant interface { - GcsRepositorySettingsCaster() *GcsRepositorySettings -} - -func (s *GcsRepositorySettings) GcsRepositorySettingsCaster() *GcsRepositorySettings { - return s -} diff --git a/typedapi/types/geoboundingboxquery.go b/typedapi/types/geoboundingboxquery.go index 505a768dc6..cf3ffde555 100644 --- a/typedapi/types/geoboundingboxquery.go +++ b/typedapi/types/geoboundingboxquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // GeoBoundingBoxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L35-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L35-L57 type GeoBoundingBoxQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -177,13 +177,3 @@ func NewGeoBoundingBoxQuery() *GeoBoundingBoxQuery { return r } - -// true - -type GeoBoundingBoxQueryVariant interface { - GeoBoundingBoxQueryCaster() *GeoBoundingBoxQuery -} - -func (s *GeoBoundingBoxQuery) GeoBoundingBoxQueryCaster() *GeoBoundingBoxQuery { - return s -} diff --git a/typedapi/types/geobounds.go b/typedapi/types/geobounds.go index d6c17b0259..35810527ff 100644 --- a/typedapi/types/geobounds.go +++ b/typedapi/types/geobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,9 +27,5 @@ package types // TopRightBottomLeftGeoBounds // WktGeoBounds // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L135-L148 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L135-L148 type GeoBounds any - -type GeoBoundsVariant interface { - GeoBoundsCaster() *GeoBounds -} diff --git a/typedapi/types/geoboundsaggregate.go b/typedapi/types/geoboundsaggregate.go index 2caf64b05f..9b1c1bd2e1 100644 --- a/typedapi/types/geoboundsaggregate.go +++ b/typedapi/types/geoboundsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoBoundsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L327-L333 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L327-L333 type GeoBoundsAggregate struct { Bounds GeoBounds `json:"bounds,omitempty"` Meta Metadata `json:"meta,omitempty"` @@ -130,5 +130,3 @@ func NewGeoBoundsAggregate() *GeoBoundsAggregate { return r } - -// false diff --git a/typedapi/types/geoboundsaggregation.go b/typedapi/types/geoboundsaggregation.go index e482a4421e..7688b33981 100644 --- a/typedapi/types/geoboundsaggregation.go +++ b/typedapi/types/geoboundsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoBoundsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L108-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L114-L123 type GeoBoundsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -99,13 +99,3 @@ func NewGeoBoundsAggregation() *GeoBoundsAggregation { return r } - -// true - -type GeoBoundsAggregationVariant interface { - GeoBoundsAggregationCaster() *GeoBoundsAggregation -} - -func (s *GeoBoundsAggregation) GeoBoundsAggregationCaster() *GeoBoundsAggregation { - return s -} diff --git a/typedapi/types/geocentroidaggregate.go b/typedapi/types/geocentroidaggregate.go index d03bfe97f9..db92e05319 100644 --- a/typedapi/types/geocentroidaggregate.go +++ b/typedapi/types/geocentroidaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L335-L342 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L335-L342 type GeoCentroidAggregate struct { Count int64 `json:"count"` Location GeoLocation `json:"location,omitempty"` @@ -129,5 +129,3 @@ func NewGeoCentroidAggregate() *GeoCentroidAggregate { return r } - -// false diff --git a/typedapi/types/geocentroidaggregation.go b/typedapi/types/geocentroidaggregation.go index c44e1fda3a..145586659a 100644 --- a/typedapi/types/geocentroidaggregation.go +++ b/typedapi/types/geocentroidaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L119-L122 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L125-L128 type GeoCentroidAggregation struct { Count *int64 `json:"count,omitempty"` // Field The field on which to run the aggregation. @@ -144,13 +144,3 @@ func NewGeoCentroidAggregation() *GeoCentroidAggregation { return r } - -// true - -type GeoCentroidAggregationVariant interface { - GeoCentroidAggregationCaster() *GeoCentroidAggregation -} - -func (s *GeoCentroidAggregation) GeoCentroidAggregationCaster() *GeoCentroidAggregation { - return s -} diff --git a/typedapi/types/geodecayfunction.go b/typedapi/types/geodecayfunction.go index 1ddf301afb..f20eb28e96 100644 --- a/typedapi/types/geodecayfunction.go +++ b/typedapi/types/geodecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // GeoDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L210-L213 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L210-L213 type GeoDecayFunction struct { DecayFunctionBaseGeoLocationDistance map[string]DecayPlacementGeoLocationDistance `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the @@ -74,13 +74,3 @@ func NewGeoDecayFunction() *GeoDecayFunction { return r } - -// true - -type GeoDecayFunctionVariant interface { - GeoDecayFunctionCaster() *GeoDecayFunction -} - -func (s *GeoDecayFunction) GeoDecayFunctionCaster() *GeoDecayFunction { - return s -} diff --git a/typedapi/types/geodistanceaggregate.go b/typedapi/types/geodistanceaggregate.go index d78212aff1..fcc6366976 100644 --- a/typedapi/types/geodistanceaggregate.go +++ b/typedapi/types/geodistanceaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoDistanceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L617-L622 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L617-L622 type GeoDistanceAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewGeoDistanceAggregate() *GeoDistanceAggregate { return r } - -// false diff --git a/typedapi/types/geodistanceaggregation.go b/typedapi/types/geodistanceaggregation.go index f565e10b83..8440223e8d 100644 --- a/typedapi/types/geodistanceaggregation.go +++ b/typedapi/types/geodistanceaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // GeoDistanceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L396-L419 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L396-L419 type GeoDistanceAggregation struct { // DistanceType The distance calculation type. DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` @@ -138,13 +138,3 @@ func NewGeoDistanceAggregation() *GeoDistanceAggregation { return r } - -// true - -type GeoDistanceAggregationVariant interface { - GeoDistanceAggregationCaster() *GeoDistanceAggregation -} - -func (s *GeoDistanceAggregation) GeoDistanceAggregationCaster() *GeoDistanceAggregation { - return s -} diff --git a/typedapi/types/geodistancefeaturequery.go b/typedapi/types/geodistancefeaturequery.go index dd355a582c..09293ca4e6 100644 --- a/typedapi/types/geodistancefeaturequery.go +++ b/typedapi/types/geodistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L66-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L66-L69 type GeoDistanceFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -171,13 +171,3 @@ func NewGeoDistanceFeatureQuery() *GeoDistanceFeatureQuery { return r } - -// true - -type GeoDistanceFeatureQueryVariant interface { - GeoDistanceFeatureQueryCaster() *GeoDistanceFeatureQuery -} - -func (s *GeoDistanceFeatureQuery) GeoDistanceFeatureQueryCaster() *GeoDistanceFeatureQuery { - return s -} diff --git a/typedapi/types/geodistancequery.go b/typedapi/types/geodistancequery.go index 6b75cf6bfc..deb4d3578b 100644 --- a/typedapi/types/geodistancequery.go +++ b/typedapi/types/geodistancequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // GeoDistanceQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L64-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L64-L96 type GeoDistanceQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -188,13 +188,3 @@ func NewGeoDistanceQuery() *GeoDistanceQuery { return r } - -// true - -type GeoDistanceQueryVariant interface { - GeoDistanceQueryCaster() *GeoDistanceQuery -} - -func (s *GeoDistanceQuery) GeoDistanceQueryCaster() *GeoDistanceQuery { - return s -} diff --git a/typedapi/types/geodistancesort.go b/typedapi/types/geodistancesort.go index cd19c26e42..e4e7d50dc2 100644 --- a/typedapi/types/geodistancesort.go +++ b/typedapi/types/geodistancesort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // GeoDistanceSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L58-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L58-L70 type GeoDistanceSort struct { DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` GeoDistanceSort map[string][]GeoLocation `json:"-"` @@ -166,13 +166,3 @@ func NewGeoDistanceSort() *GeoDistanceSort { return r } - -// true - -type GeoDistanceSortVariant interface { - GeoDistanceSortCaster() *GeoDistanceSort -} - -func (s *GeoDistanceSort) GeoDistanceSortCaster() *GeoDistanceSort { - return s -} diff --git a/typedapi/types/geogridprocessor.go b/typedapi/types/geogridprocessor.go index 3107deced4..d6f2df9a0f 100644 --- a/typedapi/types/geogridprocessor.go +++ b/typedapi/types/geogridprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // GeoGridProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L388-L429 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L388-L429 type GeoGridProcessor struct { // ChildrenField If specified and children tiles exist, save those tile addresses to this // field as an array of strings. @@ -215,13 +215,3 @@ func NewGeoGridProcessor() *GeoGridProcessor { return r } - -// true - -type GeoGridProcessorVariant interface { - GeoGridProcessorCaster() *GeoGridProcessor -} - -func (s *GeoGridProcessor) GeoGridProcessorCaster() *GeoGridProcessor { - return s -} diff --git a/typedapi/types/geogridquery.go b/typedapi/types/geogridquery.go index 24cb6d03b6..0aa042b6ea 100644 --- a/typedapi/types/geogridquery.go +++ b/typedapi/types/geogridquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoGridQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L98-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L98-L103 type GeoGridQuery struct { AdditionalGeoGridQueryProperty map[string]json.RawMessage `json:"-"` // Boost Floating point number used to decrease or increase the relevance scores of @@ -40,9 +40,9 @@ type GeoGridQuery struct { // A boost value between 0 and 1.0 decreases the relevance score. // A value greater than 1.0 increases the relevance score. Boost *float32 `json:"boost,omitempty"` - Geogrid *string `json:"geogrid,omitempty"` Geohash *string `json:"geohash,omitempty"` Geohex *string `json:"geohex,omitempty"` + Geotile *string `json:"geotile,omitempty"` QueryName_ *string `json:"_name,omitempty"` } @@ -77,11 +77,6 @@ func (s *GeoGridQuery) UnmarshalJSON(data []byte) error { s.Boost = &f } - case "geogrid": - if err := dec.Decode(&s.Geogrid); err != nil { - return fmt.Errorf("%s | %w", "Geogrid", err) - } - case "geohash": if err := dec.Decode(&s.Geohash); err != nil { return fmt.Errorf("%s | %w", "Geohash", err) @@ -92,6 +87,11 @@ func (s *GeoGridQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Geohex", err) } + case "geotile": + if err := dec.Decode(&s.Geotile); err != nil { + return fmt.Errorf("%s | %w", "Geotile", err) + } + case "_name": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -159,13 +159,3 @@ func NewGeoGridQuery() *GeoGridQuery { return r } - -// true - -type GeoGridQueryVariant interface { - GeoGridQueryCaster() *GeoGridQuery -} - -func (s *GeoGridQuery) GeoGridQueryCaster() *GeoGridQuery { - return s -} diff --git a/typedapi/types/geohashgridaggregate.go b/typedapi/types/geohashgridaggregate.go index 00e0f77607..f15697e624 100644 --- a/typedapi/types/geohashgridaggregate.go +++ b/typedapi/types/geohashgridaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoHashGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L566-L568 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L566-L568 type GeoHashGridAggregate struct { Buckets BucketsGeoHashGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewGeoHashGridAggregate() *GeoHashGridAggregate { return r } - -// false diff --git a/typedapi/types/geohashgridaggregation.go b/typedapi/types/geohashgridaggregation.go index 1d37d6b2b5..945e42adc0 100644 --- a/typedapi/types/geohashgridaggregation.go +++ b/typedapi/types/geohashgridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoHashGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L421-L449 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L421-L449 type GeoHashGridAggregation struct { // Bounds The bounding box to filter the points in each bucket. Bounds GeoBounds `json:"bounds,omitempty"` @@ -181,13 +181,3 @@ func NewGeoHashGridAggregation() *GeoHashGridAggregation { return r } - -// true - -type GeoHashGridAggregationVariant interface { - GeoHashGridAggregationCaster() *GeoHashGridAggregation -} - -func (s *GeoHashGridAggregation) GeoHashGridAggregationCaster() *GeoHashGridAggregation { - return s -} diff --git a/typedapi/types/geohashgridbucket.go b/typedapi/types/geohashgridbucket.go index 259f340870..35d8beb37d 100644 --- a/typedapi/types/geohashgridbucket.go +++ b/typedapi/types/geohashgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // GeoHashGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L570-L572 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L570-L572 type GeoHashGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewGeoHashGridBucket() *GeoHashGridBucket { return r } - -// false diff --git a/typedapi/types/geohashlocation.go b/typedapi/types/geohashlocation.go index 83a1cda3be..3f345634c8 100644 --- a/typedapi/types/geohashlocation.go +++ b/typedapi/types/geohashlocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoHashLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L131-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L131-L133 type GeoHashLocation struct { Geohash string `json:"geohash"` } @@ -66,13 +66,3 @@ func NewGeoHashLocation() *GeoHashLocation { return r } - -// true - -type GeoHashLocationVariant interface { - GeoHashLocationCaster() *GeoHashLocation -} - -func (s *GeoHashLocation) GeoHashLocationCaster() *GeoHashLocation { - return s -} diff --git a/typedapi/types/geohashprecision.go b/typedapi/types/geohashprecision.go index b1a68e7892..750213fbbb 100644 --- a/typedapi/types/geohashprecision.go +++ b/typedapi/types/geohashprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L86-L90 type GeoHashPrecision any - -type GeoHashPrecisionVariant interface { - GeoHashPrecisionCaster() *GeoHashPrecision -} diff --git a/typedapi/types/geohexgridaggregate.go b/typedapi/types/geohexgridaggregate.go index b34cc6b396..296ac4b0d2 100644 --- a/typedapi/types/geohexgridaggregate.go +++ b/typedapi/types/geohexgridaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoHexGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L585-L586 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L585-L586 type GeoHexGridAggregate struct { Buckets BucketsGeoHexGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewGeoHexGridAggregate() *GeoHexGridAggregate { return r } - -// false diff --git a/typedapi/types/geohexgridaggregation.go b/typedapi/types/geohexgridaggregation.go index 234bf98bef..7920c29cf4 100644 --- a/typedapi/types/geohexgridaggregation.go +++ b/typedapi/types/geohexgridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeohexGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L479-L504 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L479-L504 type GeohexGridAggregation struct { // Bounds Bounding box used to filter the geo-points in each bucket. Bounds GeoBounds `json:"bounds,omitempty"` @@ -189,13 +189,3 @@ func NewGeohexGridAggregation() *GeohexGridAggregation { return r } - -// true - -type GeohexGridAggregationVariant interface { - GeohexGridAggregationCaster() *GeohexGridAggregation -} - -func (s *GeohexGridAggregation) GeohexGridAggregationCaster() *GeohexGridAggregation { - return s -} diff --git a/typedapi/types/geohexgridbucket.go b/typedapi/types/geohexgridbucket.go index 4278f94a69..35fee82709 100644 --- a/typedapi/types/geohexgridbucket.go +++ b/typedapi/types/geohexgridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // GeoHexGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L588-L590 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L588-L590 type GeoHexGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewGeoHexGridBucket() *GeoHexGridBucket { return r } - -// false diff --git a/typedapi/types/geoipdatabaseconfigurationmetadata.go b/typedapi/types/geoipdatabaseconfigurationmetadata.go index fc033f89b6..f59823bf0c 100644 --- a/typedapi/types/geoipdatabaseconfigurationmetadata.go +++ b/typedapi/types/geoipdatabaseconfigurationmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoipDatabaseConfigurationMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34 type GeoipDatabaseConfigurationMetadata struct { Database DatabaseConfiguration `json:"database"` Id string `json:"id"` @@ -95,5 +95,3 @@ func NewGeoipDatabaseConfigurationMetadata() *GeoipDatabaseConfigurationMetadata return r } - -// false diff --git a/typedapi/types/geoipdownloadstatistics.go b/typedapi/types/geoipdownloadstatistics.go index 2df7187dcb..f2a31b1680 100644 --- a/typedapi/types/geoipdownloadstatistics.go +++ b/typedapi/types/geoipdownloadstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoIpDownloadStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/geo_ip_stats/types.ts#L24-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/geo_ip_stats/types.ts#L24-L37 type GeoIpDownloadStatistics struct { // DatabasesCount Current number of databases available for use. DatabasesCount int `json:"databases_count"` @@ -158,5 +158,3 @@ func NewGeoIpDownloadStatistics() *GeoIpDownloadStatistics { return r } - -// false diff --git a/typedapi/types/geoipnodedatabasename.go b/typedapi/types/geoipnodedatabasename.go index 497a74fdc3..96b7a01a77 100644 --- a/typedapi/types/geoipnodedatabasename.go +++ b/typedapi/types/geoipnodedatabasename.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoIpNodeDatabaseName type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/geo_ip_stats/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/geo_ip_stats/types.ts#L47-L50 type GeoIpNodeDatabaseName struct { // Name Name of the database. Name string `json:"name"` @@ -67,5 +67,3 @@ func NewGeoIpNodeDatabaseName() *GeoIpNodeDatabaseName { return r } - -// false diff --git a/typedapi/types/geoipnodedatabases.go b/typedapi/types/geoipnodedatabases.go index 4f2409718e..3681887fee 100644 --- a/typedapi/types/geoipnodedatabases.go +++ b/typedapi/types/geoipnodedatabases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // GeoIpNodeDatabases type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/geo_ip_stats/types.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/geo_ip_stats/types.ts#L39-L45 type GeoIpNodeDatabases struct { // Databases Downloaded databases for the node. Databases []GeoIpNodeDatabaseName `json:"databases"` @@ -38,5 +38,3 @@ func NewGeoIpNodeDatabases() *GeoIpNodeDatabases { return r } - -// false diff --git a/typedapi/types/geoipprocessor.go b/typedapi/types/geoipprocessor.go index c782d46fa3..9cc90f622c 100644 --- a/typedapi/types/geoipprocessor.go +++ b/typedapi/types/geoipprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoIpProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L442-L476 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L442-L476 type GeoIpProcessor struct { // DatabaseFile The database filename referring to a database the module ships with // (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom @@ -220,13 +220,3 @@ func NewGeoIpProcessor() *GeoIpProcessor { return r } - -// true - -type GeoIpProcessorVariant interface { - GeoIpProcessorCaster() *GeoIpProcessor -} - -func (s *GeoIpProcessor) GeoIpProcessorCaster() *GeoIpProcessor { - return s -} diff --git a/typedapi/types/geoline.go b/typedapi/types/geoline.go index b69e58b682..e08cea92b9 100644 --- a/typedapi/types/geoline.go +++ b/typedapi/types/geoline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoLine type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L56-L62 type GeoLine struct { // Coordinates Array of `[lon, lat]` coordinates Coordinates [][]Float64 `json:"coordinates"` @@ -82,5 +82,3 @@ func NewGeoLine() *GeoLine { return r } - -// false diff --git a/typedapi/types/geolineaggregate.go b/typedapi/types/geolineaggregate.go index 5bd1d01cb8..b36633ee48 100644 --- a/typedapi/types/geolineaggregate.go +++ b/typedapi/types/geolineaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoLineAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L902-L912 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L904-L914 type GeoLineAggregate struct { Geometry GeoLine `json:"geometry"` Meta Metadata `json:"meta,omitempty"` @@ -92,5 +92,3 @@ func NewGeoLineAggregate() *GeoLineAggregate { return r } - -// false diff --git a/typedapi/types/geolineaggregation.go b/typedapi/types/geolineaggregation.go index 8cdeea2ce2..0222c21c76 100644 --- a/typedapi/types/geolineaggregation.go +++ b/typedapi/types/geolineaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // GeoLineAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L124-L149 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L130-L155 type GeoLineAggregation struct { // IncludeSort When `true`, returns an additional array of the sort values in the feature // properties. @@ -123,13 +123,3 @@ func NewGeoLineAggregation() *GeoLineAggregation { return r } - -// true - -type GeoLineAggregationVariant interface { - GeoLineAggregationCaster() *GeoLineAggregation -} - -func (s *GeoLineAggregation) GeoLineAggregationCaster() *GeoLineAggregation { - return s -} diff --git a/typedapi/types/geolinepoint.go b/typedapi/types/geolinepoint.go index a8e5868833..7e8c78f13c 100644 --- a/typedapi/types/geolinepoint.go +++ b/typedapi/types/geolinepoint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoLinePoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L158-L163 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L164-L169 type GeoLinePoint struct { // Field The name of the geo_point field. Field string `json:"field"` @@ -67,13 +67,3 @@ func NewGeoLinePoint() *GeoLinePoint { return r } - -// true - -type GeoLinePointVariant interface { - GeoLinePointCaster() *GeoLinePoint -} - -func (s *GeoLinePoint) GeoLinePointCaster() *GeoLinePoint { - return s -} diff --git a/typedapi/types/geolinesort.go b/typedapi/types/geolinesort.go index 7a69703ef6..4bb04ce918 100644 --- a/typedapi/types/geolinesort.go +++ b/typedapi/types/geolinesort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoLineSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L151-L156 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L157-L162 type GeoLineSort struct { // Field The name of the numeric field to use as the sort key for ordering the points. Field string `json:"field"` @@ -67,13 +67,3 @@ func NewGeoLineSort() *GeoLineSort { return r } - -// true - -type GeoLineSortVariant interface { - GeoLineSortCaster() *GeoLineSort -} - -func (s *GeoLineSort) GeoLineSortCaster() *GeoLineSort { - return s -} diff --git a/typedapi/types/geolocation.go b/typedapi/types/geolocation.go index 6c41114a33..32450b92b5 100644 --- a/typedapi/types/geolocation.go +++ b/typedapi/types/geolocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,9 +27,5 @@ package types // []Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L104-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L104-L118 type GeoLocation any - -type GeoLocationVariant interface { - GeoLocationCaster() *GeoLocation -} diff --git a/typedapi/types/geopointproperty.go b/typedapi/types/geopointproperty.go index d70b5820c5..a599542913 100644 --- a/typedapi/types/geopointproperty.go +++ b/typedapi/types/geopointproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,13 +29,14 @@ import ( "strconv" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/geopointmetrictype" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/onscripterror" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/syntheticsourcekeepenum" ) // GeoPointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/geo.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L24-L33 type GeoPointProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -53,6 +54,7 @@ type GeoPointProperty struct { Script *Script `json:"script,omitempty"` Store *bool `json:"store,omitempty"` SyntheticSourceKeep *syntheticsourcekeepenum.SyntheticSourceKeepEnum `json:"synthetic_source_keep,omitempty"` + TimeSeriesMetric *geopointmetrictype.GeoPointMetricType `json:"time_series_metric,omitempty"` Type string `json:"type,omitempty"` } @@ -248,6 +250,12 @@ func (s *GeoPointProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -695,6 +703,12 @@ func (s *GeoPointProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -908,6 +922,11 @@ func (s *GeoPointProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "SyntheticSourceKeep", err) } + case "time_series_metric": + if err := dec.Decode(&s.TimeSeriesMetric); err != nil { + return fmt.Errorf("%s | %w", "TimeSeriesMetric", err) + } + case "type": if err := dec.Decode(&s.Type); err != nil { return fmt.Errorf("%s | %w", "Type", err) @@ -937,6 +956,7 @@ func (s GeoPointProperty) MarshalJSON() ([]byte, error) { Script: s.Script, Store: s.Store, SyntheticSourceKeep: s.SyntheticSourceKeep, + TimeSeriesMetric: s.TimeSeriesMetric, Type: s.Type, } @@ -955,13 +975,3 @@ func NewGeoPointProperty() *GeoPointProperty { return r } - -// true - -type GeoPointPropertyVariant interface { - GeoPointPropertyCaster() *GeoPointProperty -} - -func (s *GeoPointProperty) GeoPointPropertyCaster() *GeoPointProperty { - return s -} diff --git a/typedapi/types/geopolygonpoints.go b/typedapi/types/geopolygonpoints.go index 8c87fc8953..7b9ec9fee4 100644 --- a/typedapi/types/geopolygonpoints.go +++ b/typedapi/types/geopolygonpoints.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // GeoPolygonPoints type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L105-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L105-L107 type GeoPolygonPoints struct { Points []GeoLocation `json:"points"` } @@ -33,13 +33,3 @@ func NewGeoPolygonPoints() *GeoPolygonPoints { return r } - -// true - -type GeoPolygonPointsVariant interface { - GeoPolygonPointsCaster() *GeoPolygonPoints -} - -func (s *GeoPolygonPoints) GeoPolygonPointsCaster() *GeoPolygonPoints { - return s -} diff --git a/typedapi/types/geopolygonquery.go b/typedapi/types/geopolygonquery.go index c3fcc6f7ff..f728eafcc7 100644 --- a/typedapi/types/geopolygonquery.go +++ b/typedapi/types/geopolygonquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // GeoPolygonQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L109-L121 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L109-L121 type GeoPolygonQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -164,13 +164,3 @@ func NewGeoPolygonQuery() *GeoPolygonQuery { return r } - -// true - -type GeoPolygonQueryVariant interface { - GeoPolygonQueryCaster() *GeoPolygonQuery -} - -func (s *GeoPolygonQuery) GeoPolygonQueryCaster() *GeoPolygonQuery { - return s -} diff --git a/typedapi/types/georesults.go b/typedapi/types/georesults.go index 3ca4471ba8..ea4b818789 100644 --- a/typedapi/types/georesults.go +++ b/typedapi/types/georesults.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Anomaly.ts#L146-L155 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Anomaly.ts#L146-L155 type GeoResults struct { // ActualPoint The actual value for the bucket formatted as a `geo_point`. ActualPoint *string `json:"actual_point,omitempty"` @@ -89,5 +89,3 @@ func NewGeoResults() *GeoResults { return r } - -// false diff --git a/typedapi/types/geoshapefieldquery.go b/typedapi/types/geoshapefieldquery.go index 954b544f30..b5e160c0b0 100644 --- a/typedapi/types/geoshapefieldquery.go +++ b/typedapi/types/geoshapefieldquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // GeoShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L128-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L128-L139 type GeoShapeFieldQuery struct { // IndexedShape Query using an indexed shape retrieved from the the specified document and // path. @@ -83,13 +83,3 @@ func NewGeoShapeFieldQuery() *GeoShapeFieldQuery { return r } - -// true - -type GeoShapeFieldQueryVariant interface { - GeoShapeFieldQueryCaster() *GeoShapeFieldQuery -} - -func (s *GeoShapeFieldQuery) GeoShapeFieldQueryCaster() *GeoShapeFieldQuery { - return s -} diff --git a/typedapi/types/geoshapeproperty.go b/typedapi/types/geoshapeproperty.go index b6e1e2ad68..8c3de70c0e 100644 --- a/typedapi/types/geoshapeproperty.go +++ b/typedapi/types/geoshapeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // GeoShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/geo.ts#L41-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L48-L62 type GeoShapeProperty struct { Coerce *bool `json:"coerce,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -263,6 +263,12 @@ func (s *GeoShapeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -665,6 +671,12 @@ func (s *GeoShapeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -925,13 +937,3 @@ func NewGeoShapeProperty() *GeoShapeProperty { return r } - -// true - -type GeoShapePropertyVariant interface { - GeoShapePropertyCaster() *GeoShapeProperty -} - -func (s *GeoShapeProperty) GeoShapePropertyCaster() *GeoShapeProperty { - return s -} diff --git a/typedapi/types/geoshapequery.go b/typedapi/types/geoshapequery.go index f81a554a93..f78cca7708 100644 --- a/typedapi/types/geoshapequery.go +++ b/typedapi/types/geoshapequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/geo.ts#L141-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/geo.ts#L141-L157 type GeoShapeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -159,13 +159,3 @@ func NewGeoShapeQuery() *GeoShapeQuery { return r } - -// true - -type GeoShapeQueryVariant interface { - GeoShapeQueryCaster() *GeoShapeQuery -} - -func (s *GeoShapeQuery) GeoShapeQueryCaster() *GeoShapeQuery { - return s -} diff --git a/typedapi/types/geotilegridaggregate.go b/typedapi/types/geotilegridaggregate.go index e8b6a4f4cd..5554c78368 100644 --- a/typedapi/types/geotilegridaggregate.go +++ b/typedapi/types/geotilegridaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GeoTileGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L574-L579 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L574-L579 type GeoTileGridAggregate struct { Buckets BucketsGeoTileGridBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewGeoTileGridAggregate() *GeoTileGridAggregate { return r } - -// false diff --git a/typedapi/types/geotilegridaggregation.go b/typedapi/types/geotilegridaggregation.go index 15163dd737..b321023dec 100644 --- a/typedapi/types/geotilegridaggregation.go +++ b/typedapi/types/geotilegridaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L451-L477 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L451-L477 type GeoTileGridAggregation struct { // Bounds A bounding box to filter the geo-points or geo-shapes in each bucket. Bounds GeoBounds `json:"bounds,omitempty"` @@ -181,13 +181,3 @@ func NewGeoTileGridAggregation() *GeoTileGridAggregation { return r } - -// true - -type GeoTileGridAggregationVariant interface { - GeoTileGridAggregationCaster() *GeoTileGridAggregation -} - -func (s *GeoTileGridAggregation) GeoTileGridAggregationCaster() *GeoTileGridAggregation { - return s -} diff --git a/typedapi/types/geotilegridbucket.go b/typedapi/types/geotilegridbucket.go index 1110ab5d35..80a610128d 100644 --- a/typedapi/types/geotilegridbucket.go +++ b/typedapi/types/geotilegridbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // GeoTileGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L581-L583 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L581-L583 type GeoTileGridBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewGeoTileGridBucket() *GeoTileGridBucket { return r } - -// false diff --git a/typedapi/types/germananalyzer.go b/typedapi/types/germananalyzer.go index 31de7798e2..ad28962e43 100644 --- a/typedapi/types/germananalyzer.go +++ b/typedapi/types/germananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // GermanAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L166-L171 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L166-L171 type GermanAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *GermanAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *GermanAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewGermanAnalyzer() *GermanAnalyzer { return r } - -// true - -type GermanAnalyzerVariant interface { - GermanAnalyzerCaster() *GermanAnalyzer -} - -func (s *GermanAnalyzer) GermanAnalyzerCaster() *GermanAnalyzer { - return s -} diff --git a/typedapi/types/germannormalizationtokenfilter.go b/typedapi/types/germannormalizationtokenfilter.go new file mode 100644 index 0000000000..e3f9ab5ad5 --- /dev/null +++ b/typedapi/types/germannormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// GermanNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L498-L500 +type GermanNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *GermanNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s GermanNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerGermanNormalizationTokenFilter GermanNormalizationTokenFilter + tmp := innerGermanNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "german_normalization" + + return json.Marshal(tmp) +} + +// NewGermanNormalizationTokenFilter returns a GermanNormalizationTokenFilter. +func NewGermanNormalizationTokenFilter() *GermanNormalizationTokenFilter { + r := &GermanNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/germanstemtokenfilter.go b/typedapi/types/germanstemtokenfilter.go new file mode 100644 index 0000000000..0185c23a52 --- /dev/null +++ b/typedapi/types/germanstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// GermanStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L563-L565 +type GermanStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *GermanStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s GermanStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerGermanStemTokenFilter GermanStemTokenFilter + tmp := innerGermanStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "german_stem" + + return json.Marshal(tmp) +} + +// NewGermanStemTokenFilter returns a GermanStemTokenFilter. +func NewGermanStemTokenFilter() *GermanStemTokenFilter { + r := &GermanStemTokenFilter{} + + return r +} diff --git a/typedapi/types/getmigrationfeature.go b/typedapi/types/getmigrationfeature.go index 107301c20c..7e7701cf82 100644 --- a/typedapi/types/getmigrationfeature.go +++ b/typedapi/types/getmigrationfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // GetMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 type GetMigrationFeature struct { FeatureName string `json:"feature_name"` Indices []MigrationFeatureIndexInfo `json:"indices"` @@ -94,5 +94,3 @@ func NewGetMigrationFeature() *GetMigrationFeature { return r } - -// false diff --git a/typedapi/types/getresult.go b/typedapi/types/getresult.go index f84d10cfd0..bc8f10002a 100644 --- a/typedapi/types/getresult.go +++ b/typedapi/types/getresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GetResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get/types.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get/types.ts#L25-L67 type GetResult struct { // Fields If the `stored_fields` parameter is set to `true` and `found` is `true`, it // contains the document fields stored in the index. @@ -166,5 +166,3 @@ func NewGetResult() *GetResult { return r } - -// false diff --git a/typedapi/types/getscriptcontext.go b/typedapi/types/getscriptcontext.go index d15e209870..3ae52e682d 100644 --- a/typedapi/types/getscriptcontext.go +++ b/typedapi/types/getscriptcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GetScriptContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script_context/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script_context/types.ts#L22-L25 type GetScriptContext struct { Methods []ContextMethod `json:"methods"` Name string `json:"name"` @@ -72,5 +72,3 @@ func NewGetScriptContext() *GetScriptContext { return r } - -// false diff --git a/typedapi/types/getstats.go b/typedapi/types/getstats.go index 23a9f67c67..d0a0bb3419 100644 --- a/typedapi/types/getstats.go +++ b/typedapi/types/getstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GetStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L133-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L155-L166 type GetStats struct { Current int64 `json:"current"` ExistsTime Duration `json:"exists_time,omitempty"` @@ -161,5 +161,3 @@ func NewGetStats() *GetStats { return r } - -// false diff --git a/typedapi/types/getuserprofileerrors.go b/typedapi/types/getuserprofileerrors.go index 5397442a7b..eb2ade1689 100644 --- a/typedapi/types/getuserprofileerrors.go +++ b/typedapi/types/getuserprofileerrors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GetUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_user_profile/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_user_profile/types.ts#L25-L28 type GetUserProfileErrors struct { Count int64 `json:"count"` Details map[string]ErrorCause `json:"details"` @@ -88,5 +88,3 @@ func NewGetUserProfileErrors() *GetUserProfileErrors { return r } - -// false diff --git a/typedapi/types/globalaggregate.go b/typedapi/types/globalaggregate.go index 56c9bce174..97a54819a3 100644 --- a/typedapi/types/globalaggregate.go +++ b/typedapi/types/globalaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // GlobalAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L546-L550 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L546-L550 type GlobalAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewGlobalAggregate() *GlobalAggregate { return r } - -// false diff --git a/typedapi/types/globalaggregation.go b/typedapi/types/globalaggregation.go index b49ab72473..43c2321cb9 100644 --- a/typedapi/types/globalaggregation.go +++ b/typedapi/types/globalaggregation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // GlobalAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L506-L506 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L506-L506 type GlobalAggregation struct { } @@ -32,13 +32,3 @@ func NewGlobalAggregation() *GlobalAggregation { return r } - -// true - -type GlobalAggregationVariant interface { - GlobalAggregationCaster() *GlobalAggregation -} - -func (s *GlobalAggregation) GlobalAggregationCaster() *GlobalAggregation { - return s -} diff --git a/typedapi/types/globalordinalfieldstats.go b/typedapi/types/globalordinalfieldstats.go new file mode 100644 index 0000000000..b4c4630ecc --- /dev/null +++ b/typedapi/types/globalordinalfieldstats.go @@ -0,0 +1,98 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GlobalOrdinalFieldStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L137-L141 +type GlobalOrdinalFieldStats struct { + BuildTime *string `json:"build_time,omitempty"` + BuildTimeInMillis int64 `json:"build_time_in_millis"` + ShardMaxValueCount int64 `json:"shard_max_value_count"` +} + +func (s *GlobalOrdinalFieldStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "build_time": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "BuildTime", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.BuildTime = &o + + case "build_time_in_millis": + if err := dec.Decode(&s.BuildTimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "BuildTimeInMillis", err) + } + + case "shard_max_value_count": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "ShardMaxValueCount", err) + } + s.ShardMaxValueCount = value + case float64: + f := int64(v) + s.ShardMaxValueCount = f + } + + } + } + return nil +} + +// NewGlobalOrdinalFieldStats returns a GlobalOrdinalFieldStats. +func NewGlobalOrdinalFieldStats() *GlobalOrdinalFieldStats { + r := &GlobalOrdinalFieldStats{} + + return r +} diff --git a/typedapi/types/globalordinalsstats.go b/typedapi/types/globalordinalsstats.go new file mode 100644 index 0000000000..b889fe8e75 --- /dev/null +++ b/typedapi/types/globalordinalsstats.go @@ -0,0 +1,93 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GlobalOrdinalsStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L131-L135 +type GlobalOrdinalsStats struct { + BuildTime *string `json:"build_time,omitempty"` + BuildTimeInMillis int64 `json:"build_time_in_millis"` + Fields map[string]GlobalOrdinalFieldStats `json:"fields,omitempty"` +} + +func (s *GlobalOrdinalsStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "build_time": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "BuildTime", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.BuildTime = &o + + case "build_time_in_millis": + if err := dec.Decode(&s.BuildTimeInMillis); err != nil { + return fmt.Errorf("%s | %w", "BuildTimeInMillis", err) + } + + case "fields": + if s.Fields == nil { + s.Fields = make(map[string]GlobalOrdinalFieldStats, 0) + } + if err := dec.Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + + } + } + return nil +} + +// NewGlobalOrdinalsStats returns a GlobalOrdinalsStats. +func NewGlobalOrdinalsStats() *GlobalOrdinalsStats { + r := &GlobalOrdinalsStats{ + Fields: make(map[string]GlobalOrdinalFieldStats), + } + + return r +} diff --git a/typedapi/types/globalprivilege.go b/typedapi/types/globalprivilege.go index 14a723984e..1723c54aea 100644 --- a/typedapi/types/globalprivilege.go +++ b/typedapi/types/globalprivilege.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // GlobalPrivilege type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L430-L432 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L430-L432 type GlobalPrivilege struct { Application ApplicationGlobalUserPrivileges `json:"application"` } @@ -33,13 +33,3 @@ func NewGlobalPrivilege() *GlobalPrivilege { return r } - -// true - -type GlobalPrivilegeVariant interface { - GlobalPrivilegeCaster() *GlobalPrivilege -} - -func (s *GlobalPrivilege) GlobalPrivilegeCaster() *GlobalPrivilege { - return s -} diff --git a/typedapi/types/googleaistudioservicesettings.go b/typedapi/types/googleaistudioservicesettings.go index 368e5f419c..48327fce38 100644 --- a/typedapi/types/googleaistudioservicesettings.go +++ b/typedapi/types/googleaistudioservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GoogleAiStudioServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L794-L810 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1305-L1321 type GoogleAiStudioServiceSettings struct { // ApiKey A valid API key of your Google Gemini account. ApiKey string `json:"api_key"` @@ -100,13 +100,3 @@ func NewGoogleAiStudioServiceSettings() *GoogleAiStudioServiceSettings { return r } - -// true - -type GoogleAiStudioServiceSettingsVariant interface { - GoogleAiStudioServiceSettingsCaster() *GoogleAiStudioServiceSettings -} - -func (s *GoogleAiStudioServiceSettings) GoogleAiStudioServiceSettingsCaster() *GoogleAiStudioServiceSettings { - return s -} diff --git a/typedapi/types/googlenormalizeddistanceheuristic.go b/typedapi/types/googlenormalizeddistanceheuristic.go index 08df80d4f6..c392edeb86 100644 --- a/typedapi/types/googlenormalizeddistanceheuristic.go +++ b/typedapi/types/googlenormalizeddistanceheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GoogleNormalizedDistanceHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L793-L798 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L793-L798 type GoogleNormalizedDistanceHeuristic struct { // BackgroundIsSuperset Set to `false` if you defined a custom background filter that represents a // different set of documents that you want to compare to. @@ -78,13 +78,3 @@ func NewGoogleNormalizedDistanceHeuristic() *GoogleNormalizedDistanceHeuristic { return r } - -// true - -type GoogleNormalizedDistanceHeuristicVariant interface { - GoogleNormalizedDistanceHeuristicCaster() *GoogleNormalizedDistanceHeuristic -} - -func (s *GoogleNormalizedDistanceHeuristic) GoogleNormalizedDistanceHeuristicCaster() *GoogleNormalizedDistanceHeuristic { - return s -} diff --git a/typedapi/types/googlevertexaiservicesettings.go b/typedapi/types/googlevertexaiservicesettings.go index ee0c87dfa2..e875fad2f8 100644 --- a/typedapi/types/googlevertexaiservicesettings.go +++ b/typedapi/types/googlevertexaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GoogleVertexAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L821-L847 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1332-L1358 type GoogleVertexAIServiceSettings struct { // Location The name of the location to use for the inference task. // Refer to the Google documentation for the list of supported locations. @@ -129,13 +129,3 @@ func NewGoogleVertexAIServiceSettings() *GoogleVertexAIServiceSettings { return r } - -// true - -type GoogleVertexAIServiceSettingsVariant interface { - GoogleVertexAIServiceSettingsCaster() *GoogleVertexAIServiceSettings -} - -func (s *GoogleVertexAIServiceSettings) GoogleVertexAIServiceSettingsCaster() *GoogleVertexAIServiceSettings { - return s -} diff --git a/typedapi/types/googlevertexaitasksettings.go b/typedapi/types/googlevertexaitasksettings.go index df1bed2993..165c3ed462 100644 --- a/typedapi/types/googlevertexaitasksettings.go +++ b/typedapi/types/googlevertexaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GoogleVertexAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L849-L858 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1360-L1369 type GoogleVertexAITaskSettings struct { // AutoTruncate For a `text_embedding` task, truncate inputs longer than the maximum token // length automatically. @@ -97,13 +97,3 @@ func NewGoogleVertexAITaskSettings() *GoogleVertexAITaskSettings { return r } - -// true - -type GoogleVertexAITaskSettingsVariant interface { - GoogleVertexAITaskSettingsCaster() *GoogleVertexAITaskSettings -} - -func (s *GoogleVertexAITaskSettings) GoogleVertexAITaskSettingsCaster() *GoogleVertexAITaskSettings { - return s -} diff --git a/typedapi/types/grantapikey.go b/typedapi/types/grantapikey.go index 9a94240690..f9e0409c55 100644 --- a/typedapi/types/grantapikey.go +++ b/typedapi/types/grantapikey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // GrantApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/grant_api_key/types.ts#L25-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/grant_api_key/types.ts#L25-L45 type GrantApiKey struct { // Expiration Expiration time for the API key. By default, API keys never expire. Expiration *string `json:"expiration,omitempty"` @@ -110,13 +110,3 @@ func NewGrantApiKey() *GrantApiKey { return r } - -// true - -type GrantApiKeyVariant interface { - GrantApiKeyCaster() *GrantApiKey -} - -func (s *GrantApiKey) GrantApiKeyCaster() *GrantApiKey { - return s -} diff --git a/typedapi/types/greaterthanvalidation.go b/typedapi/types/greaterthanvalidation.go index 55f7e951db..21d81a9f4d 100644 --- a/typedapi/types/greaterthanvalidation.go +++ b/typedapi/types/greaterthanvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GreaterThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L63-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L63-L66 type GreaterThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` @@ -97,13 +97,3 @@ func NewGreaterThanValidation() *GreaterThanValidation { return r } - -// true - -type GreaterThanValidationVariant interface { - GreaterThanValidationCaster() *GreaterThanValidation -} - -func (s *GreaterThanValidation) GreaterThanValidationCaster() *GreaterThanValidation { - return s -} diff --git a/typedapi/types/greekanalyzer.go b/typedapi/types/greekanalyzer.go index 3c7b09e014..0dbd31c754 100644 --- a/typedapi/types/greekanalyzer.go +++ b/typedapi/types/greekanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // GreekAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L173-L177 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L173-L177 type GreekAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *GreekAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *GreekAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewGreekAnalyzer() *GreekAnalyzer { return r } - -// true - -type GreekAnalyzerVariant interface { - GreekAnalyzerCaster() *GreekAnalyzer -} - -func (s *GreekAnalyzer) GreekAnalyzerCaster() *GreekAnalyzer { - return s -} diff --git a/typedapi/types/grokprocessor.go b/typedapi/types/grokprocessor.go index 38c705d134..cd2121e29e 100644 --- a/typedapi/types/grokprocessor.go +++ b/typedapi/types/grokprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GrokProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L950-L981 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L950-L981 type GrokProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -207,13 +207,3 @@ func NewGrokProcessor() *GrokProcessor { return r } - -// true - -type GrokProcessorVariant interface { - GrokProcessorCaster() *GrokProcessor -} - -func (s *GrokProcessor) GrokProcessorCaster() *GrokProcessor { - return s -} diff --git a/typedapi/types/groupings.go b/typedapi/types/groupings.go index 5aa5ff2621..7dcb1228b3 100644 --- a/typedapi/types/groupings.go +++ b/typedapi/types/groupings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Groupings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/_types/Groupings.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/_types/Groupings.ts#L24-L40 type Groupings struct { // DateHistogram A date histogram group aggregates a date field into time-based buckets. // This group is mandatory; you currently cannot roll up documents without a @@ -45,13 +45,3 @@ func NewGroupings() *Groupings { return r } - -// true - -type GroupingsVariant interface { - GroupingsCaster() *Groupings -} - -func (s *Groupings) GroupingsCaster() *Groupings { - return s -} diff --git a/typedapi/types/gsubprocessor.go b/typedapi/types/gsubprocessor.go index fd63f218b4..9f19ca172b 100644 --- a/typedapi/types/gsubprocessor.go +++ b/typedapi/types/gsubprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // GsubProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L983-L1007 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L983-L1007 type GsubProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -188,13 +188,3 @@ func NewGsubProcessor() *GsubProcessor { return r } - -// true - -type GsubProcessorVariant interface { - GsubProcessorCaster() *GsubProcessor -} - -func (s *GsubProcessor) GsubProcessorCaster() *GsubProcessor { - return s -} diff --git a/typedapi/types/halffloatnumberproperty.go b/typedapi/types/halffloatnumberproperty.go index 9f7d61d6a7..a1879d6921 100644 --- a/typedapi/types/halffloatnumberproperty.go +++ b/typedapi/types/halffloatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // HalfFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L161-L164 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L163-L166 type HalfFloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *HalfFloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -690,6 +696,12 @@ func (s *HalfFloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -972,13 +984,3 @@ func NewHalfFloatNumberProperty() *HalfFloatNumberProperty { return r } - -// true - -type HalfFloatNumberPropertyVariant interface { - HalfFloatNumberPropertyCaster() *HalfFloatNumberProperty -} - -func (s *HalfFloatNumberProperty) HalfFloatNumberPropertyCaster() *HalfFloatNumberProperty { - return s -} diff --git a/typedapi/types/haschildquery.go b/typedapi/types/haschildquery.go index 5dbd2fc511..f8bbfe8f92 100644 --- a/typedapi/types/haschildquery.go +++ b/typedapi/types/haschildquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // HasChildQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/joining.ts#L41-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/joining.ts#L41-L79 type HasChildQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -188,13 +188,3 @@ func NewHasChildQuery() *HasChildQuery { return r } - -// true - -type HasChildQueryVariant interface { - HasChildQueryCaster() *HasChildQuery -} - -func (s *HasChildQuery) HasChildQueryCaster() *HasChildQuery { - return s -} diff --git a/typedapi/types/hasparentquery.go b/typedapi/types/hasparentquery.go index 1d5dbbc40f..125f225365 100644 --- a/typedapi/types/hasparentquery.go +++ b/typedapi/types/hasparentquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HasParentQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/joining.ts#L81-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/joining.ts#L81-L110 type HasParentQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -155,13 +155,3 @@ func NewHasParentQuery() *HasParentQuery { return r } - -// true - -type HasParentQueryVariant interface { - HasParentQueryCaster() *HasParentQuery -} - -func (s *HasParentQuery) HasParentQueryCaster() *HasParentQuery { - return s -} diff --git a/typedapi/types/hasprivilegesuserprofileerrors.go b/typedapi/types/hasprivilegesuserprofileerrors.go index 8c9574a9c2..2bda91e28e 100644 --- a/typedapi/types/hasprivilegesuserprofileerrors.go +++ b/typedapi/types/hasprivilegesuserprofileerrors.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HasPrivilegesUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges_user_profile/types.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges_user_profile/types.ts#L39-L42 type HasPrivilegesUserProfileErrors struct { Count int64 `json:"count"` Details map[string]ErrorCause `json:"details"` @@ -88,5 +88,3 @@ func NewHasPrivilegesUserProfileErrors() *HasPrivilegesUserProfileErrors { return r } - -// false diff --git a/typedapi/types/hdrmethod.go b/typedapi/types/hdrmethod.go index 70dcae0e72..96afe6f2c3 100644 --- a/typedapi/types/hdrmethod.go +++ b/typedapi/types/hdrmethod.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HdrMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L237-L242 type HdrMethod struct { // NumberOfSignificantValueDigits Specifies the resolution of values for the histogram in number of significant // digits. @@ -80,13 +80,3 @@ func NewHdrMethod() *HdrMethod { return r } - -// true - -type HdrMethodVariant interface { - HdrMethodCaster() *HdrMethod -} - -func (s *HdrMethod) HdrMethodCaster() *HdrMethod { - return s -} diff --git a/typedapi/types/hdrpercentileranksaggregate.go b/typedapi/types/hdrpercentileranksaggregate.go index 852ef29be6..17d8275edb 100644 --- a/typedapi/types/hdrpercentileranksaggregate.go +++ b/typedapi/types/hdrpercentileranksaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HdrPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L171-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L171-L172 type HdrPercentileRanksAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` @@ -88,5 +88,3 @@ func NewHdrPercentileRanksAggregate() *HdrPercentileRanksAggregate { return r } - -// false diff --git a/typedapi/types/hdrpercentilesaggregate.go b/typedapi/types/hdrpercentilesaggregate.go index 7ea677b6de..95bdac0374 100644 --- a/typedapi/types/hdrpercentilesaggregate.go +++ b/typedapi/types/hdrpercentilesaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HdrPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L168-L169 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L168-L169 type HdrPercentilesAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` @@ -88,5 +88,3 @@ func NewHdrPercentilesAggregate() *HdrPercentilesAggregate { return r } - -// false diff --git a/typedapi/types/healthrecord.go b/typedapi/types/healthrecord.go index 4d79e6512a..4b9723ea2e 100644 --- a/typedapi/types/healthrecord.go +++ b/typedapi/types/healthrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HealthRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/health/types.ts#L23-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/health/types.ts#L23-L99 type HealthRecord struct { // ActiveShardsPercent active number of shards in percent ActiveShardsPercent *string `json:"active_shards_percent,omitempty"` @@ -257,5 +257,3 @@ func NewHealthRecord() *HealthRecord { return r } - -// false diff --git a/typedapi/types/healthstatistics.go b/typedapi/types/healthstatistics.go index d6356604ae..703f61a689 100644 --- a/typedapi/types/healthstatistics.go +++ b/typedapi/types/healthstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HealthStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L150-L152 type HealthStatistics struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -97,5 +97,3 @@ func NewHealthStatistics() *HealthStatistics { return r } - -// false diff --git a/typedapi/types/highlight.go b/typedapi/types/highlight.go index 0bae5584fd..ff7a55b128 100644 --- a/typedapi/types/highlight.go +++ b/typedapi/types/highlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -38,7 +38,7 @@ import ( // Highlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L152-L155 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L152-L155 type Highlight struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` @@ -384,13 +384,3 @@ func NewHighlight() *Highlight { return r } - -// true - -type HighlightVariant interface { - HighlightCaster() *Highlight -} - -func (s *Highlight) HighlightCaster() *Highlight { - return s -} diff --git a/typedapi/types/highlightfield.go b/typedapi/types/highlightfield.go index 499efa19a4..c0eae28d3a 100644 --- a/typedapi/types/highlightfield.go +++ b/typedapi/types/highlightfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -37,7 +37,7 @@ import ( // HighlightField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/highlighting.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/highlighting.ts#L192-L195 type HighlightField struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` @@ -401,13 +401,3 @@ func NewHighlightField() *HighlightField { return r } - -// true - -type HighlightFieldVariant interface { - HighlightFieldCaster() *HighlightField -} - -func (s *HighlightField) HighlightFieldCaster() *HighlightField { - return s -} diff --git a/typedapi/types/hindianalyzer.go b/typedapi/types/hindianalyzer.go index 88729560c0..ae251eda47 100644 --- a/typedapi/types/hindianalyzer.go +++ b/typedapi/types/hindianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // HindiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L179-L184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L179-L184 type HindiAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *HindiAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *HindiAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewHindiAnalyzer() *HindiAnalyzer { return r } - -// true - -type HindiAnalyzerVariant interface { - HindiAnalyzerCaster() *HindiAnalyzer -} - -func (s *HindiAnalyzer) HindiAnalyzerCaster() *HindiAnalyzer { - return s -} diff --git a/typedapi/types/hindinormalizationtokenfilter.go b/typedapi/types/hindinormalizationtokenfilter.go new file mode 100644 index 0000000000..1c4b276bd6 --- /dev/null +++ b/typedapi/types/hindinormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// HindiNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L502-L504 +type HindiNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *HindiNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s HindiNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerHindiNormalizationTokenFilter HindiNormalizationTokenFilter + tmp := innerHindiNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "hindi_normalization" + + return json.Marshal(tmp) +} + +// NewHindiNormalizationTokenFilter returns a HindiNormalizationTokenFilter. +func NewHindiNormalizationTokenFilter() *HindiNormalizationTokenFilter { + r := &HindiNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/hint.go b/typedapi/types/hint.go index 27832a7dff..9f4d73bf08 100644 --- a/typedapi/types/hint.go +++ b/typedapi/types/hint.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Hint type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/suggest_user_profiles/types.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/suggest_user_profiles/types.ts#L23-L34 type Hint struct { // Labels A single key-value pair to match against the labels section // of a profile. A profile is considered matching if it matches @@ -40,13 +40,3 @@ func NewHint() *Hint { return r } - -// true - -type HintVariant interface { - HintCaster() *Hint -} - -func (s *Hint) HintCaster() *Hint { - return s -} diff --git a/typedapi/types/histogramaggregate.go b/typedapi/types/histogramaggregate.go index 2439061f48..c5d5f8dca7 100644 --- a/typedapi/types/histogramaggregate.go +++ b/typedapi/types/histogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L372-L376 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L372-L376 type HistogramAggregate struct { Buckets BucketsHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewHistogramAggregate() *HistogramAggregate { return r } - -// false diff --git a/typedapi/types/histogramaggregation.go b/typedapi/types/histogramaggregation.go index e9f727b0dc..1c1958cfbb 100644 --- a/typedapi/types/histogramaggregation.go +++ b/typedapi/types/histogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // HistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L519-L565 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L519-L565 type HistogramAggregation struct { // ExtendedBounds Enables extending the bounds of the histogram beyond the data itself. ExtendedBounds *ExtendedBoundsdouble `json:"extended_bounds,omitempty"` @@ -223,13 +223,3 @@ func NewHistogramAggregation() *HistogramAggregation { return r } - -// true - -type HistogramAggregationVariant interface { - HistogramAggregationCaster() *HistogramAggregation -} - -func (s *HistogramAggregation) HistogramAggregationCaster() *HistogramAggregation { - return s -} diff --git a/typedapi/types/histogrambucket.go b/typedapi/types/histogrambucket.go index 3f2a1efd70..c3d724c547 100644 --- a/typedapi/types/histogrambucket.go +++ b/typedapi/types/histogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // HistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L378-L381 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L378-L381 type HistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -660,5 +660,3 @@ func NewHistogramBucket() *HistogramBucket { return r } - -// false diff --git a/typedapi/types/histogramgrouping.go b/typedapi/types/histogramgrouping.go index 7a1d58de52..968b408a05 100644 --- a/typedapi/types/histogramgrouping.go +++ b/typedapi/types/histogramgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/_types/Groupings.ts#L84-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/_types/Groupings.ts#L84-L97 type HistogramGrouping struct { // Fields The set of fields that you wish to build histograms for. // All fields specified must be some kind of numeric. @@ -102,13 +102,3 @@ func NewHistogramGrouping() *HistogramGrouping { return r } - -// true - -type HistogramGroupingVariant interface { - HistogramGroupingCaster() *HistogramGrouping -} - -func (s *HistogramGrouping) HistogramGroupingCaster() *HistogramGrouping { - return s -} diff --git a/typedapi/types/histogramproperty.go b/typedapi/types/histogramproperty.go index e057897b4e..653f7eb550 100644 --- a/typedapi/types/histogramproperty.go +++ b/typedapi/types/histogramproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // HistogramProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L69-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L69-L72 type HistogramProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -209,6 +209,12 @@ func (s *HistogramProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -578,6 +584,12 @@ func (s *HistogramProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -811,13 +823,3 @@ func NewHistogramProperty() *HistogramProperty { return r } - -// true - -type HistogramPropertyVariant interface { - HistogramPropertyCaster() *HistogramProperty -} - -func (s *HistogramProperty) HistogramPropertyCaster() *HistogramProperty { - return s -} diff --git a/typedapi/types/hit.go b/typedapi/types/hit.go index 964631e960..459fed8e85 100644 --- a/typedapi/types/hit.go +++ b/typedapi/types/hit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Hit type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L41-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L41-L66 type Hit struct { Explanation_ *Explanation `json:"_explanation,omitempty"` Fields map[string]json.RawMessage `json:"fields,omitempty"` @@ -256,5 +256,3 @@ func NewHit() *Hit { return r } - -// false diff --git a/typedapi/types/hitsevent.go b/typedapi/types/hitsevent.go index 35f143d297..1b421c0585 100644 --- a/typedapi/types/hitsevent.go +++ b/typedapi/types/hitsevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HitsEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/_types/EqlHits.ts#L41-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/_types/EqlHits.ts#L41-L54 type HitsEvent struct { Fields map[string][]json.RawMessage `json:"fields,omitempty"` // Id_ Unique identifier for the event. This ID is only unique within the index. @@ -110,5 +110,3 @@ func NewHitsEvent() *HitsEvent { return r } - -// false diff --git a/typedapi/types/hitsmetadata.go b/typedapi/types/hitsmetadata.go index 187d777f9c..59585c9706 100644 --- a/typedapi/types/hitsmetadata.go +++ b/typedapi/types/hitsmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HitsMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L68-L74 type HitsMetadata struct { Hits []Hit `json:"hits"` MaxScore *Float64 `json:"max_score,omitempty"` @@ -80,5 +80,3 @@ func NewHitsMetadata() *HitsMetadata { return r } - -// false diff --git a/typedapi/types/hitssequence.go b/typedapi/types/hitssequence.go index d51479605d..72201bd748 100644 --- a/typedapi/types/hitssequence.go +++ b/typedapi/types/hitssequence.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // HitsSequence type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/eql/_types/EqlHits.ts#L56-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/eql/_types/EqlHits.ts#L56-L64 type HitsSequence struct { // Events Contains events matching the query. Each object represents a matching event. Events []HitsEvent `json:"events"` @@ -41,5 +41,3 @@ func NewHitsSequence() *HitsSequence { return r } - -// false diff --git a/typedapi/types/holtlinearmodelsettings.go b/typedapi/types/holtlinearmodelsettings.go index 1cbb3f6c21..8683e32486 100644 --- a/typedapi/types/holtlinearmodelsettings.go +++ b/typedapi/types/holtlinearmodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HoltLinearModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L297-L300 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L297-L300 type HoltLinearModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` @@ -95,13 +95,3 @@ func NewHoltLinearModelSettings() *HoltLinearModelSettings { return r } - -// true - -type HoltLinearModelSettingsVariant interface { - HoltLinearModelSettingsCaster() *HoltLinearModelSettings -} - -func (s *HoltLinearModelSettings) HoltLinearModelSettingsCaster() *HoltLinearModelSettings { - return s -} diff --git a/typedapi/types/holtmovingaverageaggregation.go b/typedapi/types/holtmovingaverageaggregation.go index afdcba71ae..d020230e2a 100644 --- a/typedapi/types/holtmovingaverageaggregation.go +++ b/typedapi/types/holtmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // HoltMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L283-L286 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L283-L286 type HoltMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -173,13 +173,3 @@ func NewHoltMovingAverageAggregation() *HoltMovingAverageAggregation { return r } - -// true - -type HoltMovingAverageAggregationVariant interface { - HoltMovingAverageAggregationCaster() *HoltMovingAverageAggregation -} - -func (s *HoltMovingAverageAggregation) HoltMovingAverageAggregationCaster() *HoltMovingAverageAggregation { - return s -} diff --git a/typedapi/types/holtwintersmodelsettings.go b/typedapi/types/holtwintersmodelsettings.go index 724e9dd235..261857744d 100644 --- a/typedapi/types/holtwintersmodelsettings.go +++ b/typedapi/types/holtwintersmodelsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // HoltWintersModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L301-L308 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L301-L308 type HoltWintersModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` @@ -152,13 +152,3 @@ func NewHoltWintersModelSettings() *HoltWintersModelSettings { return r } - -// true - -type HoltWintersModelSettingsVariant interface { - HoltWintersModelSettingsCaster() *HoltWintersModelSettings -} - -func (s *HoltWintersModelSettings) HoltWintersModelSettingsCaster() *HoltWintersModelSettings { - return s -} diff --git a/typedapi/types/holtwintersmovingaverageaggregation.go b/typedapi/types/holtwintersmovingaverageaggregation.go index 450f154c5a..4c84736a75 100644 --- a/typedapi/types/holtwintersmovingaverageaggregation.go +++ b/typedapi/types/holtwintersmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // HoltWintersMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L288-L291 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L288-L291 type HoltWintersMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -173,13 +173,3 @@ func NewHoltWintersMovingAverageAggregation() *HoltWintersMovingAverageAggregati return r } - -// true - -type HoltWintersMovingAverageAggregationVariant interface { - HoltWintersMovingAverageAggregationCaster() *HoltWintersMovingAverageAggregation -} - -func (s *HoltWintersMovingAverageAggregation) HoltWintersMovingAverageAggregationCaster() *HoltWintersMovingAverageAggregation { - return s -} diff --git a/typedapi/types/hop.go b/typedapi/types/hop.go index 842d3005fe..7d4ec5a91d 100644 --- a/typedapi/types/hop.go +++ b/typedapi/types/hop.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Hop type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/Hop.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/Hop.ts#L23-L36 type Hop struct { // Connections Specifies one or more fields from which you want to extract terms that are // associated with the specified vertices. @@ -40,13 +40,3 @@ func NewHop() *Hop { return r } - -// true - -type HopVariant interface { - HopCaster() *Hop -} - -func (s *Hop) HopCaster() *Hop { - return s -} diff --git a/typedapi/types/hourandminute.go b/typedapi/types/hourandminute.go index 10ec7b0af0..8c7e792d51 100644 --- a/typedapi/types/hourandminute.go +++ b/typedapi/types/hourandminute.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // HourAndMinute type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L106-L109 type HourAndMinute struct { Hour []int `json:"hour"` Minute []int `json:"minute"` @@ -34,13 +34,3 @@ func NewHourAndMinute() *HourAndMinute { return r } - -// true - -type HourAndMinuteVariant interface { - HourAndMinuteCaster() *HourAndMinute -} - -func (s *HourAndMinute) HourAndMinuteCaster() *HourAndMinute { - return s -} diff --git a/typedapi/types/hourlyschedule.go b/typedapi/types/hourlyschedule.go index c24a05e54c..94e6800377 100644 --- a/typedapi/types/hourlyschedule.go +++ b/typedapi/types/hourlyschedule.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // HourlySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L47-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L47-L49 type HourlySchedule struct { Minute []int `json:"minute"` } @@ -33,13 +33,3 @@ func NewHourlySchedule() *HourlySchedule { return r } - -// true - -type HourlyScheduleVariant interface { - HourlyScheduleCaster() *HourlySchedule -} - -func (s *HourlySchedule) HourlyScheduleCaster() *HourlySchedule { - return s -} diff --git a/typedapi/types/htmlstripcharfilter.go b/typedapi/types/htmlstripcharfilter.go index b3c4c1320d..3e19db3ca6 100644 --- a/typedapi/types/htmlstripcharfilter.go +++ b/typedapi/types/htmlstripcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HtmlStripCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/char_filters.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/char_filters.ts#L46-L49 type HtmlStripCharFilter struct { EscapedTags []string `json:"escaped_tags,omitempty"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewHtmlStripCharFilter() *HtmlStripCharFilter { return r } - -// true - -type HtmlStripCharFilterVariant interface { - HtmlStripCharFilterCaster() *HtmlStripCharFilter -} - -func (s *HtmlStripCharFilter) HtmlStripCharFilterCaster() *HtmlStripCharFilter { - return s -} diff --git a/typedapi/types/htmlstripprocessor.go b/typedapi/types/htmlstripprocessor.go index 6022999ef4..1e44b0020a 100644 --- a/typedapi/types/htmlstripprocessor.go +++ b/typedapi/types/htmlstripprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HtmlStripProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1009-L1025 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1009-L1025 type HtmlStripProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewHtmlStripProcessor() *HtmlStripProcessor { return r } - -// true - -type HtmlStripProcessorVariant interface { - HtmlStripProcessorCaster() *HtmlStripProcessor -} - -func (s *HtmlStripProcessor) HtmlStripProcessorCaster() *HtmlStripProcessor { - return s -} diff --git a/typedapi/types/http.go b/typedapi/types/http.go index 5946823f2d..9f77630138 100644 --- a/typedapi/types/http.go +++ b/typedapi/types/http.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Http type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L669-L688 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L671-L690 type Http struct { // Clients Information on current and recently-closed HTTP client connections. // Clients that have been closed longer than the @@ -118,5 +118,3 @@ func NewHttp() *Http { return r } - -// false diff --git a/typedapi/types/httpemailattachment.go b/typedapi/types/httpemailattachment.go index 82879d47f8..10ed108616 100644 --- a/typedapi/types/httpemailattachment.go +++ b/typedapi/types/httpemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HttpEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L218-L222 type HttpEmailAttachment struct { ContentType *string `json:"content_type,omitempty"` Inline *bool `json:"inline,omitempty"` @@ -95,13 +95,3 @@ func NewHttpEmailAttachment() *HttpEmailAttachment { return r } - -// true - -type HttpEmailAttachmentVariant interface { - HttpEmailAttachmentCaster() *HttpEmailAttachment -} - -func (s *HttpEmailAttachment) HttpEmailAttachmentCaster() *HttpEmailAttachment { - return s -} diff --git a/typedapi/types/httpheaders.go b/typedapi/types/httpheaders.go index e88c0381c0..7b46bf4b35 100644 --- a/typedapi/types/httpheaders.go +++ b/typedapi/types/httpheaders.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // HttpHeaders type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L162-L162 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L162-L162 type HttpHeaders map[string][]string - -type HttpHeadersVariant interface { - HttpHeadersCaster() *HttpHeaders -} diff --git a/typedapi/types/httpinput.go b/typedapi/types/httpinput.go index 435cd3b66a..2b386a5200 100644 --- a/typedapi/types/httpinput.go +++ b/typedapi/types/httpinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // HttpInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L44-L48 type HttpInput struct { Extract []string `json:"extract,omitempty"` Request *HttpInputRequestDefinition `json:"request,omitempty"` @@ -39,13 +39,3 @@ func NewHttpInput() *HttpInput { return r } - -// true - -type HttpInputVariant interface { - HttpInputCaster() *HttpInput -} - -func (s *HttpInput) HttpInputCaster() *HttpInput { - return s -} diff --git a/typedapi/types/httpinputauthentication.go b/typedapi/types/httpinputauthentication.go index 12c48860b2..4575ae2848 100644 --- a/typedapi/types/httpinputauthentication.go +++ b/typedapi/types/httpinputauthentication.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // HttpInputAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L50-L52 type HttpInputAuthentication struct { Basic HttpInputBasicAuthentication `json:"basic"` } @@ -33,13 +33,3 @@ func NewHttpInputAuthentication() *HttpInputAuthentication { return r } - -// true - -type HttpInputAuthenticationVariant interface { - HttpInputAuthenticationCaster() *HttpInputAuthentication -} - -func (s *HttpInputAuthentication) HttpInputAuthenticationCaster() *HttpInputAuthentication { - return s -} diff --git a/typedapi/types/httpinputbasicauthentication.go b/typedapi/types/httpinputbasicauthentication.go index 9a9afae616..12193b365d 100644 --- a/typedapi/types/httpinputbasicauthentication.go +++ b/typedapi/types/httpinputbasicauthentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HttpInputBasicAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L54-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L54-L57 type HttpInputBasicAuthentication struct { Password string `json:"password"` Username string `json:"username"` @@ -72,13 +72,3 @@ func NewHttpInputBasicAuthentication() *HttpInputBasicAuthentication { return r } - -// true - -type HttpInputBasicAuthenticationVariant interface { - HttpInputBasicAuthenticationCaster() *HttpInputBasicAuthentication -} - -func (s *HttpInputBasicAuthentication) HttpInputBasicAuthenticationCaster() *HttpInputBasicAuthentication { - return s -} diff --git a/typedapi/types/httpinputproxy.go b/typedapi/types/httpinputproxy.go index 6c00e49fdc..ce93142267 100644 --- a/typedapi/types/httpinputproxy.go +++ b/typedapi/types/httpinputproxy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // HttpInputProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L67-L70 type HttpInputProxy struct { Host string `json:"host"` Port uint `json:"port"` @@ -72,13 +72,3 @@ func NewHttpInputProxy() *HttpInputProxy { return r } - -// true - -type HttpInputProxyVariant interface { - HttpInputProxyCaster() *HttpInputProxy -} - -func (s *HttpInputProxy) HttpInputProxyCaster() *HttpInputProxy { - return s -} diff --git a/typedapi/types/httpinputrequestdefinition.go b/typedapi/types/httpinputrequestdefinition.go index f3f366bc6a..27f7a9c2d5 100644 --- a/typedapi/types/httpinputrequestdefinition.go +++ b/typedapi/types/httpinputrequestdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L72-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L72-L86 type HttpInputRequestDefinition struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` @@ -172,13 +172,3 @@ func NewHttpInputRequestDefinition() *HttpInputRequestDefinition { return r } - -// true - -type HttpInputRequestDefinitionVariant interface { - HttpInputRequestDefinitionCaster() *HttpInputRequestDefinition -} - -func (s *HttpInputRequestDefinition) HttpInputRequestDefinitionCaster() *HttpInputRequestDefinition { - return s -} diff --git a/typedapi/types/httpinputrequestresult.go b/typedapi/types/httpinputrequestresult.go index be9de89cc9..00f3beb6f9 100644 --- a/typedapi/types/httpinputrequestresult.go +++ b/typedapi/types/httpinputrequestresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L300-L300 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L300-L300 type HttpInputRequestResult struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` @@ -172,5 +172,3 @@ func NewHttpInputRequestResult() *HttpInputRequestResult { return r } - -// false diff --git a/typedapi/types/httpinputresponseresult.go b/typedapi/types/httpinputresponseresult.go index 6ee8428a01..bb1c612aa8 100644 --- a/typedapi/types/httpinputresponseresult.go +++ b/typedapi/types/httpinputresponseresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HttpInputResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L302-L306 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L302-L306 type HttpInputResponseResult struct { Body string `json:"body"` Headers HttpHeaders `json:"headers"` @@ -97,5 +97,3 @@ func NewHttpInputResponseResult() *HttpInputResponseResult { return r } - -// false diff --git a/typedapi/types/httproute.go b/typedapi/types/httproute.go index 7a0b1ae396..6f1a89784c 100644 --- a/typedapi/types/httproute.go +++ b/typedapi/types/httproute.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // HttpRoute type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L690-L693 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L692-L695 type HttpRoute struct { Requests HttpRouteRequests `json:"requests"` Responses HttpRouteResponses `json:"responses"` @@ -34,5 +34,3 @@ func NewHttpRoute() *HttpRoute { return r } - -// false diff --git a/typedapi/types/httprouterequests.go b/typedapi/types/httprouterequests.go index 08fe9ffa31..cc4d8ffc51 100644 --- a/typedapi/types/httprouterequests.go +++ b/typedapi/types/httprouterequests.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HttpRouteRequests type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L695-L699 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L697-L701 type HttpRouteRequests struct { Count int64 `json:"count"` SizeHistogram []SizeHttpHistogram `json:"size_histogram"` @@ -99,5 +99,3 @@ func NewHttpRouteRequests() *HttpRouteRequests { return r } - -// false diff --git a/typedapi/types/httprouteresponses.go b/typedapi/types/httprouteresponses.go index 5594db1f3b..44e1686a79 100644 --- a/typedapi/types/httprouteresponses.go +++ b/typedapi/types/httprouteresponses.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HttpRouteResponses type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L701-L706 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L703-L708 type HttpRouteResponses struct { Count int64 `json:"count"` HandlingTimeHistogram []TimeHttpHistogram `json:"handling_time_histogram"` @@ -105,5 +105,3 @@ func NewHttpRouteResponses() *HttpRouteResponses { return r } - -// false diff --git a/typedapi/types/huggingfaceservicesettings.go b/typedapi/types/huggingfaceservicesettings.go index d2523e114d..17e8d2fc1b 100644 --- a/typedapi/types/huggingfaceservicesettings.go +++ b/typedapi/types/huggingfaceservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // HuggingFaceServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L869-L890 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1382-L1414 type HuggingFaceServiceSettings struct { // ApiKey A valid access token for your HuggingFace account. // You can create or find your access tokens on the HuggingFace settings page. @@ -43,12 +43,33 @@ type HuggingFaceServiceSettings struct { // If you want to use a different API key, delete the inference model and // recreate it with the same name and the updated API key. ApiKey string `json:"api_key"` + // ModelId The name of the HuggingFace model to use for the inference task. + // For `completion` and `chat_completion` tasks, this field is optional but may + // be required for certain models — particularly when using serverless inference + // endpoints. + // For the `text_embedding` task, this field should not be included. Otherwise, + // the request will fail. + ModelId *string `json:"model_id,omitempty"` // RateLimit This setting helps to minimize the number of rate limit errors returned from // Hugging Face. // By default, the `hugging_face` service sets the number of requests allowed - // per minute to 3000. + // per minute to 3000 for all supported tasks. + // Hugging Face does not publish a universal rate limit — actual limits may + // vary. + // It is recommended to adjust this value based on the capacity and limits of + // your specific deployment environment. RateLimit *RateLimitSetting `json:"rate_limit,omitempty"` // Url The URL endpoint to use for the requests. + // For `completion` and `chat_completion` tasks, the deployed model must be + // compatible with the Hugging Face Chat Completion interface (see the linked + // external documentation for details). The endpoint URL for the request must + // include `/v1/chat/completions`. + // If the model supports the OpenAI Chat Completion schema, a toggle should + // appear in the interface. Enabling this toggle doesn't change any model + // behavior, it reveals the full endpoint URL needed (which should include + // `/v1/chat/completions`) when configuring the inference endpoint in + // Elasticsearch. If the model doesn't support this schema, the toggle may not + // be shown. Url string `json:"url"` } @@ -79,6 +100,18 @@ func (s *HuggingFaceServiceSettings) UnmarshalJSON(data []byte) error { } s.ApiKey = o + case "model_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ModelId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ModelId = &o + case "rate_limit": if err := dec.Decode(&s.RateLimit); err != nil { return fmt.Errorf("%s | %w", "RateLimit", err) @@ -107,13 +140,3 @@ func NewHuggingFaceServiceSettings() *HuggingFaceServiceSettings { return r } - -// true - -type HuggingFaceServiceSettingsVariant interface { - HuggingFaceServiceSettingsCaster() *HuggingFaceServiceSettings -} - -func (s *HuggingFaceServiceSettings) HuggingFaceServiceSettingsCaster() *HuggingFaceServiceSettings { - return s -} diff --git a/typedapi/types/huggingfacetasksettings.go b/typedapi/types/huggingfacetasksettings.go new file mode 100644 index 0000000000..aca5ca62aa --- /dev/null +++ b/typedapi/types/huggingfacetasksettings.go @@ -0,0 +1,98 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HuggingFaceTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1416-L1426 +type HuggingFaceTaskSettings struct { + // ReturnDocuments For a `rerank` task, return doc text within the results. + ReturnDocuments *bool `json:"return_documents,omitempty"` + // TopN For a `rerank` task, the number of most relevant documents to return. + // It defaults to the number of the documents. + TopN *int `json:"top_n,omitempty"` +} + +func (s *HuggingFaceTaskSettings) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "return_documents": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ReturnDocuments", err) + } + s.ReturnDocuments = &value + case bool: + s.ReturnDocuments = &v + } + + case "top_n": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "TopN", err) + } + s.TopN = &value + case float64: + f := int(v) + s.TopN = &f + } + + } + } + return nil +} + +// NewHuggingFaceTaskSettings returns a HuggingFaceTaskSettings. +func NewHuggingFaceTaskSettings() *HuggingFaceTaskSettings { + r := &HuggingFaceTaskSettings{} + + return r +} diff --git a/typedapi/types/hungariananalyzer.go b/typedapi/types/hungariananalyzer.go index 5fbca6fe33..2989dc8410 100644 --- a/typedapi/types/hungariananalyzer.go +++ b/typedapi/types/hungariananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // HungarianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L186-L191 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L186-L191 type HungarianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *HungarianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *HungarianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewHungarianAnalyzer() *HungarianAnalyzer { return r } - -// true - -type HungarianAnalyzerVariant interface { - HungarianAnalyzerCaster() *HungarianAnalyzer -} - -func (s *HungarianAnalyzer) HungarianAnalyzerCaster() *HungarianAnalyzer { - return s -} diff --git a/typedapi/types/hunspelltokenfilter.go b/typedapi/types/hunspelltokenfilter.go index f2236b2782..f1f74cb6e7 100644 --- a/typedapi/types/hunspelltokenfilter.go +++ b/typedapi/types/hunspelltokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,23 @@ import ( // HunspellTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L201-L207 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L268-L280 type HunspellTokenFilter struct { - Dedup *bool `json:"dedup,omitempty"` - Dictionary *string `json:"dictionary,omitempty"` - Locale string `json:"locale"` + // Dedup If `true`, duplicate tokens are removed from the filter’s output. Defaults to + // `true`. + Dedup *bool `json:"dedup,omitempty"` + // Dictionary One or more `.dic` files (e.g, `en_US.dic`, my_custom.dic) to use for the + // Hunspell dictionary. + // By default, the `hunspell` filter uses all `.dic` files in the + // `<$ES_PATH_CONF>/hunspell/` directory specified using the `lang`, + // `language`, or `locale` parameter. + Dictionary *string `json:"dictionary,omitempty"` + // Locale Locale directory used to specify the `.aff` and `.dic` files for a Hunspell + // dictionary. + Locale string `json:"locale"` + // LongestOnly If `true`, only the longest stemmed version of each token is included in the + // output. If `false`, all stemmed versions of the token are included. Defaults + // to `false`. LongestOnly *bool `json:"longest_only,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -82,7 +94,7 @@ func (s *HunspellTokenFilter) UnmarshalJSON(data []byte) error { } s.Dictionary = &o - case "locale": + case "locale", "lang", "language": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { return fmt.Errorf("%s | %w", "Locale", err) @@ -146,13 +158,3 @@ func NewHunspellTokenFilter() *HunspellTokenFilter { return r } - -// true - -type HunspellTokenFilterVariant interface { - HunspellTokenFilterCaster() *HunspellTokenFilter -} - -func (s *HunspellTokenFilter) HunspellTokenFilterCaster() *HunspellTokenFilter { - return s -} diff --git a/typedapi/types/hyperparameter.go b/typedapi/types/hyperparameter.go index 45a46b3087..7cd7a2ba79 100644 --- a/typedapi/types/hyperparameter.go +++ b/typedapi/types/hyperparameter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Hyperparameter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L274-L288 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L274-L288 type Hyperparameter struct { // AbsoluteImportance A positive number showing how much the parameter influences the variation of // the loss function. For hyperparameters with values that are not specified by @@ -144,5 +144,3 @@ func NewHyperparameter() *Hyperparameter { return r } - -// false diff --git a/typedapi/types/hyperparameters.go b/typedapi/types/hyperparameters.go index 58bffaeb56..e271b1c38e 100644 --- a/typedapi/types/hyperparameters.go +++ b/typedapi/types/hyperparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Hyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L420-L526 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L420-L526 type Hyperparameters struct { // Alpha Advanced configuration option. // Machine learning uses loss guided tree growing, which means that the decision @@ -382,5 +382,3 @@ func NewHyperparameters() *Hyperparameters { return r } - -// false diff --git a/typedapi/types/hyphenationdecompoundertokenfilter.go b/typedapi/types/hyphenationdecompoundertokenfilter.go index 7c224c0f78..227c05eb71 100644 --- a/typedapi/types/hyphenationdecompoundertokenfilter.go +++ b/typedapi/types/hyphenationdecompoundertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,17 +31,42 @@ import ( // HyphenationDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L57-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L67-L76 type HyphenationDecompounderTokenFilter struct { - HyphenationPatternsPath *string `json:"hyphenation_patterns_path,omitempty"` - MaxSubwordSize *int `json:"max_subword_size,omitempty"` - MinSubwordSize *int `json:"min_subword_size,omitempty"` - MinWordSize *int `json:"min_word_size,omitempty"` - OnlyLongestMatch *bool `json:"only_longest_match,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` - WordList []string `json:"word_list,omitempty"` - WordListPath *string `json:"word_list_path,omitempty"` + // HyphenationPatternsPath Path to an Apache FOP (Formatting Objects Processor) XML hyphenation pattern + // file. + // This path must be absolute or relative to the `config` location. Only FOP + // v1.2 compatible files are supported. + HyphenationPatternsPath string `json:"hyphenation_patterns_path"` + // MaxSubwordSize Maximum subword character length. Longer subword tokens are excluded from the + // output. Defaults to `15`. + MaxSubwordSize *int `json:"max_subword_size,omitempty"` + // MinSubwordSize Minimum subword character length. Shorter subword tokens are excluded from + // the output. Defaults to `2`. + MinSubwordSize *int `json:"min_subword_size,omitempty"` + // MinWordSize Minimum word character length. Shorter word tokens are excluded from the + // output. Defaults to `5`. + MinWordSize *int `json:"min_word_size,omitempty"` + // NoOverlappingMatches If `true`, do not allow overlapping tokens. Defaults to `false`. + NoOverlappingMatches *bool `json:"no_overlapping_matches,omitempty"` + // NoSubMatches If `true`, do not match sub tokens in tokens that are in the word list. + // Defaults to `false`. + NoSubMatches *bool `json:"no_sub_matches,omitempty"` + // OnlyLongestMatch If `true`, only include the longest matching subword. Defaults to `false`. + OnlyLongestMatch *bool `json:"only_longest_match,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` + // WordList A list of subwords to look for in the token stream. If found, the subword is + // included in the token output. + // Either this parameter or `word_list_path` must be specified. + WordList []string `json:"word_list,omitempty"` + // WordListPath Path to a file that contains a list of subwords to find in the token stream. + // If found, the subword is included in the token output. + // This path must be absolute or relative to the config location, and the file + // must be UTF-8 encoded. Each token in the file must be separated by a line + // break. + // Either this parameter or `word_list` must be specified. + WordListPath *string `json:"word_list_path,omitempty"` } func (s *HyphenationDecompounderTokenFilter) UnmarshalJSON(data []byte) error { @@ -69,7 +94,7 @@ func (s *HyphenationDecompounderTokenFilter) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.HyphenationPatternsPath = &o + s.HyphenationPatternsPath = o case "max_subword_size": @@ -119,6 +144,34 @@ func (s *HyphenationDecompounderTokenFilter) UnmarshalJSON(data []byte) error { s.MinWordSize = &f } + case "no_overlapping_matches": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "NoOverlappingMatches", err) + } + s.NoOverlappingMatches = &value + case bool: + s.NoOverlappingMatches = &v + } + + case "no_sub_matches": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "NoSubMatches", err) + } + s.NoSubMatches = &value + case bool: + s.NoSubMatches = &v + } + case "only_longest_match": var tmp any dec.Decode(&tmp) @@ -173,6 +226,8 @@ func (s HyphenationDecompounderTokenFilter) MarshalJSON() ([]byte, error) { MaxSubwordSize: s.MaxSubwordSize, MinSubwordSize: s.MinSubwordSize, MinWordSize: s.MinWordSize, + NoOverlappingMatches: s.NoOverlappingMatches, + NoSubMatches: s.NoSubMatches, OnlyLongestMatch: s.OnlyLongestMatch, Type: s.Type, Version: s.Version, @@ -191,13 +246,3 @@ func NewHyphenationDecompounderTokenFilter() *HyphenationDecompounderTokenFilter return r } - -// true - -type HyphenationDecompounderTokenFilterVariant interface { - HyphenationDecompounderTokenFilterCaster() *HyphenationDecompounderTokenFilter -} - -func (s *HyphenationDecompounderTokenFilter) HyphenationDecompounderTokenFilterCaster() *HyphenationDecompounderTokenFilter { - return s -} diff --git a/typedapi/types/icuanalyzer.go b/typedapi/types/icuanalyzer.go index 8f55580ef7..bc6ba62e44 100644 --- a/typedapi/types/icuanalyzer.go +++ b/typedapi/types/icuanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // IcuAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L67-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L68-L72 type IcuAnalyzer struct { Method icunormalizationtype.IcuNormalizationType `json:"method"` Mode icunormalizationmode.IcuNormalizationMode `json:"mode"` @@ -56,13 +56,3 @@ func NewIcuAnalyzer() *IcuAnalyzer { return r } - -// true - -type IcuAnalyzerVariant interface { - IcuAnalyzerCaster() *IcuAnalyzer -} - -func (s *IcuAnalyzer) IcuAnalyzerCaster() *IcuAnalyzer { - return s -} diff --git a/typedapi/types/icucollationproperty.go b/typedapi/types/icucollationproperty.go index 9884dc2d1d..f98ca0dd4d 100644 --- a/typedapi/types/icucollationproperty.go +++ b/typedapi/types/icucollationproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -39,7 +39,7 @@ import ( // IcuCollationProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L103-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L103-L127 type IcuCollationProperty struct { Alternate *icucollationalternate.IcuCollationAlternate `json:"alternate,omitempty"` CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"case_first,omitempty"` @@ -306,6 +306,12 @@ func (s *IcuCollationProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -746,6 +752,12 @@ func (s *IcuCollationProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -1052,13 +1064,3 @@ func NewIcuCollationProperty() *IcuCollationProperty { return r } - -// true - -type IcuCollationPropertyVariant interface { - IcuCollationPropertyCaster() *IcuCollationProperty -} - -func (s *IcuCollationProperty) IcuCollationPropertyCaster() *IcuCollationProperty { - return s -} diff --git a/typedapi/types/icucollationtokenfilter.go b/typedapi/types/icucollationtokenfilter.go index 0f3d41a27a..78a7de06d9 100644 --- a/typedapi/types/icucollationtokenfilter.go +++ b/typedapi/types/icucollationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,20 +36,20 @@ import ( // IcuCollationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L51-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L52-L66 type IcuCollationTokenFilter struct { Alternate *icucollationalternate.IcuCollationAlternate `json:"alternate,omitempty"` - CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"case_first,omitempty"` - CaseLevel *bool `json:"case_level,omitempty"` + CaseFirst *icucollationcasefirst.IcuCollationCaseFirst `json:"caseFirst,omitempty"` + CaseLevel *bool `json:"caseLevel,omitempty"` Country *string `json:"country,omitempty"` Decomposition *icucollationdecomposition.IcuCollationDecomposition `json:"decomposition,omitempty"` - HiraganaQuaternaryMode *bool `json:"hiragana_quaternary_mode,omitempty"` + HiraganaQuaternaryMode *bool `json:"hiraganaQuaternaryMode,omitempty"` Language *string `json:"language,omitempty"` Numeric *bool `json:"numeric,omitempty"` Rules *string `json:"rules,omitempty"` Strength *icucollationstrength.IcuCollationStrength `json:"strength,omitempty"` Type string `json:"type,omitempty"` - VariableTop *string `json:"variable_top,omitempty"` + VariableTop *string `json:"variableTop,omitempty"` Variant *string `json:"variant,omitempty"` Version *string `json:"version,omitempty"` } @@ -74,12 +74,12 @@ func (s *IcuCollationTokenFilter) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Alternate", err) } - case "case_first": + case "caseFirst": if err := dec.Decode(&s.CaseFirst); err != nil { return fmt.Errorf("%s | %w", "CaseFirst", err) } - case "case_level": + case "caseLevel": var tmp any dec.Decode(&tmp) switch v := tmp.(type) { @@ -110,7 +110,7 @@ func (s *IcuCollationTokenFilter) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Decomposition", err) } - case "hiragana_quaternary_mode": + case "hiraganaQuaternaryMode": var tmp any dec.Decode(&tmp) switch v := tmp.(type) { @@ -172,7 +172,7 @@ func (s *IcuCollationTokenFilter) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Type", err) } - case "variable_top": + case "variableTop": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { return fmt.Errorf("%s | %w", "VariableTop", err) @@ -237,13 +237,3 @@ func NewIcuCollationTokenFilter() *IcuCollationTokenFilter { return r } - -// true - -type IcuCollationTokenFilterVariant interface { - IcuCollationTokenFilterCaster() *IcuCollationTokenFilter -} - -func (s *IcuCollationTokenFilter) IcuCollationTokenFilterCaster() *IcuCollationTokenFilter { - return s -} diff --git a/typedapi/types/icufoldingtokenfilter.go b/typedapi/types/icufoldingtokenfilter.go index 219a1cb6a7..88d847f0a1 100644 --- a/typedapi/types/icufoldingtokenfilter.go +++ b/typedapi/types/icufoldingtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IcuFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L47-L50 type IcuFoldingTokenFilter struct { Type string `json:"type,omitempty"` UnicodeSetFilter string `json:"unicode_set_filter"` @@ -100,13 +100,3 @@ func NewIcuFoldingTokenFilter() *IcuFoldingTokenFilter { return r } - -// true - -type IcuFoldingTokenFilterVariant interface { - IcuFoldingTokenFilterCaster() *IcuFoldingTokenFilter -} - -func (s *IcuFoldingTokenFilter) IcuFoldingTokenFilterCaster() *IcuFoldingTokenFilter { - return s -} diff --git a/typedapi/types/icunormalizationcharfilter.go b/typedapi/types/icunormalizationcharfilter.go index d901c31b34..f10d6d405a 100644 --- a/typedapi/types/icunormalizationcharfilter.go +++ b/typedapi/types/icunormalizationcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,6 +26,7 @@ import ( "errors" "fmt" "io" + "strconv" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/icunormalizationmode" "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/icunormalizationtype" @@ -33,12 +34,13 @@ import ( // IcuNormalizationCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L40-L45 type IcuNormalizationCharFilter struct { - Mode *icunormalizationmode.IcuNormalizationMode `json:"mode,omitempty"` - Name *icunormalizationtype.IcuNormalizationType `json:"name,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + Mode *icunormalizationmode.IcuNormalizationMode `json:"mode,omitempty"` + Name *icunormalizationtype.IcuNormalizationType `json:"name,omitempty"` + Type string `json:"type,omitempty"` + UnicodeSetFilter *string `json:"unicode_set_filter,omitempty"` + Version *string `json:"version,omitempty"` } func (s *IcuNormalizationCharFilter) UnmarshalJSON(data []byte) error { @@ -71,6 +73,18 @@ func (s *IcuNormalizationCharFilter) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Type", err) } + case "unicode_set_filter": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "UnicodeSetFilter", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.UnicodeSetFilter = &o + case "version": if err := dec.Decode(&s.Version); err != nil { return fmt.Errorf("%s | %w", "Version", err) @@ -85,10 +99,11 @@ func (s *IcuNormalizationCharFilter) UnmarshalJSON(data []byte) error { func (s IcuNormalizationCharFilter) MarshalJSON() ([]byte, error) { type innerIcuNormalizationCharFilter IcuNormalizationCharFilter tmp := innerIcuNormalizationCharFilter{ - Mode: s.Mode, - Name: s.Name, - Type: s.Type, - Version: s.Version, + Mode: s.Mode, + Name: s.Name, + Type: s.Type, + UnicodeSetFilter: s.UnicodeSetFilter, + Version: s.Version, } tmp.Type = "icu_normalizer" @@ -102,13 +117,3 @@ func NewIcuNormalizationCharFilter() *IcuNormalizationCharFilter { return r } - -// true - -type IcuNormalizationCharFilterVariant interface { - IcuNormalizationCharFilterCaster() *IcuNormalizationCharFilter -} - -func (s *IcuNormalizationCharFilter) IcuNormalizationCharFilterCaster() *IcuNormalizationCharFilter { - return s -} diff --git a/typedapi/types/icunormalizationtokenfilter.go b/typedapi/types/icunormalizationtokenfilter.go index e58daa9671..14f3a078d5 100644 --- a/typedapi/types/icunormalizationtokenfilter.go +++ b/typedapi/types/icunormalizationtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // IcuNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L35-L38 type IcuNormalizationTokenFilter struct { Name icunormalizationtype.IcuNormalizationType `json:"name"` Type string `json:"type,omitempty"` @@ -94,13 +94,3 @@ func NewIcuNormalizationTokenFilter() *IcuNormalizationTokenFilter { return r } - -// true - -type IcuNormalizationTokenFilterVariant interface { - IcuNormalizationTokenFilterCaster() *IcuNormalizationTokenFilter -} - -func (s *IcuNormalizationTokenFilter) IcuNormalizationTokenFilterCaster() *IcuNormalizationTokenFilter { - return s -} diff --git a/typedapi/types/icutokenizer.go b/typedapi/types/icutokenizer.go index 0f6a615f9e..7d35292e07 100644 --- a/typedapi/types/icutokenizer.go +++ b/typedapi/types/icutokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IcuTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L30-L33 type IcuTokenizer struct { RuleFiles string `json:"rule_files"` Type string `json:"type,omitempty"` @@ -100,13 +100,3 @@ func NewIcuTokenizer() *IcuTokenizer { return r } - -// true - -type IcuTokenizerVariant interface { - IcuTokenizerCaster() *IcuTokenizer -} - -func (s *IcuTokenizer) IcuTokenizerCaster() *IcuTokenizer { - return s -} diff --git a/typedapi/types/icutransformtokenfilter.go b/typedapi/types/icutransformtokenfilter.go index dc2ab1ec2f..377c0648a9 100644 --- a/typedapi/types/icutransformtokenfilter.go +++ b/typedapi/types/icutransformtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IcuTransformTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/icu-plugin.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/icu-plugin.ts#L24-L28 type IcuTransformTokenFilter struct { Dir *icutransformdirection.IcuTransformDirection `json:"dir,omitempty"` Id string `json:"id"` @@ -109,13 +109,3 @@ func NewIcuTransformTokenFilter() *IcuTransformTokenFilter { return r } - -// true - -type IcuTransformTokenFilterVariant interface { - IcuTransformTokenFilterCaster() *IcuTransformTokenFilter -} - -func (s *IcuTransformTokenFilter) IcuTransformTokenFilterCaster() *IcuTransformTokenFilter { - return s -} diff --git a/typedapi/types/ids.go b/typedapi/types/ids.go index d003d8ba2b..546def81b4 100644 --- a/typedapi/types/ids.go +++ b/typedapi/types/ids.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Ids type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L62-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L62-L62 type Ids []string - -type IdsVariant interface { - IdsCaster() *Ids -} diff --git a/typedapi/types/idsquery.go b/typedapi/types/idsquery.go index 47e59bbbb6..42444ce9e6 100644 --- a/typedapi/types/idsquery.go +++ b/typedapi/types/idsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IdsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L88-L96 type IdsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -114,13 +114,3 @@ func NewIdsQuery() *IdsQuery { return r } - -// true - -type IdsQueryVariant interface { - IdsQueryCaster() *IdsQuery -} - -func (s *IdsQuery) IdsQueryCaster() *IdsQuery { - return s -} diff --git a/typedapi/types/ilm.go b/typedapi/types/ilm.go index c30a6d9ece..272dcb0f4b 100644 --- a/typedapi/types/ilm.go +++ b/typedapi/types/ilm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Ilm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L172-L175 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L172-L175 type Ilm struct { PolicyCount int `json:"policy_count"` PolicyStats []IlmPolicyStatistics `json:"policy_stats"` @@ -84,5 +84,3 @@ func NewIlm() *Ilm { return r } - -// false diff --git a/typedapi/types/ilmactions.go b/typedapi/types/ilmactions.go index 1c8eae312e..c0fde42051 100644 --- a/typedapi/types/ilmactions.go +++ b/typedapi/types/ilmactions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IlmActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L39-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L39-L93 type IlmActions struct { // Allocate Phases allowed: warm, cold. Allocate *AllocateAction `json:"allocate,omitempty"` @@ -58,13 +58,3 @@ func NewIlmActions() *IlmActions { return r } - -// true - -type IlmActionsVariant interface { - IlmActionsCaster() *IlmActions -} - -func (s *IlmActions) IlmActionsCaster() *IlmActions { - return s -} diff --git a/typedapi/types/ilmindicator.go b/typedapi/types/ilmindicator.go index be180a09fa..b72161342b 100644 --- a/typedapi/types/ilmindicator.go +++ b/typedapi/types/ilmindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L163-L167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L164-L168 type IlmIndicator struct { Details *IlmIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewIlmIndicator() *IlmIndicator { return r } - -// false diff --git a/typedapi/types/ilmindicatordetails.go b/typedapi/types/ilmindicatordetails.go index 636a526c06..ce15deb160 100644 --- a/typedapi/types/ilmindicatordetails.go +++ b/typedapi/types/ilmindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L168-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L169-L173 type IlmIndicatorDetails struct { IlmStatus lifecycleoperationmode.LifecycleOperationMode `json:"ilm_status"` Policies int64 `json:"policies"` @@ -102,5 +102,3 @@ func NewIlmIndicatorDetails() *IlmIndicatorDetails { return r } - -// false diff --git a/typedapi/types/ilmpolicy.go b/typedapi/types/ilmpolicy.go index 4a3e7650c8..b55d5c3cfe 100644 --- a/typedapi/types/ilmpolicy.go +++ b/typedapi/types/ilmpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IlmPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Policy.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Policy.ts#L23-L29 type IlmPolicy struct { // Meta_ Arbitrary metadata that is not automatically generated or used by // Elasticsearch. @@ -74,13 +74,3 @@ func NewIlmPolicy() *IlmPolicy { return r } - -// true - -type IlmPolicyVariant interface { - IlmPolicyCaster() *IlmPolicy -} - -func (s *IlmPolicy) IlmPolicyCaster() *IlmPolicy { - return s -} diff --git a/typedapi/types/ilmpolicystatistics.go b/typedapi/types/ilmpolicystatistics.go index 1a5db3a4ed..449d3e5ba4 100644 --- a/typedapi/types/ilmpolicystatistics.go +++ b/typedapi/types/ilmpolicystatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IlmPolicyStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L167-L170 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L167-L170 type IlmPolicyStatistics struct { IndicesManaged int `json:"indices_managed"` Phases UsagePhases `json:"phases"` @@ -84,5 +84,3 @@ func NewIlmPolicyStatistics() *IlmPolicyStatistics { return r } - -// false diff --git a/typedapi/types/impact.go b/typedapi/types/impact.go index 171cbcb533..ddaaae2835 100644 --- a/typedapi/types/impact.go +++ b/typedapi/types/impact.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Impact type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L66-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L67-L72 type Impact struct { Description string `json:"description"` Id string `json:"id"` @@ -112,5 +112,3 @@ func NewImpact() *Impact { return r } - -// false diff --git a/typedapi/types/includedinvalidation.go b/typedapi/types/includedinvalidation.go index b52dbfb054..68f7cc58ba 100644 --- a/typedapi/types/includedinvalidation.go +++ b/typedapi/types/includedinvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // IncludedInValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L73-L76 type IncludedInValidation struct { Constraint []ScalarValue `json:"constraint"` Type string `json:"type,omitempty"` @@ -51,13 +51,3 @@ func NewIncludedInValidation() *IncludedInValidation { return r } - -// true - -type IncludedInValidationVariant interface { - IncludedInValidationCaster() *IncludedInValidation -} - -func (s *IncludedInValidation) IncludedInValidationCaster() *IncludedInValidation { - return s -} diff --git a/typedapi/types/indexaction.go b/typedapi/types/indexaction.go index e7c6d314fe..354bb59c4a 100644 --- a/typedapi/types/indexaction.go +++ b/typedapi/types/indexaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L256-L265 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L256-L265 type IndexAction struct { DocId *string `json:"doc_id,omitempty"` ExecutionTimeField *string `json:"execution_time_field,omitempty"` @@ -99,13 +99,3 @@ func NewIndexAction() *IndexAction { return r } - -// true - -type IndexActionVariant interface { - IndexActionCaster() *IndexAction -} - -func (s *IndexAction) IndexActionCaster() *IndexAction { - return s -} diff --git a/typedapi/types/indexaliases.go b/typedapi/types/indexaliases.go index 8d02f771de..e23bd2953e 100644 --- a/typedapi/types/indexaliases.go +++ b/typedapi/types/indexaliases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexAliases type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_alias/IndicesGetAliasResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_alias/_types/response.ts#L24-L26 type IndexAliases struct { Aliases map[string]AliasDefinition `json:"aliases"` } @@ -35,5 +35,3 @@ func NewIndexAliases() *IndexAliases { return r } - -// false diff --git a/typedapi/types/indexanddatastreamaction.go b/typedapi/types/indexanddatastreamaction.go index eb7be9cb12..b3bece7883 100644 --- a/typedapi/types/indexanddatastreamaction.go +++ b/typedapi/types/indexanddatastreamaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexAndDataStreamAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/modify_data_stream/types.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/modify_data_stream/types.ts#L39-L44 type IndexAndDataStreamAction struct { // DataStream Data stream targeted by the action. DataStream string `json:"data_stream"` @@ -74,13 +74,3 @@ func NewIndexAndDataStreamAction() *IndexAndDataStreamAction { return r } - -// true - -type IndexAndDataStreamActionVariant interface { - IndexAndDataStreamActionCaster() *IndexAndDataStreamAction -} - -func (s *IndexAndDataStreamAction) IndexAndDataStreamActionCaster() *IndexAndDataStreamAction { - return s -} diff --git a/typedapi/types/indexcapabilities.go b/typedapi/types/indexcapabilities.go index 1c67cbade8..bb4497eb99 100644 --- a/typedapi/types/indexcapabilities.go +++ b/typedapi/types/indexcapabilities.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 type IndexCapabilities struct { RollupJobs []RollupJobSummary `json:"rollup_jobs"` } @@ -33,5 +33,3 @@ func NewIndexCapabilities() *IndexCapabilities { return r } - -// false diff --git a/typedapi/types/indexdetails.go b/typedapi/types/indexdetails.go index b33f63966a..eba85ed730 100644 --- a/typedapi/types/indexdetails.go +++ b/typedapi/types/indexdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 type IndexDetails struct { MaxSegmentsPerShard int64 `json:"max_segments_per_shard"` ShardCount int `json:"shard_count"` @@ -116,5 +116,3 @@ func NewIndexDetails() *IndexDetails { return r } - -// false diff --git a/typedapi/types/indexfield.go b/typedapi/types/indexfield.go index c3c1d479b5..4c28363017 100644 --- a/typedapi/types/indexfield.go +++ b/typedapi/types/indexfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L46-L48 type IndexField struct { Enabled bool `json:"enabled"` } @@ -76,13 +76,3 @@ func NewIndexField() *IndexField { return r } - -// true - -type IndexFieldVariant interface { - IndexFieldCaster() *IndexField -} - -func (s *IndexField) IndexFieldCaster() *IndexField { - return s -} diff --git a/typedapi/types/indexhealthstats.go b/typedapi/types/indexhealthstats.go index 1c8f6ac68c..862671f9e8 100644 --- a/typedapi/types/indexhealthstats.go +++ b/typedapi/types/indexhealthstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndexHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/health/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/health/types.ts#L24-L35 type IndexHealthStats struct { ActivePrimaryShards int `json:"active_primary_shards"` ActiveShards int `json:"active_shards"` @@ -216,5 +216,3 @@ func NewIndexHealthStats() *IndexHealthStats { return r } - -// false diff --git a/typedapi/types/indexingpressurememorysummary.go b/typedapi/types/indexingpressurememorysummary.go deleted file mode 100644 index ea7474c72c..0000000000 --- a/typedapi/types/indexingpressurememorysummary.go +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 - -package types - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "strconv" -) - -// IndexingPressureMemorySummary type. -// -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L580-L589 -type IndexingPressureMemorySummary struct { - AllInBytes int64 `json:"all_in_bytes"` - CombinedCoordinatingAndPrimaryInBytes int64 `json:"combined_coordinating_and_primary_in_bytes"` - CoordinatingInBytes int64 `json:"coordinating_in_bytes"` - CoordinatingRejections *int64 `json:"coordinating_rejections,omitempty"` - PrimaryInBytes int64 `json:"primary_in_bytes"` - PrimaryRejections *int64 `json:"primary_rejections,omitempty"` - ReplicaInBytes int64 `json:"replica_in_bytes"` - ReplicaRejections *int64 `json:"replica_rejections,omitempty"` -} - -func (s *IndexingPressureMemorySummary) UnmarshalJSON(data []byte) error { - - dec := json.NewDecoder(bytes.NewReader(data)) - - for { - t, err := dec.Token() - if err != nil { - if errors.Is(err, io.EOF) { - break - } - return err - } - - switch t { - - case "all_in_bytes": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "AllInBytes", err) - } - s.AllInBytes = value - case float64: - f := int64(v) - s.AllInBytes = f - } - - case "combined_coordinating_and_primary_in_bytes": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "CombinedCoordinatingAndPrimaryInBytes", err) - } - s.CombinedCoordinatingAndPrimaryInBytes = value - case float64: - f := int64(v) - s.CombinedCoordinatingAndPrimaryInBytes = f - } - - case "coordinating_in_bytes": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "CoordinatingInBytes", err) - } - s.CoordinatingInBytes = value - case float64: - f := int64(v) - s.CoordinatingInBytes = f - } - - case "coordinating_rejections": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "CoordinatingRejections", err) - } - s.CoordinatingRejections = &value - case float64: - f := int64(v) - s.CoordinatingRejections = &f - } - - case "primary_in_bytes": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "PrimaryInBytes", err) - } - s.PrimaryInBytes = value - case float64: - f := int64(v) - s.PrimaryInBytes = f - } - - case "primary_rejections": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "PrimaryRejections", err) - } - s.PrimaryRejections = &value - case float64: - f := int64(v) - s.PrimaryRejections = &f - } - - case "replica_in_bytes": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "ReplicaInBytes", err) - } - s.ReplicaInBytes = value - case float64: - f := int64(v) - s.ReplicaInBytes = f - } - - case "replica_rejections": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "ReplicaRejections", err) - } - s.ReplicaRejections = &value - case float64: - f := int64(v) - s.ReplicaRejections = &f - } - - } - } - return nil -} - -// NewIndexingPressureMemorySummary returns a IndexingPressureMemorySummary. -func NewIndexingPressureMemorySummary() *IndexingPressureMemorySummary { - r := &IndexingPressureMemorySummary{} - - return r -} - -// false diff --git a/typedapi/types/indexingslowlogsettings.go b/typedapi/types/indexingslowlogsettings.go index 9ddf5c6e75..2d9deb59cd 100644 --- a/typedapi/types/indexingslowlogsettings.go +++ b/typedapi/types/indexingslowlogsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexingSlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L588-L593 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L590-L595 type IndexingSlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` @@ -112,13 +112,3 @@ func NewIndexingSlowlogSettings() *IndexingSlowlogSettings { return r } - -// true - -type IndexingSlowlogSettingsVariant interface { - IndexingSlowlogSettingsCaster() *IndexingSlowlogSettings -} - -func (s *IndexingSlowlogSettings) IndexingSlowlogSettingsCaster() *IndexingSlowlogSettings { - return s -} diff --git a/typedapi/types/indexingslowlogtresholds.go b/typedapi/types/indexingslowlogtresholds.go index 9daf0cae5f..24cd5677f3 100644 --- a/typedapi/types/indexingslowlogtresholds.go +++ b/typedapi/types/indexingslowlogtresholds.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexingSlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L595-L602 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L597-L604 type IndexingSlowlogTresholds struct { // Index The indexing slow log, similar in functionality to the search slow log. The // log file name ends with `_index_indexing_slowlog.json`. @@ -36,13 +36,3 @@ func NewIndexingSlowlogTresholds() *IndexingSlowlogTresholds { return r } - -// true - -type IndexingSlowlogTresholdsVariant interface { - IndexingSlowlogTresholdsCaster() *IndexingSlowlogTresholds -} - -func (s *IndexingSlowlogTresholds) IndexingSlowlogTresholdsCaster() *IndexingSlowlogTresholds { - return s -} diff --git a/typedapi/types/indexingstats.go b/typedapi/types/indexingstats.go index d6705bc57a..7272528358 100644 --- a/typedapi/types/indexingstats.go +++ b/typedapi/types/indexingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L146-L162 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L168-L184 type IndexingStats struct { DeleteCurrent int64 `json:"delete_current"` DeleteTime Duration `json:"delete_time,omitempty"` @@ -236,5 +236,3 @@ func NewIndexingStats() *IndexingStats { return r } - -// false diff --git a/typedapi/types/indexmappingrecord.go b/typedapi/types/indexmappingrecord.go index ef30c11ecb..b4bf79ccba 100644 --- a/typedapi/types/indexmappingrecord.go +++ b/typedapi/types/indexmappingrecord.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexMappingRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 type IndexMappingRecord struct { Item *TypeMapping `json:"item,omitempty"` Mappings TypeMapping `json:"mappings"` @@ -34,5 +34,3 @@ func NewIndexMappingRecord() *IndexMappingRecord { return r } - -// false diff --git a/typedapi/types/indexoperation.go b/typedapi/types/indexoperation.go index a76fb8d409..1e4e01498e 100644 --- a/typedapi/types/indexoperation.go +++ b/typedapi/types/indexoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndexOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L142-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L142-L142 type IndexOperation struct { // DynamicTemplates A map from the full name of fields to the name of dynamic templates. // It defaults to an empty map. @@ -169,13 +169,3 @@ func NewIndexOperation() *IndexOperation { return r } - -// true - -type IndexOperationVariant interface { - IndexOperationCaster() *IndexOperation -} - -func (s *IndexOperation) IndexOperationCaster() *IndexOperation { - return s -} diff --git a/typedapi/types/indexprivilegescheck.go b/typedapi/types/indexprivilegescheck.go index ca74ea601b..ddbe1d6f7f 100644 --- a/typedapi/types/indexprivilegescheck.go +++ b/typedapi/types/indexprivilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndexPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/types.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/types.ts#L34-L45 type IndexPrivilegesCheck struct { // AllowRestrictedIndices This needs to be set to `true` (default is `false`) if using wildcards or // regexps for patterns that cover restricted indices. @@ -111,13 +111,3 @@ func NewIndexPrivilegesCheck() *IndexPrivilegesCheck { return r } - -// true - -type IndexPrivilegesCheckVariant interface { - IndexPrivilegesCheckCaster() *IndexPrivilegesCheck -} - -func (s *IndexPrivilegesCheck) IndexPrivilegesCheckCaster() *IndexPrivilegesCheck { - return s -} diff --git a/typedapi/types/indexresult.go b/typedapi/types/indexresult.go index 233f57a4d4..2d168cfe67 100644 --- a/typedapi/types/indexresult.go +++ b/typedapi/types/indexresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L267-L269 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L267-L269 type IndexResult struct { Response IndexResultSummary `json:"response"` } @@ -33,5 +33,3 @@ func NewIndexResult() *IndexResult { return r } - -// false diff --git a/typedapi/types/indexresultsummary.go b/typedapi/types/indexresultsummary.go index 241633f3dc..7d11a9ded6 100644 --- a/typedapi/types/indexresultsummary.go +++ b/typedapi/types/indexresultsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndexResultSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L271-L277 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L271-L277 type IndexResultSummary struct { Created bool `json:"created"` Id string `json:"id"` @@ -102,5 +102,3 @@ func NewIndexResultSummary() *IndexResultSummary { return r } - -// false diff --git a/typedapi/types/indexrouting.go b/typedapi/types/indexrouting.go index 2765970394..c687f65d86 100644 --- a/typedapi/types/indexrouting.go +++ b/typedapi/types/indexrouting.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L22-L25 type IndexRouting struct { Allocation *IndexRoutingAllocation `json:"allocation,omitempty"` Rebalance *IndexRoutingRebalance `json:"rebalance,omitempty"` @@ -34,13 +34,3 @@ func NewIndexRouting() *IndexRouting { return r } - -// true - -type IndexRoutingVariant interface { - IndexRoutingCaster() *IndexRouting -} - -func (s *IndexRouting) IndexRoutingCaster() *IndexRouting { - return s -} diff --git a/typedapi/types/indexroutingallocation.go b/typedapi/types/indexroutingallocation.go index 82185d9227..f1282ff00c 100644 --- a/typedapi/types/indexroutingallocation.go +++ b/typedapi/types/indexroutingallocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // IndexRoutingAllocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L27-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L27-L32 type IndexRoutingAllocation struct { Disk *IndexRoutingAllocationDisk `json:"disk,omitempty"` Enable *indexroutingallocationoptions.IndexRoutingAllocationOptions `json:"enable,omitempty"` @@ -40,13 +40,3 @@ func NewIndexRoutingAllocation() *IndexRoutingAllocation { return r } - -// true - -type IndexRoutingAllocationVariant interface { - IndexRoutingAllocationCaster() *IndexRoutingAllocation -} - -func (s *IndexRoutingAllocation) IndexRoutingAllocationCaster() *IndexRoutingAllocation { - return s -} diff --git a/typedapi/types/indexroutingallocationdisk.go b/typedapi/types/indexroutingallocationdisk.go index c32f3e267c..3030f9ed44 100644 --- a/typedapi/types/indexroutingallocationdisk.go +++ b/typedapi/types/indexroutingallocationdisk.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,9 +31,9 @@ import ( // IndexRoutingAllocationDisk type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L62-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L62-L64 type IndexRoutingAllocationDisk struct { - ThresholdEnabled string `json:"threshold_enabled,omitempty"` + ThresholdEnabled *string `json:"threshold_enabled,omitempty"` } func (s *IndexRoutingAllocationDisk) UnmarshalJSON(data []byte) error { @@ -61,7 +61,7 @@ func (s *IndexRoutingAllocationDisk) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.ThresholdEnabled = o + s.ThresholdEnabled = &o } } @@ -74,13 +74,3 @@ func NewIndexRoutingAllocationDisk() *IndexRoutingAllocationDisk { return r } - -// true - -type IndexRoutingAllocationDiskVariant interface { - IndexRoutingAllocationDiskCaster() *IndexRoutingAllocationDisk -} - -func (s *IndexRoutingAllocationDisk) IndexRoutingAllocationDiskCaster() *IndexRoutingAllocationDisk { - return s -} diff --git a/typedapi/types/indexroutingallocationinclude.go b/typedapi/types/indexroutingallocationinclude.go index 5663106ef2..405df8da18 100644 --- a/typedapi/types/indexroutingallocationinclude.go +++ b/typedapi/types/indexroutingallocationinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexRoutingAllocationInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L52-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L52-L55 type IndexRoutingAllocationInclude struct { Id_ *string `json:"_id,omitempty"` TierPreference_ *string `json:"_tier_preference,omitempty"` @@ -80,13 +80,3 @@ func NewIndexRoutingAllocationInclude() *IndexRoutingAllocationInclude { return r } - -// true - -type IndexRoutingAllocationIncludeVariant interface { - IndexRoutingAllocationIncludeCaster() *IndexRoutingAllocationInclude -} - -func (s *IndexRoutingAllocationInclude) IndexRoutingAllocationIncludeCaster() *IndexRoutingAllocationInclude { - return s -} diff --git a/typedapi/types/indexroutingallocationinitialrecovery.go b/typedapi/types/indexroutingallocationinitialrecovery.go index 7f9c5459fc..78a1c27ea0 100644 --- a/typedapi/types/indexroutingallocationinitialrecovery.go +++ b/typedapi/types/indexroutingallocationinitialrecovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexRoutingAllocationInitialRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L57-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L57-L59 type IndexRoutingAllocationInitialRecovery struct { Id_ *string `json:"_id,omitempty"` } @@ -66,13 +66,3 @@ func NewIndexRoutingAllocationInitialRecovery() *IndexRoutingAllocationInitialRe return r } - -// true - -type IndexRoutingAllocationInitialRecoveryVariant interface { - IndexRoutingAllocationInitialRecoveryCaster() *IndexRoutingAllocationInitialRecovery -} - -func (s *IndexRoutingAllocationInitialRecovery) IndexRoutingAllocationInitialRecoveryCaster() *IndexRoutingAllocationInitialRecovery { - return s -} diff --git a/typedapi/types/indexroutingrebalance.go b/typedapi/types/indexroutingrebalance.go index 293f4e168d..aa62d8b5b7 100644 --- a/typedapi/types/indexroutingrebalance.go +++ b/typedapi/types/indexroutingrebalance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // IndexRoutingRebalance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexRouting.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexRouting.ts#L34-L36 type IndexRoutingRebalance struct { Enable indexroutingrebalanceoptions.IndexRoutingRebalanceOptions `json:"enable"` } @@ -37,13 +37,3 @@ func NewIndexRoutingRebalance() *IndexRoutingRebalance { return r } - -// true - -type IndexRoutingRebalanceVariant interface { - IndexRoutingRebalanceCaster() *IndexRoutingRebalance -} - -func (s *IndexRoutingRebalance) IndexRoutingRebalanceCaster() *IndexRoutingRebalance { - return s -} diff --git a/typedapi/types/indexsegment.go b/typedapi/types/indexsegment.go index a66a8aa621..b2c9d90507 100644 --- a/typedapi/types/indexsegment.go +++ b/typedapi/types/indexsegment.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/segments/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/segments/types.ts#L24-L26 type IndexSegment struct { Shards map[string][]ShardsSegment `json:"shards"` } @@ -35,5 +35,3 @@ func NewIndexSegment() *IndexSegment { return r } - -// false diff --git a/typedapi/types/indexsegmentsort.go b/typedapi/types/indexsegmentsort.go index 12805f5242..f057be79ae 100644 --- a/typedapi/types/indexsegmentsort.go +++ b/typedapi/types/indexsegmentsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // IndexSegmentSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSegmentSort.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSegmentSort.ts#L22-L27 type IndexSegmentSort struct { Field []string `json:"field,omitempty"` Missing []segmentsortmissing.SegmentSortMissing `json:"missing,omitempty"` @@ -132,13 +132,3 @@ func NewIndexSegmentSort() *IndexSegmentSort { return r } - -// true - -type IndexSegmentSortVariant interface { - IndexSegmentSortCaster() *IndexSegmentSort -} - -func (s *IndexSegmentSort) IndexSegmentSortCaster() *IndexSegmentSort { - return s -} diff --git a/typedapi/types/indexsettingblocks.go b/typedapi/types/indexsettingblocks.go index 5c499537bc..eeea462c96 100644 --- a/typedapi/types/indexsettingblocks.go +++ b/typedapi/types/indexsettingblocks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexSettingBlocks type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L262-L268 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L262-L268 type IndexSettingBlocks struct { Metadata Stringifiedboolean `json:"metadata,omitempty"` Read Stringifiedboolean `json:"read,omitempty"` @@ -90,13 +90,3 @@ func NewIndexSettingBlocks() *IndexSettingBlocks { return r } - -// true - -type IndexSettingBlocksVariant interface { - IndexSettingBlocksCaster() *IndexSettingBlocks -} - -func (s *IndexSettingBlocks) IndexSettingBlocksCaster() *IndexSettingBlocks { - return s -} diff --git a/typedapi/types/indexsettings.go b/typedapi/types/indexsettings.go index 85773d2418..2b6c991014 100644 --- a/typedapi/types/indexsettings.go +++ b/typedapi/types/indexsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndexSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L70-L176 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L70-L176 type IndexSettings struct { Analysis *IndexSettingsAnalysis `json:"analysis,omitempty"` // Analyze Settings to define analyzers, tokenizers, token filters and character @@ -47,9 +47,9 @@ type IndexSettings struct { CreationDateString DateTime `json:"creation_date_string,omitempty"` DefaultPipeline *string `json:"default_pipeline,omitempty"` FinalPipeline *string `json:"final_pipeline,omitempty"` - Format string `json:"format,omitempty"` + Format *string `json:"format,omitempty"` GcDeletes Duration `json:"gc_deletes,omitempty"` - Hidden string `json:"hidden,omitempty"` + Hidden *string `json:"hidden,omitempty"` Highlight *SettingsHighlight `json:"highlight,omitempty"` Index *IndexSettings `json:"index,omitempty"` IndexSettings map[string]json.RawMessage `json:"-"` @@ -73,10 +73,10 @@ type IndexSettings struct { MaxTermsCount *int `json:"max_terms_count,omitempty"` Merge *Merge `json:"merge,omitempty"` Mode *string `json:"mode,omitempty"` - NumberOfReplicas string `json:"number_of_replicas,omitempty"` + NumberOfReplicas *string `json:"number_of_replicas,omitempty"` NumberOfRoutingShards *int `json:"number_of_routing_shards,omitempty"` - NumberOfShards string `json:"number_of_shards,omitempty"` - Priority string `json:"priority,omitempty"` + NumberOfShards *string `json:"number_of_shards,omitempty"` + Priority *string `json:"priority,omitempty"` ProvidedName *string `json:"provided_name,omitempty"` Queries *Queries `json:"queries,omitempty"` QueryString *SettingsQueryString `json:"query_string,omitempty"` @@ -98,7 +98,7 @@ type IndexSettings struct { TopMetricsMaxSize *int `json:"top_metrics_max_size,omitempty"` Translog *Translog `json:"translog,omitempty"` Uuid *string `json:"uuid,omitempty"` - VerifiedBeforeClose string `json:"verified_before_close,omitempty"` + VerifiedBeforeClose *string `json:"verified_before_close,omitempty"` Version *IndexVersioning `json:"version,omitempty"` } @@ -184,7 +184,7 @@ func (s *IndexSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Format = o + s.Format = &o case "gc_deletes": if err := dec.Decode(&s.GcDeletes); err != nil { @@ -201,7 +201,7 @@ func (s *IndexSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Hidden = o + s.Hidden = &o case "highlight": if err := dec.Decode(&s.Highlight); err != nil { @@ -450,7 +450,7 @@ func (s *IndexSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.NumberOfReplicas = o + s.NumberOfReplicas = &o case "number_of_routing_shards": @@ -478,7 +478,7 @@ func (s *IndexSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.NumberOfShards = o + s.NumberOfShards = &o case "priority": var tmp json.RawMessage @@ -490,7 +490,7 @@ func (s *IndexSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Priority = o + s.Priority = &o case "provided_name": if err := dec.Decode(&s.ProvidedName); err != nil { @@ -675,7 +675,7 @@ func (s *IndexSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.VerifiedBeforeClose = o + s.VerifiedBeforeClose = &o case "version": if err := dec.Decode(&s.Version); err != nil { @@ -738,13 +738,3 @@ func NewIndexSettings() *IndexSettings { return r } - -// true - -type IndexSettingsVariant interface { - IndexSettingsCaster() *IndexSettings -} - -func (s *IndexSettings) IndexSettingsCaster() *IndexSettings { - return s -} diff --git a/typedapi/types/indexsettingsanalysis.go b/typedapi/types/indexsettingsanalysis.go index 3c3767c7d4..df30294538 100644 --- a/typedapi/types/indexsettingsanalysis.go +++ b/typedapi/types/indexsettingsanalysis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexSettingsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L333-L339 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L333-L339 type IndexSettingsAnalysis struct { Analyzer map[string]Analyzer `json:"analyzer,omitempty"` CharFilter map[string]CharFilter `json:"char_filter,omitempty"` @@ -440,12 +440,60 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { buf.Seek(0, io.SeekStart) switch kind["type"] { + case "apostrophe": + oo := NewApostropheTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "arabic_stem": + oo := NewArabicStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "arabic_normalization": + oo := NewArabicNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "asciifolding": oo := NewAsciiFoldingTokenFilter() if err := localDec.Decode(&oo); err != nil { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "bengali_normalization": + oo := NewBengaliNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "brazilian_stem": + oo := NewBrazilianStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "cjk_bigram": + oo := NewCjkBigramTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "cjk_width": + oo := NewCjkWidthTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "classic": + oo := NewClassicTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "common_grams": oo := NewCommonGramsTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -458,12 +506,30 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "czech_stem": + oo := NewCzechStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "decimal_digit": + oo := NewDecimalDigitTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "delimited_payload": oo := NewDelimitedPayloadTokenFilter() if err := localDec.Decode(&oo); err != nil { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "dutch_stem": + oo := NewDutchStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "edge_ngram": oo := NewEdgeNGramTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -482,6 +548,36 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "flatten_graph": + oo := NewFlattenGraphTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "french_stem": + oo := NewFrenchStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "german_normalization": + oo := NewGermanNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "german_stem": + oo := NewGermanStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "hindi_normalization": + oo := NewHindiNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "hunspell": oo := NewHunspellTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -494,6 +590,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "indic_normalization": + oo := NewIndicNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "keep_types": oo := NewKeepTypesTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -512,6 +614,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "keyword_repeat": + oo := NewKeywordRepeatTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "kstem": oo := NewKStemTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -536,6 +644,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "min_hash": + oo := NewMinHashTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "multiplexer": oo := NewMultiplexerTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -566,6 +680,18 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "persian_normalization": + oo := NewPersianNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "persian_stem": + oo := NewPersianStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "porter_stem": oo := NewPorterStemTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -590,6 +716,30 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "russian_stem": + oo := NewRussianStemTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "scandinavian_folding": + oo := NewScandinavianFoldingTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "scandinavian_normalization": + oo := NewScandinavianNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo + case "serbian_normalization": + oo := NewSerbianNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "shingle": oo := NewShingleTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -602,6 +752,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "sorani_normalization": + oo := NewSoraniNormalizationTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "stemmer_override": oo := NewStemmerOverrideTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -668,6 +824,12 @@ func (s *IndexSettingsAnalysis) UnmarshalJSON(data []byte) error { return fmt.Errorf("Filter | %w", err) } s.Filter[key] = oo + case "ja_stop": + oo := NewJaStopTokenFilter() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Filter | %w", err) + } + s.Filter[key] = oo case "kuromoji_stemmer": oo := NewKuromojiStemmerTokenFilter() if err := localDec.Decode(&oo); err != nil { @@ -916,13 +1078,3 @@ func NewIndexSettingsAnalysis() *IndexSettingsAnalysis { return r } - -// true - -type IndexSettingsAnalysisVariant interface { - IndexSettingsAnalysisCaster() *IndexSettingsAnalysis -} - -func (s *IndexSettingsAnalysis) IndexSettingsAnalysisCaster() *IndexSettingsAnalysis { - return s -} diff --git a/typedapi/types/indexsettingslifecycle.go b/typedapi/types/indexsettingslifecycle.go index ae54fb8685..1bab664932 100644 --- a/typedapi/types/indexsettingslifecycle.go +++ b/typedapi/types/indexsettingslifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexSettingsLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L284-L323 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L284-L323 type IndexSettingsLifecycle struct { // IndexingComplete Indicates whether or not the index has been rolled over. Automatically set to // true when ILM completes the rollover action. @@ -58,7 +58,7 @@ type IndexSettingsLifecycle struct { // PreferIlm Preference for the system that manages a data stream backing index // (preferring ILM when both ILM and DLM are // applicable for an index). - PreferIlm string `json:"prefer_ilm,omitempty"` + PreferIlm *string `json:"prefer_ilm,omitempty"` // RolloverAlias The index alias to update when the index rolls over. Specify when using a // policy that contains a rollover action. // When the index rolls over, the alias is updated to reflect that the index is @@ -132,7 +132,7 @@ func (s *IndexSettingsLifecycle) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.PreferIlm = o + s.PreferIlm = &o case "rollover_alias": var tmp json.RawMessage @@ -162,13 +162,3 @@ func NewIndexSettingsLifecycle() *IndexSettingsLifecycle { return r } - -// true - -type IndexSettingsLifecycleVariant interface { - IndexSettingsLifecycleCaster() *IndexSettingsLifecycle -} - -func (s *IndexSettingsLifecycle) IndexSettingsLifecycleCaster() *IndexSettingsLifecycle { - return s -} diff --git a/typedapi/types/indexsettingslifecyclestep.go b/typedapi/types/indexsettingslifecyclestep.go index f8e4a06041..d06b2564f7 100644 --- a/typedapi/types/indexsettingslifecyclestep.go +++ b/typedapi/types/indexsettingslifecyclestep.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexSettingsLifecycleStep type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L325-L331 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L325-L331 type IndexSettingsLifecycleStep struct { // WaitTimeThreshold Time to wait for the cluster to resolve allocation issues during an ILM // shrink action. Must be greater than 1h (1 hour). @@ -69,13 +69,3 @@ func NewIndexSettingsLifecycleStep() *IndexSettingsLifecycleStep { return r } - -// true - -type IndexSettingsLifecycleStepVariant interface { - IndexSettingsLifecycleStepCaster() *IndexSettingsLifecycleStep -} - -func (s *IndexSettingsLifecycleStep) IndexSettingsLifecycleStepCaster() *IndexSettingsLifecycleStep { - return s -} diff --git a/typedapi/types/indexsettingstimeseries.go b/typedapi/types/indexsettingstimeseries.go index 1f56417e13..a6195a5fe1 100644 --- a/typedapi/types/indexsettingstimeseries.go +++ b/typedapi/types/indexsettingstimeseries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexSettingsTimeSeries type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L341-L344 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L341-L344 type IndexSettingsTimeSeries struct { EndTime DateTime `json:"end_time,omitempty"` StartTime DateTime `json:"start_time,omitempty"` @@ -72,13 +72,3 @@ func NewIndexSettingsTimeSeries() *IndexSettingsTimeSeries { return r } - -// true - -type IndexSettingsTimeSeriesVariant interface { - IndexSettingsTimeSeriesCaster() *IndexSettingsTimeSeries -} - -func (s *IndexSettingsTimeSeries) IndexSettingsTimeSeriesCaster() *IndexSettingsTimeSeries { - return s -} diff --git a/typedapi/types/indexstate.go b/typedapi/types/indexstate.go index ecfeff0304..a54da31af2 100644 --- a/typedapi/types/indexstate.go +++ b/typedapi/types/indexstate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexState.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexState.ts#L27-L40 type IndexState struct { Aliases map[string]Alias `json:"aliases,omitempty"` DataStream *string `json:"data_stream,omitempty"` @@ -103,13 +103,3 @@ func NewIndexState() *IndexState { return r } - -// true - -type IndexStateVariant interface { - IndexStateCaster() *IndexState -} - -func (s *IndexState) IndexStateCaster() *IndexState { - return s -} diff --git a/typedapi/types/indexstats.go b/typedapi/types/indexstats.go index c8e5c6a344..42e8974515 100644 --- a/typedapi/types/indexstats.go +++ b/typedapi/types/indexstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L52-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L52-L93 type IndexStats struct { Bulk *BulkStats `json:"bulk,omitempty"` // Completion Contains statistics about completions across all shards assigned to the node. @@ -72,5 +72,3 @@ func NewIndexStats() *IndexStats { return r } - -// false diff --git a/typedapi/types/indextemplate.go b/typedapi/types/indextemplate.go index 4a7d60e80e..58197fef12 100644 --- a/typedapi/types/indextemplate.go +++ b/typedapi/types/indextemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexTemplate.ts#L28-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexTemplate.ts#L28-L81 type IndexTemplate struct { AllowAutoCreate *bool `json:"allow_auto_create,omitempty"` // ComposedOf An ordered list of component template names. @@ -197,13 +197,3 @@ func NewIndexTemplate() *IndexTemplate { return r } - -// true - -type IndexTemplateVariant interface { - IndexTemplateCaster() *IndexTemplate -} - -func (s *IndexTemplate) IndexTemplateCaster() *IndexTemplate { - return s -} diff --git a/typedapi/types/indextemplatedatastreamconfiguration.go b/typedapi/types/indextemplatedatastreamconfiguration.go index 9fd71384f7..c27c444556 100644 --- a/typedapi/types/indextemplatedatastreamconfiguration.go +++ b/typedapi/types/indextemplatedatastreamconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexTemplateDataStreamConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexTemplate.ts#L83-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexTemplate.ts#L83-L94 type IndexTemplateDataStreamConfiguration struct { // AllowCustomRouting If true, the data stream supports custom routing. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` @@ -93,13 +93,3 @@ func NewIndexTemplateDataStreamConfiguration() *IndexTemplateDataStreamConfigura return r } - -// true - -type IndexTemplateDataStreamConfigurationVariant interface { - IndexTemplateDataStreamConfigurationCaster() *IndexTemplateDataStreamConfiguration -} - -func (s *IndexTemplateDataStreamConfiguration) IndexTemplateDataStreamConfigurationCaster() *IndexTemplateDataStreamConfiguration { - return s -} diff --git a/typedapi/types/indextemplateitem.go b/typedapi/types/indextemplateitem.go index 69dae73741..fbd32c3e1d 100644 --- a/typedapi/types/indextemplateitem.go +++ b/typedapi/types/indextemplateitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IndexTemplateItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 type IndexTemplateItem struct { IndexTemplate IndexTemplate `json:"index_template"` Name string `json:"name"` @@ -72,5 +72,3 @@ func NewIndexTemplateItem() *IndexTemplateItem { return r } - -// false diff --git a/typedapi/types/indextemplatemapping.go b/typedapi/types/indextemplatemapping.go index ecbc2f062b..287c8593c5 100644 --- a/typedapi/types/indextemplatemapping.go +++ b/typedapi/types/indextemplatemapping.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexTemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L159-L181 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L159-L181 type IndexTemplateMapping struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream @@ -48,13 +48,3 @@ func NewIndexTemplateMapping() *IndexTemplateMapping { return r } - -// true - -type IndexTemplateMappingVariant interface { - IndexTemplateMappingCaster() *IndexTemplateMapping -} - -func (s *IndexTemplateMapping) IndexTemplateMappingCaster() *IndexTemplateMapping { - return s -} diff --git a/typedapi/types/indextemplatesummary.go b/typedapi/types/indextemplatesummary.go index a670c7c29c..cf220a7e49 100644 --- a/typedapi/types/indextemplatesummary.go +++ b/typedapi/types/indextemplatesummary.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndexTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexTemplate.ts#L96-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexTemplate.ts#L96-L118 type IndexTemplateSummary struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream @@ -48,13 +48,3 @@ func NewIndexTemplateSummary() *IndexTemplateSummary { return r } - -// true - -type IndexTemplateSummaryVariant interface { - IndexTemplateSummaryCaster() *IndexTemplateSummary -} - -func (s *IndexTemplateSummary) IndexTemplateSummaryCaster() *IndexTemplateSummary { - return s -} diff --git a/typedapi/types/indexversioning.go b/typedapi/types/indexversioning.go index 49805c2c3a..26426797b9 100644 --- a/typedapi/types/indexversioning.go +++ b/typedapi/types/indexversioning.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndexVersioning type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L279-L282 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L279-L282 type IndexVersioning struct { Created *string `json:"created,omitempty"` CreatedString *string `json:"created_string,omitempty"` @@ -80,13 +80,3 @@ func NewIndexVersioning() *IndexVersioning { return r } - -// true - -type IndexVersioningVariant interface { - IndexVersioningCaster() *IndexVersioning -} - -func (s *IndexVersioning) IndexVersioningCaster() *IndexVersioning { - return s -} diff --git a/typedapi/types/indicatornode.go b/typedapi/types/indicatornode.go index b0a487d8b0..15078fe345 100644 --- a/typedapi/types/indicatornode.go +++ b/typedapi/types/indicatornode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndicatorNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L92-L95 type IndicatorNode struct { Name *string `json:"name,omitempty"` NodeId *string `json:"node_id,omitempty"` @@ -87,5 +87,3 @@ func NewIndicatorNode() *IndicatorNode { return r } - -// false diff --git a/typedapi/types/indicators.go b/typedapi/types/indicators.go index e72b449598..9203dd3a04 100644 --- a/typedapi/types/indicators.go +++ b/typedapi/types/indicators.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Indicators type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L32-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L33-L42 type Indicators struct { DataStreamLifecycle *DataStreamLifecycleIndicator `json:"data_stream_lifecycle,omitempty"` Disk *DiskIndicator `json:"disk,omitempty"` @@ -40,5 +40,3 @@ func NewIndicators() *Indicators { return r } - -// false diff --git a/typedapi/types/indices.go b/typedapi/types/indices.go index 5724bb5c05..91ea0dc370 100644 --- a/typedapi/types/indices.go +++ b/typedapi/types/indices.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Indices type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L67-L67 type Indices []string - -type IndicesVariant interface { - IndicesCaster() *Indices -} diff --git a/typedapi/types/indicesaction.go b/typedapi/types/indicesaction.go index 292cb9be56..14a002e019 100644 --- a/typedapi/types/indicesaction.go +++ b/typedapi/types/indicesaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // IndicesAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/update_aliases/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/update_aliases/types.ts#L23-L39 type IndicesAction struct { // Add Adds a data stream or index to an alias. // If the alias doesn’t exist, the `add` action creates it. @@ -77,13 +77,3 @@ func NewIndicesAction() *IndicesAction { return r } - -// true - -type IndicesActionVariant interface { - IndicesActionCaster() *IndicesAction -} - -func (s *IndicesAction) IndicesActionCaster() *IndicesAction { - return s -} diff --git a/typedapi/types/indicesblockstatus.go b/typedapi/types/indicesblockstatus.go index 6db023fb34..c6052afa67 100644 --- a/typedapi/types/indicesblockstatus.go +++ b/typedapi/types/indicesblockstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndicesBlockStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 type IndicesBlockStatus struct { Blocked bool `json:"blocked"` Name string `json:"name"` @@ -82,5 +82,3 @@ func NewIndicesBlockStatus() *IndicesBlockStatus { return r } - -// false diff --git a/typedapi/types/indicesindexingpressure.go b/typedapi/types/indicesindexingpressure.go index 4b84db6100..8610e6e210 100644 --- a/typedapi/types/indicesindexingpressure.go +++ b/typedapi/types/indicesindexingpressure.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndicesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L575-L577 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L577-L579 type IndicesIndexingPressure struct { Memory IndicesIndexingPressureMemory `json:"memory"` } @@ -33,13 +33,3 @@ func NewIndicesIndexingPressure() *IndicesIndexingPressure { return r } - -// true - -type IndicesIndexingPressureVariant interface { - IndicesIndexingPressureCaster() *IndicesIndexingPressure -} - -func (s *IndicesIndexingPressure) IndicesIndexingPressureCaster() *IndicesIndexingPressure { - return s -} diff --git a/typedapi/types/indicesindexingpressurememory.go b/typedapi/types/indicesindexingpressurememory.go index 2797e42a76..45c33af0d6 100644 --- a/typedapi/types/indicesindexingpressurememory.go +++ b/typedapi/types/indicesindexingpressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndicesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L579-L586 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L581-L588 type IndicesIndexingPressureMemory struct { // Limit Number of outstanding bytes that may be consumed by indexing requests. When // this limit is reached or exceeded, @@ -83,13 +83,3 @@ func NewIndicesIndexingPressureMemory() *IndicesIndexingPressureMemory { return r } - -// true - -type IndicesIndexingPressureMemoryVariant interface { - IndicesIndexingPressureMemoryCaster() *IndicesIndexingPressureMemory -} - -func (s *IndicesIndexingPressureMemory) IndicesIndexingPressureMemoryCaster() *IndicesIndexingPressureMemory { - return s -} diff --git a/typedapi/types/indicesmodifyaction.go b/typedapi/types/indicesmodifyaction.go index 5f1eb84f22..346a6d4728 100644 --- a/typedapi/types/indicesmodifyaction.go +++ b/typedapi/types/indicesmodifyaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // IndicesModifyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/modify_data_stream/types.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/modify_data_stream/types.ts#L22-L37 type IndicesModifyAction struct { // AddBackingIndex Adds an existing index as a backing index for a data stream. // The index is hidden as part of this operation. @@ -79,13 +79,3 @@ func NewIndicesModifyAction() *IndicesModifyAction { return r } - -// true - -type IndicesModifyActionVariant interface { - IndicesModifyActionCaster() *IndicesModifyAction -} - -func (s *IndicesModifyAction) IndicesModifyActionCaster() *IndicesModifyAction { - return s -} diff --git a/typedapi/types/indicesoptions.go b/typedapi/types/indicesoptions.go index 01e32479cd..7cf3c82779 100644 --- a/typedapi/types/indicesoptions.go +++ b/typedapi/types/indicesoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndicesOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L339-L366 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L341-L368 type IndicesOptions struct { // AllowNoIndices If false, the request returns an error if any wildcard expression, index // alias, or `_all` value targets only @@ -138,13 +138,3 @@ func NewIndicesOptions() *IndicesOptions { return r } - -// true - -type IndicesOptionsVariant interface { - IndicesOptionsCaster() *IndicesOptions -} - -func (s *IndicesOptions) IndicesOptionsCaster() *IndicesOptions { - return s -} diff --git a/typedapi/types/indicesprivileges.go b/typedapi/types/indicesprivileges.go index 59cf635f5d..a662dc184e 100644 --- a/typedapi/types/indicesprivileges.go +++ b/typedapi/types/indicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L216-L242 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L216-L242 type IndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -156,13 +156,3 @@ func NewIndicesPrivileges() *IndicesPrivileges { return r } - -// true - -type IndicesPrivilegesVariant interface { - IndicesPrivilegesCaster() *IndicesPrivileges -} - -func (s *IndicesPrivileges) IndicesPrivilegesCaster() *IndicesPrivileges { - return s -} diff --git a/typedapi/types/indicesprivilegesquery.go b/typedapi/types/indicesprivilegesquery.go index 3bb7e95edd..9bedfd6907 100644 --- a/typedapi/types/indicesprivilegesquery.go +++ b/typedapi/types/indicesprivilegesquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,9 +26,5 @@ package types // Query // RoleTemplateQuery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L341-L349 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L341-L349 type IndicesPrivilegesQuery any - -type IndicesPrivilegesQueryVariant interface { - IndicesPrivilegesQueryCaster() *IndicesPrivilegesQuery -} diff --git a/typedapi/types/indicesrecord.go b/typedapi/types/indicesrecord.go index 08f4202f13..2f8bea8711 100644 --- a/typedapi/types/indicesrecord.go +++ b/typedapi/types/indicesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndicesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/indices/types.ts#L20-L808 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/indices/types.ts#L20-L808 type IndicesRecord struct { // BulkAvgSizeInBytes average size in bytes of shard bulk BulkAvgSizeInBytes *string `json:"bulk.avg_size_in_bytes,omitempty"` @@ -2051,5 +2051,3 @@ func NewIndicesRecord() *IndicesRecord { return r } - -// false diff --git a/typedapi/types/indicesshardsstats.go b/typedapi/types/indicesshardsstats.go index 3de7204e75..0e69c87ecc 100644 --- a/typedapi/types/indicesshardsstats.go +++ b/typedapi/types/indicesshardsstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndicesShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L52-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L52-L55 type IndicesShardsStats struct { AllFields FieldSummary `json:"all_fields"` Fields map[string]FieldSummary `json:"fields"` @@ -36,5 +36,3 @@ func NewIndicesShardsStats() *IndicesShardsStats { return r } - -// false diff --git a/typedapi/types/indicesshardstats.go b/typedapi/types/indicesshardstats.go index 53eddd6fff..a2afc7c48e 100644 --- a/typedapi/types/indicesshardstats.go +++ b/typedapi/types/indicesshardstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // IndicesShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L192-L223 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L192-L223 type IndicesShardStats struct { Bulk *BulkStats `json:"bulk,omitempty"` Commit *ShardCommit `json:"commit,omitempty"` @@ -64,5 +64,3 @@ func NewIndicesShardStats() *IndicesShardStats { return r } - -// false diff --git a/typedapi/types/indicesshardstores.go b/typedapi/types/indicesshardstores.go index 8535916225..e38284dfc0 100644 --- a/typedapi/types/indicesshardstores.go +++ b/typedapi/types/indicesshardstores.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IndicesShardStores type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L25-L27 type IndicesShardStores struct { Shards map[string]ShardStoreWrapper `json:"shards"` } @@ -35,5 +35,3 @@ func NewIndicesShardStores() *IndicesShardStores { return r } - -// false diff --git a/typedapi/types/indicesstats.go b/typedapi/types/indicesstats.go index 92ba4f5a42..d150e34c37 100644 --- a/typedapi/types/indicesstats.go +++ b/typedapi/types/indicesstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // IndicesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L95-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L95-L110 type IndicesStats struct { Health *healthstatus.HealthStatus `json:"health,omitempty"` Primaries *IndexStats `json:"primaries,omitempty"` @@ -104,5 +104,3 @@ func NewIndicesStats() *IndicesStats { return r } - -// false diff --git a/typedapi/types/indicesvalidationexplanation.go b/typedapi/types/indicesvalidationexplanation.go index ebe9ec3720..95ede77cfc 100644 --- a/typedapi/types/indicesvalidationexplanation.go +++ b/typedapi/types/indicesvalidationexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IndicesValidationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 type IndicesValidationExplanation struct { Error *string `json:"error,omitempty"` Explanation *string `json:"explanation,omitempty"` @@ -108,5 +108,3 @@ func NewIndicesValidationExplanation() *IndicesValidationExplanation { return r } - -// false diff --git a/typedapi/types/indicesversions.go b/typedapi/types/indicesversions.go index a6d5c3d111..306a9afe2f 100644 --- a/typedapi/types/indicesversions.go +++ b/typedapi/types/indicesversions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,13 @@ import ( // IndicesVersions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L263-L268 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L359-L365 type IndicesVersions struct { - IndexCount int `json:"index_count"` - PrimaryShardCount int `json:"primary_shard_count"` - TotalPrimaryBytes int64 `json:"total_primary_bytes"` - Version string `json:"version"` + IndexCount int `json:"index_count"` + PrimaryShardCount int `json:"primary_shard_count"` + TotalPrimaryBytes int64 `json:"total_primary_bytes"` + TotalPrimarySize ByteSize `json:"total_primary_size,omitempty"` + Version string `json:"version"` } func (s *IndicesVersions) UnmarshalJSON(data []byte) error { @@ -101,6 +102,11 @@ func (s *IndicesVersions) UnmarshalJSON(data []byte) error { s.TotalPrimaryBytes = f } + case "total_primary_size": + if err := dec.Decode(&s.TotalPrimarySize); err != nil { + return fmt.Errorf("%s | %w", "TotalPrimarySize", err) + } + case "version": if err := dec.Decode(&s.Version); err != nil { return fmt.Errorf("%s | %w", "Version", err) @@ -117,5 +123,3 @@ func NewIndicesVersions() *IndicesVersions { return r } - -// false diff --git a/typedapi/types/indicnormalizationtokenfilter.go b/typedapi/types/indicnormalizationtokenfilter.go new file mode 100644 index 0000000000..2ac72741f6 --- /dev/null +++ b/typedapi/types/indicnormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// IndicNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L506-L508 +type IndicNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *IndicNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s IndicNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerIndicNormalizationTokenFilter IndicNormalizationTokenFilter + tmp := innerIndicNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "indic_normalization" + + return json.Marshal(tmp) +} + +// NewIndicNormalizationTokenFilter returns a IndicNormalizationTokenFilter. +func NewIndicNormalizationTokenFilter() *IndicNormalizationTokenFilter { + r := &IndicNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/indonesiananalyzer.go b/typedapi/types/indonesiananalyzer.go index 2b217630a1..3125242860 100644 --- a/typedapi/types/indonesiananalyzer.go +++ b/typedapi/types/indonesiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // IndonesianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L193-L198 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L193-L198 type IndonesianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *IndonesianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *IndonesianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewIndonesianAnalyzer() *IndonesianAnalyzer { return r } - -// true - -type IndonesianAnalyzerVariant interface { - IndonesianAnalyzerCaster() *IndonesianAnalyzer -} - -func (s *IndonesianAnalyzer) IndonesianAnalyzerCaster() *IndonesianAnalyzer { - return s -} diff --git a/typedapi/types/inferenceaggregate.go b/typedapi/types/inferenceaggregate.go index 9cb248b87a..b453e6dfcb 100644 --- a/typedapi/types/inferenceaggregate.go +++ b/typedapi/types/inferenceaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L755-L770 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L757-L772 type InferenceAggregate struct { Data map[string]json.RawMessage `json:"-"` FeatureImportance []InferenceFeatureImportance `json:"feature_importance,omitempty"` @@ -143,5 +143,3 @@ func NewInferenceAggregate() *InferenceAggregate { return r } - -// false diff --git a/typedapi/types/inferenceaggregation.go b/typedapi/types/inferenceaggregation.go index 5d7d1a11ec..5f82348cab 100644 --- a/typedapi/types/inferenceaggregation.go +++ b/typedapi/types/inferenceaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // InferenceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L225-L234 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L225-L234 type InferenceAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -107,13 +107,3 @@ func NewInferenceAggregation() *InferenceAggregation { return r } - -// true - -type InferenceAggregationVariant interface { - InferenceAggregationCaster() *InferenceAggregation -} - -func (s *InferenceAggregation) InferenceAggregationCaster() *InferenceAggregation { - return s -} diff --git a/typedapi/types/inferencechunkingsettings.go b/typedapi/types/inferencechunkingsettings.go index 567085de8c..bb03144d7d 100644 --- a/typedapi/types/inferencechunkingsettings.go +++ b/typedapi/types/inferencechunkingsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceChunkingSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Services.ts#L60-L89 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Services.ts#L288-L317 type InferenceChunkingSettings struct { // MaxChunkSize The maximum size of a chunk in words. // This value cannot be higher than `300` or lower than `20` (for `sentence` @@ -135,13 +135,3 @@ func NewInferenceChunkingSettings() *InferenceChunkingSettings { return r } - -// true - -type InferenceChunkingSettingsVariant interface { - InferenceChunkingSettingsCaster() *InferenceChunkingSettings -} - -func (s *InferenceChunkingSettings) InferenceChunkingSettingsCaster() *InferenceChunkingSettings { - return s -} diff --git a/typedapi/types/inferenceclassimportance.go b/typedapi/types/inferenceclassimportance.go index 9adac924d3..ee1d2c1e44 100644 --- a/typedapi/types/inferenceclassimportance.go +++ b/typedapi/types/inferenceclassimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L784-L787 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L786-L789 type InferenceClassImportance struct { ClassName string `json:"class_name"` Importance Float64 `json:"importance"` @@ -91,5 +91,3 @@ func NewInferenceClassImportance() *InferenceClassImportance { return r } - -// false diff --git a/typedapi/types/inferenceconfig.go b/typedapi/types/inferenceconfig.go index 617b9615f9..617d297796 100644 --- a/typedapi/types/inferenceconfig.go +++ b/typedapi/types/inferenceconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // InferenceConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1066-L1078 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1066-L1078 type InferenceConfig struct { AdditionalInferenceConfigProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -73,13 +73,3 @@ func NewInferenceConfig() *InferenceConfig { return r } - -// true - -type InferenceConfigVariant interface { - InferenceConfigCaster() *InferenceConfig -} - -func (s *InferenceConfig) InferenceConfigCaster() *InferenceConfig { - return s -} diff --git a/typedapi/types/inferenceconfigclassification.go b/typedapi/types/inferenceconfigclassification.go index 8fec476bcb..dd9337d667 100644 --- a/typedapi/types/inferenceconfigclassification.go +++ b/typedapi/types/inferenceconfigclassification.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceConfigClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1093-L1119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1093-L1119 type InferenceConfigClassification struct { // NumTopClasses Specifies the number of top class predictions to return. NumTopClasses *int `json:"num_top_classes,omitempty"` @@ -127,13 +127,3 @@ func NewInferenceConfigClassification() *InferenceConfigClassification { return r } - -// true - -type InferenceConfigClassificationVariant interface { - InferenceConfigClassificationCaster() *InferenceConfigClassification -} - -func (s *InferenceConfigClassification) InferenceConfigClassificationCaster() *InferenceConfigClassification { - return s -} diff --git a/typedapi/types/inferenceconfigcontainer.go b/typedapi/types/inferenceconfigcontainer.go index bd54ac8c04..61cf7520f0 100644 --- a/typedapi/types/inferenceconfigcontainer.go +++ b/typedapi/types/inferenceconfigcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // InferenceConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L236-L242 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L236-L242 type InferenceConfigContainer struct { AdditionalInferenceConfigContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -73,13 +73,3 @@ func NewInferenceConfigContainer() *InferenceConfigContainer { return r } - -// true - -type InferenceConfigContainerVariant interface { - InferenceConfigContainerCaster() *InferenceConfigContainer -} - -func (s *InferenceConfigContainer) InferenceConfigContainerCaster() *InferenceConfigContainer { - return s -} diff --git a/typedapi/types/inferenceconfigcreatecontainer.go b/typedapi/types/inferenceconfigcreatecontainer.go index ffcbe9bbe1..49696469cb 100644 --- a/typedapi/types/inferenceconfigcreatecontainer.go +++ b/typedapi/types/inferenceconfigcreatecontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // InferenceConfigCreateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L26-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L26-L85 type InferenceConfigCreateContainer struct { AdditionalInferenceConfigCreateContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -90,13 +90,3 @@ func NewInferenceConfigCreateContainer() *InferenceConfigCreateContainer { return r } - -// true - -type InferenceConfigCreateContainerVariant interface { - InferenceConfigCreateContainerCaster() *InferenceConfigCreateContainer -} - -func (s *InferenceConfigCreateContainer) InferenceConfigCreateContainerCaster() *InferenceConfigCreateContainer { - return s -} diff --git a/typedapi/types/inferenceconfigregression.go b/typedapi/types/inferenceconfigregression.go index 5a13b49591..a70d9f1cf2 100644 --- a/typedapi/types/inferenceconfigregression.go +++ b/typedapi/types/inferenceconfigregression.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceConfigRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1080-L1091 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1080-L1091 type InferenceConfigRegression struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` @@ -87,13 +87,3 @@ func NewInferenceConfigRegression() *InferenceConfigRegression { return r } - -// true - -type InferenceConfigRegressionVariant interface { - InferenceConfigRegressionCaster() *InferenceConfigRegression -} - -func (s *InferenceConfigRegression) InferenceConfigRegressionCaster() *InferenceConfigRegression { - return s -} diff --git a/typedapi/types/inferenceconfigupdatecontainer.go b/typedapi/types/inferenceconfigupdatecontainer.go index 040253fd66..59fdb19c8f 100644 --- a/typedapi/types/inferenceconfigupdatecontainer.go +++ b/typedapi/types/inferenceconfigupdatecontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // InferenceConfigUpdateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L315-L337 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L315-L337 type InferenceConfigUpdateContainer struct { AdditionalInferenceConfigUpdateContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -89,13 +89,3 @@ func NewInferenceConfigUpdateContainer() *InferenceConfigUpdateContainer { return r } - -// true - -type InferenceConfigUpdateContainerVariant interface { - InferenceConfigUpdateContainerCaster() *InferenceConfigUpdateContainer -} - -func (s *InferenceConfigUpdateContainer) InferenceConfigUpdateContainerCaster() *InferenceConfigUpdateContainer { - return s -} diff --git a/typedapi/types/inferenceendpoint.go b/typedapi/types/inferenceendpoint.go index e32aa1d68b..5506191b53 100644 --- a/typedapi/types/inferenceendpoint.go +++ b/typedapi/types/inferenceendpoint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceEndpoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Services.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Services.ts#L45-L65 type InferenceEndpoint struct { // ChunkingSettings Chunking configuration object ChunkingSettings *InferenceChunkingSettings `json:"chunking_settings,omitempty"` @@ -96,13 +96,3 @@ func NewInferenceEndpoint() *InferenceEndpoint { return r } - -// true - -type InferenceEndpointVariant interface { - InferenceEndpointCaster() *InferenceEndpoint -} - -func (s *InferenceEndpoint) InferenceEndpointCaster() *InferenceEndpoint { - return s -} diff --git a/typedapi/types/inferenceendpointinfo.go b/typedapi/types/inferenceendpointinfo.go index e4e2c28f2e..c9c671b14c 100644 --- a/typedapi/types/inferenceendpointinfo.go +++ b/typedapi/types/inferenceendpointinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // InferenceEndpointInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Services.ts#L46-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Services.ts#L67-L79 type InferenceEndpointInfo struct { // ChunkingSettings Chunking configuration object ChunkingSettings *InferenceChunkingSettings `json:"chunking_settings,omitempty"` @@ -119,5 +119,3 @@ func NewInferenceEndpointInfo() *InferenceEndpointInfo { return r } - -// false diff --git a/typedapi/types/inferencefeatureimportance.go b/typedapi/types/inferencefeatureimportance.go index a6a9df7897..f64f3f8efa 100644 --- a/typedapi/types/inferencefeatureimportance.go +++ b/typedapi/types/inferencefeatureimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L778-L782 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L780-L784 type InferenceFeatureImportance struct { Classes []InferenceClassImportance `json:"classes,omitempty"` FeatureName string `json:"feature_name"` @@ -97,5 +97,3 @@ func NewInferenceFeatureImportance() *InferenceFeatureImportance { return r } - -// false diff --git a/typedapi/types/inferenceprocessor.go b/typedapi/types/inferenceprocessor.go index c20da57b2c..7f4dab1fc0 100644 --- a/typedapi/types/inferenceprocessor.go +++ b/typedapi/types/inferenceprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1027-L1059 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1027-L1059 type InferenceProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -203,13 +203,3 @@ func NewInferenceProcessor() *InferenceProcessor { return r } - -// true - -type InferenceProcessorVariant interface { - InferenceProcessorCaster() *InferenceProcessor -} - -func (s *InferenceProcessor) InferenceProcessorCaster() *InferenceProcessor { - return s -} diff --git a/typedapi/types/inferenceresponseresult.go b/typedapi/types/inferenceresponseresult.go index 79c62274e8..f47b615fa0 100644 --- a/typedapi/types/inferenceresponseresult.go +++ b/typedapi/types/inferenceresponseresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L478-L526 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L478-L526 type InferenceResponseResult struct { // Entities If the model is trained for named entity recognition (NER) tasks, the // response contains the recognized entities. @@ -200,5 +200,3 @@ func NewInferenceResponseResult() *InferenceResponseResult { return r } - -// false diff --git a/typedapi/types/inferencetopclassentry.go b/typedapi/types/inferencetopclassentry.go index f9df043c6d..a2d6f17b38 100644 --- a/typedapi/types/inferencetopclassentry.go +++ b/typedapi/types/inferencetopclassentry.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InferenceTopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L772-L776 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L774-L778 type InferenceTopClassEntry struct { ClassName FieldValue `json:"class_name"` ClassProbability Float64 `json:"class_probability"` @@ -101,5 +101,3 @@ func NewInferenceTopClassEntry() *InferenceTopClassEntry { return r } - -// false diff --git a/typedapi/types/influence.go b/typedapi/types/influence.go index c0b31e4e22..b3d2077434 100644 --- a/typedapi/types/influence.go +++ b/typedapi/types/influence.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Influence type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Anomaly.ts#L141-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Anomaly.ts#L141-L144 type Influence struct { InfluencerFieldName string `json:"influencer_field_name"` InfluencerFieldValues []string `json:"influencer_field_values"` @@ -80,5 +80,3 @@ func NewInfluence() *Influence { return r } - -// false diff --git a/typedapi/types/influencer.go b/typedapi/types/influencer.go index d76e9cef0c..12a32c452a 100644 --- a/typedapi/types/influencer.go +++ b/typedapi/types/influencer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Influencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Influencer.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Influencer.ts#L24-L76 type Influencer struct { // BucketSpan The length of the bucket in seconds. This value matches the bucket span that // is specified in the job. @@ -218,5 +218,3 @@ func NewInfluencer() *Influencer { return r } - -// false diff --git a/typedapi/types/infofeaturestate.go b/typedapi/types/infofeaturestate.go index 8c5f53623d..407c06f895 100644 --- a/typedapi/types/infofeaturestate.go +++ b/typedapi/types/infofeaturestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InfoFeatureState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 type InfoFeatureState struct { FeatureName string `json:"feature_name"` Indices []string `json:"indices"` @@ -91,5 +91,3 @@ func NewInfoFeatureState() *InfoFeatureState { return r } - -// false diff --git a/typedapi/types/ingest.go b/typedapi/types/ingest.go index 774881c26e..faa05dc00f 100644 --- a/typedapi/types/ingest.go +++ b/typedapi/types/ingest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Ingest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Simulation.ts#L29-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L28-L36 type Ingest struct { Pipeline *string `json:"pipeline,omitempty"` Redact_ *Redact `json:"_redact,omitempty"` @@ -78,5 +78,3 @@ func NewIngest() *Ingest { return r } - -// false diff --git a/typedapi/types/ingestdocumentsimulation.go b/typedapi/types/ingestdocumentsimulation.go index 718fb7e6f6..02e933f563 100644 --- a/typedapi/types/ingestdocumentsimulation.go +++ b/typedapi/types/ingestdocumentsimulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IngestDocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/simulate/ingest/SimulateIngestResponse.ts#L35-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/simulate/ingest/SimulateIngestResponse.ts#L35-L78 type IngestDocumentSimulation struct { // Error Any error resulting from simulatng ingest on this doc. This can be an error // generated by @@ -166,5 +166,3 @@ func NewIngestDocumentSimulation() *IngestDocumentSimulation { return r } - -// false diff --git a/typedapi/types/ingestpipeline.go b/typedapi/types/ingestpipeline.go index b74173485c..1ededafa71 100644 --- a/typedapi/types/ingestpipeline.go +++ b/typedapi/types/ingestpipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IngestPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Pipeline.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Pipeline.ts#L23-L51 type IngestPipeline struct { // Deprecated Marks this ingest pipeline as deprecated. // When a deprecated ingest pipeline is referenced as the default or final @@ -124,13 +124,3 @@ func NewIngestPipeline() *IngestPipeline { return r } - -// true - -type IngestPipelineVariant interface { - IngestPipelineCaster() *IngestPipeline -} - -func (s *IngestPipeline) IngestPipelineCaster() *IngestPipeline { - return s -} diff --git a/typedapi/types/ingestpipelineparams.go b/typedapi/types/ingestpipelineparams.go index 8c57fdcf13..2fbd84ec1e 100644 --- a/typedapi/types/ingestpipelineparams.go +++ b/typedapi/types/ingestpipelineparams.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IngestPipelineParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L148-L153 type IngestPipelineParams struct { ExtractBinaryContent bool `json:"extract_binary_content"` Name string `json:"name"` @@ -119,13 +119,3 @@ func NewIngestPipelineParams() *IngestPipelineParams { return r } - -// true - -type IngestPipelineParamsVariant interface { - IngestPipelineParamsCaster() *IngestPipelineParams -} - -func (s *IngestPipelineParams) IngestPipelineParamsCaster() *IngestPipelineParams { - return s -} diff --git a/typedapi/types/ingeststats.go b/typedapi/types/ingeststats.go index b2cf3faafc..77cca94378 100644 --- a/typedapi/types/ingeststats.go +++ b/typedapi/types/ingeststats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IngestStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L356-L394 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L358-L396 type IngestStats struct { // Count Total number of documents ingested during the lifetime of this node. Count int64 `json:"count"` @@ -173,5 +173,3 @@ func NewIngestStats() *IngestStats { return r } - -// false diff --git a/typedapi/types/ingesttotal.go b/typedapi/types/ingesttotal.go index 60d405a2ed..661247d9ef 100644 --- a/typedapi/types/ingesttotal.go +++ b/typedapi/types/ingesttotal.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IngestTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L396-L413 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L398-L415 type IngestTotal struct { // Count Total number of documents ingested during the lifetime of this node. Count int64 `json:"count"` @@ -120,5 +120,3 @@ func NewIngestTotal() *IngestTotal { return r } - -// false diff --git a/typedapi/types/inlineget.go b/typedapi/types/inlineget.go index 168cce4f0a..46d67c39c2 100644 --- a/typedapi/types/inlineget.go +++ b/typedapi/types/inlineget.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InlineGet type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L324-L337 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L326-L339 type InlineGet struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` @@ -165,5 +165,3 @@ func NewInlineGet() *InlineGet { return r } - -// false diff --git a/typedapi/types/inlinegetdictuserdefined.go b/typedapi/types/inlinegetdictuserdefined.go index 9a09dadd32..d8652fa267 100644 --- a/typedapi/types/inlinegetdictuserdefined.go +++ b/typedapi/types/inlinegetdictuserdefined.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InlineGetDictUserDefined type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L324-L337 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L326-L339 type InlineGetDictUserDefined struct { Fields map[string]json.RawMessage `json:"fields,omitempty"` Found bool `json:"found"` @@ -169,5 +169,3 @@ func NewInlineGetDictUserDefined() *InlineGetDictUserDefined { return r } - -// false diff --git a/typedapi/types/innerhits.go b/typedapi/types/innerhits.go index 726452a9e0..c33a4ce387 100644 --- a/typedapi/types/innerhits.go +++ b/typedapi/types/innerhits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InnerHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L108-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L108-L142 type InnerHits struct { Collapse *FieldCollapse `json:"collapse,omitempty"` DocvalueFields []FieldAndFormat `json:"docvalue_fields,omitempty"` @@ -97,19 +97,8 @@ func (s *InnerHits) UnmarshalJSON(data []byte) error { } case "fields": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Fields", err) - } - - s.Fields = append(s.Fields, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Fields); err != nil { - return fmt.Errorf("%s | %w", "Fields", err) - } + if err := dec.Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) } case "from": @@ -224,7 +213,7 @@ func (s *InnerHits) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { @@ -299,13 +288,3 @@ func NewInnerHits() *InnerHits { return r } - -// true - -type InnerHitsVariant interface { - InnerHitsCaster() *InnerHits -} - -func (s *InnerHits) InnerHitsCaster() *InnerHits { - return s -} diff --git a/typedapi/types/innerhitsresult.go b/typedapi/types/innerhitsresult.go index 609f6bf0a9..80a5892f76 100644 --- a/typedapi/types/innerhitsresult.go +++ b/typedapi/types/innerhitsresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // InnerHitsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L86-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L86-L88 type InnerHitsResult struct { Hits HitsMetadata `json:"hits"` } @@ -33,5 +33,3 @@ func NewInnerHitsResult() *InnerHitsResult { return r } - -// false diff --git a/typedapi/types/innerretriever.go b/typedapi/types/innerretriever.go new file mode 100644 index 0000000000..8311f3fc9a --- /dev/null +++ b/typedapi/types/innerretriever.go @@ -0,0 +1,94 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/scorenormalizer" +) + +// InnerRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L85-L89 +type InnerRetriever struct { + Normalizer scorenormalizer.ScoreNormalizer `json:"normalizer"` + Retriever RetrieverContainer `json:"retriever"` + Weight float32 `json:"weight"` +} + +func (s *InnerRetriever) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "normalizer": + if err := dec.Decode(&s.Normalizer); err != nil { + return fmt.Errorf("%s | %w", "Normalizer", err) + } + + case "retriever": + if err := dec.Decode(&s.Retriever); err != nil { + return fmt.Errorf("%s | %w", "Retriever", err) + } + + case "weight": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "Weight", err) + } + f := float32(value) + s.Weight = f + case float64: + f := float32(v) + s.Weight = f + } + + } + } + return nil +} + +// NewInnerRetriever returns a InnerRetriever. +func NewInnerRetriever() *InnerRetriever { + r := &InnerRetriever{} + + return r +} diff --git a/typedapi/types/inprogress.go b/typedapi/types/inprogress.go index 4c348048ee..b5d5fb4392 100644 --- a/typedapi/types/inprogress.go +++ b/typedapi/types/inprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L141-L146 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L141-L146 type InProgress struct { Name string `json:"name"` StartTimeMillis int64 `json:"start_time_millis"` @@ -92,5 +92,3 @@ func NewInProgress() *InProgress { return r } - -// false diff --git a/typedapi/types/input.go b/typedapi/types/input.go index e1bf04cebe..f8616c0387 100644 --- a/typedapi/types/input.go +++ b/typedapi/types/input.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Input type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L56-L58 type Input struct { FieldNames []string `json:"field_names"` } @@ -77,13 +77,3 @@ func NewInput() *Input { return r } - -// true - -type InputVariant interface { - InputCaster() *Input -} - -func (s *Input) InputCaster() *Input { - return s -} diff --git a/typedapi/types/inputconfig.go b/typedapi/types/inputconfig.go index 87497a5ad1..72ca3e2ac3 100644 --- a/typedapi/types/inputconfig.go +++ b/typedapi/types/inputconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // InputConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1061-L1064 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1061-L1064 type InputConfig struct { InputField string `json:"input_field"` OutputField string `json:"output_field"` @@ -87,13 +87,3 @@ func NewInputConfig() *InputConfig { return r } - -// true - -type InputConfigVariant interface { - InputConfigCaster() *InputConfig -} - -func (s *InputConfig) InputConfigCaster() *InputConfig { - return s -} diff --git a/typedapi/types/integernumberproperty.go b/typedapi/types/integernumberproperty.go index 0ac5ff93bc..0680ef245e 100644 --- a/typedapi/types/integernumberproperty.go +++ b/typedapi/types/integernumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // IntegerNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L171-L174 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L173-L176 type IntegerNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *IntegerNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -690,6 +696,12 @@ func (s *IntegerNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -972,13 +984,3 @@ func NewIntegerNumberProperty() *IntegerNumberProperty { return r } - -// true - -type IntegerNumberPropertyVariant interface { - IntegerNumberPropertyCaster() *IntegerNumberProperty -} - -func (s *IntegerNumberProperty) IntegerNumberPropertyCaster() *IntegerNumberProperty { - return s -} diff --git a/typedapi/types/integerrangeproperty.go b/typedapi/types/integerrangeproperty.go index 0248275a24..d06f33f08a 100644 --- a/typedapi/types/integerrangeproperty.go +++ b/typedapi/types/integerrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // IntegerRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/range.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/range.ts#L42-L44 type IntegerRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -274,6 +274,12 @@ func (s *IntegerRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -643,6 +649,12 @@ func (s *IntegerRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -895,13 +907,3 @@ func NewIntegerRangeProperty() *IntegerRangeProperty { return r } - -// true - -type IntegerRangePropertyVariant interface { - IntegerRangePropertyCaster() *IntegerRangeProperty -} - -func (s *IntegerRangeProperty) IntegerRangePropertyCaster() *IntegerRangeProperty { - return s -} diff --git a/typedapi/types/intervals.go b/typedapi/types/intervals.go index 74a28ab644..4965bf4909 100644 --- a/typedapi/types/intervals.go +++ b/typedapi/types/intervals.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // Intervals type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L83-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L83-L112 type Intervals struct { AdditionalIntervalsProperty map[string]json.RawMessage `json:"-"` // AllOf Returns matches that span a combination of other rules. @@ -40,6 +40,8 @@ type Intervals struct { Match *IntervalsMatch `json:"match,omitempty"` // Prefix Matches terms that start with a specified set of characters. Prefix *IntervalsPrefix `json:"prefix,omitempty"` + Range *IntervalsRange `json:"range,omitempty"` + Regexp *IntervalsRegexp `json:"regexp,omitempty"` // Wildcard Matches terms using a wildcard pattern. Wildcard *IntervalsWildcard `json:"wildcard,omitempty"` } @@ -81,13 +83,3 @@ func NewIntervals() *Intervals { return r } - -// true - -type IntervalsVariant interface { - IntervalsCaster() *Intervals -} - -func (s *Intervals) IntervalsCaster() *Intervals { - return s -} diff --git a/typedapi/types/intervalsallof.go b/typedapi/types/intervalsallof.go index 4f3a04822f..83276e5989 100644 --- a/typedapi/types/intervalsallof.go +++ b/typedapi/types/intervalsallof.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IntervalsAllOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L50-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L50-L70 type IntervalsAllOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` @@ -113,13 +113,3 @@ func NewIntervalsAllOf() *IntervalsAllOf { return r } - -// true - -type IntervalsAllOfVariant interface { - IntervalsAllOfCaster() *IntervalsAllOf -} - -func (s *IntervalsAllOf) IntervalsAllOfCaster() *IntervalsAllOf { - return s -} diff --git a/typedapi/types/intervalsanyof.go b/typedapi/types/intervalsanyof.go index 56e4d7c155..2cd96ca020 100644 --- a/typedapi/types/intervalsanyof.go +++ b/typedapi/types/intervalsanyof.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IntervalsAnyOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L72-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L72-L81 type IntervalsAnyOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` @@ -36,13 +36,3 @@ func NewIntervalsAnyOf() *IntervalsAnyOf { return r } - -// true - -type IntervalsAnyOfVariant interface { - IntervalsAnyOfCaster() *IntervalsAnyOf -} - -func (s *IntervalsAnyOf) IntervalsAnyOfCaster() *IntervalsAnyOf { - return s -} diff --git a/typedapi/types/intervalsfilter.go b/typedapi/types/intervalsfilter.go index b1a18e3db9..d480c5f351 100644 --- a/typedapi/types/intervalsfilter.go +++ b/typedapi/types/intervalsfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // IntervalsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L112-L152 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L114-L154 type IntervalsFilter struct { AdditionalIntervalsFilterProperty map[string]json.RawMessage `json:"-"` // After Query used to return intervals that follow an interval from the `filter` @@ -96,13 +96,3 @@ func NewIntervalsFilter() *IntervalsFilter { return r } - -// true - -type IntervalsFilterVariant interface { - IntervalsFilterCaster() *IntervalsFilter -} - -func (s *IntervalsFilter) IntervalsFilterCaster() *IntervalsFilter { - return s -} diff --git a/typedapi/types/intervalsfuzzy.go b/typedapi/types/intervalsfuzzy.go index 601f128710..c8eb81d09b 100644 --- a/typedapi/types/intervalsfuzzy.go +++ b/typedapi/types/intervalsfuzzy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IntervalsFuzzy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L154-L184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L156-L186 type IntervalsFuzzy struct { // Analyzer Analyzer used to normalize the term. Analyzer *string `json:"analyzer,omitempty"` @@ -141,13 +141,3 @@ func NewIntervalsFuzzy() *IntervalsFuzzy { return r } - -// true - -type IntervalsFuzzyVariant interface { - IntervalsFuzzyCaster() *IntervalsFuzzy -} - -func (s *IntervalsFuzzy) IntervalsFuzzyCaster() *IntervalsFuzzy { - return s -} diff --git a/typedapi/types/intervalsmatch.go b/typedapi/types/intervalsmatch.go index c743af7c6e..611de9599c 100644 --- a/typedapi/types/intervalsmatch.go +++ b/typedapi/types/intervalsmatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IntervalsMatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L186-L216 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L188-L218 type IntervalsMatch struct { // Analyzer Analyzer used to analyze terms in the query. Analyzer *string `json:"analyzer,omitempty"` @@ -141,13 +141,3 @@ func NewIntervalsMatch() *IntervalsMatch { return r } - -// true - -type IntervalsMatchVariant interface { - IntervalsMatchCaster() *IntervalsMatch -} - -func (s *IntervalsMatch) IntervalsMatchCaster() *IntervalsMatch { - return s -} diff --git a/typedapi/types/intervalsprefix.go b/typedapi/types/intervalsprefix.go index 2744c295ef..31edc43237 100644 --- a/typedapi/types/intervalsprefix.go +++ b/typedapi/types/intervalsprefix.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IntervalsPrefix type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L218-L233 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L220-L235 type IntervalsPrefix struct { // Analyzer Analyzer used to analyze the `prefix`. Analyzer *string `json:"analyzer,omitempty"` @@ -99,13 +99,3 @@ func NewIntervalsPrefix() *IntervalsPrefix { return r } - -// true - -type IntervalsPrefixVariant interface { - IntervalsPrefixCaster() *IntervalsPrefix -} - -func (s *IntervalsPrefix) IntervalsPrefixCaster() *IntervalsPrefix { - return s -} diff --git a/typedapi/types/intervalsquery.go b/typedapi/types/intervalsquery.go index 1b73c8cfd1..022cb2a655 100644 --- a/typedapi/types/intervalsquery.go +++ b/typedapi/types/intervalsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IntervalsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L235-L266 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L283-L317 type IntervalsQuery struct { AdditionalIntervalsQueryProperty map[string]json.RawMessage `json:"-"` // AllOf Returns matches that span a combination of other rules. @@ -52,6 +52,8 @@ type IntervalsQuery struct { // Prefix Matches terms that start with a specified set of characters. Prefix *IntervalsPrefix `json:"prefix,omitempty"` QueryName_ *string `json:"_name,omitempty"` + Range *IntervalsRange `json:"range,omitempty"` + Regexp *IntervalsRegexp `json:"regexp,omitempty"` // Wildcard Matches terms using a wildcard pattern. Wildcard *IntervalsWildcard `json:"wildcard,omitempty"` } @@ -124,6 +126,16 @@ func (s *IntervalsQuery) UnmarshalJSON(data []byte) error { } s.QueryName_ = &o + case "range": + if err := dec.Decode(&s.Range); err != nil { + return fmt.Errorf("%s | %w", "Range", err) + } + + case "regexp": + if err := dec.Decode(&s.Regexp); err != nil { + return fmt.Errorf("%s | %w", "Regexp", err) + } + case "wildcard": if err := dec.Decode(&s.Wildcard); err != nil { return fmt.Errorf("%s | %w", "Wildcard", err) @@ -184,13 +196,3 @@ func NewIntervalsQuery() *IntervalsQuery { return r } - -// true - -type IntervalsQueryVariant interface { - IntervalsQueryCaster() *IntervalsQuery -} - -func (s *IntervalsQuery) IntervalsQueryCaster() *IntervalsQuery { - return s -} diff --git a/typedapi/types/intervalsrange.go b/typedapi/types/intervalsrange.go new file mode 100644 index 0000000000..6c10d96579 --- /dev/null +++ b/typedapi/types/intervalsrange.go @@ -0,0 +1,143 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IntervalsRange type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L237-L264 +type IntervalsRange struct { + // Analyzer Analyzer used to analyze the `prefix`. + Analyzer *string `json:"analyzer,omitempty"` + // Gt Lower term, either gte or gt must be provided. + Gt *string `json:"gt,omitempty"` + // Gte Lower term, either gte or gt must be provided. + Gte *string `json:"gte,omitempty"` + // Lt Upper term, either lte or lt must be provided. + Lt *string `json:"lt,omitempty"` + // Lte Upper term, either lte or lt must be provided. + Lte *string `json:"lte,omitempty"` + // UseField If specified, match intervals from this field rather than the top-level + // field. + // The `prefix` is normalized using the search analyzer from this field, unless + // `analyzer` is specified separately. + UseField *string `json:"use_field,omitempty"` +} + +func (s *IntervalsRange) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "analyzer": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Analyzer", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Analyzer = &o + + case "gt": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Gt", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Gt = &o + + case "gte": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Gte", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Gte = &o + + case "lt": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Lt", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Lt = &o + + case "lte": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Lte", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Lte = &o + + case "use_field": + if err := dec.Decode(&s.UseField); err != nil { + return fmt.Errorf("%s | %w", "UseField", err) + } + + } + } + return nil +} + +// NewIntervalsRange returns a IntervalsRange. +func NewIntervalsRange() *IntervalsRange { + r := &IntervalsRange{} + + return r +} diff --git a/typedapi/types/intervalsregexp.go b/typedapi/types/intervalsregexp.go new file mode 100644 index 0000000000..4f4143a8a7 --- /dev/null +++ b/typedapi/types/intervalsregexp.go @@ -0,0 +1,101 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IntervalsRegexp type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L266-L281 +type IntervalsRegexp struct { + // Analyzer Analyzer used to analyze the `prefix`. + Analyzer *string `json:"analyzer,omitempty"` + // Pattern Regex pattern. + Pattern string `json:"pattern"` + // UseField If specified, match intervals from this field rather than the top-level + // field. + // The `prefix` is normalized using the search analyzer from this field, unless + // `analyzer` is specified separately. + UseField *string `json:"use_field,omitempty"` +} + +func (s *IntervalsRegexp) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "analyzer": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Analyzer", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Analyzer = &o + + case "pattern": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Pattern", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Pattern = o + + case "use_field": + if err := dec.Decode(&s.UseField); err != nil { + return fmt.Errorf("%s | %w", "UseField", err) + } + + } + } + return nil +} + +// NewIntervalsRegexp returns a IntervalsRegexp. +func NewIntervalsRegexp() *IntervalsRegexp { + r := &IntervalsRegexp{} + + return r +} diff --git a/typedapi/types/intervalswildcard.go b/typedapi/types/intervalswildcard.go index 4a4c42ad3f..cc443c8d82 100644 --- a/typedapi/types/intervalswildcard.go +++ b/typedapi/types/intervalswildcard.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IntervalsWildcard type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L268-L283 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L319-L334 type IntervalsWildcard struct { // Analyzer Analyzer used to analyze the `pattern`. // Defaults to the top-level field's analyzer. @@ -100,13 +100,3 @@ func NewIntervalsWildcard() *IntervalsWildcard { return r } - -// true - -type IntervalsWildcardVariant interface { - IntervalsWildcardCaster() *IntervalsWildcard -} - -func (s *IntervalsWildcard) IntervalsWildcardCaster() *IntervalsWildcard { - return s -} diff --git a/typedapi/types/invertedindex.go b/typedapi/types/invertedindex.go index 51dbee4157..5afab194ae 100644 --- a/typedapi/types/invertedindex.go +++ b/typedapi/types/invertedindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // InvertedIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L68-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L68-L76 type InvertedIndex struct { Offsets uint `json:"offsets"` Payloads uint `json:"payloads"` @@ -39,5 +39,3 @@ func NewInvertedIndex() *InvertedIndex { return r } - -// false diff --git a/typedapi/types/invocation.go b/typedapi/types/invocation.go index e021ade487..ad130aed76 100644 --- a/typedapi/types/invocation.go +++ b/typedapi/types/invocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Invocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L148-L151 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L148-L151 type Invocation struct { SnapshotName string `json:"snapshot_name"` Time DateTime `json:"time"` @@ -72,5 +72,3 @@ func NewInvocation() *Invocation { return r } - -// false diff --git a/typedapi/types/invocations.go b/typedapi/types/invocations.go index 6b7eed425a..4d13b64387 100644 --- a/typedapi/types/invocations.go +++ b/typedapi/types/invocations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Invocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L41-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L41-L43 type Invocations struct { Total int64 `json:"total"` } @@ -77,5 +77,3 @@ func NewInvocations() *Invocations { return r } - -// false diff --git a/typedapi/types/iostatdevice.go b/typedapi/types/iostatdevice.go index 5ebfe02b19..c1d110602f 100644 --- a/typedapi/types/iostatdevice.go +++ b/typedapi/types/iostatdevice.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IoStatDevice type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L801-L826 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L803-L828 type IoStatDevice struct { // DeviceName The Linux device name. DeviceName *string `json:"device_name,omitempty"` @@ -165,5 +165,3 @@ func NewIoStatDevice() *IoStatDevice { return r } - -// false diff --git a/typedapi/types/iostats.go b/typedapi/types/iostats.go index d92ac599de..f8fcce42ba 100644 --- a/typedapi/types/iostats.go +++ b/typedapi/types/iostats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // IoStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L789-L799 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L791-L801 type IoStats struct { // Devices Array of disk metrics for each device that is backing an Elasticsearch data // path. @@ -40,5 +40,3 @@ func NewIoStats() *IoStats { return r } - -// false diff --git a/typedapi/types/ipfilter.go b/typedapi/types/ipfilter.go index 6c65adc42a..d862c76e2c 100644 --- a/typedapi/types/ipfilter.go +++ b/typedapi/types/ipfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IpFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L177-L180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L177-L180 type IpFilter struct { Http bool `json:"http"` Transport bool `json:"transport"` @@ -91,5 +91,3 @@ func NewIpFilter() *IpFilter { return r } - -// false diff --git a/typedapi/types/ipinfo.go b/typedapi/types/ipinfo.go index 0e8f3c45d8..b2fb67d1ed 100644 --- a/typedapi/types/ipinfo.go +++ b/typedapi/types/ipinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Ipinfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Database.ts#L59-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Database.ts#L59-L59 type Ipinfo struct { } @@ -32,13 +32,3 @@ func NewIpinfo() *Ipinfo { return r } - -// true - -type IpinfoVariant interface { - IpinfoCaster() *Ipinfo -} - -func (s *Ipinfo) IpinfoCaster() *Ipinfo { - return s -} diff --git a/typedapi/types/iplocationdatabaseconfigurationmetadata.go b/typedapi/types/iplocationdatabaseconfigurationmetadata.go index fda4c1685f..2046be79ac 100644 --- a/typedapi/types/iplocationdatabaseconfigurationmetadata.go +++ b/typedapi/types/iplocationdatabaseconfigurationmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IpLocationDatabaseConfigurationMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L28-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L28-L34 type IpLocationDatabaseConfigurationMetadata struct { Database DatabaseConfigurationFull `json:"database"` Id string `json:"id"` @@ -90,5 +90,3 @@ func NewIpLocationDatabaseConfigurationMetadata() *IpLocationDatabaseConfigurati return r } - -// false diff --git a/typedapi/types/iplocationprocessor.go b/typedapi/types/iplocationprocessor.go index 5d2dee467a..9070bb50ca 100644 --- a/typedapi/types/iplocationprocessor.go +++ b/typedapi/types/iplocationprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IpLocationProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L478-L512 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L478-L512 type IpLocationProcessor struct { // DatabaseFile The database filename referring to a database the module ships with // (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom @@ -220,13 +220,3 @@ func NewIpLocationProcessor() *IpLocationProcessor { return r } - -// true - -type IpLocationProcessorVariant interface { - IpLocationProcessorCaster() *IpLocationProcessor -} - -func (s *IpLocationProcessor) IpLocationProcessorCaster() *IpLocationProcessor { - return s -} diff --git a/typedapi/types/ipprefixaggregate.go b/typedapi/types/ipprefixaggregate.go index 6f2a298590..481aebd13b 100644 --- a/typedapi/types/ipprefixaggregate.go +++ b/typedapi/types/ipprefixaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IpPrefixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L709-L713 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L711-L715 type IpPrefixAggregate struct { Buckets BucketsIpPrefixBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewIpPrefixAggregate() *IpPrefixAggregate { return r } - -// false diff --git a/typedapi/types/ipprefixaggregation.go b/typedapi/types/ipprefixaggregation.go index 068f27315f..906946b756 100644 --- a/typedapi/types/ipprefixaggregation.go +++ b/typedapi/types/ipprefixaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IpPrefixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1195-L1224 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1196-L1225 type IpPrefixAggregation struct { // AppendPrefixLength Defines whether the prefix length is appended to IP address keys in the // response. @@ -156,13 +156,3 @@ func NewIpPrefixAggregation() *IpPrefixAggregation { return r } - -// true - -type IpPrefixAggregationVariant interface { - IpPrefixAggregationCaster() *IpPrefixAggregation -} - -func (s *IpPrefixAggregation) IpPrefixAggregationCaster() *IpPrefixAggregation { - return s -} diff --git a/typedapi/types/ipprefixbucket.go b/typedapi/types/ipprefixbucket.go index 62fce47d34..983e521576 100644 --- a/typedapi/types/ipprefixbucket.go +++ b/typedapi/types/ipprefixbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // IpPrefixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L715-L720 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L717-L722 type IpPrefixBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -688,5 +688,3 @@ func NewIpPrefixBucket() *IpPrefixBucket { return r } - -// false diff --git a/typedapi/types/ipproperty.go b/typedapi/types/ipproperty.go index 20b962850b..e7d0a82c6d 100644 --- a/typedapi/types/ipproperty.go +++ b/typedapi/types/ipproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // IpProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L74-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L74-L88 type IpProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -267,6 +267,12 @@ func (s *IpProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -667,6 +673,12 @@ func (s *IpProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -942,13 +954,3 @@ func NewIpProperty() *IpProperty { return r } - -// true - -type IpPropertyVariant interface { - IpPropertyCaster() *IpProperty -} - -func (s *IpProperty) IpPropertyCaster() *IpProperty { - return s -} diff --git a/typedapi/types/iprangeaggregate.go b/typedapi/types/iprangeaggregate.go index ca439604fd..35b42940ce 100644 --- a/typedapi/types/iprangeaggregate.go +++ b/typedapi/types/iprangeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L624-L629 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L624-L629 type IpRangeAggregate struct { Buckets BucketsIpRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewIpRangeAggregate() *IpRangeAggregate { return r } - -// false diff --git a/typedapi/types/iprangeaggregation.go b/typedapi/types/iprangeaggregation.go index 793a08b638..045d7680d0 100644 --- a/typedapi/types/iprangeaggregation.go +++ b/typedapi/types/iprangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L567-L576 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L567-L576 type IpRangeAggregation struct { // Field The date field whose values are used to build ranges. Field *string `json:"field,omitempty"` @@ -74,13 +74,3 @@ func NewIpRangeAggregation() *IpRangeAggregation { return r } - -// true - -type IpRangeAggregationVariant interface { - IpRangeAggregationCaster() *IpRangeAggregation -} - -func (s *IpRangeAggregation) IpRangeAggregationCaster() *IpRangeAggregation { - return s -} diff --git a/typedapi/types/iprangeaggregationrange.go b/typedapi/types/iprangeaggregationrange.go index d50c9215c7..6637841a2d 100644 --- a/typedapi/types/iprangeaggregationrange.go +++ b/typedapi/types/iprangeaggregationrange.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // IpRangeAggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L578-L591 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L578-L591 type IpRangeAggregationRange struct { // From Start of the range. From *string `json:"from,omitempty"` @@ -103,13 +103,3 @@ func NewIpRangeAggregationRange() *IpRangeAggregationRange { return r } - -// true - -type IpRangeAggregationRangeVariant interface { - IpRangeAggregationRangeCaster() *IpRangeAggregationRange -} - -func (s *IpRangeAggregationRange) IpRangeAggregationRangeCaster() *IpRangeAggregationRange { - return s -} diff --git a/typedapi/types/iprangebucket.go b/typedapi/types/iprangebucket.go index 8eb0a6efb4..f0628b4877 100644 --- a/typedapi/types/iprangebucket.go +++ b/typedapi/types/iprangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // IpRangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L631-L635 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L631-L635 type IpRangeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -669,5 +669,3 @@ func NewIpRangeBucket() *IpRangeBucket { return r } - -// false diff --git a/typedapi/types/iprangeproperty.go b/typedapi/types/iprangeproperty.go index 494ae5830b..08f3edf92d 100644 --- a/typedapi/types/iprangeproperty.go +++ b/typedapi/types/iprangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // IpRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/range.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/range.ts#L46-L48 type IpRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -274,6 +274,12 @@ func (s *IpRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -643,6 +649,12 @@ func (s *IpRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -895,13 +907,3 @@ func NewIpRangeProperty() *IpRangeProperty { return r } - -// true - -type IpRangePropertyVariant interface { - IpRangePropertyCaster() *IpRangeProperty -} - -func (s *IpRangeProperty) IpRangePropertyCaster() *IpRangeProperty { - return s -} diff --git a/typedapi/types/irishanalyzer.go b/typedapi/types/irishanalyzer.go index 57522ffee2..a78d70a7eb 100644 --- a/typedapi/types/irishanalyzer.go +++ b/typedapi/types/irishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // IrishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L200-L205 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L200-L205 type IrishAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *IrishAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *IrishAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewIrishAnalyzer() *IrishAnalyzer { return r } - -// true - -type IrishAnalyzerVariant interface { - IrishAnalyzerCaster() *IrishAnalyzer -} - -func (s *IrishAnalyzer) IrishAnalyzerCaster() *IrishAnalyzer { - return s -} diff --git a/typedapi/types/italiananalyzer.go b/typedapi/types/italiananalyzer.go index e356667d05..32ef7091ee 100644 --- a/typedapi/types/italiananalyzer.go +++ b/typedapi/types/italiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // ItalianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L207-L212 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L207-L212 type ItalianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *ItalianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *ItalianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewItalianAnalyzer() *ItalianAnalyzer { return r } - -// true - -type ItalianAnalyzerVariant interface { - ItalianAnalyzerCaster() *ItalianAnalyzer -} - -func (s *ItalianAnalyzer) ItalianAnalyzerCaster() *ItalianAnalyzer { - return s -} diff --git a/typedapi/types/jastoptokenfilter.go b/typedapi/types/jastoptokenfilter.go new file mode 100644 index 0000000000..368afc2347 --- /dev/null +++ b/typedapi/types/jastoptokenfilter.go @@ -0,0 +1,94 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// JaStopTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L32-L35 +type JaStopTokenFilter struct { + Stopwords StopWords `json:"stopwords,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *JaStopTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "stopwords": + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) + } + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s JaStopTokenFilter) MarshalJSON() ([]byte, error) { + type innerJaStopTokenFilter JaStopTokenFilter + tmp := innerJaStopTokenFilter{ + Stopwords: s.Stopwords, + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "ja_stop" + + return json.Marshal(tmp) +} + +// NewJaStopTokenFilter returns a JaStopTokenFilter. +func NewJaStopTokenFilter() *JaStopTokenFilter { + r := &JaStopTokenFilter{} + + return r +} diff --git a/typedapi/types/jinaaiservicesettings.go b/typedapi/types/jinaaiservicesettings.go index 7c92b8f47d..04ffaa1d32 100644 --- a/typedapi/types/jinaaiservicesettings.go +++ b/typedapi/types/jinaaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // JinaAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L900-L929 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1439-L1468 type JinaAIServiceSettings struct { // ApiKey A valid API key of your JinaAI account. // @@ -121,13 +121,3 @@ func NewJinaAIServiceSettings() *JinaAIServiceSettings { return r } - -// true - -type JinaAIServiceSettingsVariant interface { - JinaAIServiceSettingsCaster() *JinaAIServiceSettings -} - -func (s *JinaAIServiceSettings) JinaAIServiceSettingsCaster() *JinaAIServiceSettings { - return s -} diff --git a/typedapi/types/jinaaitasksettings.go b/typedapi/types/jinaaitasksettings.go index 9eba98e330..7c39e55274 100644 --- a/typedapi/types/jinaaitasksettings.go +++ b/typedapi/types/jinaaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // JinaAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L931-L952 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1470-L1491 type JinaAITaskSettings struct { // ReturnDocuments For a `rerank` task, return the doc text within the results. ReturnDocuments *bool `json:"return_documents,omitempty"` @@ -115,13 +115,3 @@ func NewJinaAITaskSettings() *JinaAITaskSettings { return r } - -// true - -type JinaAITaskSettingsVariant interface { - JinaAITaskSettingsCaster() *JinaAITaskSettings -} - -func (s *JinaAITaskSettings) JinaAITaskSettingsCaster() *JinaAITaskSettings { - return s -} diff --git a/typedapi/types/job.go b/typedapi/types/job.go index b556f6b21d..ed60efdd38 100644 --- a/typedapi/types/job.go +++ b/typedapi/types/job.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Job type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L61-L180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L61-L180 type Job struct { // AllowLazyOpen Advanced configuration option. // Specifies whether this job can open when there is insufficient machine @@ -351,5 +351,3 @@ func NewJob() *Job { return r } - -// false diff --git a/typedapi/types/jobblocked.go b/typedapi/types/jobblocked.go index 645a862854..d7c506e3d3 100644 --- a/typedapi/types/jobblocked.go +++ b/typedapi/types/jobblocked.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // JobBlocked type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L392-L395 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L392-L395 type JobBlocked struct { Reason jobblockedreason.JobBlockedReason `json:"reason"` TaskId TaskId `json:"task_id,omitempty"` @@ -74,5 +74,3 @@ func NewJobBlocked() *JobBlocked { return r } - -// false diff --git a/typedapi/types/jobconfig.go b/typedapi/types/jobconfig.go index f591e3485d..644cfd7955 100644 --- a/typedapi/types/jobconfig.go +++ b/typedapi/types/jobconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JobConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L182-L283 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L182-L283 type JobConfig struct { // AllowLazyOpen Advanced configuration option. Specifies whether this job can open when there // is insufficient machine learning node capacity for it to be immediately @@ -293,13 +293,3 @@ func NewJobConfig() *JobConfig { return r } - -// true - -type JobConfigVariant interface { - JobConfigCaster() *JobConfig -} - -func (s *JobConfig) JobConfigCaster() *JobConfig { - return s -} diff --git a/typedapi/types/jobforecaststatistics.go b/typedapi/types/jobforecaststatistics.go index b3e9f597be..3af9203982 100644 --- a/typedapi/types/jobforecaststatistics.go +++ b/typedapi/types/jobforecaststatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JobForecastStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L343-L350 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L343-L350 type JobForecastStatistics struct { ForecastedJobs int `json:"forecasted_jobs"` MemoryBytes *JobStatistics `json:"memory_bytes,omitempty"` @@ -123,5 +123,3 @@ func NewJobForecastStatistics() *JobForecastStatistics { return r } - -// false diff --git a/typedapi/types/jobsrecord.go b/typedapi/types/jobsrecord.go index a6ecc3f0e1..5a1e97a391 100644 --- a/typedapi/types/jobsrecord.go +++ b/typedapi/types/jobsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // JobsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_jobs/types.ts#L24-L347 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_jobs/types.ts#L24-L347 type JobsRecord struct { // AssignmentExplanation For open anomaly detection jobs only, contains messages relating to the // selection of a node to run the job. @@ -909,5 +909,3 @@ func NewJobsRecord() *JobsRecord { return r } - -// false diff --git a/typedapi/types/jobstatistics.go b/typedapi/types/jobstatistics.go index 35ff197286..ca29fd70ba 100644 --- a/typedapi/types/jobstatistics.go +++ b/typedapi/types/jobstatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JobStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L54-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L54-L59 type JobStatistics struct { Avg Float64 `json:"avg"` Max Float64 `json:"max"` @@ -129,5 +129,3 @@ func NewJobStatistics() *JobStatistics { return r } - -// false diff --git a/typedapi/types/jobstats.go b/typedapi/types/jobstats.go index 54380f9056..93f71d23a6 100644 --- a/typedapi/types/jobstats.go +++ b/typedapi/types/jobstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // JobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L284-L330 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L284-L330 type JobStats struct { // AssignmentExplanation For open anomaly detection jobs only, contains messages relating to the // selection of a node to run the job. @@ -167,5 +167,3 @@ func NewJobStats() *JobStats { return r } - -// false diff --git a/typedapi/types/jobtimingstats.go b/typedapi/types/jobtimingstats.go index 5aa9ad59ab..95bbbe186e 100644 --- a/typedapi/types/jobtimingstats.go +++ b/typedapi/types/jobtimingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JobTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Job.ts#L332-L341 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Job.ts#L332-L341 type JobTimingStats struct { AverageBucketProcessingTimeMs Float64 `json:"average_bucket_processing_time_ms,omitempty"` BucketCount int64 `json:"bucket_count"` @@ -119,5 +119,3 @@ func NewJobTimingStats() *JobTimingStats { return r } - -// false diff --git a/typedapi/types/jobusage.go b/typedapi/types/jobusage.go index c363e26bb8..d9aeb8b19f 100644 --- a/typedapi/types/jobusage.go +++ b/typedapi/types/jobusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JobUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L374-L380 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L374-L380 type JobUsage struct { Count int `json:"count"` CreatedBy map[string]int64 `json:"created_by"` @@ -107,5 +107,3 @@ func NewJobUsage() *JobUsage { return r } - -// false diff --git a/typedapi/types/joinprocessor.go b/typedapi/types/joinprocessor.go index 77d0de30e8..4b51427149 100644 --- a/typedapi/types/joinprocessor.go +++ b/typedapi/types/joinprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JoinProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1121-L1136 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1121-L1136 type JoinProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -157,13 +157,3 @@ func NewJoinProcessor() *JoinProcessor { return r } - -// true - -type JoinProcessorVariant interface { - JoinProcessorCaster() *JoinProcessor -} - -func (s *JoinProcessor) JoinProcessorCaster() *JoinProcessor { - return s -} diff --git a/typedapi/types/joinproperty.go b/typedapi/types/joinproperty.go index d434dd7b0b..8269ee433d 100644 --- a/typedapi/types/joinproperty.go +++ b/typedapi/types/joinproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // JoinProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L102-L106 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L104-L108 type JoinProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` EagerGlobalOrdinals *bool `json:"eager_global_ordinals,omitempty"` @@ -224,6 +224,12 @@ func (s *JoinProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -579,6 +585,12 @@ func (s *JoinProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -839,13 +851,3 @@ func NewJoinProperty() *JoinProperty { return r } - -// true - -type JoinPropertyVariant interface { - JoinPropertyCaster() *JoinProperty -} - -func (s *JoinProperty) JoinPropertyCaster() *JoinProperty { - return s -} diff --git a/typedapi/types/jsonprocessor.go b/typedapi/types/jsonprocessor.go index 97da587fb8..43453b63c5 100644 --- a/typedapi/types/jsonprocessor.go +++ b/typedapi/types/jsonprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // JsonProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1138-L1167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1138-L1167 type JsonProcessor struct { // AddToRoot Flag that forces the parsed JSON to be added at the top level of the // document. @@ -191,13 +191,3 @@ func NewJsonProcessor() *JsonProcessor { return r } - -// true - -type JsonProcessorVariant interface { - JsonProcessorCaster() *JsonProcessor -} - -func (s *JsonProcessor) JsonProcessorCaster() *JsonProcessor { - return s -} diff --git a/typedapi/types/jvm.go b/typedapi/types/jvm.go index 7ebb15d089..2f0a723099 100644 --- a/typedapi/types/jvm.go +++ b/typedapi/types/jvm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Jvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L882-L916 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L884-L918 type Jvm struct { // BufferPools Contains statistics about JVM buffer pools for the node. BufferPools map[string]NodeBufferPool `json:"buffer_pools,omitempty"` @@ -150,5 +150,3 @@ func NewJvm() *Jvm { return r } - -// false diff --git a/typedapi/types/jvmclasses.go b/typedapi/types/jvmclasses.go index e9136a510c..fac9b1cf58 100644 --- a/typedapi/types/jvmclasses.go +++ b/typedapi/types/jvmclasses.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JvmClasses type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L979-L992 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L986-L999 type JvmClasses struct { // CurrentLoadedCount Number of classes currently loaded by JVM. CurrentLoadedCount *int64 `json:"current_loaded_count,omitempty"` @@ -112,5 +112,3 @@ func NewJvmClasses() *JvmClasses { return r } - -// false diff --git a/typedapi/types/jvmmemorystats.go b/typedapi/types/jvmmemorystats.go index 00b919bd5b..8c766e142c 100644 --- a/typedapi/types/jvmmemorystats.go +++ b/typedapi/types/jvmmemorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,10 +31,12 @@ import ( // JvmMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L918-L947 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L920-L954 type JvmMemoryStats struct { // HeapCommittedInBytes Amount of memory, in bytes, available for use by the heap. HeapCommittedInBytes *int64 `json:"heap_committed_in_bytes,omitempty"` + // HeapMax Maximum amount of memory, available for use by the heap. + HeapMax ByteSize `json:"heap_max,omitempty"` // HeapMaxInBytes Maximum amount of memory, in bytes, available for use by the heap. HeapMaxInBytes *int64 `json:"heap_max_in_bytes,omitempty"` // HeapUsedInBytes Memory, in bytes, currently in use by the heap. @@ -79,6 +81,11 @@ func (s *JvmMemoryStats) UnmarshalJSON(data []byte) error { s.HeapCommittedInBytes = &f } + case "heap_max": + if err := dec.Decode(&s.HeapMax); err != nil { + return fmt.Errorf("%s | %w", "HeapMax", err) + } + case "heap_max_in_bytes": var tmp any dec.Decode(&tmp) @@ -175,5 +182,3 @@ func NewJvmMemoryStats() *JvmMemoryStats { return r } - -// false diff --git a/typedapi/types/jvmstats.go b/typedapi/types/jvmstats.go index b5fefe0365..95d31209bc 100644 --- a/typedapi/types/jvmstats.go +++ b/typedapi/types/jvmstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JvmStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_memory_stats/types.ts#L50-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_memory_stats/types.ts#L50-L63 type JvmStats struct { // HeapMax Maximum amount of memory available for use by the heap. HeapMax ByteSize `json:"heap_max,omitempty"` @@ -138,5 +138,3 @@ func NewJvmStats() *JvmStats { return r } - -// false diff --git a/typedapi/types/jvmthreads.go b/typedapi/types/jvmthreads.go index 86565c9e00..8bd1b2fe6c 100644 --- a/typedapi/types/jvmthreads.go +++ b/typedapi/types/jvmthreads.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // JvmThreads type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L968-L977 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L975-L984 type JvmThreads struct { // Count Number of active threads in use by JVM. Count *int64 `json:"count,omitempty"` @@ -95,5 +95,3 @@ func NewJvmThreads() *JvmThreads { return r } - -// false diff --git a/typedapi/types/keeptypestokenfilter.go b/typedapi/types/keeptypestokenfilter.go index e45aa78522..106b1b6f0b 100644 --- a/typedapi/types/keeptypestokenfilter.go +++ b/typedapi/types/keeptypestokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,12 +32,14 @@ import ( // KeepTypesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L219-L223 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L287-L293 type KeepTypesTokenFilter struct { - Mode *keeptypesmode.KeepTypesMode `json:"mode,omitempty"` - Type string `json:"type,omitempty"` - Types []string `json:"types,omitempty"` - Version *string `json:"version,omitempty"` + // Mode Indicates whether to keep or remove the specified token types. + Mode *keeptypesmode.KeepTypesMode `json:"mode,omitempty"` + Type string `json:"type,omitempty"` + // Types List of token types to keep or remove. + Types []string `json:"types"` + Version *string `json:"version,omitempty"` } func (s *KeepTypesTokenFilter) UnmarshalJSON(data []byte) error { @@ -101,13 +103,3 @@ func NewKeepTypesTokenFilter() *KeepTypesTokenFilter { return r } - -// true - -type KeepTypesTokenFilterVariant interface { - KeepTypesTokenFilterCaster() *KeepTypesTokenFilter -} - -func (s *KeepTypesTokenFilter) KeepTypesTokenFilterCaster() *KeepTypesTokenFilter { - return s -} diff --git a/typedapi/types/keepwordstokenfilter.go b/typedapi/types/keepwordstokenfilter.go index b32fcdb9b8..1e9d9e4711 100644 --- a/typedapi/types/keepwordstokenfilter.go +++ b/typedapi/types/keepwordstokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,13 +31,23 @@ import ( // KeepWordsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L295-L306 type KeepWordsTokenFilter struct { - KeepWords []string `json:"keep_words,omitempty"` - KeepWordsCase *bool `json:"keep_words_case,omitempty"` - KeepWordsPath *string `json:"keep_words_path,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // KeepWords List of words to keep. Only tokens that match words in this list are included + // in the output. + // Either this parameter or `keep_words_path` must be specified. + KeepWords []string `json:"keep_words,omitempty"` + // KeepWordsCase If `true`, lowercase all keep words. Defaults to `false`. + KeepWordsCase *bool `json:"keep_words_case,omitempty"` + // KeepWordsPath Path to a file that contains a list of words to keep. Only tokens that match + // words in this list are included in the output. + // This path must be absolute or relative to the `config` location, and the file + // must be UTF-8 encoded. Each word in the file must be separated by a line + // break. + // Either this parameter or `keep_words` must be specified. + KeepWordsPath *string `json:"keep_words_path,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *KeepWordsTokenFilter) UnmarshalJSON(data []byte) error { @@ -123,13 +133,3 @@ func NewKeepWordsTokenFilter() *KeepWordsTokenFilter { return r } - -// true - -type KeepWordsTokenFilterVariant interface { - KeepWordsTokenFilterCaster() *KeepWordsTokenFilter -} - -func (s *KeepWordsTokenFilter) KeepWordsTokenFilterCaster() *KeepWordsTokenFilter { - return s -} diff --git a/typedapi/types/keyedpercentiles.go b/typedapi/types/keyedpercentiles.go index 60a444bd4f..b84d41aab9 100644 --- a/typedapi/types/keyedpercentiles.go +++ b/typedapi/types/keyedpercentiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // KeyedPercentiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L160-L160 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L160-L160 type KeyedPercentiles map[string]string func (s KeyedPercentiles) UnmarshalJSON(data []byte) error { diff --git a/typedapi/types/keyedprocessor.go b/typedapi/types/keyedprocessor.go index 625490d12c..54bc66d035 100644 --- a/typedapi/types/keyedprocessor.go +++ b/typedapi/types/keyedprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KeyedProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L415-L418 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L417-L420 type KeyedProcessor struct { Stats *Processor `json:"stats,omitempty"` Type *string `json:"type,omitempty"` @@ -80,5 +80,3 @@ func NewKeyedProcessor() *KeyedProcessor { return r } - -// false diff --git a/typedapi/types/keyvalueprocessor.go b/typedapi/types/keyvalueprocessor.go index 5e5c419b62..ff57e02ae8 100644 --- a/typedapi/types/keyvalueprocessor.go +++ b/typedapi/types/keyvalueprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KeyValueProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1176-L1228 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1176-L1228 type KeyValueProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -265,13 +265,3 @@ func NewKeyValueProcessor() *KeyValueProcessor { return r } - -// true - -type KeyValueProcessorVariant interface { - KeyValueProcessorCaster() *KeyValueProcessor -} - -func (s *KeyValueProcessor) KeyValueProcessorCaster() *KeyValueProcessor { - return s -} diff --git a/typedapi/types/keywordanalyzer.go b/typedapi/types/keywordanalyzer.go index 6a822c333d..98e0e68775 100644 --- a/typedapi/types/keywordanalyzer.go +++ b/typedapi/types/keywordanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // KeywordAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L47-L50 type KeywordAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewKeywordAnalyzer() *KeywordAnalyzer { return r } - -// true - -type KeywordAnalyzerVariant interface { - KeywordAnalyzerCaster() *KeywordAnalyzer -} - -func (s *KeywordAnalyzer) KeywordAnalyzerCaster() *KeywordAnalyzer { - return s -} diff --git a/typedapi/types/keywordmarkertokenfilter.go b/typedapi/types/keywordmarkertokenfilter.go index 291aab1dd8..8d5bf55576 100644 --- a/typedapi/types/keywordmarkertokenfilter.go +++ b/typedapi/types/keywordmarkertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,14 +31,30 @@ import ( // KeywordMarkerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L232-L238 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L308-L322 type KeywordMarkerTokenFilter struct { - IgnoreCase *bool `json:"ignore_case,omitempty"` - Keywords []string `json:"keywords,omitempty"` - KeywordsPath *string `json:"keywords_path,omitempty"` - KeywordsPattern *string `json:"keywords_pattern,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // IgnoreCase If `true`, matching for the `keywords` and `keywords_path` parameters ignores + // letter case. Defaults to `false`. + IgnoreCase *bool `json:"ignore_case,omitempty"` + // Keywords Array of keywords. Tokens that match these keywords are not stemmed. + // This parameter, `keywords_path`, or `keywords_pattern` must be specified. You + // cannot specify this parameter and `keywords_pattern`. + Keywords []string `json:"keywords,omitempty"` + // KeywordsPath Path to a file that contains a list of keywords. Tokens that match these + // keywords are not stemmed. + // This path must be absolute or relative to the `config` location, and the file + // must be UTF-8 encoded. Each word in the file must be separated by a line + // break. + // This parameter, `keywords`, or `keywords_pattern` must be specified. You + // cannot specify this parameter and `keywords_pattern`. + KeywordsPath *string `json:"keywords_path,omitempty"` + // KeywordsPattern Java regular expression used to match tokens. Tokens that match this + // expression are marked as keywords and not stemmed. + // This parameter, `keywords`, or `keywords_path` must be specified. You cannot + // specify this parameter and `keywords` or `keywords_pattern`. + KeywordsPattern *string `json:"keywords_pattern,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *KeywordMarkerTokenFilter) UnmarshalJSON(data []byte) error { @@ -148,13 +164,3 @@ func NewKeywordMarkerTokenFilter() *KeywordMarkerTokenFilter { return r } - -// true - -type KeywordMarkerTokenFilterVariant interface { - KeywordMarkerTokenFilterCaster() *KeywordMarkerTokenFilter -} - -func (s *KeywordMarkerTokenFilter) KeywordMarkerTokenFilterCaster() *KeywordMarkerTokenFilter { - return s -} diff --git a/typedapi/types/keywordproperty.go b/typedapi/types/keywordproperty.go index 9270127952..5d1226917f 100644 --- a/typedapi/types/keywordproperty.go +++ b/typedapi/types/keywordproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // KeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L108-L127 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L110-L129 type KeywordProperty struct { Boost *Float64 `json:"boost,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -287,6 +287,12 @@ func (s *KeywordProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -704,6 +710,12 @@ func (s *KeywordProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -1010,13 +1022,3 @@ func NewKeywordProperty() *KeywordProperty { return r } - -// true - -type KeywordPropertyVariant interface { - KeywordPropertyCaster() *KeywordProperty -} - -func (s *KeywordProperty) KeywordPropertyCaster() *KeywordProperty { - return s -} diff --git a/typedapi/types/keywordrepeattokenfilter.go b/typedapi/types/keywordrepeattokenfilter.go new file mode 100644 index 0000000000..9590c31a83 --- /dev/null +++ b/typedapi/types/keywordrepeattokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// KeywordRepeatTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L510-L512 +type KeywordRepeatTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *KeywordRepeatTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s KeywordRepeatTokenFilter) MarshalJSON() ([]byte, error) { + type innerKeywordRepeatTokenFilter KeywordRepeatTokenFilter + tmp := innerKeywordRepeatTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "keyword_repeat" + + return json.Marshal(tmp) +} + +// NewKeywordRepeatTokenFilter returns a KeywordRepeatTokenFilter. +func NewKeywordRepeatTokenFilter() *KeywordRepeatTokenFilter { + r := &KeywordRepeatTokenFilter{} + + return r +} diff --git a/typedapi/types/keywordtokenizer.go b/typedapi/types/keywordtokenizer.go index be09019152..f25f46badf 100644 --- a/typedapi/types/keywordtokenizer.go +++ b/typedapi/types/keywordtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KeywordTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L69-L75 type KeywordTokenizer struct { BufferSize *int `json:"buffer_size,omitempty"` Type string `json:"type,omitempty"` @@ -104,13 +104,3 @@ func NewKeywordTokenizer() *KeywordTokenizer { return r } - -// true - -type KeywordTokenizerVariant interface { - KeywordTokenizerCaster() *KeywordTokenizer -} - -func (s *KeywordTokenizer) KeywordTokenizerCaster() *KeywordTokenizer { - return s -} diff --git a/typedapi/types/kibanatoken.go b/typedapi/types/kibanatoken.go index f59e30dede..e45e359d0e 100644 --- a/typedapi/types/kibanatoken.go +++ b/typedapi/types/kibanatoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KibanaToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/enroll_kibana/Response.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/enroll_kibana/Response.ts#L31-L41 type KibanaToken struct { // Name The name of the bearer token for the `elastic/kibana` service account. Name string `json:"name"` @@ -90,5 +90,3 @@ func NewKibanaToken() *KibanaToken { return r } - -// false diff --git a/typedapi/types/knncollectorresult.go b/typedapi/types/knncollectorresult.go index 2616f5e9ef..03ad70c2bb 100644 --- a/typedapi/types/knncollectorresult.go +++ b/typedapi/types/knncollectorresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KnnCollectorResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L222-L228 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L222-L228 type KnnCollectorResult struct { Children []KnnCollectorResult `json:"children,omitempty"` Name string `json:"name"` @@ -105,5 +105,3 @@ func NewKnnCollectorResult() *KnnCollectorResult { return r } - -// false diff --git a/typedapi/types/knnquery.go b/typedapi/types/knnquery.go index 0d377dceec..9bff8126e2 100644 --- a/typedapi/types/knnquery.go +++ b/typedapi/types/knnquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KnnQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Knn.ts#L64-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Knn.ts#L64-L87 type KnnQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -197,13 +197,3 @@ func NewKnnQuery() *KnnQuery { return r } - -// true - -type KnnQueryVariant interface { - KnnQueryCaster() *KnnQuery -} - -func (s *KnnQuery) KnnQueryCaster() *KnnQuery { - return s -} diff --git a/typedapi/types/knnqueryprofilebreakdown.go b/typedapi/types/knnqueryprofilebreakdown.go index 071f75b6b0..5c7e1939c9 100644 --- a/typedapi/types/knnqueryprofilebreakdown.go +++ b/typedapi/types/knnqueryprofilebreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KnnQueryProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L199-L220 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L199-L220 type KnnQueryProfileBreakdown struct { Advance int64 `json:"advance"` AdvanceCount int64 `json:"advance_count"` @@ -381,5 +381,3 @@ func NewKnnQueryProfileBreakdown() *KnnQueryProfileBreakdown { return r } - -// false diff --git a/typedapi/types/knnqueryprofileresult.go b/typedapi/types/knnqueryprofileresult.go index 3e77b68aaa..ee1fe12b40 100644 --- a/typedapi/types/knnqueryprofileresult.go +++ b/typedapi/types/knnqueryprofileresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KnnQueryProfileResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L188-L196 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L188-L196 type KnnQueryProfileResult struct { Breakdown KnnQueryProfileBreakdown `json:"breakdown"` Children []KnnQueryProfileResult `json:"children,omitempty"` @@ -122,5 +122,3 @@ func NewKnnQueryProfileResult() *KnnQueryProfileResult { return r } - -// false diff --git a/typedapi/types/knnretriever.go b/typedapi/types/knnretriever.go index d9745fbab2..aa75ecb3e9 100644 --- a/typedapi/types/knnretriever.go +++ b/typedapi/types/knnretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KnnRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retriever.ts#L64-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L115-L133 type KnnRetriever struct { // Field The name of the vector field to search against. Field string `json:"field"` @@ -42,6 +42,8 @@ type KnnRetriever struct { // MinScore Minimum _score for matching documents. Documents with a lower _score are not // included in the top documents. MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` // NumCandidates Number of nearest neighbor candidates to consider per shard. NumCandidates int `json:"num_candidates"` // QueryVector Query vector. Must have the same number of dimensions as the vector field you @@ -131,6 +133,18 @@ func (s *KnnRetriever) UnmarshalJSON(data []byte) error { s.MinScore = &f } + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + case "num_candidates": var tmp any @@ -189,13 +203,3 @@ func NewKnnRetriever() *KnnRetriever { return r } - -// true - -type KnnRetrieverVariant interface { - KnnRetrieverCaster() *KnnRetriever -} - -func (s *KnnRetriever) KnnRetrieverCaster() *KnnRetriever { - return s -} diff --git a/typedapi/types/knnsearch.go b/typedapi/types/knnsearch.go index b5607465d0..dc56fde61f 100644 --- a/typedapi/types/knnsearch.go +++ b/typedapi/types/knnsearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KnnSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Knn.ts#L35-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Knn.ts#L35-L62 type KnnSearch struct { // Boost Boost value to apply to kNN scores Boost *float32 `json:"boost,omitempty"` @@ -187,13 +187,3 @@ func NewKnnSearch() *KnnSearch { return r } - -// true - -type KnnSearchVariant interface { - KnnSearchCaster() *KnnSearch -} - -func (s *KnnSearch) KnnSearchCaster() *KnnSearch { - return s -} diff --git a/typedapi/types/kstemtokenfilter.go b/typedapi/types/kstemtokenfilter.go index 74b9a2a9d8..8aa4a441d3 100644 --- a/typedapi/types/kstemtokenfilter.go +++ b/typedapi/types/kstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // KStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L240-L242 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L324-L326 type KStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewKStemTokenFilter() *KStemTokenFilter { return r } - -// true - -type KStemTokenFilterVariant interface { - KStemTokenFilterCaster() *KStemTokenFilter -} - -func (s *KStemTokenFilter) KStemTokenFilterCaster() *KStemTokenFilter { - return s -} diff --git a/typedapi/types/kuromojianalyzer.go b/typedapi/types/kuromojianalyzer.go index 67f0147c23..10fb4a0a8f 100644 --- a/typedapi/types/kuromojianalyzer.go +++ b/typedapi/types/kuromojianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // KuromojiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L26-L30 type KuromojiAnalyzer struct { Mode kuromojitokenizationmode.KuromojiTokenizationMode `json:"mode"` Type string `json:"type,omitempty"` @@ -102,13 +102,3 @@ func NewKuromojiAnalyzer() *KuromojiAnalyzer { return r } - -// true - -type KuromojiAnalyzerVariant interface { - KuromojiAnalyzerCaster() *KuromojiAnalyzer -} - -func (s *KuromojiAnalyzer) KuromojiAnalyzerCaster() *KuromojiAnalyzer { - return s -} diff --git a/typedapi/types/kuromojiiterationmarkcharfilter.go b/typedapi/types/kuromojiiterationmarkcharfilter.go index b6f3f6c4e9..bec488447d 100644 --- a/typedapi/types/kuromojiiterationmarkcharfilter.go +++ b/typedapi/types/kuromojiiterationmarkcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KuromojiIterationMarkCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L31-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L37-L41 type KuromojiIterationMarkCharFilter struct { NormalizeKana bool `json:"normalize_kana"` NormalizeKanji bool `json:"normalize_kanji"` @@ -118,13 +118,3 @@ func NewKuromojiIterationMarkCharFilter() *KuromojiIterationMarkCharFilter { return r } - -// true - -type KuromojiIterationMarkCharFilterVariant interface { - KuromojiIterationMarkCharFilterCaster() *KuromojiIterationMarkCharFilter -} - -func (s *KuromojiIterationMarkCharFilter) KuromojiIterationMarkCharFilterCaster() *KuromojiIterationMarkCharFilter { - return s -} diff --git a/typedapi/types/kuromojipartofspeechtokenfilter.go b/typedapi/types/kuromojipartofspeechtokenfilter.go index b238c93206..5e8ae97a0c 100644 --- a/typedapi/types/kuromojipartofspeechtokenfilter.go +++ b/typedapi/types/kuromojipartofspeechtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // KuromojiPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L43-L46 type KuromojiPartOfSpeechTokenFilter struct { Stoptags []string `json:"stoptags"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewKuromojiPartOfSpeechTokenFilter() *KuromojiPartOfSpeechTokenFilter { return r } - -// true - -type KuromojiPartOfSpeechTokenFilterVariant interface { - KuromojiPartOfSpeechTokenFilterCaster() *KuromojiPartOfSpeechTokenFilter -} - -func (s *KuromojiPartOfSpeechTokenFilter) KuromojiPartOfSpeechTokenFilterCaster() *KuromojiPartOfSpeechTokenFilter { - return s -} diff --git a/typedapi/types/kuromojireadingformtokenfilter.go b/typedapi/types/kuromojireadingformtokenfilter.go index 66e2f26fee..0e3e03833c 100644 --- a/typedapi/types/kuromojireadingformtokenfilter.go +++ b/typedapi/types/kuromojireadingformtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KuromojiReadingFormTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L48-L51 type KuromojiReadingFormTokenFilter struct { Type string `json:"type,omitempty"` UseRomaji bool `json:"use_romaji"` @@ -102,13 +102,3 @@ func NewKuromojiReadingFormTokenFilter() *KuromojiReadingFormTokenFilter { return r } - -// true - -type KuromojiReadingFormTokenFilterVariant interface { - KuromojiReadingFormTokenFilterCaster() *KuromojiReadingFormTokenFilter -} - -func (s *KuromojiReadingFormTokenFilter) KuromojiReadingFormTokenFilterCaster() *KuromojiReadingFormTokenFilter { - return s -} diff --git a/typedapi/types/kuromojistemmertokenfilter.go b/typedapi/types/kuromojistemmertokenfilter.go index e3940dd970..a3f04448c6 100644 --- a/typedapi/types/kuromojistemmertokenfilter.go +++ b/typedapi/types/kuromojistemmertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // KuromojiStemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L53-L56 type KuromojiStemmerTokenFilter struct { MinimumLength int `json:"minimum_length"` Type string `json:"type,omitempty"` @@ -104,13 +104,3 @@ func NewKuromojiStemmerTokenFilter() *KuromojiStemmerTokenFilter { return r } - -// true - -type KuromojiStemmerTokenFilterVariant interface { - KuromojiStemmerTokenFilterCaster() *KuromojiStemmerTokenFilter -} - -func (s *KuromojiStemmerTokenFilter) KuromojiStemmerTokenFilterCaster() *KuromojiStemmerTokenFilter { - return s -} diff --git a/typedapi/types/kuromojitokenizer.go b/typedapi/types/kuromojitokenizer.go index 5ed4487715..de551f79ff 100644 --- a/typedapi/types/kuromojitokenizer.go +++ b/typedapi/types/kuromojitokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // KuromojiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/kuromoji-plugin.ts#L58-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/kuromoji-plugin.ts#L64-L73 type KuromojiTokenizer struct { DiscardCompoundToken *bool `json:"discard_compound_token,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` @@ -180,13 +180,3 @@ func NewKuromojiTokenizer() *KuromojiTokenizer { return r } - -// true - -type KuromojiTokenizerVariant interface { - KuromojiTokenizerCaster() *KuromojiTokenizer -} - -func (s *KuromojiTokenizer) KuromojiTokenizerCaster() *KuromojiTokenizer { - return s -} diff --git a/typedapi/types/languagecontext.go b/typedapi/types/languagecontext.go index 177363b8e0..56a51c7a6e 100644 --- a/typedapi/types/languagecontext.go +++ b/typedapi/types/languagecontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // LanguageContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/get_script_languages/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/get_script_languages/types.ts#L22-L25 type LanguageContext struct { Contexts []string `json:"contexts"` Language scriptlanguage.ScriptLanguage `json:"language"` @@ -38,5 +38,3 @@ func NewLanguageContext() *LanguageContext { return r } - -// false diff --git a/typedapi/types/laplacesmoothingmodel.go b/typedapi/types/laplacesmoothingmodel.go index 378bbd75b7..a90d1f4a1d 100644 --- a/typedapi/types/laplacesmoothingmodel.go +++ b/typedapi/types/laplacesmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LaplaceSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L430-L435 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L430-L435 type LaplaceSmoothingModel struct { // Alpha A constant that is added to all counts to balance weights. Alpha Float64 `json:"alpha"` @@ -79,13 +79,3 @@ func NewLaplaceSmoothingModel() *LaplaceSmoothingModel { return r } - -// true - -type LaplaceSmoothingModelVariant interface { - LaplaceSmoothingModelCaster() *LaplaceSmoothingModel -} - -func (s *LaplaceSmoothingModel) LaplaceSmoothingModelCaster() *LaplaceSmoothingModel { - return s -} diff --git a/typedapi/types/latest.go b/typedapi/types/latest.go index 2ad2ee87bb..cec87872bb 100644 --- a/typedapi/types/latest.go +++ b/typedapi/types/latest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Latest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L47-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L47-L52 type Latest struct { // Sort Specifies the date field that is used to identify the latest documents. Sort string `json:"sort"` @@ -74,13 +74,3 @@ func NewLatest() *Latest { return r } - -// true - -type LatestVariant interface { - LatestCaster() *Latest -} - -func (s *Latest) LatestCaster() *Latest { - return s -} diff --git a/typedapi/types/latlongeolocation.go b/typedapi/types/latlongeolocation.go index b68bd15b2d..5537a43cf5 100644 --- a/typedapi/types/latlongeolocation.go +++ b/typedapi/types/latlongeolocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LatLonGeoLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L120-L129 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L120-L129 type LatLonGeoLocation struct { // Lat Latitude Lat Float64 `json:"lat"` @@ -97,13 +97,3 @@ func NewLatLonGeoLocation() *LatLonGeoLocation { return r } - -// true - -type LatLonGeoLocationVariant interface { - LatLonGeoLocationCaster() *LatLonGeoLocation -} - -func (s *LatLonGeoLocation) LatLonGeoLocationCaster() *LatLonGeoLocation { - return s -} diff --git a/typedapi/types/latviananalyzer.go b/typedapi/types/latviananalyzer.go index 61d3610ab6..6d4ef16a82 100644 --- a/typedapi/types/latviananalyzer.go +++ b/typedapi/types/latviananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // LatvianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L214-L219 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L214-L219 type LatvianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *LatvianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *LatvianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewLatvianAnalyzer() *LatvianAnalyzer { return r } - -// true - -type LatvianAnalyzerVariant interface { - LatvianAnalyzerCaster() *LatvianAnalyzer -} - -func (s *LatvianAnalyzer) LatvianAnalyzerCaster() *LatvianAnalyzer { - return s -} diff --git a/typedapi/types/learningtorank.go b/typedapi/types/learningtorank.go index 52c007dded..f92647cd50 100644 --- a/typedapi/types/learningtorank.go +++ b/typedapi/types/learningtorank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LearningToRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/rescoring.ts#L88-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/rescoring.ts#L88-L97 type LearningToRank struct { // ModelId The unique identifier of the trained model uploaded to Elasticsearch ModelId string `json:"model_id"` @@ -87,13 +87,3 @@ func NewLearningToRank() *LearningToRank { return r } - -// true - -type LearningToRankVariant interface { - LearningToRankCaster() *LearningToRank -} - -func (s *LearningToRank) LearningToRankCaster() *LearningToRank { - return s -} diff --git a/typedapi/types/learningtorankconfig.go b/typedapi/types/learningtorankconfig.go index 6e1f0aef8c..6edb6b71c1 100644 --- a/typedapi/types/learningtorankconfig.go +++ b/typedapi/types/learningtorankconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LearningToRankConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L87-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L87-L91 type LearningToRankConfig struct { DefaultParams map[string]json.RawMessage `json:"default_params,omitempty"` FeatureExtractors []map[string]QueryFeatureExtractor `json:"feature_extractors,omitempty"` @@ -95,13 +95,3 @@ func NewLearningToRankConfig() *LearningToRankConfig { return r } - -// true - -type LearningToRankConfigVariant interface { - LearningToRankConfigCaster() *LearningToRankConfig -} - -func (s *LearningToRankConfig) LearningToRankConfigCaster() *LearningToRankConfig { - return s -} diff --git a/typedapi/types/lengthtokenfilter.go b/typedapi/types/lengthtokenfilter.go index 32c0b30d9a..22304d8a7f 100644 --- a/typedapi/types/lengthtokenfilter.go +++ b/typedapi/types/lengthtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,9 +31,13 @@ import ( // LengthTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L244-L248 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L328-L334 type LengthTokenFilter struct { - Max *int `json:"max,omitempty"` + // Max Maximum character length of a token. Longer tokens are excluded from the + // output. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`. + Max *int `json:"max,omitempty"` + // Min Minimum character length of a token. Shorter tokens are excluded from the + // output. Defaults to `0`. Min *int `json:"min,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -122,13 +126,3 @@ func NewLengthTokenFilter() *LengthTokenFilter { return r } - -// true - -type LengthTokenFilterVariant interface { - LengthTokenFilterCaster() *LengthTokenFilter -} - -func (s *LengthTokenFilter) LengthTokenFilterCaster() *LengthTokenFilter { - return s -} diff --git a/typedapi/types/lessthanvalidation.go b/typedapi/types/lessthanvalidation.go index c2234e4122..d416a266eb 100644 --- a/typedapi/types/lessthanvalidation.go +++ b/typedapi/types/lessthanvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LessThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L58-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L58-L61 type LessThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` @@ -97,13 +97,3 @@ func NewLessThanValidation() *LessThanValidation { return r } - -// true - -type LessThanValidationVariant interface { - LessThanValidationCaster() *LessThanValidation -} - -func (s *LessThanValidation) LessThanValidationCaster() *LessThanValidation { - return s -} diff --git a/typedapi/types/lettertokenizer.go b/typedapi/types/lettertokenizer.go index 1c6a155588..d18930eaa8 100644 --- a/typedapi/types/lettertokenizer.go +++ b/typedapi/types/lettertokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // LetterTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L76-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L77-L79 type LetterTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewLetterTokenizer() *LetterTokenizer { return r } - -// true - -type LetterTokenizerVariant interface { - LetterTokenizerCaster() *LetterTokenizer -} - -func (s *LetterTokenizer) LetterTokenizerCaster() *LetterTokenizer { - return s -} diff --git a/typedapi/types/license.go b/typedapi/types/license.go index 7646d39892..2354465f3a 100644 --- a/typedapi/types/license.go +++ b/typedapi/types/license.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // License type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/_types/License.ts#L42-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/_types/License.ts#L42-L53 type License struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` IssueDateInMillis int64 `json:"issue_date_in_millis"` @@ -161,13 +161,3 @@ func NewLicense() *License { return r } - -// true - -type LicenseVariant interface { - LicenseCaster() *License -} - -func (s *License) LicenseCaster() *License { - return s -} diff --git a/typedapi/types/licenseinformation.go b/typedapi/types/licenseinformation.go index bb7a8fd9d1..17c929705a 100644 --- a/typedapi/types/licenseinformation.go +++ b/typedapi/types/licenseinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // LicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/license/get/types.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/license/get/types.ts#L25-L38 type LicenseInformation struct { ExpiryDate DateTime `json:"expiry_date,omitempty"` ExpiryDateInMillis *int64 `json:"expiry_date_in_millis,omitempty"` @@ -150,5 +150,3 @@ func NewLicenseInformation() *LicenseInformation { return r } - -// false diff --git a/typedapi/types/lifecycle.go b/typedapi/types/lifecycle.go index b1bf9c0dfe..377771b20a 100644 --- a/typedapi/types/lifecycle.go +++ b/typedapi/types/lifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Lifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/get_lifecycle/types.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/get_lifecycle/types.ts#L24-L28 type Lifecycle struct { ModifiedDate DateTime `json:"modified_date"` Policy IlmPolicy `json:"policy"` @@ -78,5 +78,3 @@ func NewLifecycle() *Lifecycle { return r } - -// false diff --git a/typedapi/types/lifecycleexplain.go b/typedapi/types/lifecycleexplain.go index d69477dbe6..f8827eeb33 100644 --- a/typedapi/types/lifecycleexplain.go +++ b/typedapi/types/lifecycleexplain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // LifecycleExplainManaged // LifecycleExplainUnmanaged // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/explain_lifecycle/types.ts#L64-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/explain_lifecycle/types.ts#L65-L68 type LifecycleExplain any diff --git a/typedapi/types/lifecycleexplainmanaged.go b/typedapi/types/lifecycleexplainmanaged.go index 7d3d4b949b..ba7ffbe99d 100644 --- a/typedapi/types/lifecycleexplainmanaged.go +++ b/typedapi/types/lifecycleexplainmanaged.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LifecycleExplainManaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/explain_lifecycle/types.ts#L27-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/explain_lifecycle/types.ts#L27-L58 type LifecycleExplainManaged struct { Action *string `json:"action,omitempty"` ActionTime DateTime `json:"action_time,omitempty"` @@ -46,7 +46,7 @@ type LifecycleExplainManaged struct { LifecycleDate DateTime `json:"lifecycle_date,omitempty"` LifecycleDateMillis *int64 `json:"lifecycle_date_millis,omitempty"` Managed bool `json:"managed,omitempty"` - Phase string `json:"phase"` + Phase *string `json:"phase,omitempty"` PhaseExecution *LifecycleExplainPhaseExecution `json:"phase_execution,omitempty"` PhaseTime DateTime `json:"phase_time,omitempty"` PhaseTimeMillis *int64 `json:"phase_time_millis,omitempty"` @@ -54,6 +54,7 @@ type LifecycleExplainManaged struct { PreviousStepInfo map[string]json.RawMessage `json:"previous_step_info,omitempty"` RepositoryName *string `json:"repository_name,omitempty"` ShrinkIndexName *string `json:"shrink_index_name,omitempty"` + Skip bool `json:"skip"` SnapshotName *string `json:"snapshot_name,omitempty"` Step *string `json:"step,omitempty"` StepInfo map[string]json.RawMessage `json:"step_info,omitempty"` @@ -219,6 +220,20 @@ func (s *LifecycleExplainManaged) UnmarshalJSON(data []byte) error { } s.ShrinkIndexName = &o + case "skip": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "Skip", err) + } + s.Skip = value + case bool: + s.Skip = v + } + case "snapshot_name": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -289,6 +304,7 @@ func (s LifecycleExplainManaged) MarshalJSON() ([]byte, error) { PreviousStepInfo: s.PreviousStepInfo, RepositoryName: s.RepositoryName, ShrinkIndexName: s.ShrinkIndexName, + Skip: s.Skip, SnapshotName: s.SnapshotName, Step: s.Step, StepInfo: s.StepInfo, @@ -311,5 +327,3 @@ func NewLifecycleExplainManaged() *LifecycleExplainManaged { return r } - -// false diff --git a/typedapi/types/lifecycleexplainphaseexecution.go b/typedapi/types/lifecycleexplainphaseexecution.go index 6b86016753..c823a4fcc3 100644 --- a/typedapi/types/lifecycleexplainphaseexecution.go +++ b/typedapi/types/lifecycleexplainphaseexecution.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainPhaseExecution type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/explain_lifecycle/types.ts#L69-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/explain_lifecycle/types.ts#L70-L75 type LifecycleExplainPhaseExecution struct { ModifiedDateInMillis int64 `json:"modified_date_in_millis"` PhaseDefinition *Phase `json:"phase_definition,omitempty"` @@ -84,5 +84,3 @@ func NewLifecycleExplainPhaseExecution() *LifecycleExplainPhaseExecution { return r } - -// false diff --git a/typedapi/types/lifecycleexplainunmanaged.go b/typedapi/types/lifecycleexplainunmanaged.go index 0586b15462..c2640d7fc8 100644 --- a/typedapi/types/lifecycleexplainunmanaged.go +++ b/typedapi/types/lifecycleexplainunmanaged.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainUnmanaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/explain_lifecycle/types.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/explain_lifecycle/types.ts#L60-L63 type LifecycleExplainUnmanaged struct { Index string `json:"index"` Managed bool `json:"managed,omitempty"` @@ -85,5 +85,3 @@ func NewLifecycleExplainUnmanaged() *LifecycleExplainUnmanaged { return r } - -// false diff --git a/typedapi/types/like.go b/typedapi/types/like.go index 679239b166..8010b015a0 100644 --- a/typedapi/types/like.go +++ b/typedapi/types/like.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // LikeDocument // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L198-L203 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L198-L203 type Like any - -type LikeVariant interface { - LikeCaster() *Like -} diff --git a/typedapi/types/likedocument.go b/typedapi/types/likedocument.go index cf73f6d99b..f0f4a891cc 100644 --- a/typedapi/types/likedocument.go +++ b/typedapi/types/likedocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // LikeDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L174-L196 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L174-L196 type LikeDocument struct { // Doc A document not present in the index. Doc json.RawMessage `json:"doc,omitempty"` @@ -119,13 +119,3 @@ func NewLikeDocument() *LikeDocument { return r } - -// true - -type LikeDocumentVariant interface { - LikeDocumentCaster() *LikeDocument -} - -func (s *LikeDocument) LikeDocumentCaster() *LikeDocument { - return s -} diff --git a/typedapi/types/limits.go b/typedapi/types/limits.go index 0498304968..e134572166 100644 --- a/typedapi/types/limits.go +++ b/typedapi/types/limits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Limits type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/info/types.ts#L34-L40 type Limits struct { EffectiveMaxModelMemoryLimit ByteSize `json:"effective_max_model_memory_limit,omitempty"` MaxModelMemoryLimit ByteSize `json:"max_model_memory_limit,omitempty"` @@ -113,5 +113,3 @@ func NewLimits() *Limits { return r } - -// false diff --git a/typedapi/types/limittokencounttokenfilter.go b/typedapi/types/limittokencounttokenfilter.go index 64d030961c..b13b804e92 100644 --- a/typedapi/types/limittokencounttokenfilter.go +++ b/typedapi/types/limittokencounttokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,16 @@ import ( // LimitTokenCountTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L250-L254 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L336-L342 type LimitTokenCountTokenFilter struct { - ConsumeAllTokens *bool `json:"consume_all_tokens,omitempty"` - MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // ConsumeAllTokens If `true`, the limit filter exhausts the token stream, even if the + // `max_token_count` has already been reached. Defaults to `false`. + ConsumeAllTokens *bool `json:"consume_all_tokens,omitempty"` + // MaxTokenCount Maximum number of tokens to keep. Once this limit is reached, any remaining + // tokens are excluded from the output. Defaults to `1`. + MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *LimitTokenCountTokenFilter) UnmarshalJSON(data []byte) error { @@ -109,13 +113,3 @@ func NewLimitTokenCountTokenFilter() *LimitTokenCountTokenFilter { return r } - -// true - -type LimitTokenCountTokenFilterVariant interface { - LimitTokenCountTokenFilterCaster() *LimitTokenCountTokenFilter -} - -func (s *LimitTokenCountTokenFilter) LimitTokenCountTokenFilterCaster() *LimitTokenCountTokenFilter { - return s -} diff --git a/typedapi/types/linearinterpolationsmoothingmodel.go b/typedapi/types/linearinterpolationsmoothingmodel.go index 1abf165489..20d5acf4da 100644 --- a/typedapi/types/linearinterpolationsmoothingmodel.go +++ b/typedapi/types/linearinterpolationsmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LinearInterpolationSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L437-L441 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L437-L441 type LinearInterpolationSmoothingModel struct { BigramLambda Float64 `json:"bigram_lambda"` TrigramLambda Float64 `json:"trigram_lambda"` @@ -112,13 +112,3 @@ func NewLinearInterpolationSmoothingModel() *LinearInterpolationSmoothingModel { return r } - -// true - -type LinearInterpolationSmoothingModelVariant interface { - LinearInterpolationSmoothingModelCaster() *LinearInterpolationSmoothingModel -} - -func (s *LinearInterpolationSmoothingModel) LinearInterpolationSmoothingModelCaster() *LinearInterpolationSmoothingModel { - return s -} diff --git a/typedapi/types/linearmovingaverageaggregation.go b/typedapi/types/linearmovingaverageaggregation.go index 83eefd5c5c..03de10a311 100644 --- a/typedapi/types/linearmovingaverageaggregation.go +++ b/typedapi/types/linearmovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // LinearMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L268-L271 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L268-L271 type LinearMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -173,13 +173,3 @@ func NewLinearMovingAverageAggregation() *LinearMovingAverageAggregation { return r } - -// true - -type LinearMovingAverageAggregationVariant interface { - LinearMovingAverageAggregationCaster() *LinearMovingAverageAggregation -} - -func (s *LinearMovingAverageAggregation) LinearMovingAverageAggregationCaster() *LinearMovingAverageAggregation { - return s -} diff --git a/typedapi/types/linearretriever.go b/typedapi/types/linearretriever.go new file mode 100644 index 0000000000..d8ed41720f --- /dev/null +++ b/typedapi/types/linearretriever.go @@ -0,0 +1,165 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/scorenormalizer" +) + +// LinearRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L68-L75 +type LinearRetriever struct { + Fields []string `json:"fields,omitempty"` + // Filter Query to filter the documents that can match. + Filter []Query `json:"filter,omitempty"` + // MinScore Minimum _score for matching documents. Documents with a lower _score are not + // included in the top documents. + MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` + Normalizer *scorenormalizer.ScoreNormalizer `json:"normalizer,omitempty"` + Query *string `json:"query,omitempty"` + RankWindowSize *int `json:"rank_window_size,omitempty"` + // Retrievers Inner retrievers. + Retrievers []InnerRetriever `json:"retrievers,omitempty"` +} + +func (s *LinearRetriever) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "fields": + if err := dec.Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + + case "filter": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := NewQuery() + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + + s.Filter = append(s.Filter, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Filter); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + } + + case "min_score": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "MinScore", err) + } + f := float32(value) + s.MinScore = &f + case float64: + f := float32(v) + s.MinScore = &f + } + + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + + case "normalizer": + if err := dec.Decode(&s.Normalizer); err != nil { + return fmt.Errorf("%s | %w", "Normalizer", err) + } + + case "query": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Query = &o + + case "rank_window_size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "RankWindowSize", err) + } + s.RankWindowSize = &value + case float64: + f := int(v) + s.RankWindowSize = &f + } + + case "retrievers": + if err := dec.Decode(&s.Retrievers); err != nil { + return fmt.Errorf("%s | %w", "Retrievers", err) + } + + } + } + return nil +} + +// NewLinearRetriever returns a LinearRetriever. +func NewLinearRetriever() *LinearRetriever { + r := &LinearRetriever{} + + return r +} diff --git a/typedapi/types/listtypevalidation.go b/typedapi/types/listtypevalidation.go index ad53449029..d3967de665 100644 --- a/typedapi/types/listtypevalidation.go +++ b/typedapi/types/listtypevalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ListTypeValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L68-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L68-L71 type ListTypeValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` @@ -93,13 +93,3 @@ func NewListTypeValidation() *ListTypeValidation { return r } - -// true - -type ListTypeValidationVariant interface { - ListTypeValidationCaster() *ListTypeValidation -} - -func (s *ListTypeValidation) ListTypeValidationCaster() *ListTypeValidation { - return s -} diff --git a/typedapi/types/lithuaniananalyzer.go b/typedapi/types/lithuaniananalyzer.go index 3fd16842b7..048d70de9b 100644 --- a/typedapi/types/lithuaniananalyzer.go +++ b/typedapi/types/lithuaniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // LithuanianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L221-L226 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L221-L226 type LithuanianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *LithuanianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *LithuanianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewLithuanianAnalyzer() *LithuanianAnalyzer { return r } - -// true - -type LithuanianAnalyzerVariant interface { - LithuanianAnalyzerCaster() *LithuanianAnalyzer -} - -func (s *LithuanianAnalyzer) LithuanianAnalyzerCaster() *LithuanianAnalyzer { - return s -} diff --git a/typedapi/types/local.go b/typedapi/types/local.go index d3da780952..e008625e44 100644 --- a/typedapi/types/local.go +++ b/typedapi/types/local.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Local type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Database.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Database.ts#L63-L65 type Local struct { Type string `json:"type"` } @@ -74,5 +74,3 @@ func NewLocal() *Local { return r } - -// false diff --git a/typedapi/types/loggingaction.go b/typedapi/types/loggingaction.go index d7c4e9a662..a7fb4e290f 100644 --- a/typedapi/types/loggingaction.go +++ b/typedapi/types/loggingaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LoggingAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L281-L285 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L281-L285 type LoggingAction struct { Category *string `json:"category,omitempty"` Level *string `json:"level,omitempty"` @@ -100,13 +100,3 @@ func NewLoggingAction() *LoggingAction { return r } - -// true - -type LoggingActionVariant interface { - LoggingActionCaster() *LoggingAction -} - -func (s *LoggingAction) LoggingActionCaster() *LoggingAction { - return s -} diff --git a/typedapi/types/loggingresult.go b/typedapi/types/loggingresult.go index 8e38766f97..0d0247a72b 100644 --- a/typedapi/types/loggingresult.go +++ b/typedapi/types/loggingresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LoggingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L287-L289 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L287-L289 type LoggingResult struct { LoggedText string `json:"logged_text"` } @@ -74,5 +74,3 @@ func NewLoggingResult() *LoggingResult { return r } - -// false diff --git a/typedapi/types/logstashpipeline.go b/typedapi/types/logstashpipeline.go index edef3d9eb7..00c0be48ce 100644 --- a/typedapi/types/logstashpipeline.go +++ b/typedapi/types/logstashpipeline.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LogstashPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/logstash/_types/Pipeline.ts#L56-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/logstash/_types/Pipeline.ts#L56-L87 type LogstashPipeline struct { // Description A description of the pipeline. // This description is not used by Elasticsearch or Logstash. @@ -128,13 +128,3 @@ func NewLogstashPipeline() *LogstashPipeline { return r } - -// true - -type LogstashPipelineVariant interface { - LogstashPipelineCaster() *LogstashPipeline -} - -func (s *LogstashPipeline) LogstashPipelineCaster() *LogstashPipeline { - return s -} diff --git a/typedapi/types/longnumberproperty.go b/typedapi/types/longnumberproperty.go index ee13d4ff97..9aaa01cb75 100644 --- a/typedapi/types/longnumberproperty.go +++ b/typedapi/types/longnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // LongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L176-L179 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L178-L181 type LongNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *LongNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -689,6 +695,12 @@ func (s *LongNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -971,13 +983,3 @@ func NewLongNumberProperty() *LongNumberProperty { return r } - -// true - -type LongNumberPropertyVariant interface { - LongNumberPropertyCaster() *LongNumberProperty -} - -func (s *LongNumberProperty) LongNumberPropertyCaster() *LongNumberProperty { - return s -} diff --git a/typedapi/types/longrangeproperty.go b/typedapi/types/longrangeproperty.go index bbe0613a3f..1481e85ac5 100644 --- a/typedapi/types/longrangeproperty.go +++ b/typedapi/types/longrangeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // LongRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/range.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/range.ts#L50-L52 type LongRangeProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -274,6 +274,12 @@ func (s *LongRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -643,6 +649,12 @@ func (s *LongRangeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -895,13 +907,3 @@ func NewLongRangeProperty() *LongRangeProperty { return r } - -// true - -type LongRangePropertyVariant interface { - LongRangePropertyCaster() *LongRangeProperty -} - -func (s *LongRangeProperty) LongRangePropertyCaster() *LongRangeProperty { - return s -} diff --git a/typedapi/types/longraretermsaggregate.go b/typedapi/types/longraretermsaggregate.go index ae18a1c624..d9c09c5191 100644 --- a/typedapi/types/longraretermsaggregate.go +++ b/typedapi/types/longraretermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // LongRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L471-L476 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L471-L476 type LongRareTermsAggregate struct { Buckets BucketsLongRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewLongRareTermsAggregate() *LongRareTermsAggregate { return r } - -// false diff --git a/typedapi/types/longraretermsbucket.go b/typedapi/types/longraretermsbucket.go index d8c6760940..68df65ac6b 100644 --- a/typedapi/types/longraretermsbucket.go +++ b/typedapi/types/longraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // LongRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L478-L481 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L478-L481 type LongRareTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -659,5 +659,3 @@ func NewLongRareTermsBucket() *LongRareTermsBucket { return r } - -// false diff --git a/typedapi/types/longtermsaggregate.go b/typedapi/types/longtermsaggregate.go index 63a0f85d51..f2a5b791a5 100644 --- a/typedapi/types/longtermsaggregate.go +++ b/typedapi/types/longtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L439-L444 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L439-L444 type LongTermsAggregate struct { Buckets BucketsLongTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` @@ -121,5 +121,3 @@ func NewLongTermsAggregate() *LongTermsAggregate { return r } - -// false diff --git a/typedapi/types/longtermsbucket.go b/typedapi/types/longtermsbucket.go index e377965224..251f191741 100644 --- a/typedapi/types/longtermsbucket.go +++ b/typedapi/types/longtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // LongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L446-L449 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L446-L449 type LongTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -675,5 +675,3 @@ func NewLongTermsBucket() *LongTermsBucket { return r } - -// false diff --git a/typedapi/types/lowercasenormalizer.go b/typedapi/types/lowercasenormalizer.go index b7a95093ee..43126fbc1e 100644 --- a/typedapi/types/lowercasenormalizer.go +++ b/typedapi/types/lowercasenormalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // LowercaseNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/normalizers.ts#L26-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/normalizers.ts#L26-L28 type LowercaseNormalizer struct { Type string `json:"type,omitempty"` } @@ -49,13 +49,3 @@ func NewLowercaseNormalizer() *LowercaseNormalizer { return r } - -// true - -type LowercaseNormalizerVariant interface { - LowercaseNormalizerCaster() *LowercaseNormalizer -} - -func (s *LowercaseNormalizer) LowercaseNormalizerCaster() *LowercaseNormalizer { - return s -} diff --git a/typedapi/types/lowercaseprocessor.go b/typedapi/types/lowercaseprocessor.go index 744cd979bc..e584483b4b 100644 --- a/typedapi/types/lowercaseprocessor.go +++ b/typedapi/types/lowercaseprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // LowercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1230-L1246 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1230-L1246 type LowercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewLowercaseProcessor() *LowercaseProcessor { return r } - -// true - -type LowercaseProcessorVariant interface { - LowercaseProcessorCaster() *LowercaseProcessor -} - -func (s *LowercaseProcessor) LowercaseProcessorCaster() *LowercaseProcessor { - return s -} diff --git a/typedapi/types/lowercasetokenfilter.go b/typedapi/types/lowercasetokenfilter.go index 0d794dcaf3..cf7c12146d 100644 --- a/typedapi/types/lowercasetokenfilter.go +++ b/typedapi/types/lowercasetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,16 +26,18 @@ import ( "errors" "fmt" "io" - "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/lowercasetokenfilterlanguages" ) // LowercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L256-L259 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L350-L354 type LowercaseTokenFilter struct { - Language *string `json:"language,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // Language Language-specific lowercase token filter to use. + Language *lowercasetokenfilterlanguages.LowercaseTokenFilterLanguages `json:"language,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *LowercaseTokenFilter) UnmarshalJSON(data []byte) error { @@ -54,16 +56,9 @@ func (s *LowercaseTokenFilter) UnmarshalJSON(data []byte) error { switch t { case "language": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.Language); err != nil { return fmt.Errorf("%s | %w", "Language", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.Language = &o case "type": if err := dec.Decode(&s.Type); err != nil { @@ -100,13 +95,3 @@ func NewLowercaseTokenFilter() *LowercaseTokenFilter { return r } - -// true - -type LowercaseTokenFilterVariant interface { - LowercaseTokenFilterCaster() *LowercaseTokenFilter -} - -func (s *LowercaseTokenFilter) LowercaseTokenFilterCaster() *LowercaseTokenFilter { - return s -} diff --git a/typedapi/types/lowercasetokenizer.go b/typedapi/types/lowercasetokenizer.go index f1204d7033..af7360759e 100644 --- a/typedapi/types/lowercasetokenizer.go +++ b/typedapi/types/lowercasetokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // LowercaseTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L80-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L81-L83 type LowercaseTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewLowercaseTokenizer() *LowercaseTokenizer { return r } - -// true - -type LowercaseTokenizerVariant interface { - LowercaseTokenizerCaster() *LowercaseTokenizer -} - -func (s *LowercaseTokenizer) LowercaseTokenizerCaster() *LowercaseTokenizer { - return s -} diff --git a/typedapi/types/machinelearning.go b/typedapi/types/machinelearning.go index 76b80a2505..ab5a5844d4 100644 --- a/typedapi/types/machinelearning.go +++ b/typedapi/types/machinelearning.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MachineLearning type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L382-L389 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L382-L389 type MachineLearning struct { Available bool `json:"available"` DataFrameAnalyticsJobs MlDataFrameAnalyticsJobs `json:"data_frame_analytics_jobs"` @@ -143,5 +143,3 @@ func NewMachineLearning() *MachineLearning { return r } - -// false diff --git a/typedapi/types/manageuserprivileges.go b/typedapi/types/manageuserprivileges.go index 492923cf5c..33747615d4 100644 --- a/typedapi/types/manageuserprivileges.go +++ b/typedapi/types/manageuserprivileges.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ManageUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L438-L440 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L438-L440 type ManageUserPrivileges struct { Applications []string `json:"applications"` } @@ -33,13 +33,3 @@ func NewManageUserPrivileges() *ManageUserPrivileges { return r } - -// true - -type ManageUserPrivilegesVariant interface { - ManageUserPrivilegesCaster() *ManageUserPrivileges -} - -func (s *ManageUserPrivileges) ManageUserPrivilegesCaster() *ManageUserPrivileges { - return s -} diff --git a/typedapi/types/mapboxvectortiles.go b/typedapi/types/mapboxvectortiles.go index 56fd3c31f2..f65b0f3c75 100644 --- a/typedapi/types/mapboxvectortiles.go +++ b/typedapi/types/mapboxvectortiles.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MapboxVectorTiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Binary.ts#L21-L21 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Binary.ts#L21-L21 type MapboxVectorTiles []byte diff --git a/typedapi/types/mappingcharfilter.go b/typedapi/types/mappingcharfilter.go index a32c86500d..f2b746a87d 100644 --- a/typedapi/types/mappingcharfilter.go +++ b/typedapi/types/mappingcharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/char_filters.ts#L51-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/char_filters.ts#L51-L55 type MappingCharFilter struct { Mappings []string `json:"mappings,omitempty"` MappingsPath *string `json:"mappings_path,omitempty"` @@ -107,13 +107,3 @@ func NewMappingCharFilter() *MappingCharFilter { return r } - -// true - -type MappingCharFilterVariant interface { - MappingCharFilterCaster() *MappingCharFilter -} - -func (s *MappingCharFilter) MappingCharFilterCaster() *MappingCharFilter { - return s -} diff --git a/typedapi/types/mappinglimitsettings.go b/typedapi/types/mappinglimitsettings.go index 670bd57913..6a60d46152 100644 --- a/typedapi/types/mappinglimitsettings.go +++ b/typedapi/types/mappinglimitsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,13 +31,13 @@ import ( // MappingLimitSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L425-L439 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L425-L439 type MappingLimitSettings struct { Coerce *bool `json:"coerce,omitempty"` Depth *MappingLimitSettingsDepth `json:"depth,omitempty"` DimensionFields *MappingLimitSettingsDimensionFields `json:"dimension_fields,omitempty"` FieldNameLength *MappingLimitSettingsFieldNameLength `json:"field_name_length,omitempty"` - IgnoreMalformed string `json:"ignore_malformed,omitempty"` + IgnoreMalformed *string `json:"ignore_malformed,omitempty"` NestedFields *MappingLimitSettingsNestedFields `json:"nested_fields,omitempty"` NestedObjects *MappingLimitSettingsNestedObjects `json:"nested_objects,omitempty"` Source *MappingLimitSettingsSourceFields `json:"source,omitempty"` @@ -98,7 +98,7 @@ func (s *MappingLimitSettings) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.IgnoreMalformed = o + s.IgnoreMalformed = &o case "nested_fields": if err := dec.Decode(&s.NestedFields); err != nil { @@ -131,13 +131,3 @@ func NewMappingLimitSettings() *MappingLimitSettings { return r } - -// true - -type MappingLimitSettingsVariant interface { - MappingLimitSettingsCaster() *MappingLimitSettings -} - -func (s *MappingLimitSettings) MappingLimitSettingsCaster() *MappingLimitSettings { - return s -} diff --git a/typedapi/types/mappinglimitsettingsdepth.go b/typedapi/types/mappinglimitsettingsdepth.go index 6ed3e95cf8..e2fb687974 100644 --- a/typedapi/types/mappinglimitsettingsdepth.go +++ b/typedapi/types/mappinglimitsettingsdepth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDepth type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L460-L467 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L460-L467 type MappingLimitSettingsDepth struct { // Limit The maximum depth for a field, which is measured as the number of inner // objects. For instance, if all fields are defined @@ -81,13 +81,3 @@ func NewMappingLimitSettingsDepth() *MappingLimitSettingsDepth { return r } - -// true - -type MappingLimitSettingsDepthVariant interface { - MappingLimitSettingsDepthCaster() *MappingLimitSettingsDepth -} - -func (s *MappingLimitSettingsDepth) MappingLimitSettingsDepthCaster() *MappingLimitSettingsDepth { - return s -} diff --git a/typedapi/types/mappinglimitsettingsdimensionfields.go b/typedapi/types/mappinglimitsettingsdimensionfields.go index 6d2b0b7670..2e09152625 100644 --- a/typedapi/types/mappinglimitsettingsdimensionfields.go +++ b/typedapi/types/mappinglimitsettingsdimensionfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDimensionFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L497-L503 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L497-L503 type MappingLimitSettingsDimensionFields struct { // Limit [preview] This functionality is in technical preview and may be changed or // removed in a future release. @@ -81,13 +81,3 @@ func NewMappingLimitSettingsDimensionFields() *MappingLimitSettingsDimensionFiel return r } - -// true - -type MappingLimitSettingsDimensionFieldsVariant interface { - MappingLimitSettingsDimensionFieldsCaster() *MappingLimitSettingsDimensionFields -} - -func (s *MappingLimitSettingsDimensionFields) MappingLimitSettingsDimensionFieldsCaster() *MappingLimitSettingsDimensionFields { - return s -} diff --git a/typedapi/types/mappinglimitsettingsfieldnamelength.go b/typedapi/types/mappinglimitsettingsfieldnamelength.go index 40f932ebbc..89da4a370c 100644 --- a/typedapi/types/mappinglimitsettingsfieldnamelength.go +++ b/typedapi/types/mappinglimitsettingsfieldnamelength.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsFieldNameLength type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L488-L495 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L488-L495 type MappingLimitSettingsFieldNameLength struct { // Limit Setting for the maximum length of a field name. This setting isn’t really // something that addresses mappings explosion but @@ -83,13 +83,3 @@ func NewMappingLimitSettingsFieldNameLength() *MappingLimitSettingsFieldNameLeng return r } - -// true - -type MappingLimitSettingsFieldNameLengthVariant interface { - MappingLimitSettingsFieldNameLengthCaster() *MappingLimitSettingsFieldNameLength -} - -func (s *MappingLimitSettingsFieldNameLength) MappingLimitSettingsFieldNameLengthCaster() *MappingLimitSettingsFieldNameLength { - return s -} diff --git a/typedapi/types/mappinglimitsettingsnestedfields.go b/typedapi/types/mappinglimitsettingsnestedfields.go index 1a612ce6c1..a45d02f2d3 100644 --- a/typedapi/types/mappinglimitsettingsnestedfields.go +++ b/typedapi/types/mappinglimitsettingsnestedfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L469-L477 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L469-L477 type MappingLimitSettingsNestedFields struct { // Limit The maximum number of distinct nested mappings in an index. The nested type // should only be used in special cases, when @@ -82,13 +82,3 @@ func NewMappingLimitSettingsNestedFields() *MappingLimitSettingsNestedFields { return r } - -// true - -type MappingLimitSettingsNestedFieldsVariant interface { - MappingLimitSettingsNestedFieldsCaster() *MappingLimitSettingsNestedFields -} - -func (s *MappingLimitSettingsNestedFields) MappingLimitSettingsNestedFieldsCaster() *MappingLimitSettingsNestedFields { - return s -} diff --git a/typedapi/types/mappinglimitsettingsnestedobjects.go b/typedapi/types/mappinglimitsettingsnestedobjects.go index fb08153c26..238ab231e1 100644 --- a/typedapi/types/mappinglimitsettingsnestedobjects.go +++ b/typedapi/types/mappinglimitsettingsnestedobjects.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedObjects type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L479-L486 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L479-L486 type MappingLimitSettingsNestedObjects struct { // Limit The maximum number of nested JSON objects that a single document can contain // across all nested types. This limit helps @@ -81,13 +81,3 @@ func NewMappingLimitSettingsNestedObjects() *MappingLimitSettingsNestedObjects { return r } - -// true - -type MappingLimitSettingsNestedObjectsVariant interface { - MappingLimitSettingsNestedObjectsCaster() *MappingLimitSettingsNestedObjects -} - -func (s *MappingLimitSettingsNestedObjects) MappingLimitSettingsNestedObjectsCaster() *MappingLimitSettingsNestedObjects { - return s -} diff --git a/typedapi/types/mappinglimitsettingssourcefields.go b/typedapi/types/mappinglimitsettingssourcefields.go index 9e9c424c8b..db0e8039bd 100644 --- a/typedapi/types/mappinglimitsettingssourcefields.go +++ b/typedapi/types/mappinglimitsettingssourcefields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // MappingLimitSettingsSourceFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L505-L507 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L505-L507 type MappingLimitSettingsSourceFields struct { Mode sourcemode.SourceMode `json:"mode"` } @@ -37,13 +37,3 @@ func NewMappingLimitSettingsSourceFields() *MappingLimitSettingsSourceFields { return r } - -// true - -type MappingLimitSettingsSourceFieldsVariant interface { - MappingLimitSettingsSourceFieldsCaster() *MappingLimitSettingsSourceFields -} - -func (s *MappingLimitSettingsSourceFields) MappingLimitSettingsSourceFieldsCaster() *MappingLimitSettingsSourceFields { - return s -} diff --git a/typedapi/types/mappinglimitsettingstotalfields.go b/typedapi/types/mappinglimitsettingstotalfields.go index 657fb33ff3..b190a6af85 100644 --- a/typedapi/types/mappinglimitsettingstotalfields.go +++ b/typedapi/types/mappinglimitsettingstotalfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsTotalFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L441-L458 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L441-L458 type MappingLimitSettingsTotalFields struct { // IgnoreDynamicBeyondLimit This setting determines what happens when a dynamically mapped field would // exceed the total fields limit. When set @@ -43,14 +43,14 @@ type MappingLimitSettingsTotalFields struct { // similar to dynamic: false. // The fields that were not added to the mapping will be added to the _ignored // field. - IgnoreDynamicBeyondLimit string `json:"ignore_dynamic_beyond_limit,omitempty"` + IgnoreDynamicBeyondLimit *string `json:"ignore_dynamic_beyond_limit,omitempty"` // Limit The maximum number of fields in an index. Field and object mappings, as well // as field aliases count towards this limit. // The limit is in place to prevent mappings and searches from becoming too // large. Higher values can lead to performance // degradations and memory issues, especially in clusters with a high load or // few resources. - Limit string `json:"limit,omitempty"` + Limit *string `json:"limit,omitempty"` } func (s *MappingLimitSettingsTotalFields) UnmarshalJSON(data []byte) error { @@ -78,7 +78,7 @@ func (s *MappingLimitSettingsTotalFields) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.IgnoreDynamicBeyondLimit = o + s.IgnoreDynamicBeyondLimit = &o case "limit": var tmp json.RawMessage @@ -90,7 +90,7 @@ func (s *MappingLimitSettingsTotalFields) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Limit = o + s.Limit = &o } } @@ -103,13 +103,3 @@ func NewMappingLimitSettingsTotalFields() *MappingLimitSettingsTotalFields { return r } - -// true - -type MappingLimitSettingsTotalFieldsVariant interface { - MappingLimitSettingsTotalFieldsCaster() *MappingLimitSettingsTotalFields -} - -func (s *MappingLimitSettingsTotalFields) MappingLimitSettingsTotalFieldsCaster() *MappingLimitSettingsTotalFields { - return s -} diff --git a/typedapi/types/mappingstats.go b/typedapi/types/mappingstats.go index 149cf9f7db..12007856b8 100644 --- a/typedapi/types/mappingstats.go +++ b/typedapi/types/mappingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MappingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L186-L190 type MappingStats struct { TotalCount int64 `json:"total_count"` TotalEstimatedOverhead ByteSize `json:"total_estimated_overhead,omitempty"` @@ -99,5 +99,3 @@ func NewMappingStats() *MappingStats { return r } - -// false diff --git a/typedapi/types/masterisstableindicator.go b/typedapi/types/masterisstableindicator.go index 779ef61b2d..9a37d02c13 100644 --- a/typedapi/types/masterisstableindicator.go +++ b/typedapi/types/masterisstableindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MasterIsStableIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L80-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L81-L85 type MasterIsStableIndicator struct { Details *MasterIsStableIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewMasterIsStableIndicator() *MasterIsStableIndicator { return r } - -// false diff --git a/typedapi/types/masterisstableindicatorclusterformationnode.go b/typedapi/types/masterisstableindicatorclusterformationnode.go index a519c643eb..a53e397da6 100644 --- a/typedapi/types/masterisstableindicatorclusterformationnode.go +++ b/typedapi/types/masterisstableindicatorclusterformationnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorClusterFormationNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L99-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L100-L104 type MasterIsStableIndicatorClusterFormationNode struct { ClusterFormationMessage string `json:"cluster_formation_message"` Name *string `json:"name,omitempty"` @@ -100,5 +100,3 @@ func NewMasterIsStableIndicatorClusterFormationNode() *MasterIsStableIndicatorCl return r } - -// false diff --git a/typedapi/types/masterisstableindicatordetails.go b/typedapi/types/masterisstableindicatordetails.go index 63edd83dc9..f6e3e5400a 100644 --- a/typedapi/types/masterisstableindicatordetails.go +++ b/typedapi/types/masterisstableindicatordetails.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MasterIsStableIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L85-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L86-L91 type MasterIsStableIndicatorDetails struct { ClusterFormation []MasterIsStableIndicatorClusterFormationNode `json:"cluster_formation,omitempty"` CurrentMaster IndicatorNode `json:"current_master"` @@ -36,5 +36,3 @@ func NewMasterIsStableIndicatorDetails() *MasterIsStableIndicatorDetails { return r } - -// false diff --git a/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go b/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go index 504813aa1d..a2ba76e9f0 100644 --- a/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go +++ b/typedapi/types/masterisstableindicatorexceptionfetchinghistory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorExceptionFetchingHistory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L95-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L96-L99 type MasterIsStableIndicatorExceptionFetchingHistory struct { Message string `json:"message"` StackTrace string `json:"stack_trace"` @@ -87,5 +87,3 @@ func NewMasterIsStableIndicatorExceptionFetchingHistory() *MasterIsStableIndicat return r } - -// false diff --git a/typedapi/types/masterrecord.go b/typedapi/types/masterrecord.go index a63104c9c8..34d51335b8 100644 --- a/typedapi/types/masterrecord.go +++ b/typedapi/types/masterrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MasterRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/master/types.ts#L20-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/master/types.ts#L20-L39 type MasterRecord struct { // Host host name Host *string `json:"host,omitempty"` @@ -117,5 +117,3 @@ func NewMasterRecord() *MasterRecord { return r } - -// false diff --git a/typedapi/types/matchallquery.go b/typedapi/types/matchallquery.go index ba24b48666..1abbcff953 100644 --- a/typedapi/types/matchallquery.go +++ b/typedapi/types/matchallquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MatchAllQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/MatchAllQuery.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/MatchAllQuery.ts#L22-L25 type MatchAllQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -96,13 +96,3 @@ func NewMatchAllQuery() *MatchAllQuery { return r } - -// true - -type MatchAllQueryVariant interface { - MatchAllQueryCaster() *MatchAllQuery -} - -func (s *MatchAllQuery) MatchAllQueryCaster() *MatchAllQuery { - return s -} diff --git a/typedapi/types/matchboolprefixquery.go b/typedapi/types/matchboolprefixquery.go index 282a26d4be..fb7c0ba833 100644 --- a/typedapi/types/matchboolprefixquery.go +++ b/typedapi/types/matchboolprefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MatchBoolPrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L355-L412 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L406-L463 type MatchBoolPrefixQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` @@ -232,13 +232,3 @@ func NewMatchBoolPrefixQuery() *MatchBoolPrefixQuery { return r } - -// true - -type MatchBoolPrefixQueryVariant interface { - MatchBoolPrefixQueryCaster() *MatchBoolPrefixQuery -} - -func (s *MatchBoolPrefixQuery) MatchBoolPrefixQueryCaster() *MatchBoolPrefixQuery { - return s -} diff --git a/typedapi/types/matchedfield.go b/typedapi/types/matchedfield.go index d2f4b8d040..c04b5a81a4 100644 --- a/typedapi/types/matchedfield.go +++ b/typedapi/types/matchedfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MatchedField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/test_grok_pattern/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/test_grok_pattern/types.ts#L23-L27 type MatchedField struct { Length int `json:"length"` Match string `json:"match"` @@ -108,5 +108,3 @@ func NewMatchedField() *MatchedField { return r } - -// false diff --git a/typedapi/types/matchedtext.go b/typedapi/types/matchedtext.go index bb39e0ab54..3874685e26 100644 --- a/typedapi/types/matchedtext.go +++ b/typedapi/types/matchedtext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MatchedText type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/test_grok_pattern/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/test_grok_pattern/types.ts#L29-L32 type MatchedText struct { Fields map[string][]MatchedField `json:"fields,omitempty"` Matched bool `json:"matched"` @@ -87,5 +87,3 @@ func NewMatchedText() *MatchedText { return r } - -// false diff --git a/typedapi/types/matchnonequery.go b/typedapi/types/matchnonequery.go index a7e7dcc055..42118a417e 100644 --- a/typedapi/types/matchnonequery.go +++ b/typedapi/types/matchnonequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MatchNoneQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/MatchNoneQuery.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/MatchNoneQuery.ts#L22-L25 type MatchNoneQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -96,13 +96,3 @@ func NewMatchNoneQuery() *MatchNoneQuery { return r } - -// true - -type MatchNoneQueryVariant interface { - MatchNoneQueryCaster() *MatchNoneQuery -} - -func (s *MatchNoneQuery) MatchNoneQueryCaster() *MatchNoneQuery { - return s -} diff --git a/typedapi/types/matchonlytextproperty.go b/typedapi/types/matchonlytextproperty.go index e8c4d25f5a..e848d5874d 100644 --- a/typedapi/types/matchonlytextproperty.go +++ b/typedapi/types/matchonlytextproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MatchOnlyTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L264-L289 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L289-L314 type MatchOnlyTextProperty struct { // CopyTo Allows you to copy the values of multiple fields into a group // field, which can then be queried as a single field. @@ -218,6 +218,12 @@ func (s *MatchOnlyTextProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -449,13 +455,3 @@ func NewMatchOnlyTextProperty() *MatchOnlyTextProperty { return r } - -// true - -type MatchOnlyTextPropertyVariant interface { - MatchOnlyTextPropertyCaster() *MatchOnlyTextProperty -} - -func (s *MatchOnlyTextProperty) MatchOnlyTextPropertyCaster() *MatchOnlyTextProperty { - return s -} diff --git a/typedapi/types/matchphraseprefixquery.go b/typedapi/types/matchphraseprefixquery.go index 07e9670b55..540ca4c0ff 100644 --- a/typedapi/types/matchphraseprefixquery.go +++ b/typedapi/types/matchphraseprefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MatchPhrasePrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L440-L469 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L491-L520 type MatchPhrasePrefixQuery struct { // Analyzer Analyzer used to convert text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` @@ -183,13 +183,3 @@ func NewMatchPhrasePrefixQuery() *MatchPhrasePrefixQuery { return r } - -// true - -type MatchPhrasePrefixQueryVariant interface { - MatchPhrasePrefixQueryCaster() *MatchPhrasePrefixQuery -} - -func (s *MatchPhrasePrefixQuery) MatchPhrasePrefixQueryCaster() *MatchPhrasePrefixQuery { - return s -} diff --git a/typedapi/types/matchphrasequery.go b/typedapi/types/matchphrasequery.go index 1a75c29c44..c8328a41fc 100644 --- a/typedapi/types/matchphrasequery.go +++ b/typedapi/types/matchphrasequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MatchPhraseQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L414-L438 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L465-L489 type MatchPhraseQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` @@ -164,13 +164,3 @@ func NewMatchPhraseQuery() *MatchPhraseQuery { return r } - -// true - -type MatchPhraseQueryVariant interface { - MatchPhraseQueryCaster() *MatchPhraseQuery -} - -func (s *MatchPhraseQuery) MatchPhraseQueryCaster() *MatchPhraseQuery { - return s -} diff --git a/typedapi/types/matchquery.go b/typedapi/types/matchquery.go index a3b6bd5fcd..398f032248 100644 --- a/typedapi/types/matchquery.go +++ b/typedapi/types/matchquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // MatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L285-L353 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L336-L404 type MatchQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` @@ -279,13 +279,3 @@ func NewMatchQuery() *MatchQuery { return r } - -// true - -type MatchQueryVariant interface { - MatchQueryCaster() *MatchQuery -} - -func (s *MatchQuery) MatchQueryCaster() *MatchQuery { - return s -} diff --git a/typedapi/types/matrixstatsaggregate.go b/typedapi/types/matrixstatsaggregate.go index 6d1b172f5d..4cf68e4612 100644 --- a/typedapi/types/matrixstatsaggregate.go +++ b/typedapi/types/matrixstatsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MatrixStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L866-L873 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L868-L875 type MatrixStatsAggregate struct { DocCount int64 `json:"doc_count"` Fields []MatrixStatsFields `json:"fields,omitempty"` @@ -89,5 +89,3 @@ func NewMatrixStatsAggregate() *MatrixStatsAggregate { return r } - -// false diff --git a/typedapi/types/matrixstatsaggregation.go b/typedapi/types/matrixstatsaggregation.go index abe1f04ac6..46796f1827 100644 --- a/typedapi/types/matrixstatsaggregation.go +++ b/typedapi/types/matrixstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // MatrixStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/matrix.ts#L38-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/matrix.ts#L38-L44 type MatrixStatsAggregation struct { // Fields An array of fields for computing the statistics. Fields []string `json:"fields,omitempty"` @@ -100,13 +100,3 @@ func NewMatrixStatsAggregation() *MatrixStatsAggregation { return r } - -// true - -type MatrixStatsAggregationVariant interface { - MatrixStatsAggregationCaster() *MatrixStatsAggregation -} - -func (s *MatrixStatsAggregation) MatrixStatsAggregationCaster() *MatrixStatsAggregation { - return s -} diff --git a/typedapi/types/matrixstatsfields.go b/typedapi/types/matrixstatsfields.go index b49a66af51..a752ff87c8 100644 --- a/typedapi/types/matrixstatsfields.go +++ b/typedapi/types/matrixstatsfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MatrixStatsFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L875-L884 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L877-L886 type MatrixStatsFields struct { Correlation map[string]Float64 `json:"correlation"` Count int64 `json:"count"` @@ -172,5 +172,3 @@ func NewMatrixStatsFields() *MatrixStatsFields { return r } - -// false diff --git a/typedapi/types/maxaggregate.go b/typedapi/types/maxaggregate.go index 2bbce2c782..1dd258096c 100644 --- a/typedapi/types/maxaggregate.go +++ b/typedapi/types/maxaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MaxAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L205-L209 type MaxAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewMaxAggregate() *MaxAggregate { return r } - -// false diff --git a/typedapi/types/maxaggregation.go b/typedapi/types/maxaggregation.go index 2cfd517858..cd5abb5c3c 100644 --- a/typedapi/types/maxaggregation.go +++ b/typedapi/types/maxaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MaxAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L165-L165 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L171-L171 type MaxAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -95,13 +95,3 @@ func NewMaxAggregation() *MaxAggregation { return r } - -// true - -type MaxAggregationVariant interface { - MaxAggregationCaster() *MaxAggregation -} - -func (s *MaxAggregation) MaxAggregationCaster() *MaxAggregation { - return s -} diff --git a/typedapi/types/maxbucketaggregation.go b/typedapi/types/maxbucketaggregation.go index 30ac7bc8de..3956d7a945 100644 --- a/typedapi/types/maxbucketaggregation.go +++ b/typedapi/types/maxbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MaxBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L244-L247 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L244-L247 type MaxBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewMaxBucketAggregation() *MaxBucketAggregation { return r } - -// true - -type MaxBucketAggregationVariant interface { - MaxBucketAggregationCaster() *MaxBucketAggregation -} - -func (s *MaxBucketAggregation) MaxBucketAggregationCaster() *MaxBucketAggregation { - return s -} diff --git a/typedapi/types/maxmind.go b/typedapi/types/maxmind.go index 5968c44645..a705d8c349 100644 --- a/typedapi/types/maxmind.go +++ b/typedapi/types/maxmind.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Maxmind type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Database.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Database.ts#L55-L57 type Maxmind struct { AccountId string `json:"account_id"` } @@ -66,13 +66,3 @@ func NewMaxmind() *Maxmind { return r } - -// true - -type MaxmindVariant interface { - MaxmindCaster() *Maxmind -} - -func (s *Maxmind) MaxmindCaster() *Maxmind { - return s -} diff --git a/typedapi/types/medianabsolutedeviationaggregate.go b/typedapi/types/medianabsolutedeviationaggregate.go index 28a658e626..94dd9ede70 100644 --- a/typedapi/types/medianabsolutedeviationaggregate.go +++ b/typedapi/types/medianabsolutedeviationaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MedianAbsoluteDeviationAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L196-L197 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L196-L197 type MedianAbsoluteDeviationAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewMedianAbsoluteDeviationAggregate() *MedianAbsoluteDeviationAggregate { return r } - -// false diff --git a/typedapi/types/medianabsolutedeviationaggregation.go b/typedapi/types/medianabsolutedeviationaggregation.go index 8658093caa..f5caaff36a 100644 --- a/typedapi/types/medianabsolutedeviationaggregation.go +++ b/typedapi/types/medianabsolutedeviationaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,16 +27,25 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tdigestexecutionhint" ) // MedianAbsoluteDeviationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L167-L176 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L173-L188 type MedianAbsoluteDeviationAggregation struct { // Compression Limits the maximum number of nodes used by the underlying TDigest algorithm // to `20 * compression`, enabling control of memory usage and approximation // error. Compression *Float64 `json:"compression,omitempty"` + // ExecutionHint The default implementation of TDigest is optimized for performance, scaling + // to millions or even billions of sample values while maintaining acceptable + // accuracy levels (close to 1% relative error for millions of samples in some + // cases). + // To use an implementation optimized for accuracy, set this parameter to + // high_accuracy instead. + ExecutionHint *tdigestexecutionhint.TDigestExecutionHint `json:"execution_hint,omitempty"` // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` Format *string `json:"format,omitempty"` @@ -77,6 +86,11 @@ func (s *MedianAbsoluteDeviationAggregation) UnmarshalJSON(data []byte) error { s.Compression = &f } + case "execution_hint": + if err := dec.Decode(&s.ExecutionHint); err != nil { + return fmt.Errorf("%s | %w", "ExecutionHint", err) + } + case "field": if err := dec.Decode(&s.Field); err != nil { return fmt.Errorf("%s | %w", "Field", err) @@ -115,13 +129,3 @@ func NewMedianAbsoluteDeviationAggregation() *MedianAbsoluteDeviationAggregation return r } - -// true - -type MedianAbsoluteDeviationAggregationVariant interface { - MedianAbsoluteDeviationAggregationCaster() *MedianAbsoluteDeviationAggregation -} - -func (s *MedianAbsoluteDeviationAggregation) MedianAbsoluteDeviationAggregationCaster() *MedianAbsoluteDeviationAggregation { - return s -} diff --git a/typedapi/types/memmlstats.go b/typedapi/types/memmlstats.go index 996e1a63a0..067279d674 100644 --- a/typedapi/types/memmlstats.go +++ b/typedapi/types/memmlstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MemMlStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_memory_stats/types.ts#L90-L111 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_memory_stats/types.ts#L90-L111 type MemMlStats struct { // AnomalyDetectors Amount of native memory set aside for anomaly detection jobs. AnomalyDetectors ByteSize `json:"anomaly_detectors,omitempty"` @@ -192,5 +192,3 @@ func NewMemMlStats() *MemMlStats { return r } - -// false diff --git a/typedapi/types/memory.go b/typedapi/types/memory.go index 6ca355832a..bb5bff9920 100644 --- a/typedapi/types/memory.go +++ b/typedapi/types/memory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Memory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_memory_stats/types.ts#L25-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_memory_stats/types.ts#L25-L48 type Memory struct { Attributes map[string]string `json:"attributes"` EphemeralId string `json:"ephemeral_id"` @@ -113,5 +113,3 @@ func NewMemory() *Memory { return r } - -// false diff --git a/typedapi/types/memorystats.go b/typedapi/types/memorystats.go index 986438b28b..7b64d2c300 100644 --- a/typedapi/types/memorystats.go +++ b/typedapi/types/memorystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L632-L656 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L634-L658 type MemoryStats struct { // AdjustedTotalInBytes If the amount of physical memory has been overridden using the // `es`.`total_memory_bytes` system property then this reports the overridden @@ -219,5 +219,3 @@ func NewMemoryStats() *MemoryStats { return r } - -// false diff --git a/typedapi/types/memstats.go b/typedapi/types/memstats.go index 9061362483..292788af64 100644 --- a/typedapi/types/memstats.go +++ b/typedapi/types/memstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MemStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/get_memory_stats/types.ts#L65-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/get_memory_stats/types.ts#L65-L88 type MemStats struct { // AdjustedTotal If the amount of physical memory has been overridden using the // es.total_memory_bytes system property @@ -124,5 +124,3 @@ func NewMemStats() *MemStats { return r } - -// false diff --git a/typedapi/types/merge.go b/typedapi/types/merge.go index a389e6ba75..11eb5f8e99 100644 --- a/typedapi/types/merge.go +++ b/typedapi/types/merge.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Merge type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L346-L348 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L346-L348 type Merge struct { Scheduler *MergeScheduler `json:"scheduler,omitempty"` } @@ -33,13 +33,3 @@ func NewMerge() *Merge { return r } - -// true - -type MergeVariant interface { - MergeCaster() *Merge -} - -func (s *Merge) MergeCaster() *Merge { - return s -} diff --git a/typedapi/types/mergescheduler.go b/typedapi/types/mergescheduler.go index 007997744b..d230e347c9 100644 --- a/typedapi/types/mergescheduler.go +++ b/typedapi/types/mergescheduler.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MergeScheduler type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L350-L353 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L350-L353 type MergeScheduler struct { MaxMergeCount Stringifiedinteger `json:"max_merge_count,omitempty"` MaxThreadCount Stringifiedinteger `json:"max_thread_count,omitempty"` @@ -72,13 +72,3 @@ func NewMergeScheduler() *MergeScheduler { return r } - -// true - -type MergeSchedulerVariant interface { - MergeSchedulerCaster() *MergeScheduler -} - -func (s *MergeScheduler) MergeSchedulerCaster() *MergeScheduler { - return s -} diff --git a/typedapi/types/mergesstats.go b/typedapi/types/mergesstats.go index 63f1ebe206..7fef1d7d5f 100644 --- a/typedapi/types/mergesstats.go +++ b/typedapi/types/mergesstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MergesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L164-L181 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L186-L203 type MergesStats struct { Current int64 `json:"current"` CurrentDocs int64 `json:"current_docs"` @@ -248,5 +248,3 @@ func NewMergesStats() *MergesStats { return r } - -// false diff --git a/typedapi/types/message.go b/typedapi/types/message.go index afbce35b02..4912a980c5 100644 --- a/typedapi/types/message.go +++ b/typedapi/types/message.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,15 +31,58 @@ import ( // Message type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L135-L155 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L174-L228 type Message struct { // Content The content of the message. + // + // String example: + // ``` + // + // { + // "content": "Some string" + // } + // + // ``` + // + // Object example: + // ``` + // + // { + // "content": [ + // { + // "text": "Some text", + // "type": "text" + // } + // ] + // } + // + // ``` Content MessageContent `json:"content,omitempty"` - // Role The role of the message author. + // Role The role of the message author. Valid values are `user`, `assistant`, + // `system`, and `tool`. Role string `json:"role"` - // ToolCallId The tool call that this message is responding to. + // ToolCallId Only for `tool` role messages. The tool call that this message is responding + // to. ToolCallId *string `json:"tool_call_id,omitempty"` - // ToolCalls The tool calls generated by the model. + // ToolCalls Only for `assistant` role messages. The tool calls generated by the model. If + // it's specified, the `content` field is optional. + // Example: + // ``` + // + // { + // "tool_calls": [ + // { + // "id": "call_KcAjWtAww20AihPHphUh46Gd", + // "type": "function", + // "function": { + // "name": "get_current_weather", + // "arguments": "{\"location\":\"Boston, MA\"}" + // } + // } + // ] + // } + // + // ``` ToolCalls []ToolCall `json:"tool_calls,omitempty"` } @@ -96,13 +139,3 @@ func NewMessage() *Message { return r } - -// true - -type MessageVariant interface { - MessageCaster() *Message -} - -func (s *Message) MessageCaster() *Message { - return s -} diff --git a/typedapi/types/messagecontent.go b/typedapi/types/messagecontent.go index 1f305681c3..d3265096b7 100644 --- a/typedapi/types/messagecontent.go +++ b/typedapi/types/messagecontent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // []ContentObject // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L130-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L169-L172 type MessageContent any - -type MessageContentVariant interface { - MessageContentCaster() *MessageContent -} diff --git a/typedapi/types/metadata.go b/typedapi/types/metadata.go index 919586fa7e..982ea8d862 100644 --- a/typedapi/types/metadata.go +++ b/typedapi/types/metadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,9 +26,5 @@ import ( // Metadata type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L100-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L100-L100 type Metadata map[string]json.RawMessage - -type MetadataVariant interface { - MetadataCaster() *Metadata -} diff --git a/typedapi/types/metrics.go b/typedapi/types/metrics.go index e6a07016ab..8e7478a86a 100644 --- a/typedapi/types/metrics.go +++ b/typedapi/types/metrics.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Metrics type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L76-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L76-L76 type Metrics []string diff --git a/typedapi/types/mgetoperation.go b/typedapi/types/mgetoperation.go index 3686eb6d8f..fae123579a 100644 --- a/typedapi/types/mgetoperation.go +++ b/typedapi/types/mgetoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // MgetOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mget/types.ts#L32-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mget/types.ts#L32-L55 type MgetOperation struct { // Id_ The unique document ID. Id_ string `json:"_id"` @@ -97,7 +97,7 @@ func (s *MgetOperation) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { @@ -152,13 +152,3 @@ func NewMgetOperation() *MgetOperation { return r } - -// true - -type MgetOperationVariant interface { - MgetOperationCaster() *MgetOperation -} - -func (s *MgetOperation) MgetOperationCaster() *MgetOperation { - return s -} diff --git a/typedapi/types/mgetresponseitem.go b/typedapi/types/mgetresponseitem.go index 0d6cebb246..b5a09d2c11 100644 --- a/typedapi/types/mgetresponseitem.go +++ b/typedapi/types/mgetresponseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // GetResult // MultiGetError // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mget/types.ts#L57-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mget/types.ts#L57-L60 type MgetResponseItem any diff --git a/typedapi/types/migrateaction.go b/typedapi/types/migrateaction.go index 4eb0708dd9..a0776803a9 100644 --- a/typedapi/types/migrateaction.go +++ b/typedapi/types/migrateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MigrateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L141-L143 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L141-L143 type MigrateAction struct { Enabled *bool `json:"enabled,omitempty"` } @@ -76,13 +76,3 @@ func NewMigrateAction() *MigrateAction { return r } - -// true - -type MigrateActionVariant interface { - MigrateActionCaster() *MigrateAction -} - -func (s *MigrateAction) MigrateActionCaster() *MigrateAction { - return s -} diff --git a/typedapi/types/migratereindex.go b/typedapi/types/migratereindex.go index 5a4e0a37d6..5b5c2c31da 100644 --- a/typedapi/types/migratereindex.go +++ b/typedapi/types/migratereindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // MigrateReindex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L39-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L39-L48 type MigrateReindex struct { // Mode Reindex mode. Currently only 'upgrade' is supported. Mode modeenum.ModeEnum `json:"mode"` @@ -40,13 +40,3 @@ func NewMigrateReindex() *MigrateReindex { return r } - -// true - -type MigrateReindexVariant interface { - MigrateReindexCaster() *MigrateReindex -} - -func (s *MigrateReindex) MigrateReindexCaster() *MigrateReindex { - return s -} diff --git a/typedapi/types/migrationfeatureindexinfo.go b/typedapi/types/migrationfeatureindexinfo.go index 7bfa302b6b..1cc825f6f9 100644 --- a/typedapi/types/migrationfeatureindexinfo.go +++ b/typedapi/types/migrationfeatureindexinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MigrationFeatureIndexInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 type MigrationFeatureIndexInfo struct { FailureCause *ErrorCause `json:"failure_cause,omitempty"` Index string `json:"index"` @@ -78,5 +78,3 @@ func NewMigrationFeatureIndexInfo() *MigrationFeatureIndexInfo { return r } - -// false diff --git a/typedapi/types/minaggregate.go b/typedapi/types/minaggregate.go index 4b0e709188..4cd3cae6e2 100644 --- a/typedapi/types/minaggregate.go +++ b/typedapi/types/minaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MinAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L199-L203 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L199-L203 type MinAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewMinAggregate() *MinAggregate { return r } - -// false diff --git a/typedapi/types/minaggregation.go b/typedapi/types/minaggregation.go index 11d58ddb04..e9ba95b735 100644 --- a/typedapi/types/minaggregation.go +++ b/typedapi/types/minaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MinAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L178-L178 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L190-L190 type MinAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -95,13 +95,3 @@ func NewMinAggregation() *MinAggregation { return r } - -// true - -type MinAggregationVariant interface { - MinAggregationCaster() *MinAggregation -} - -func (s *MinAggregation) MinAggregationCaster() *MinAggregation { - return s -} diff --git a/typedapi/types/minbucketaggregation.go b/typedapi/types/minbucketaggregation.go index 47c602a490..a004c5ff2c 100644 --- a/typedapi/types/minbucketaggregation.go +++ b/typedapi/types/minbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MinBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L249-L252 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L249-L252 type MinBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewMinBucketAggregation() *MinBucketAggregation { return r } - -// true - -type MinBucketAggregationVariant interface { - MinBucketAggregationCaster() *MinBucketAggregation -} - -func (s *MinBucketAggregation) MinBucketAggregationCaster() *MinBucketAggregation { - return s -} diff --git a/typedapi/types/minhashtokenfilter.go b/typedapi/types/minhashtokenfilter.go new file mode 100644 index 0000000000..4bba1b48ac --- /dev/null +++ b/typedapi/types/minhashtokenfilter.go @@ -0,0 +1,167 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// MinHashTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L514-L525 +type MinHashTokenFilter struct { + // BucketCount Number of buckets to which hashes are assigned. Defaults to `512`. + BucketCount *int `json:"bucket_count,omitempty"` + // HashCount Number of ways to hash each token in the stream. Defaults to `1`. + HashCount *int `json:"hash_count,omitempty"` + // HashSetSize Number of hashes to keep from each bucket. Defaults to `1`. + // Hashes are retained by ascending size, starting with the bucket’s smallest + // hash first. + HashSetSize *int `json:"hash_set_size,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` + // WithRotation If `true`, the filter fills empty buckets with the value of the first + // non-empty bucket to its circular right if the `hash_set_size` is `1`. If the + // `bucket_count` argument is greater than 1, this parameter defaults to `true`. + // Otherwise, this parameter defaults to `false`. + WithRotation *bool `json:"with_rotation,omitempty"` +} + +func (s *MinHashTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "bucket_count": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "BucketCount", err) + } + s.BucketCount = &value + case float64: + f := int(v) + s.BucketCount = &f + } + + case "hash_count": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "HashCount", err) + } + s.HashCount = &value + case float64: + f := int(v) + s.HashCount = &f + } + + case "hash_set_size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "HashSetSize", err) + } + s.HashSetSize = &value + case float64: + f := int(v) + s.HashSetSize = &f + } + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + case "with_rotation": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "WithRotation", err) + } + s.WithRotation = &value + case bool: + s.WithRotation = &v + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s MinHashTokenFilter) MarshalJSON() ([]byte, error) { + type innerMinHashTokenFilter MinHashTokenFilter + tmp := innerMinHashTokenFilter{ + BucketCount: s.BucketCount, + HashCount: s.HashCount, + HashSetSize: s.HashSetSize, + Type: s.Type, + Version: s.Version, + WithRotation: s.WithRotation, + } + + tmp.Type = "min_hash" + + return json.Marshal(tmp) +} + +// NewMinHashTokenFilter returns a MinHashTokenFilter. +func NewMinHashTokenFilter() *MinHashTokenFilter { + r := &MinHashTokenFilter{} + + return r +} diff --git a/typedapi/types/minimallicenseinformation.go b/typedapi/types/minimallicenseinformation.go index 1b042e3f7e..ced132b3ae 100644 --- a/typedapi/types/minimallicenseinformation.go +++ b/typedapi/types/minimallicenseinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // MinimalLicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/types.ts#L34-L40 type MinimalLicenseInformation struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` Mode licensetype.LicenseType `json:"mode"` @@ -101,5 +101,3 @@ func NewMinimalLicenseInformation() *MinimalLicenseInformation { return r } - -// false diff --git a/typedapi/types/minimumshouldmatch.go b/typedapi/types/minimumshouldmatch.go index 2c42fe6e34..b514d04994 100644 --- a/typedapi/types/minimumshouldmatch.go +++ b/typedapi/types/minimumshouldmatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L167-L171 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L167-L171 type MinimumShouldMatch any - -type MinimumShouldMatchVariant interface { - MinimumShouldMatchCaster() *MinimumShouldMatch -} diff --git a/typedapi/types/missing.go b/typedapi/types/missing.go index b96ea00111..512361284c 100644 --- a/typedapi/types/missing.go +++ b/typedapi/types/missing.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,9 +27,5 @@ package types // Float64 // bool // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/AggregationContainer.ts#L535-L535 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/AggregationContainer.ts#L535-L535 type Missing any - -type MissingVariant interface { - MissingCaster() *Missing -} diff --git a/typedapi/types/missingaggregate.go b/typedapi/types/missingaggregate.go index 702dd0324c..5e7b5e340f 100644 --- a/typedapi/types/missingaggregate.go +++ b/typedapi/types/missingaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // MissingAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L528-L532 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L528-L532 type MissingAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewMissingAggregate() *MissingAggregate { return r } - -// false diff --git a/typedapi/types/missingaggregation.go b/typedapi/types/missingaggregation.go index d52f3105a9..88c46c356b 100644 --- a/typedapi/types/missingaggregation.go +++ b/typedapi/types/missingaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MissingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L593-L599 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L593-L599 type MissingAggregation struct { // Field The name of the field. Field *string `json:"field,omitempty"` @@ -73,13 +73,3 @@ func NewMissingAggregation() *MissingAggregation { return r } - -// true - -type MissingAggregationVariant interface { - MissingAggregationCaster() *MissingAggregation -} - -func (s *MissingAggregation) MissingAggregationCaster() *MissingAggregation { - return s -} diff --git a/typedapi/types/mistralservicesettings.go b/typedapi/types/mistralservicesettings.go index 6e27dece44..a6206b63dc 100644 --- a/typedapi/types/mistralservicesettings.go +++ b/typedapi/types/mistralservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MistralServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L976-L1003 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1515-L1542 type MistralServiceSettings struct { // ApiKey A valid API key of your Mistral account. // You can find your Mistral API keys or you can create a new one on the API @@ -47,8 +47,7 @@ type MistralServiceSettings struct { // MaxInputTokens The maximum number of tokens per input before chunking occurs. MaxInputTokens *int `json:"max_input_tokens,omitempty"` // Model The name of the model to use for the inference task. - // Refer to the Mistral models documentation for the list of available text - // embedding models. + // Refer to the Mistral models documentation for the list of available models. Model string `json:"model"` // RateLimit This setting helps to minimize the number of rate limit errors returned from // the Mistral API. @@ -128,13 +127,3 @@ func NewMistralServiceSettings() *MistralServiceSettings { return r } - -// true - -type MistralServiceSettingsVariant interface { - MistralServiceSettingsCaster() *MistralServiceSettings -} - -func (s *MistralServiceSettings) MistralServiceSettingsCaster() *MistralServiceSettings { - return s -} diff --git a/typedapi/types/mlcounter.go b/typedapi/types/mlcounter.go index f09738049c..d0b1067711 100644 --- a/typedapi/types/mlcounter.go +++ b/typedapi/types/mlcounter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlCounter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L265-L267 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L265-L267 type MlCounter struct { Count int64 `json:"count"` } @@ -77,5 +77,3 @@ func NewMlCounter() *MlCounter { return r } - -// false diff --git a/typedapi/types/mldatafeed.go b/typedapi/types/mldatafeed.go index 310ca5f28b..de29be45f3 100644 --- a/typedapi/types/mldatafeed.go +++ b/typedapi/types/mldatafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MLDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L37-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L37-L61 type MLDatafeed struct { Aggregations map[string]Aggregations `json:"aggregations,omitempty"` // Authorization The security privileges that the datafeed uses to run its queries. If Elastic @@ -191,5 +191,3 @@ func NewMLDatafeed() *MLDatafeed { return r } - -// false diff --git a/typedapi/types/mldataframeanalyticsjobs.go b/typedapi/types/mldataframeanalyticsjobs.go index 3a446d8856..c3870870d7 100644 --- a/typedapi/types/mldataframeanalyticsjobs.go +++ b/typedapi/types/mldataframeanalyticsjobs.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MlDataFrameAnalyticsJobs type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L187-L192 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L187-L192 type MlDataFrameAnalyticsJobs struct { All_ MlDataFrameAnalyticsJobsCount `json:"_all"` AnalysisCounts *MlDataFrameAnalyticsJobsAnalysis `json:"analysis_counts,omitempty"` @@ -36,5 +36,3 @@ func NewMlDataFrameAnalyticsJobs() *MlDataFrameAnalyticsJobs { return r } - -// false diff --git a/typedapi/types/mldataframeanalyticsjobsanalysis.go b/typedapi/types/mldataframeanalyticsjobsanalysis.go index b8fda328f3..1161e8cbb9 100644 --- a/typedapi/types/mldataframeanalyticsjobsanalysis.go +++ b/typedapi/types/mldataframeanalyticsjobsanalysis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L194-L198 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L194-L198 type MlDataFrameAnalyticsJobsAnalysis struct { Classification *int `json:"classification,omitempty"` OutlierDetection *int `json:"outlier_detection,omitempty"` @@ -112,5 +112,3 @@ func NewMlDataFrameAnalyticsJobsAnalysis() *MlDataFrameAnalyticsJobsAnalysis { return r } - -// false diff --git a/typedapi/types/mldataframeanalyticsjobscount.go b/typedapi/types/mldataframeanalyticsjobscount.go index 47eea08c0d..d407216516 100644 --- a/typedapi/types/mldataframeanalyticsjobscount.go +++ b/typedapi/types/mldataframeanalyticsjobscount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L204-L206 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L204-L206 type MlDataFrameAnalyticsJobsCount struct { Count int64 `json:"count"` } @@ -77,5 +77,3 @@ func NewMlDataFrameAnalyticsJobsCount() *MlDataFrameAnalyticsJobsCount { return r } - -// false diff --git a/typedapi/types/mldataframeanalyticsjobsmemory.go b/typedapi/types/mldataframeanalyticsjobsmemory.go index 6428e4335c..9ce5261e99 100644 --- a/typedapi/types/mldataframeanalyticsjobsmemory.go +++ b/typedapi/types/mldataframeanalyticsjobsmemory.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MlDataFrameAnalyticsJobsMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L200-L202 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L200-L202 type MlDataFrameAnalyticsJobsMemory struct { PeakUsageBytes JobStatistics `json:"peak_usage_bytes"` } @@ -33,5 +33,3 @@ func NewMlDataFrameAnalyticsJobsMemory() *MlDataFrameAnalyticsJobsMemory { return r } - -// false diff --git a/typedapi/types/mlfilter.go b/typedapi/types/mlfilter.go index e5f6047dbf..a7362cf5cc 100644 --- a/typedapi/types/mlfilter.go +++ b/typedapi/types/mlfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MLFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Filter.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Filter.ts#L22-L29 type MLFilter struct { // Description A description of the filter. Description *string `json:"description,omitempty"` @@ -89,5 +89,3 @@ func NewMLFilter() *MLFilter { return r } - -// false diff --git a/typedapi/types/mlinference.go b/typedapi/types/mlinference.go index 618ea3bfdf..3dad4a6536 100644 --- a/typedapi/types/mlinference.go +++ b/typedapi/types/mlinference.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MlInference type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L208-L216 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L208-L216 type MlInference struct { Deployments *MlInferenceDeployments `json:"deployments,omitempty"` IngestProcessors map[string]MlInferenceIngestProcessor `json:"ingest_processors"` @@ -37,5 +37,3 @@ func NewMlInference() *MlInference { return r } - -// false diff --git a/typedapi/types/mlinferencedeployments.go b/typedapi/types/mlinferencedeployments.go index 2e5d63207c..1fe5fde4a8 100644 --- a/typedapi/types/mlinferencedeployments.go +++ b/typedapi/types/mlinferencedeployments.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeployments type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L237-L242 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L237-L242 type MlInferenceDeployments struct { Count int `json:"count"` InferenceCounts JobStatistics `json:"inference_counts"` @@ -96,5 +96,3 @@ func NewMlInferenceDeployments() *MlInferenceDeployments { return r } - -// false diff --git a/typedapi/types/mlinferencedeploymentstimems.go b/typedapi/types/mlinferencedeploymentstimems.go index 6baeb0cb78..fa314f11f4 100644 --- a/typedapi/types/mlinferencedeploymentstimems.go +++ b/typedapi/types/mlinferencedeploymentstimems.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeploymentsTimeMs type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L244-L246 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L244-L246 type MlInferenceDeploymentsTimeMs struct { Avg Float64 `json:"avg"` } @@ -78,5 +78,3 @@ func NewMlInferenceDeploymentsTimeMs() *MlInferenceDeploymentsTimeMs { return r } - -// false diff --git a/typedapi/types/mlinferenceingestprocessor.go b/typedapi/types/mlinferenceingestprocessor.go index 7056060a30..528c0943d1 100644 --- a/typedapi/types/mlinferenceingestprocessor.go +++ b/typedapi/types/mlinferenceingestprocessor.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MlInferenceIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L218-L223 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L218-L223 type MlInferenceIngestProcessor struct { NumDocsProcessed MlInferenceIngestProcessorCount `json:"num_docs_processed"` NumFailures MlInferenceIngestProcessorCount `json:"num_failures"` @@ -36,5 +36,3 @@ func NewMlInferenceIngestProcessor() *MlInferenceIngestProcessor { return r } - -// false diff --git a/typedapi/types/mlinferenceingestprocessorcount.go b/typedapi/types/mlinferenceingestprocessorcount.go index 9e3d3417ff..e4fa4968a0 100644 --- a/typedapi/types/mlinferenceingestprocessorcount.go +++ b/typedapi/types/mlinferenceingestprocessorcount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlInferenceIngestProcessorCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L248-L252 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L248-L252 type MlInferenceIngestProcessorCount struct { Max int64 `json:"max"` Min int64 `json:"min"` @@ -109,5 +109,3 @@ func NewMlInferenceIngestProcessorCount() *MlInferenceIngestProcessorCount { return r } - -// false diff --git a/typedapi/types/mlinferencetrainedmodels.go b/typedapi/types/mlinferencetrainedmodels.go index 125d59d1bb..cd3b1e9db8 100644 --- a/typedapi/types/mlinferencetrainedmodels.go +++ b/typedapi/types/mlinferencetrainedmodels.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // MlInferenceTrainedModels type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L225-L235 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L225-L235 type MlInferenceTrainedModels struct { All_ MlCounter `json:"_all"` Count *MlInferenceTrainedModelsCount `json:"count,omitempty"` @@ -37,5 +37,3 @@ func NewMlInferenceTrainedModels() *MlInferenceTrainedModels { return r } - -// false diff --git a/typedapi/types/mlinferencetrainedmodelscount.go b/typedapi/types/mlinferencetrainedmodelscount.go index b430267fb8..a52db0cf96 100644 --- a/typedapi/types/mlinferencetrainedmodelscount.go +++ b/typedapi/types/mlinferencetrainedmodelscount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlInferenceTrainedModelsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L254-L263 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L254-L263 type MlInferenceTrainedModelsCount struct { Classification *int64 `json:"classification,omitempty"` Ner *int64 `json:"ner,omitempty"` @@ -189,5 +189,3 @@ func NewMlInferenceTrainedModelsCount() *MlInferenceTrainedModelsCount { return r } - -// false diff --git a/typedapi/types/mljobforecasts.go b/typedapi/types/mljobforecasts.go index f8d2b10334..a6347feb18 100644 --- a/typedapi/types/mljobforecasts.go +++ b/typedapi/types/mljobforecasts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MlJobForecasts type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L182-L185 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L182-L185 type MlJobForecasts struct { ForecastedJobs int64 `json:"forecasted_jobs"` Total int64 `json:"total"` @@ -93,5 +93,3 @@ func NewMlJobForecasts() *MlJobForecasts { return r } - -// false diff --git a/typedapi/types/modelpackageconfig.go b/typedapi/types/modelpackageconfig.go index a164ae2654..9f46b43fd8 100644 --- a/typedapi/types/modelpackageconfig.go +++ b/typedapi/types/modelpackageconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ModelPackageConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L257-L272 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L257-L272 type ModelPackageConfig struct { CreateTime *int64 `json:"create_time,omitempty"` Description *string `json:"description,omitempty"` @@ -199,5 +199,3 @@ func NewModelPackageConfig() *ModelPackageConfig { return r } - -// false diff --git a/typedapi/types/modelplotconfig.go b/typedapi/types/modelplotconfig.go index 081e14474d..46162127a4 100644 --- a/typedapi/types/modelplotconfig.go +++ b/typedapi/types/modelplotconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ModelPlotConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/ModelPlot.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/ModelPlot.ts#L23-L42 type ModelPlotConfig struct { // AnnotationsEnabled If true, enables calculation and storage of the model change annotations for // each entity that is being analyzed. @@ -105,13 +105,3 @@ func NewModelPlotConfig() *ModelPlotConfig { return r } - -// true - -type ModelPlotConfigVariant interface { - ModelPlotConfigCaster() *ModelPlotConfig -} - -func (s *ModelPlotConfig) ModelPlotConfigCaster() *ModelPlotConfig { - return s -} diff --git a/typedapi/types/modelsizestats.go b/typedapi/types/modelsizestats.go index 6c9ef64786..d830b7b76e 100644 --- a/typedapi/types/modelsizestats.go +++ b/typedapi/types/modelsizestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // ModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Model.ts#L59-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Model.ts#L59-L82 type ModelSizeStats struct { AssignmentMemoryBasis *string `json:"assignment_memory_basis,omitempty"` BucketAllocationFailuresCount int64 `json:"bucket_allocation_failures_count"` @@ -326,5 +326,3 @@ func NewModelSizeStats() *ModelSizeStats { return r } - -// false diff --git a/typedapi/types/modelsnapshot.go b/typedapi/types/modelsnapshot.go index 7c3af36e52..70ba825862 100644 --- a/typedapi/types/modelsnapshot.go +++ b/typedapi/types/modelsnapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ModelSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Model.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Model.ts#L25-L46 type ModelSnapshot struct { // Description An optional description of the job. Description *string `json:"description,omitempty"` @@ -192,5 +192,3 @@ func NewModelSnapshot() *ModelSnapshot { return r } - -// false diff --git a/typedapi/types/modelsnapshotupgrade.go b/typedapi/types/modelsnapshotupgrade.go index 7291f3aa28..63fcf62209 100644 --- a/typedapi/types/modelsnapshotupgrade.go +++ b/typedapi/types/modelsnapshotupgrade.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ModelSnapshotUpgrade type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Model.ts#L48-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Model.ts#L48-L57 type ModelSnapshotUpgrade struct { AssignmentExplanation string `json:"assignment_explanation"` JobId string `json:"job_id"` @@ -100,5 +100,3 @@ func NewModelSnapshotUpgrade() *ModelSnapshotUpgrade { return r } - -// false diff --git a/typedapi/types/monitoring.go b/typedapi/types/monitoring.go index 811662f8a8..e8c08ce73e 100644 --- a/typedapi/types/monitoring.go +++ b/typedapi/types/monitoring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Monitoring type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L391-L394 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L391-L394 type Monitoring struct { Available bool `json:"available"` CollectionEnabled bool `json:"collection_enabled"` @@ -117,5 +117,3 @@ func NewMonitoring() *Monitoring { return r } - -// false diff --git a/typedapi/types/morelikethisquery.go b/typedapi/types/morelikethisquery.go index e59aa90ac7..1a13fa744a 100644 --- a/typedapi/types/morelikethisquery.go +++ b/typedapi/types/morelikethisquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MoreLikeThisQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L87-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L87-L172 type MoreLikeThisQuery struct { // Analyzer The analyzer that is used to analyze the free form text. // Defaults to the analyzer associated with the first field in fields. @@ -84,7 +84,7 @@ type MoreLikeThisQuery struct { Routing *string `json:"routing,omitempty"` // StopWords An array of stop words. // Any word in this set is ignored. - StopWords []string `json:"stop_words,omitempty"` + StopWords StopWords `json:"stop_words,omitempty"` // Unlike Used in combination with `like` to exclude documents that match a set of // terms. Unlike []Like `json:"unlike,omitempty"` @@ -319,19 +319,8 @@ func (s *MoreLikeThisQuery) UnmarshalJSON(data []byte) error { } case "stop_words": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "StopWords", err) - } - - s.StopWords = append(s.StopWords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.StopWords); err != nil { - return fmt.Errorf("%s | %w", "StopWords", err) - } + if err := dec.Decode(&s.StopWords); err != nil { + return fmt.Errorf("%s | %w", "StopWords", err) } case "unlike": @@ -371,13 +360,3 @@ func NewMoreLikeThisQuery() *MoreLikeThisQuery { return r } - -// true - -type MoreLikeThisQueryVariant interface { - MoreLikeThisQueryCaster() *MoreLikeThisQuery -} - -func (s *MoreLikeThisQuery) MoreLikeThisQueryCaster() *MoreLikeThisQuery { - return s -} diff --git a/typedapi/types/mountedsnapshot.go b/typedapi/types/mountedsnapshot.go index c17257d854..4950fdea5c 100644 --- a/typedapi/types/mountedsnapshot.go +++ b/typedapi/types/mountedsnapshot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MountedSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/mount/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/mount/types.ts#L23-L27 type MountedSnapshot struct { Indices []string `json:"indices"` Shards ShardStatistics `json:"shards"` @@ -89,5 +89,3 @@ func NewMountedSnapshot() *MountedSnapshot { return r } - -// false diff --git a/typedapi/types/movingaverageaggregation.go b/typedapi/types/movingaverageaggregation.go index 6f6c320e5e..2d69697936 100644 --- a/typedapi/types/movingaverageaggregation.go +++ b/typedapi/types/movingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,9 +28,5 @@ package types // HoltMovingAverageAggregation // HoltWintersMovingAverageAggregation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L254-L260 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L254-L260 type MovingAverageAggregation any - -type MovingAverageAggregationVariant interface { - MovingAverageAggregationCaster() *MovingAverageAggregation -} diff --git a/typedapi/types/movingfunctionaggregation.go b/typedapi/types/movingfunctionaggregation.go index 56a0c93389..1dfaf3bb4f 100644 --- a/typedapi/types/movingfunctionaggregation.go +++ b/typedapi/types/movingfunctionaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MovingFunctionAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L314-L332 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L314-L332 type MovingFunctionAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -146,13 +146,3 @@ func NewMovingFunctionAggregation() *MovingFunctionAggregation { return r } - -// true - -type MovingFunctionAggregationVariant interface { - MovingFunctionAggregationCaster() *MovingFunctionAggregation -} - -func (s *MovingFunctionAggregation) MovingFunctionAggregationCaster() *MovingFunctionAggregation { - return s -} diff --git a/typedapi/types/movingpercentilesaggregation.go b/typedapi/types/movingpercentilesaggregation.go index 38c754ba8e..f99e50a3d6 100644 --- a/typedapi/types/movingpercentilesaggregation.go +++ b/typedapi/types/movingpercentilesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MovingPercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L334-L349 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L334-L349 type MovingPercentilesAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -147,13 +147,3 @@ func NewMovingPercentilesAggregation() *MovingPercentilesAggregation { return r } - -// true - -type MovingPercentilesAggregationVariant interface { - MovingPercentilesAggregationCaster() *MovingPercentilesAggregation -} - -func (s *MovingPercentilesAggregation) MovingPercentilesAggregationCaster() *MovingPercentilesAggregation { - return s -} diff --git a/typedapi/types/msearchrequestitem.go b/typedapi/types/msearchrequestitem.go index a795cab167..56b79a8fbd 100644 --- a/typedapi/types/msearchrequestitem.go +++ b/typedapi/types/msearchrequestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // MultisearchHeader // MultisearchBody // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/types.ts#L47-L50 type MsearchRequestItem any - -type MsearchRequestItemVariant interface { - MsearchRequestItemCaster() *MsearchRequestItem -} diff --git a/typedapi/types/msearchresponseitem.go b/typedapi/types/msearchresponseitem.go index 7bbc9afb92..43be702480 100644 --- a/typedapi/types/msearchresponseitem.go +++ b/typedapi/types/msearchresponseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // MultiSearchItem // ErrorResponseBase // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/types.ts#L211-L214 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/types.ts#L211-L214 type MsearchResponseItem any diff --git a/typedapi/types/mtermvectorsoperation.go b/typedapi/types/mtermvectorsoperation.go index ef49e1218a..2a83c9be1a 100644 --- a/typedapi/types/mtermvectorsoperation.go +++ b/typedapi/types/mtermvectorsoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // MTermVectorsOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mtermvectors/types.ts#L35-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mtermvectors/types.ts#L35-L94 type MTermVectorsOperation struct { // Doc An artificial document (a document not present in the index) for which you // want to retrieve term vectors. @@ -215,13 +215,3 @@ func NewMTermVectorsOperation() *MTermVectorsOperation { return r } - -// true - -type MTermVectorsOperationVariant interface { - MTermVectorsOperationCaster() *MTermVectorsOperation -} - -func (s *MTermVectorsOperation) MTermVectorsOperationCaster() *MTermVectorsOperation { - return s -} diff --git a/typedapi/types/multigeterror.go b/typedapi/types/multigeterror.go index dace3104dc..7289c8c4fd 100644 --- a/typedapi/types/multigeterror.go +++ b/typedapi/types/multigeterror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MultiGetError type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mget/types.ts#L62-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mget/types.ts#L62-L66 type MultiGetError struct { Error ErrorCause `json:"error"` Id_ string `json:"_id"` @@ -78,5 +78,3 @@ func NewMultiGetError() *MultiGetError { return r } - -// false diff --git a/typedapi/types/multimatchquery.go b/typedapi/types/multimatchquery.go index 2a50b64300..2345a4d81f 100644 --- a/typedapi/types/multimatchquery.go +++ b/typedapi/types/multimatchquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // MultiMatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L471-L557 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L522-L608 type MultiMatchQuery struct { // Analyzer Analyzer used to convert the text in the query value into tokens. Analyzer *string `json:"analyzer,omitempty"` @@ -334,13 +334,3 @@ func NewMultiMatchQuery() *MultiMatchQuery { return r } - -// true - -type MultiMatchQueryVariant interface { - MultiMatchQueryCaster() *MultiMatchQuery -} - -func (s *MultiMatchQuery) MultiMatchQueryCaster() *MultiMatchQuery { - return s -} diff --git a/typedapi/types/multiplexertokenfilter.go b/typedapi/types/multiplexertokenfilter.go index f59e8bfc20..bff7be213f 100644 --- a/typedapi/types/multiplexertokenfilter.go +++ b/typedapi/types/multiplexertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,9 +30,12 @@ import ( // MultiplexerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L261-L265 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L356-L362 type MultiplexerTokenFilter struct { - Filters []string `json:"filters"` + // Filters A list of token filters to apply to incoming tokens. + Filters []string `json:"filters"` + // PreserveOriginal If `true` (the default) then emit the original token in addition to the + // filtered tokens. PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -99,13 +102,3 @@ func NewMultiplexerTokenFilter() *MultiplexerTokenFilter { return r } - -// true - -type MultiplexerTokenFilterVariant interface { - MultiplexerTokenFilterCaster() *MultiplexerTokenFilter -} - -func (s *MultiplexerTokenFilter) MultiplexerTokenFilterCaster() *MultiplexerTokenFilter { - return s -} diff --git a/typedapi/types/multisearchbody.go b/typedapi/types/multisearchbody.go index 04c5c0774a..8bf3f19017 100644 --- a/typedapi/types/multisearchbody.go +++ b/typedapi/types/multisearchbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MultisearchBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/types.ts#L70-L204 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/types.ts#L70-L204 type MultisearchBody struct { Aggregations map[string]Aggregations `json:"aggregations,omitempty"` Collapse *FieldCollapse `json:"collapse,omitempty"` @@ -367,7 +367,7 @@ func (s *MultisearchBody) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { @@ -486,13 +486,3 @@ func NewMultisearchBody() *MultisearchBody { return r } - -// true - -type MultisearchBodyVariant interface { - MultisearchBodyCaster() *MultisearchBody -} - -func (s *MultisearchBody) MultisearchBodyCaster() *MultisearchBody { - return s -} diff --git a/typedapi/types/multisearchheader.go b/typedapi/types/multisearchheader.go index 59cb133a71..91a10f6ef7 100644 --- a/typedapi/types/multisearchheader.go +++ b/typedapi/types/multisearchheader.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // MultisearchHeader type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/types.ts#L52-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/types.ts#L52-L67 type MultisearchHeader struct { AllowNoIndices *bool `json:"allow_no_indices,omitempty"` AllowPartialSearchResults *bool `json:"allow_partial_search_results,omitempty"` @@ -213,13 +213,3 @@ func NewMultisearchHeader() *MultisearchHeader { return r } - -// true - -type MultisearchHeaderVariant interface { - MultisearchHeaderCaster() *MultisearchHeader -} - -func (s *MultisearchHeader) MultisearchHeaderCaster() *MultisearchHeader { - return s -} diff --git a/typedapi/types/multisearchitem.go b/typedapi/types/multisearchitem.go index 91e3851888..827d165293 100644 --- a/typedapi/types/multisearchitem.go +++ b/typedapi/types/multisearchitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // MultiSearchItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch/types.ts#L216-L219 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch/types.ts#L216-L219 type MultiSearchItem struct { Aggregations map[string]Aggregate `json:"aggregations,omitempty"` Clusters_ *ClusterStatistics `json:"_clusters,omitempty"` @@ -828,5 +828,3 @@ func NewMultiSearchItem() *MultiSearchItem { return r } - -// false diff --git a/typedapi/types/multitermlookup.go b/typedapi/types/multitermlookup.go index 7d10ca9ec8..3b1f013c30 100644 --- a/typedapi/types/multitermlookup.go +++ b/typedapi/types/multitermlookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // MultiTermLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L643-L653 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L643-L653 type MultiTermLookup struct { // Field A fields from which to retrieve terms. Field string `json:"field"` @@ -75,13 +75,3 @@ func NewMultiTermLookup() *MultiTermLookup { return r } - -// true - -type MultiTermLookupVariant interface { - MultiTermLookupCaster() *MultiTermLookup -} - -func (s *MultiTermLookup) MultiTermLookupCaster() *MultiTermLookup { - return s -} diff --git a/typedapi/types/multitermsaggregate.go b/typedapi/types/multitermsaggregate.go index 8c2d2e013a..b838dbe270 100644 --- a/typedapi/types/multitermsaggregate.go +++ b/typedapi/types/multitermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MultiTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L501-L506 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L501-L506 type MultiTermsAggregate struct { Buckets BucketsMultiTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` @@ -121,5 +121,3 @@ func NewMultiTermsAggregate() *MultiTermsAggregate { return r } - -// false diff --git a/typedapi/types/multitermsaggregation.go b/typedapi/types/multitermsaggregation.go index 287b2ea9e2..ab27237906 100644 --- a/typedapi/types/multitermsaggregation.go +++ b/typedapi/types/multitermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // MultiTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L601-L641 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L601-L641 type MultiTermsAggregation struct { // CollectMode Specifies the strategy for data collection. CollectMode *termsaggregationcollectmode.TermsAggregationCollectMode `json:"collect_mode,omitempty"` @@ -191,13 +191,3 @@ func NewMultiTermsAggregation() *MultiTermsAggregation { return r } - -// true - -type MultiTermsAggregationVariant interface { - MultiTermsAggregationCaster() *MultiTermsAggregation -} - -func (s *MultiTermsAggregation) MultiTermsAggregationCaster() *MultiTermsAggregation { - return s -} diff --git a/typedapi/types/multitermsbucket.go b/typedapi/types/multitermsbucket.go index 485258633d..6ddd7ca977 100644 --- a/typedapi/types/multitermsbucket.go +++ b/typedapi/types/multitermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // MultiTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L508-L512 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L508-L512 type MultiTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -665,5 +665,3 @@ func NewMultiTermsBucket() *MultiTermsBucket { return r } - -// false diff --git a/typedapi/types/murmur3hashproperty.go b/typedapi/types/murmur3hashproperty.go index 4c2f9bb641..9c41cd7310 100644 --- a/typedapi/types/murmur3hashproperty.go +++ b/typedapi/types/murmur3hashproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // Murmur3HashProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L90-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L90-L92 type Murmur3HashProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -241,6 +241,12 @@ func (s *Murmur3HashProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -596,6 +602,12 @@ func (s *Murmur3HashProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -845,13 +857,3 @@ func NewMurmur3HashProperty() *Murmur3HashProperty { return r } - -// true - -type Murmur3HashPropertyVariant interface { - Murmur3HashPropertyCaster() *Murmur3HashProperty -} - -func (s *Murmur3HashProperty) Murmur3HashPropertyCaster() *Murmur3HashProperty { - return s -} diff --git a/typedapi/types/mutualinformationheuristic.go b/typedapi/types/mutualinformationheuristic.go index 22d05de346..c129cecdee 100644 --- a/typedapi/types/mutualinformationheuristic.go +++ b/typedapi/types/mutualinformationheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // MutualInformationHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L800-L809 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L800-L809 type MutualInformationHeuristic struct { // BackgroundIsSuperset Set to `false` if you defined a custom background filter that represents a // different set of documents that you want to compare to. @@ -95,13 +95,3 @@ func NewMutualInformationHeuristic() *MutualInformationHeuristic { return r } - -// true - -type MutualInformationHeuristicVariant interface { - MutualInformationHeuristicCaster() *MutualInformationHeuristic -} - -func (s *MutualInformationHeuristic) MutualInformationHeuristicCaster() *MutualInformationHeuristic { - return s -} diff --git a/typedapi/types/names.go b/typedapi/types/names.go index 2a3e9a1dc2..4290a3ea3f 100644 --- a/typedapi/types/names.go +++ b/typedapi/types/names.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Names type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L81-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L81-L81 type Names []string - -type NamesVariant interface { - NamesCaster() *Names -} diff --git a/typedapi/types/nativecode.go b/typedapi/types/nativecode.go index a44c7d9f5d..a5daf5c0f2 100644 --- a/typedapi/types/nativecode.go +++ b/typedapi/types/nativecode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NativeCode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/info/types.ts#L29-L32 type NativeCode struct { BuildHash string `json:"build_hash"` Version string `json:"version"` @@ -80,5 +80,3 @@ func NewNativeCode() *NativeCode { return r } - -// false diff --git a/typedapi/types/nativecodeinformation.go b/typedapi/types/nativecodeinformation.go index 1ffc2819fd..f53a8afc2b 100644 --- a/typedapi/types/nativecodeinformation.go +++ b/typedapi/types/nativecodeinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NativeCodeInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/types.ts#L29-L32 type NativeCodeInformation struct { BuildHash string `json:"build_hash"` Version string `json:"version"` @@ -80,5 +80,3 @@ func NewNativeCodeInformation() *NativeCodeInformation { return r } - -// false diff --git a/typedapi/types/nerinferenceoptions.go b/typedapi/types/nerinferenceoptions.go index 64b05837e4..cfd4f63cb7 100644 --- a/typedapi/types/nerinferenceoptions.go +++ b/typedapi/types/nerinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NerInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L273-L282 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L273-L282 type NerInferenceOptions struct { // ClassificationLabels The token classification labels. Must be IOB formatted tags ClassificationLabels []string `json:"classification_labels,omitempty"` @@ -96,13 +96,3 @@ func NewNerInferenceOptions() *NerInferenceOptions { return r } - -// true - -type NerInferenceOptionsVariant interface { - NerInferenceOptionsCaster() *NerInferenceOptions -} - -func (s *NerInferenceOptions) NerInferenceOptionsCaster() *NerInferenceOptions { - return s -} diff --git a/typedapi/types/nerinferenceupdateoptions.go b/typedapi/types/nerinferenceupdateoptions.go index 5271b9bb1e..708af9024a 100644 --- a/typedapi/types/nerinferenceupdateoptions.go +++ b/typedapi/types/nerinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NerInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L423-L428 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L423-L428 type NerInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. @@ -83,13 +83,3 @@ func NewNerInferenceUpdateOptions() *NerInferenceUpdateOptions { return r } - -// true - -type NerInferenceUpdateOptionsVariant interface { - NerInferenceUpdateOptionsCaster() *NerInferenceUpdateOptions -} - -func (s *NerInferenceUpdateOptions) NerInferenceUpdateOptionsCaster() *NerInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/nestedaggregate.go b/typedapi/types/nestedaggregate.go index 31a3d51dcd..e2210998fb 100644 --- a/typedapi/types/nestedaggregate.go +++ b/typedapi/types/nestedaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // NestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L534-L538 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L534-L538 type NestedAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewNestedAggregate() *NestedAggregate { return r } - -// false diff --git a/typedapi/types/nestedaggregation.go b/typedapi/types/nestedaggregation.go index bd2baac1af..3cfecaef2c 100644 --- a/typedapi/types/nestedaggregation.go +++ b/typedapi/types/nestedaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L655-L660 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L655-L660 type NestedAggregation struct { // Path The path to the field of type `nested`. Path *string `json:"path,omitempty"` @@ -67,13 +67,3 @@ func NewNestedAggregation() *NestedAggregation { return r } - -// true - -type NestedAggregationVariant interface { - NestedAggregationCaster() *NestedAggregation -} - -func (s *NestedAggregation) NestedAggregationCaster() *NestedAggregation { - return s -} diff --git a/typedapi/types/nestedidentity.go b/typedapi/types/nestedidentity.go index 5f1e97881f..c505cc4fb0 100644 --- a/typedapi/types/nestedidentity.go +++ b/typedapi/types/nestedidentity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NestedIdentity type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L90-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L90-L94 type NestedIdentity struct { Field string `json:"field"` Nested_ *NestedIdentity `json:"_nested,omitempty"` @@ -90,5 +90,3 @@ func NewNestedIdentity() *NestedIdentity { return r } - -// false diff --git a/typedapi/types/nestedproperty.go b/typedapi/types/nestedproperty.go index 83df952314..1a6be7b417 100644 --- a/typedapi/types/nestedproperty.go +++ b/typedapi/types/nestedproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // NestedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/complex.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/complex.ts#L40-L45 type NestedProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` @@ -243,6 +243,12 @@ func (s *NestedProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -626,6 +632,12 @@ func (s *NestedProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -877,13 +889,3 @@ func NewNestedProperty() *NestedProperty { return r } - -// true - -type NestedPropertyVariant interface { - NestedPropertyCaster() *NestedProperty -} - -func (s *NestedProperty) NestedPropertyCaster() *NestedProperty { - return s -} diff --git a/typedapi/types/nestedquery.go b/typedapi/types/nestedquery.go index 3591f4ea47..dc5dc11d26 100644 --- a/typedapi/types/nestedquery.go +++ b/typedapi/types/nestedquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NestedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/joining.ts#L112-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/joining.ts#L112-L139 type NestedQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -144,13 +144,3 @@ func NewNestedQuery() *NestedQuery { return r } - -// true - -type NestedQueryVariant interface { - NestedQueryCaster() *NestedQuery -} - -func (s *NestedQuery) NestedQueryCaster() *NestedQuery { - return s -} diff --git a/typedapi/types/nestedsortvalue.go b/typedapi/types/nestedsortvalue.go index da754ea5b6..9f167bf4fe 100644 --- a/typedapi/types/nestedsortvalue.go +++ b/typedapi/types/nestedsortvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NestedSortValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L29-L34 type NestedSortValue struct { Filter *Query `json:"filter,omitempty"` MaxChildren *int `json:"max_children,omitempty"` @@ -96,13 +96,3 @@ func NewNestedSortValue() *NestedSortValue { return r } - -// true - -type NestedSortValueVariant interface { - NestedSortValueCaster() *NestedSortValue -} - -func (s *NestedSortValue) NestedSortValueCaster() *NestedSortValue { - return s -} diff --git a/typedapi/types/networkdirectionprocessor.go b/typedapi/types/networkdirectionprocessor.go index 3d15e95d1a..51dad84c27 100644 --- a/typedapi/types/networkdirectionprocessor.go +++ b/typedapi/types/networkdirectionprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NetworkDirectionProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1248-L1282 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1248-L1282 type NetworkDirectionProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -184,13 +184,3 @@ func NewNetworkDirectionProcessor() *NetworkDirectionProcessor { return r } - -// true - -type NetworkDirectionProcessorVariant interface { - NetworkDirectionProcessorCaster() *NetworkDirectionProcessor -} - -func (s *NetworkDirectionProcessor) NetworkDirectionProcessorCaster() *NetworkDirectionProcessor { - return s -} diff --git a/typedapi/types/nevercondition.go b/typedapi/types/nevercondition.go index 9f81448f03..f20252dc82 100644 --- a/typedapi/types/nevercondition.go +++ b/typedapi/types/nevercondition.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NeverCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L72-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L72-L72 type NeverCondition struct { } @@ -32,13 +32,3 @@ func NewNeverCondition() *NeverCondition { return r } - -// true - -type NeverConditionVariant interface { - NeverConditionCaster() *NeverCondition -} - -func (s *NeverCondition) NeverConditionCaster() *NeverCondition { - return s -} diff --git a/typedapi/types/ngramtokenfilter.go b/typedapi/types/ngramtokenfilter.go index ac24f4b65d..182ccc664d 100644 --- a/typedapi/types/ngramtokenfilter.go +++ b/typedapi/types/ngramtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,10 +31,13 @@ import ( // NGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L267-L272 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L364-L372 type NGramTokenFilter struct { - MaxGram *int `json:"max_gram,omitempty"` - MinGram *int `json:"min_gram,omitempty"` + // MaxGram Maximum length of characters in a gram. Defaults to `2`. + MaxGram *int `json:"max_gram,omitempty"` + // MinGram Minimum length of characters in a gram. Defaults to `1`. + MinGram *int `json:"min_gram,omitempty"` + // PreserveOriginal Emits original token when set to `true`. Defaults to `false`. PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -129,13 +132,3 @@ func NewNGramTokenFilter() *NGramTokenFilter { return r } - -// true - -type NGramTokenFilterVariant interface { - NGramTokenFilterCaster() *NGramTokenFilter -} - -func (s *NGramTokenFilter) NGramTokenFilterCaster() *NGramTokenFilter { - return s -} diff --git a/typedapi/types/ngramtokenizer.go b/typedapi/types/ngramtokenizer.go index cf57744699..8e43af0cb1 100644 --- a/typedapi/types/ngramtokenizer.go +++ b/typedapi/types/ngramtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L84-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L85-L95 type NGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` MaxGram *int `json:"max_gram,omitempty"` @@ -145,13 +145,3 @@ func NewNGramTokenizer() *NGramTokenizer { return r } - -// true - -type NGramTokenizerVariant interface { - NGramTokenizerCaster() *NGramTokenizer -} - -func (s *NGramTokenizer) NGramTokenizerCaster() *NGramTokenizer { - return s -} diff --git a/typedapi/types/nlpberttokenizationconfig.go b/typedapi/types/nlpberttokenizationconfig.go index 40e5f203fd..9b87de3db7 100644 --- a/typedapi/types/nlpberttokenizationconfig.go +++ b/typedapi/types/nlpberttokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NlpBertTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L188-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L188-L189 type NlpBertTokenizationConfig struct { // DoLowerCase Should the tokenizer lower case the text DoLowerCase *bool `json:"do_lower_case,omitempty"` @@ -140,13 +140,3 @@ func NewNlpBertTokenizationConfig() *NlpBertTokenizationConfig { return r } - -// true - -type NlpBertTokenizationConfigVariant interface { - NlpBertTokenizationConfigCaster() *NlpBertTokenizationConfig -} - -func (s *NlpBertTokenizationConfig) NlpBertTokenizationConfigCaster() *NlpBertTokenizationConfig { - return s -} diff --git a/typedapi/types/nlprobertatokenizationconfig.go b/typedapi/types/nlprobertatokenizationconfig.go index f86ab876a2..dcaa9bd764 100644 --- a/typedapi/types/nlprobertatokenizationconfig.go +++ b/typedapi/types/nlprobertatokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NlpRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L191-L198 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L191-L198 type NlpRobertaTokenizationConfig struct { // AddPrefixSpace Should the tokenizer prefix input with a space character AddPrefixSpace *bool `json:"add_prefix_space,omitempty"` @@ -156,13 +156,3 @@ func NewNlpRobertaTokenizationConfig() *NlpRobertaTokenizationConfig { return r } - -// true - -type NlpRobertaTokenizationConfigVariant interface { - NlpRobertaTokenizationConfigCaster() *NlpRobertaTokenizationConfig -} - -func (s *NlpRobertaTokenizationConfig) NlpRobertaTokenizationConfigCaster() *NlpRobertaTokenizationConfig { - return s -} diff --git a/typedapi/types/nlptokenizationupdateoptions.go b/typedapi/types/nlptokenizationupdateoptions.go index 24537f7c54..27c495dbfa 100644 --- a/typedapi/types/nlptokenizationupdateoptions.go +++ b/typedapi/types/nlptokenizationupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NlpTokenizationUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L375-L380 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L375-L380 type NlpTokenizationUpdateOptions struct { // Span Span options to apply Span *int `json:"span,omitempty"` @@ -88,13 +88,3 @@ func NewNlpTokenizationUpdateOptions() *NlpTokenizationUpdateOptions { return r } - -// true - -type NlpTokenizationUpdateOptionsVariant interface { - NlpTokenizationUpdateOptionsCaster() *NlpTokenizationUpdateOptions -} - -func (s *NlpTokenizationUpdateOptions) NlpTokenizationUpdateOptionsCaster() *NlpTokenizationUpdateOptions { - return s -} diff --git a/typedapi/types/node.go b/typedapi/types/node.go index 8a0fe931fd..41c8cf8a69 100644 --- a/typedapi/types/node.go +++ b/typedapi/types/node.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Node type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 type Node struct { SharedCache Shared `json:"shared_cache"` } @@ -33,5 +33,3 @@ func NewNode() *Node { return r } - -// false diff --git a/typedapi/types/nodeallocationexplanation.go b/typedapi/types/nodeallocationexplanation.go index 84913e84b6..88230af37d 100644 --- a/typedapi/types/nodeallocationexplanation.go +++ b/typedapi/types/nodeallocationexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // NodeAllocationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L103-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L103-L117 type NodeAllocationExplanation struct { Deciders []AllocationDecision `json:"deciders"` NodeAttributes map[string]string `json:"node_attributes"` @@ -134,5 +134,3 @@ func NewNodeAllocationExplanation() *NodeAllocationExplanation { return r } - -// false diff --git a/typedapi/types/nodeattributes.go b/typedapi/types/nodeattributes.go index c9016ba853..8d4f5415a9 100644 --- a/typedapi/types/nodeattributes.go +++ b/typedapi/types/nodeattributes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Node.ts#L41-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Node.ts#L41-L52 type NodeAttributes struct { // Attributes Lists node attributes. Attributes map[string]string `json:"attributes"` @@ -100,5 +100,3 @@ func NewNodeAttributes() *NodeAttributes { return r } - -// false diff --git a/typedapi/types/nodeattributesrecord.go b/typedapi/types/nodeattributesrecord.go index 713e1be319..35f3fb7de1 100644 --- a/typedapi/types/nodeattributesrecord.go +++ b/typedapi/types/nodeattributesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeAttributesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/nodeattrs/types.ts#L20-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/nodeattrs/types.ts#L20-L55 type NodeAttributesRecord struct { // Attr The attribute name. Attr *string `json:"attr,omitempty"` @@ -173,5 +173,3 @@ func NewNodeAttributesRecord() *NodeAttributesRecord { return r } - -// false diff --git a/typedapi/types/nodebufferpool.go b/typedapi/types/nodebufferpool.go index 5922bbc74e..3b619a60ef 100644 --- a/typedapi/types/nodebufferpool.go +++ b/typedapi/types/nodebufferpool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeBufferPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L859-L880 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L861-L882 type NodeBufferPool struct { // Count Number of buffer pools. Count *int64 `json:"count,omitempty"` @@ -140,5 +140,3 @@ func NewNodeBufferPool() *NodeBufferPool { return r } - -// false diff --git a/typedapi/types/nodediskusage.go b/typedapi/types/nodediskusage.go index 5b8e3c33a7..f9e42f62e2 100644 --- a/typedapi/types/nodediskusage.go +++ b/typedapi/types/nodediskusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeDiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L57-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L57-L61 type NodeDiskUsage struct { LeastAvailable DiskUsage `json:"least_available"` MostAvailable DiskUsage `json:"most_available"` @@ -78,5 +78,3 @@ func NewNodeDiskUsage() *NodeDiskUsage { return r } - -// false diff --git a/typedapi/types/nodeids.go b/typedapi/types/nodeids.go index 7d07927e19..1d1cf9b8ad 100644 --- a/typedapi/types/nodeids.go +++ b/typedapi/types/nodeids.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L64-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L64-L64 type NodeIds []string diff --git a/typedapi/types/nodeinfo.go b/typedapi/types/nodeinfo.go index 989e163302..7552ed3930 100644 --- a/typedapi/types/nodeinfo.go +++ b/typedapi/types/nodeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,31 +33,33 @@ import ( // NodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L31-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L32-L72 type NodeInfo struct { Aggregations map[string]NodeInfoAggregation `json:"aggregations,omitempty"` Attributes map[string]string `json:"attributes"` BuildFlavor string `json:"build_flavor"` // BuildHash Short hash of the last git commit in this release. - BuildHash string `json:"build_hash"` - BuildType string `json:"build_type"` + BuildHash string `json:"build_hash"` + BuildType string `json:"build_type"` + ComponentVersions map[string]int `json:"component_versions"` // Host The node’s host name. - Host string `json:"host"` - Http *NodeInfoHttp `json:"http,omitempty"` - Ingest *NodeInfoIngest `json:"ingest,omitempty"` + Host string `json:"host"` + Http *NodeInfoHttp `json:"http,omitempty"` + IndexVersion int64 `json:"index_version"` + Ingest *NodeInfoIngest `json:"ingest,omitempty"` // Ip The node’s IP address. Ip string `json:"ip"` Jvm *NodeJvmInfo `json:"jvm,omitempty"` Modules []PluginStats `json:"modules,omitempty"` // Name The node's name - Name string `json:"name"` - Network *NodeInfoNetwork `json:"network,omitempty"` - Os *NodeOperatingSystemInfo `json:"os,omitempty"` - Plugins []PluginStats `json:"plugins,omitempty"` - Process *NodeProcessInfo `json:"process,omitempty"` - Roles []noderole.NodeRole `json:"roles"` - Settings *NodeInfoSettings `json:"settings,omitempty"` - ThreadPool map[string]NodeThreadPoolInfo `json:"thread_pool,omitempty"` + Name string `json:"name"` + Os *NodeOperatingSystemInfo `json:"os,omitempty"` + Plugins []PluginStats `json:"plugins,omitempty"` + Process *NodeProcessInfo `json:"process,omitempty"` + RemoteClusterServer *RemoveClusterServer `json:"remote_cluster_server,omitempty"` + Roles []noderole.NodeRole `json:"roles"` + Settings *NodeInfoSettings `json:"settings,omitempty"` + ThreadPool map[string]NodeThreadPoolInfo `json:"thread_pool,omitempty"` // TotalIndexingBuffer Total heap allowed to be used to hold recently indexed documents before they // must be written to disk. This size is a shared pool across all shards on this // node, and is controlled by Indexing Buffer settings. @@ -67,6 +69,7 @@ type NodeInfo struct { Transport *NodeInfoTransport `json:"transport,omitempty"` // TransportAddress Host and port where transport HTTP connections are accepted. TransportAddress string `json:"transport_address"` + TransportVersion int64 `json:"transport_version"` // Version Elasticsearch version running on this node. Version string `json:"version"` } @@ -138,6 +141,14 @@ func (s *NodeInfo) UnmarshalJSON(data []byte) error { } s.BuildType = o + case "component_versions": + if s.ComponentVersions == nil { + s.ComponentVersions = make(map[string]int, 0) + } + if err := dec.Decode(&s.ComponentVersions); err != nil { + return fmt.Errorf("%s | %w", "ComponentVersions", err) + } + case "host": if err := dec.Decode(&s.Host); err != nil { return fmt.Errorf("%s | %w", "Host", err) @@ -148,6 +159,11 @@ func (s *NodeInfo) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Http", err) } + case "index_version": + if err := dec.Decode(&s.IndexVersion); err != nil { + return fmt.Errorf("%s | %w", "IndexVersion", err) + } + case "ingest": if err := dec.Decode(&s.Ingest); err != nil { return fmt.Errorf("%s | %w", "Ingest", err) @@ -173,11 +189,6 @@ func (s *NodeInfo) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Name", err) } - case "network": - if err := dec.Decode(&s.Network); err != nil { - return fmt.Errorf("%s | %w", "Network", err) - } - case "os": if err := dec.Decode(&s.Os); err != nil { return fmt.Errorf("%s | %w", "Os", err) @@ -193,6 +204,11 @@ func (s *NodeInfo) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Process", err) } + case "remote_cluster_server": + if err := dec.Decode(&s.RemoteClusterServer); err != nil { + return fmt.Errorf("%s | %w", "RemoteClusterServer", err) + } + case "roles": if err := dec.Decode(&s.Roles); err != nil { return fmt.Errorf("%s | %w", "Roles", err) @@ -241,6 +257,11 @@ func (s *NodeInfo) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "TransportAddress", err) } + case "transport_version": + if err := dec.Decode(&s.TransportVersion); err != nil { + return fmt.Errorf("%s | %w", "TransportVersion", err) + } + case "version": if err := dec.Decode(&s.Version); err != nil { return fmt.Errorf("%s | %w", "Version", err) @@ -254,12 +275,11 @@ func (s *NodeInfo) UnmarshalJSON(data []byte) error { // NewNodeInfo returns a NodeInfo. func NewNodeInfo() *NodeInfo { r := &NodeInfo{ - Aggregations: make(map[string]NodeInfoAggregation), - Attributes: make(map[string]string), - ThreadPool: make(map[string]NodeThreadPoolInfo), + Aggregations: make(map[string]NodeInfoAggregation), + Attributes: make(map[string]string), + ComponentVersions: make(map[string]int), + ThreadPool: make(map[string]NodeThreadPoolInfo), } return r } - -// false diff --git a/typedapi/types/nodeinfoaction.go b/typedapi/types/nodeinfoaction.go index 6869eb3fbb..0b131f0ec2 100644 --- a/typedapi/types/nodeinfoaction.go +++ b/typedapi/types/nodeinfoaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L184-L186 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L194-L196 type NodeInfoAction struct { DestructiveRequiresName string `json:"destructive_requires_name"` } @@ -74,5 +74,3 @@ func NewNodeInfoAction() *NodeInfoAction { return r } - -// false diff --git a/typedapi/types/nodeinfoaggregation.go b/typedapi/types/nodeinfoaggregation.go index 70aa3214d4..f3f52a86fd 100644 --- a/typedapi/types/nodeinfoaggregation.go +++ b/typedapi/types/nodeinfoaggregation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L235-L237 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L250-L252 type NodeInfoAggregation struct { Types []string `json:"types"` } @@ -33,5 +33,3 @@ func NewNodeInfoAggregation() *NodeInfoAggregation { return r } - -// false diff --git a/typedapi/types/nodeinfobootstrap.go b/typedapi/types/nodeinfobootstrap.go index cc19d94a5d..b36d8c4c2d 100644 --- a/typedapi/types/nodeinfobootstrap.go +++ b/typedapi/types/nodeinfobootstrap.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoBootstrap type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L204-L206 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L214-L216 type NodeInfoBootstrap struct { MemoryLock string `json:"memory_lock"` } @@ -74,5 +74,3 @@ func NewNodeInfoBootstrap() *NodeInfoBootstrap { return r } - -// false diff --git a/typedapi/types/nodeinfoclient.go b/typedapi/types/nodeinfoclient.go index 66ea33d7b5..796b4e4c02 100644 --- a/typedapi/types/nodeinfoclient.go +++ b/typedapi/types/nodeinfoclient.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoClient type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L188-L190 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L198-L200 type NodeInfoClient struct { Type string `json:"type"` } @@ -74,5 +74,3 @@ func NewNodeInfoClient() *NodeInfoClient { return r } - -// false diff --git a/typedapi/types/nodeinfodiscover.go b/typedapi/types/nodeinfodiscover.go index 265a994c33..9dfb9a972d 100644 --- a/typedapi/types/nodeinfodiscover.go +++ b/typedapi/types/nodeinfodiscover.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoDiscover type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L173-L182 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L183-L192 type NodeInfoDiscover struct { NodeInfoDiscover map[string]json.RawMessage `json:"-"` SeedHosts []string `json:"seed_hosts,omitempty"` @@ -55,8 +55,19 @@ func (s *NodeInfoDiscover) UnmarshalJSON(data []byte) error { switch t { case "seed_hosts": - if err := dec.Decode(&s.SeedHosts); err != nil { - return fmt.Errorf("%s | %w", "SeedHosts", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "SeedHosts", err) + } + + s.SeedHosts = append(s.SeedHosts, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.SeedHosts); err != nil { + return fmt.Errorf("%s | %w", "SeedHosts", err) + } } case "seed_providers": @@ -131,5 +142,3 @@ func NewNodeInfoDiscover() *NodeInfoDiscover { return r } - -// false diff --git a/typedapi/types/nodeinfohttp.go b/typedapi/types/nodeinfohttp.go index bbffcd4eb6..e800906913 100644 --- a/typedapi/types/nodeinfohttp.go +++ b/typedapi/types/nodeinfohttp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L311-L316 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L326-L331 type NodeInfoHttp struct { BoundAddress []string `json:"bound_address"` MaxContentLength ByteSize `json:"max_content_length,omitempty"` @@ -102,5 +102,3 @@ func NewNodeInfoHttp() *NodeInfoHttp { return r } - -// false diff --git a/typedapi/types/nodeinfoingest.go b/typedapi/types/nodeinfoingest.go index 077d22c74b..6b81c5d7a4 100644 --- a/typedapi/types/nodeinfoingest.go +++ b/typedapi/types/nodeinfoingest.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L227-L229 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L242-L244 type NodeInfoIngest struct { Processors []NodeInfoIngestProcessor `json:"processors"` } @@ -33,5 +33,3 @@ func NewNodeInfoIngest() *NodeInfoIngest { return r } - -// false diff --git a/typedapi/types/nodeinfoingestdownloader.go b/typedapi/types/nodeinfoingestdownloader.go index aa4140ea82..1414a4b27d 100644 --- a/typedapi/types/nodeinfoingestdownloader.go +++ b/typedapi/types/nodeinfoingestdownloader.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestDownloader type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L128-L130 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L138-L140 type NodeInfoIngestDownloader struct { Enabled string `json:"enabled"` } @@ -74,5 +74,3 @@ func NewNodeInfoIngestDownloader() *NodeInfoIngestDownloader { return r } - -// false diff --git a/typedapi/types/nodeinfoingestinfo.go b/typedapi/types/nodeinfoingestinfo.go index 9c0ca40459..55898968d8 100644 --- a/typedapi/types/nodeinfoingestinfo.go +++ b/typedapi/types/nodeinfoingestinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoIngestInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L124-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L134-L136 type NodeInfoIngestInfo struct { Downloader NodeInfoIngestDownloader `json:"downloader"` } @@ -33,5 +33,3 @@ func NewNodeInfoIngestInfo() *NodeInfoIngestInfo { return r } - -// false diff --git a/typedapi/types/nodeinfoingestprocessor.go b/typedapi/types/nodeinfoingestprocessor.go index d91dd68098..ec018d7e0e 100644 --- a/typedapi/types/nodeinfoingestprocessor.go +++ b/typedapi/types/nodeinfoingestprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L231-L233 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L246-L248 type NodeInfoIngestProcessor struct { Type string `json:"type"` } @@ -74,5 +74,3 @@ func NewNodeInfoIngestProcessor() *NodeInfoIngestProcessor { return r } - -// false diff --git a/typedapi/types/nodeinfojvmmemory.go b/typedapi/types/nodeinfojvmmemory.go index 423563078d..a86358fa76 100644 --- a/typedapi/types/nodeinfojvmmemory.go +++ b/typedapi/types/nodeinfojvmmemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L318-L329 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L333-L344 type NodeInfoJvmMemory struct { DirectMax ByteSize `json:"direct_max,omitempty"` DirectMaxInBytes int64 `json:"direct_max_in_bytes"` @@ -171,5 +171,3 @@ func NewNodeInfoJvmMemory() *NodeInfoJvmMemory { return r } - -// false diff --git a/typedapi/types/nodeinfomemory.go b/typedapi/types/nodeinfomemory.go index 72b4e5c837..b7800d1c17 100644 --- a/typedapi/types/nodeinfomemory.go +++ b/typedapi/types/nodeinfomemory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L331-L334 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L346-L349 type NodeInfoMemory struct { Total string `json:"total"` TotalInBytes int64 `json:"total_in_bytes"` @@ -90,5 +90,3 @@ func NewNodeInfoMemory() *NodeInfoMemory { return r } - -// false diff --git a/typedapi/types/nodeinfooscpu.go b/typedapi/types/nodeinfooscpu.go index 38fbe6b601..f14751074e 100644 --- a/typedapi/types/nodeinfooscpu.go +++ b/typedapi/types/nodeinfooscpu.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoOSCPU type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L347-L356 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L351-L360 type NodeInfoOSCPU struct { CacheSize string `json:"cache_size"` CacheSizeInBytes int `json:"cache_size_in_bytes"` @@ -185,5 +185,3 @@ func NewNodeInfoOSCPU() *NodeInfoOSCPU { return r } - -// false diff --git a/typedapi/types/nodeinfopath.go b/typedapi/types/nodeinfopath.go index ded0e13bc9..cd5897e97d 100644 --- a/typedapi/types/nodeinfopath.go +++ b/typedapi/types/nodeinfopath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L158-L163 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L168-L173 type NodeInfoPath struct { Data []string `json:"data,omitempty"` Home *string `json:"home,omitempty"` @@ -110,5 +110,3 @@ func NewNodeInfoPath() *NodeInfoPath { return r } - -// false diff --git a/typedapi/types/nodeinforepositories.go b/typedapi/types/nodeinforepositories.go index 0957d98f8f..b765816a2b 100644 --- a/typedapi/types/nodeinforepositories.go +++ b/typedapi/types/nodeinforepositories.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoRepositories type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L165-L167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L175-L177 type NodeInfoRepositories struct { Url NodeInfoRepositoriesUrl `json:"url"` } @@ -33,5 +33,3 @@ func NewNodeInfoRepositories() *NodeInfoRepositories { return r } - -// false diff --git a/typedapi/types/nodeinforepositoriesurl.go b/typedapi/types/nodeinforepositoriesurl.go index 1bf1014087..52194e8e3e 100644 --- a/typedapi/types/nodeinforepositoriesurl.go +++ b/typedapi/types/nodeinforepositoriesurl.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoRepositoriesUrl type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L169-L171 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L179-L181 type NodeInfoRepositoriesUrl struct { AllowedUrls string `json:"allowed_urls"` } @@ -74,5 +74,3 @@ func NewNodeInfoRepositoriesUrl() *NodeInfoRepositoriesUrl { return r } - -// false diff --git a/typedapi/types/nodeinfoscript.go b/typedapi/types/nodeinfoscript.go index 4849d128cc..56289d60ee 100644 --- a/typedapi/types/nodeinfoscript.go +++ b/typedapi/types/nodeinfoscript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L289-L292 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L304-L307 type NodeInfoScript struct { AllowedTypes string `json:"allowed_types"` DisableMaxCompilationsRate *string `json:"disable_max_compilations_rate,omitempty"` @@ -87,5 +87,3 @@ func NewNodeInfoScript() *NodeInfoScript { return r } - -// false diff --git a/typedapi/types/nodeinfosearch.go b/typedapi/types/nodeinfosearch.go index 47f28796f1..1e886a298d 100644 --- a/typedapi/types/nodeinfosearch.go +++ b/typedapi/types/nodeinfosearch.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L294-L296 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L309-L311 type NodeInfoSearch struct { Remote NodeInfoSearchRemote `json:"remote"` } @@ -33,5 +33,3 @@ func NewNodeInfoSearch() *NodeInfoSearch { return r } - -// false diff --git a/typedapi/types/nodeinfosearchremote.go b/typedapi/types/nodeinfosearchremote.go index 79aa404c52..2ad4d60569 100644 --- a/typedapi/types/nodeinfosearchremote.go +++ b/typedapi/types/nodeinfosearchremote.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSearchRemote type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L298-L300 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L313-L315 type NodeInfoSearchRemote struct { Connect string `json:"connect"` } @@ -74,5 +74,3 @@ func NewNodeInfoSearchRemote() *NodeInfoSearchRemote { return r } - -// false diff --git a/typedapi/types/nodeinfosettings.go b/typedapi/types/nodeinfosettings.go index ed8d7c5069..5ae3b894af 100644 --- a/typedapi/types/nodeinfosettings.go +++ b/typedapi/types/nodeinfosettings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L69-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L79-L95 type NodeInfoSettings struct { Action *NodeInfoAction `json:"action,omitempty"` Bootstrap *NodeInfoBootstrap `json:"bootstrap,omitempty"` @@ -47,5 +47,3 @@ func NewNodeInfoSettings() *NodeInfoSettings { return r } - -// false diff --git a/typedapi/types/nodeinfosettingscluster.go b/typedapi/types/nodeinfosettingscluster.go index deafbd73ca..caf7f6086e 100644 --- a/typedapi/types/nodeinfosettingscluster.go +++ b/typedapi/types/nodeinfosettingscluster.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L132-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L142-L152 type NodeInfoSettingsCluster struct { DeprecationIndexing *DeprecationIndexing `json:"deprecation_indexing,omitempty"` Election NodeInfoSettingsClusterElection `json:"election"` @@ -65,8 +65,19 @@ func (s *NodeInfoSettingsCluster) UnmarshalJSON(data []byte) error { } case "initial_master_nodes": - if err := dec.Decode(&s.InitialMasterNodes); err != nil { - return fmt.Errorf("%s | %w", "InitialMasterNodes", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "InitialMasterNodes", err) + } + + s.InitialMasterNodes = append(s.InitialMasterNodes, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.InitialMasterNodes); err != nil { + return fmt.Errorf("%s | %w", "InitialMasterNodes", err) + } } case "name": @@ -90,5 +101,3 @@ func NewNodeInfoSettingsCluster() *NodeInfoSettingsCluster { return r } - -// false diff --git a/typedapi/types/nodeinfosettingsclusterelection.go b/typedapi/types/nodeinfosettingsclusterelection.go index 094f548070..a719c6bbd2 100644 --- a/typedapi/types/nodeinfosettingsclusterelection.go +++ b/typedapi/types/nodeinfosettingsclusterelection.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsClusterElection type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L148-L150 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L158-L160 type NodeInfoSettingsClusterElection struct { Strategy string `json:"strategy"` } @@ -66,5 +66,3 @@ func NewNodeInfoSettingsClusterElection() *NodeInfoSettingsClusterElection { return r } - -// false diff --git a/typedapi/types/nodeinfosettingshttp.go b/typedapi/types/nodeinfosettingshttp.go index a13dca3521..0c3fcf18bd 100644 --- a/typedapi/types/nodeinfosettingshttp.go +++ b/typedapi/types/nodeinfosettingshttp.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,10 +31,10 @@ import ( // NodeInfoSettingsHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L192-L197 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L202-L207 type NodeInfoSettingsHttp struct { - Compression string `json:"compression,omitempty"` - Port string `json:"port,omitempty"` + Compression *string `json:"compression,omitempty"` + Port *string `json:"port,omitempty"` Type NodeInfoSettingsHttpType `json:"type"` TypeDefault *string `json:"type.default,omitempty"` } @@ -64,7 +64,7 @@ func (s *NodeInfoSettingsHttp) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Compression = o + s.Compression = &o case "port": var tmp json.RawMessage @@ -76,7 +76,7 @@ func (s *NodeInfoSettingsHttp) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Port = o + s.Port = &o case "type": if err := dec.Decode(&s.Type); err != nil { @@ -106,5 +106,3 @@ func NewNodeInfoSettingsHttp() *NodeInfoSettingsHttp { return r } - -// false diff --git a/typedapi/types/nodeinfosettingshttptype.go b/typedapi/types/nodeinfosettingshttptype.go index c9ee8216b9..bfb37d483c 100644 --- a/typedapi/types/nodeinfosettingshttptype.go +++ b/typedapi/types/nodeinfosettingshttptype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsHttpType type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L199-L202 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L209-L212 type NodeInfoSettingsHttpType struct { Default string `json:"default"` } @@ -86,5 +86,3 @@ func NewNodeInfoSettingsHttpType() *NodeInfoSettingsHttpType { return r } - -// false diff --git a/typedapi/types/nodeinfosettingsingest.go b/typedapi/types/nodeinfosettingsingest.go index 94dc3caa2d..8f9b4ef994 100644 --- a/typedapi/types/nodeinfosettingsingest.go +++ b/typedapi/types/nodeinfosettingsingest.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoSettingsIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L87-L122 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L97-L132 type NodeInfoSettingsIngest struct { Append *NodeInfoIngestInfo `json:"append,omitempty"` Attachment *NodeInfoIngestInfo `json:"attachment,omitempty"` @@ -66,5 +66,3 @@ func NewNodeInfoSettingsIngest() *NodeInfoSettingsIngest { return r } - -// false diff --git a/typedapi/types/nodeinfosettingsnetwork.go b/typedapi/types/nodeinfosettingsnetwork.go index 66c9f2b2f8..85ccf85347 100644 --- a/typedapi/types/nodeinfosettingsnetwork.go +++ b/typedapi/types/nodeinfosettingsnetwork.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsNetwork type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L223-L225 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L238-L240 type NodeInfoSettingsNetwork struct { Host []string `json:"host,omitempty"` } @@ -77,5 +77,3 @@ func NewNodeInfoSettingsNetwork() *NodeInfoSettingsNetwork { return r } - -// false diff --git a/typedapi/types/nodeinfosettingsnode.go b/typedapi/types/nodeinfosettingsnode.go index 4ea0c747fa..a20e3489ad 100644 --- a/typedapi/types/nodeinfosettingsnode.go +++ b/typedapi/types/nodeinfosettingsnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L152-L156 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L162-L166 type NodeInfoSettingsNode struct { Attr map[string]json.RawMessage `json:"attr"` MaxLocalStorageNodes *string `json:"max_local_storage_nodes,omitempty"` @@ -91,5 +91,3 @@ func NewNodeInfoSettingsNode() *NodeInfoSettingsNode { return r } - -// false diff --git a/typedapi/types/nodeinfosettingstransport.go b/typedapi/types/nodeinfosettingstransport.go index 672a667dfc..df72b728ee 100644 --- a/typedapi/types/nodeinfosettingstransport.go +++ b/typedapi/types/nodeinfosettingstransport.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,13 @@ import ( // NodeInfoSettingsTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L208-L212 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L218-L227 type NodeInfoSettingsTransport struct { - Features *NodeInfoSettingsTransportFeatures `json:"features,omitempty"` - Type NodeInfoSettingsTransportType `json:"type"` - TypeDefault *string `json:"type.default,omitempty"` + Features *NodeInfoSettingsTransportFeatures `json:"features,omitempty"` + // IgnoreDeserializationErrors Only used in unit tests + IgnoreDeserializationErrors Stringifiedboolean `json:"ignore_deserialization_errors,omitempty"` + Type NodeInfoSettingsTransportType `json:"type"` + TypeDefault *string `json:"type.default,omitempty"` } func (s *NodeInfoSettingsTransport) UnmarshalJSON(data []byte) error { @@ -58,6 +60,11 @@ func (s *NodeInfoSettingsTransport) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Features", err) } + case "ignore_deserialization_errors": + if err := dec.Decode(&s.IgnoreDeserializationErrors); err != nil { + return fmt.Errorf("%s | %w", "IgnoreDeserializationErrors", err) + } + case "type": if err := dec.Decode(&s.Type); err != nil { return fmt.Errorf("%s | %w", "Type", err) @@ -86,5 +93,3 @@ func NewNodeInfoSettingsTransport() *NodeInfoSettingsTransport { return r } - -// false diff --git a/typedapi/types/nodeinfosettingstransportfeatures.go b/typedapi/types/nodeinfosettingstransportfeatures.go index 37e6428d7c..e6f4f66267 100644 --- a/typedapi/types/nodeinfosettingstransportfeatures.go +++ b/typedapi/types/nodeinfosettingstransportfeatures.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L219-L221 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L234-L236 type NodeInfoSettingsTransportFeatures struct { XPack string `json:"x-pack"` } @@ -74,5 +74,3 @@ func NewNodeInfoSettingsTransportFeatures() *NodeInfoSettingsTransportFeatures { return r } - -// false diff --git a/typedapi/types/nodeinfosettingstransporttype.go b/typedapi/types/nodeinfosettingstransporttype.go index e67be9db52..f56173651d 100644 --- a/typedapi/types/nodeinfosettingstransporttype.go +++ b/typedapi/types/nodeinfosettingstransporttype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportType type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L229-L232 type NodeInfoSettingsTransportType struct { Default string `json:"default"` } @@ -86,5 +86,3 @@ func NewNodeInfoSettingsTransportType() *NodeInfoSettingsTransportType { return r } - -// false diff --git a/typedapi/types/nodeinfotransport.go b/typedapi/types/nodeinfotransport.go index bb8b6dc29b..b519a0ee0d 100644 --- a/typedapi/types/nodeinfotransport.go +++ b/typedapi/types/nodeinfotransport.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L358-L362 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L362-L366 type NodeInfoTransport struct { BoundAddress []string `json:"bound_address"` Profiles map[string]string `json:"profiles"` @@ -91,5 +91,3 @@ func NewNodeInfoTransport() *NodeInfoTransport { return r } - -// false diff --git a/typedapi/types/nodeinfoxpack.go b/typedapi/types/nodeinfoxpack.go index 94e7124ac7..27bcce47f0 100644 --- a/typedapi/types/nodeinfoxpack.go +++ b/typedapi/types/nodeinfoxpack.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // NodeInfoXpack type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L239-L244 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L254-L259 type NodeInfoXpack struct { License *NodeInfoXpackLicense `json:"license,omitempty"` Ml *NodeInfoXpackMl `json:"ml,omitempty"` @@ -42,5 +42,3 @@ func NewNodeInfoXpack() *NodeInfoXpack { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacklicense.go b/typedapi/types/nodeinfoxpacklicense.go index dbce7c74f4..b78879feb4 100644 --- a/typedapi/types/nodeinfoxpacklicense.go +++ b/typedapi/types/nodeinfoxpacklicense.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoXpackLicense type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L281-L283 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L296-L298 type NodeInfoXpackLicense struct { SelfGenerated NodeInfoXpackLicenseType `json:"self_generated"` } @@ -33,5 +33,3 @@ func NewNodeInfoXpackLicense() *NodeInfoXpackLicense { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacklicensetype.go b/typedapi/types/nodeinfoxpacklicensetype.go index e51fe66af8..b4a19c1736 100644 --- a/typedapi/types/nodeinfoxpacklicensetype.go +++ b/typedapi/types/nodeinfoxpacklicensetype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackLicenseType type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L285-L287 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L300-L302 type NodeInfoXpackLicenseType struct { Type string `json:"type"` } @@ -74,5 +74,3 @@ func NewNodeInfoXpackLicenseType() *NodeInfoXpackLicenseType { return r } - -// false diff --git a/typedapi/types/nodeinfoxpackml.go b/typedapi/types/nodeinfoxpackml.go index c2d2f3be2a..880db2e313 100644 --- a/typedapi/types/nodeinfoxpackml.go +++ b/typedapi/types/nodeinfoxpackml.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackMl type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L253-L255 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L268-L270 type NodeInfoXpackMl struct { UseAutoMachineMemoryPercent *bool `json:"use_auto_machine_memory_percent,omitempty"` } @@ -76,5 +76,3 @@ func NewNodeInfoXpackMl() *NodeInfoXpackMl { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacksecurity.go b/typedapi/types/nodeinfoxpacksecurity.go index b68ee04692..e64ec7357b 100644 --- a/typedapi/types/nodeinfoxpacksecurity.go +++ b/typedapi/types/nodeinfoxpacksecurity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L246-L251 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L261-L266 type NodeInfoXpackSecurity struct { Authc *NodeInfoXpackSecurityAuthc `json:"authc,omitempty"` Enabled string `json:"enabled"` @@ -92,5 +92,3 @@ func NewNodeInfoXpackSecurity() *NodeInfoXpackSecurity { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacksecurityauthc.go b/typedapi/types/nodeinfoxpacksecurityauthc.go index dd6fec4775..cf497be4dc 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthc.go +++ b/typedapi/types/nodeinfoxpacksecurityauthc.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoXpackSecurityAuthc type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L261-L264 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L276-L279 type NodeInfoXpackSecurityAuthc struct { Realms *NodeInfoXpackSecurityAuthcRealms `json:"realms,omitempty"` Token *NodeInfoXpackSecurityAuthcToken `json:"token,omitempty"` @@ -34,5 +34,3 @@ func NewNodeInfoXpackSecurityAuthc() *NodeInfoXpackSecurityAuthc { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacksecurityauthcrealms.go b/typedapi/types/nodeinfoxpacksecurityauthcrealms.go index ea023bf8fc..20b115dc93 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthcrealms.go +++ b/typedapi/types/nodeinfoxpacksecurityauthcrealms.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoXpackSecurityAuthcRealms type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L266-L270 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L281-L285 type NodeInfoXpackSecurityAuthcRealms struct { File map[string]NodeInfoXpackSecurityAuthcRealmsStatus `json:"file,omitempty"` Native map[string]NodeInfoXpackSecurityAuthcRealmsStatus `json:"native,omitempty"` @@ -39,5 +39,3 @@ func NewNodeInfoXpackSecurityAuthcRealms() *NodeInfoXpackSecurityAuthcRealms { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go b/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go index 50f624b14e..c6d53030e6 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go +++ b/typedapi/types/nodeinfoxpacksecurityauthcrealmsstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcRealmsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L276-L279 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L291-L294 type NodeInfoXpackSecurityAuthcRealmsStatus struct { Enabled *string `json:"enabled,omitempty"` Order string `json:"order"` @@ -87,5 +87,3 @@ func NewNodeInfoXpackSecurityAuthcRealmsStatus() *NodeInfoXpackSecurityAuthcReal return r } - -// false diff --git a/typedapi/types/nodeinfoxpacksecurityauthctoken.go b/typedapi/types/nodeinfoxpacksecurityauthctoken.go index 55bc5594f7..82008c28d4 100644 --- a/typedapi/types/nodeinfoxpacksecurityauthctoken.go +++ b/typedapi/types/nodeinfoxpacksecurityauthctoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L272-L274 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L287-L289 type NodeInfoXpackSecurityAuthcToken struct { Enabled string `json:"enabled"` } @@ -74,5 +74,3 @@ func NewNodeInfoXpackSecurityAuthcToken() *NodeInfoXpackSecurityAuthcToken { return r } - -// false diff --git a/typedapi/types/nodeinfoxpacksecurityssl.go b/typedapi/types/nodeinfoxpacksecurityssl.go index 4b4a002719..02a72960b5 100644 --- a/typedapi/types/nodeinfoxpacksecurityssl.go +++ b/typedapi/types/nodeinfoxpacksecurityssl.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodeInfoXpackSecuritySsl type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L257-L259 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L272-L274 type NodeInfoXpackSecuritySsl struct { Ssl map[string]string `json:"ssl"` } @@ -35,5 +35,3 @@ func NewNodeInfoXpackSecuritySsl() *NodeInfoXpackSecuritySsl { return r } - -// false diff --git a/typedapi/types/nodejvminfo.go b/typedapi/types/nodejvminfo.go index e27e103c9c..0f8c0e4d4e 100644 --- a/typedapi/types/nodejvminfo.go +++ b/typedapi/types/nodejvminfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeJvmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L364-L378 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L368-L381 type NodeJvmInfo struct { GcCollectors []string `json:"gc_collectors"` InputArguments []string `json:"input_arguments"` @@ -40,7 +40,7 @@ type NodeJvmInfo struct { Pid int `json:"pid"` StartTimeInMillis int64 `json:"start_time_in_millis"` UsingBundledJdk bool `json:"using_bundled_jdk"` - UsingCompressedOrdinaryObjectPointers string `json:"using_compressed_ordinary_object_pointers,omitempty"` + UsingCompressedOrdinaryObjectPointers *string `json:"using_compressed_ordinary_object_pointers,omitempty"` Version string `json:"version"` VmName string `json:"vm_name"` VmVendor string `json:"vm_vendor"` @@ -103,7 +103,7 @@ func (s *NodeJvmInfo) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "StartTimeInMillis", err) } - case "using_bundled_jdk", "bundled_jdk": + case "using_bundled_jdk": var tmp any dec.Decode(&tmp) switch v := tmp.(type) { @@ -127,7 +127,7 @@ func (s *NodeJvmInfo) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.UsingCompressedOrdinaryObjectPointers = o + s.UsingCompressedOrdinaryObjectPointers = &o case "version": if err := dec.Decode(&s.Version); err != nil { @@ -167,5 +167,3 @@ func NewNodeJvmInfo() *NodeJvmInfo { return r } - -// false diff --git a/typedapi/types/nodeoperatingsysteminfo.go b/typedapi/types/nodeoperatingsysteminfo.go index 021c500035..9731ea5f40 100644 --- a/typedapi/types/nodeoperatingsysteminfo.go +++ b/typedapi/types/nodeoperatingsysteminfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeOperatingSystemInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L380-L397 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L383-L400 type NodeOperatingSystemInfo struct { // AllocatedProcessors The number of processors actually used to calculate thread pool size. This // number can be set with the node.processors setting of a node and defaults to @@ -158,5 +158,3 @@ func NewNodeOperatingSystemInfo() *NodeOperatingSystemInfo { return r } - -// false diff --git a/typedapi/types/nodepackagingtype.go b/typedapi/types/nodepackagingtype.go index d230029dfa..a7496e026d 100644 --- a/typedapi/types/nodepackagingtype.go +++ b/typedapi/types/nodepackagingtype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodePackagingType type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L526-L539 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L700-L713 type NodePackagingType struct { // Count Number of selected nodes using the distribution flavor and file type. Count int `json:"count"` @@ -107,5 +107,3 @@ func NewNodePackagingType() *NodePackagingType { return r } - -// false diff --git a/typedapi/types/nodeprocessinfo.go b/typedapi/types/nodeprocessinfo.go index 33d8783720..a87a7eba8f 100644 --- a/typedapi/types/nodeprocessinfo.go +++ b/typedapi/types/nodeprocessinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeProcessInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L399-L406 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L402-L409 type NodeProcessInfo struct { // Id Process identifier (PID) Id int64 `json:"id"` @@ -101,5 +101,3 @@ func NewNodeProcessInfo() *NodeProcessInfo { return r } - -// false diff --git a/typedapi/types/nodereloadresult.go b/typedapi/types/nodereloadresult.go index 263ba7da74..f093c9ca53 100644 --- a/typedapi/types/nodereloadresult.go +++ b/typedapi/types/nodereloadresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/NodeReloadResult.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/NodeReloadResult.ts#L23-L26 type NodeReloadResult struct { Name string `json:"name"` ReloadException *ErrorCause `json:"reload_exception,omitempty"` @@ -72,5 +72,3 @@ func NewNodeReloadResult() *NodeReloadResult { return r } - -// false diff --git a/typedapi/types/nodescontext.go b/typedapi/types/nodescontext.go index 5958044a57..f3b73a5229 100644 --- a/typedapi/types/nodescontext.go +++ b/typedapi/types/nodescontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodesContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1068-L1073 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1075-L1080 type NodesContext struct { CacheEvictions *int64 `json:"cache_evictions,omitempty"` CompilationLimitTriggered *int64 `json:"compilation_limit_triggered,omitempty"` @@ -122,5 +122,3 @@ func NewNodesContext() *NodesContext { return r } - -// false diff --git a/typedapi/types/nodescredentials.go b/typedapi/types/nodescredentials.go index 196707d74d..940c3d5119 100644 --- a/typedapi/types/nodescredentials.go +++ b/typedapi/types/nodescredentials.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodesCredentials type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_service_credentials/types.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_service_credentials/types.ts#L23-L28 type NodesCredentials struct { // FileTokens File-backed tokens collected from all nodes FileTokens map[string]NodesCredentialsFileToken `json:"file_tokens"` @@ -38,5 +38,3 @@ func NewNodesCredentials() *NodesCredentials { return r } - -// false diff --git a/typedapi/types/nodescredentialsfiletoken.go b/typedapi/types/nodescredentialsfiletoken.go index f4a7be3b09..7effcbcae5 100644 --- a/typedapi/types/nodescredentialsfiletoken.go +++ b/typedapi/types/nodescredentialsfiletoken.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodesCredentialsFileToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_service_credentials/types.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_service_credentials/types.ts#L30-L32 type NodesCredentialsFileToken struct { Nodes []string `json:"nodes"` } @@ -33,5 +33,3 @@ func NewNodesCredentialsFileToken() *NodesCredentialsFileToken { return r } - -// false diff --git a/typedapi/types/nodeshard.go b/typedapi/types/nodeshard.go index b815061c0d..2da8bdb613 100644 --- a/typedapi/types/nodeshard.go +++ b/typedapi/types/nodeshard.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NodeShard type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Node.ts#L54-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Node.ts#L54-L65 type NodeShard struct { AllocationId map[string]string `json:"allocation_id,omitempty"` Index string `json:"index"` @@ -152,5 +152,3 @@ func NewNodeShard() *NodeShard { return r } - -// false diff --git a/typedapi/types/nodeshutdownstatus.go b/typedapi/types/nodeshutdownstatus.go index 7a7de66158..5b8b018b71 100644 --- a/typedapi/types/nodeshutdownstatus.go +++ b/typedapi/types/nodeshutdownstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // NodeShutdownStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 type NodeShutdownStatus struct { NodeId string `json:"node_id"` PersistentTasks PersistentTaskStatus `json:"persistent_tasks"` @@ -119,5 +119,3 @@ func NewNodeShutdownStatus() *NodeShutdownStatus { return r } - -// false diff --git a/typedapi/types/nodesindexingpressure.go b/typedapi/types/nodesindexingpressure.go index 4ea01b7318..54436e2f5e 100644 --- a/typedapi/types/nodesindexingpressure.go +++ b/typedapi/types/nodesindexingpressure.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L116-L121 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L116-L121 type NodesIndexingPressure struct { // Memory Contains statistics for memory consumption from indexing load. Memory *NodesIndexingPressureMemory `json:"memory,omitempty"` @@ -34,5 +34,3 @@ func NewNodesIndexingPressure() *NodesIndexingPressure { return r } - -// false diff --git a/typedapi/types/nodesindexingpressurememory.go b/typedapi/types/nodesindexingpressurememory.go index f29f9a6b80..13ef1ebef9 100644 --- a/typedapi/types/nodesindexingpressurememory.go +++ b/typedapi/types/nodesindexingpressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L123-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L123-L142 type NodesIndexingPressureMemory struct { // Current Contains statistics for current indexing load. Current *PressureMemory `json:"current,omitempty"` @@ -101,5 +101,3 @@ func NewNodesIndexingPressureMemory() *NodesIndexingPressureMemory { return r } - -// false diff --git a/typedapi/types/nodesingest.go b/typedapi/types/nodesingest.go index 6b1fa29124..fe2f46fc8a 100644 --- a/typedapi/types/nodesingest.go +++ b/typedapi/types/nodesingest.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // NodesIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L345-L354 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L347-L356 type NodesIngest struct { // Pipelines Contains statistics about ingest pipelines for the node. Pipelines map[string]IngestStats `json:"pipelines,omitempty"` @@ -38,5 +38,3 @@ func NewNodesIngest() *NodesIngest { return r } - -// false diff --git a/typedapi/types/nodesrecord.go b/typedapi/types/nodesrecord.go index 002ac42d1e..5ec041b4ca 100644 --- a/typedapi/types/nodesrecord.go +++ b/typedapi/types/nodesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/nodes/types.ts#L23-L542 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/nodes/types.ts#L23-L542 type NodesRecord struct { // Build The Elasticsearch build hash. Build *string `json:"build,omitempty"` @@ -1342,5 +1342,3 @@ func NewNodesRecord() *NodesRecord { return r } - -// false diff --git a/typedapi/types/nodestatistics.go b/typedapi/types/nodestatistics.go index 1e4c77f667..b0cb3e21c2 100644 --- a/typedapi/types/nodestatistics.go +++ b/typedapi/types/nodestatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Node.ts#L28-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Node.ts#L28-L39 type NodeStatistics struct { // Failed Number of nodes that rejected the request or failed to respond. If this value // is not 0, a reason for the rejection or failure is included in the response. @@ -122,5 +122,3 @@ func NewNodeStatistics() *NodeStatistics { return r } - -// false diff --git a/typedapi/types/nodetasks.go b/typedapi/types/nodetasks.go index ed2c7b4b93..73c6426e1e 100644 --- a/typedapi/types/nodetasks.go +++ b/typedapi/types/nodetasks.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeTasks type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 type NodeTasks struct { Attributes map[string]string `json:"attributes,omitempty"` Host *string `json:"host,omitempty"` @@ -111,5 +111,3 @@ func NewNodeTasks() *NodeTasks { return r } - -// false diff --git a/typedapi/types/nodethreadpoolinfo.go b/typedapi/types/nodethreadpoolinfo.go index 8bd2b824a9..0efc053124 100644 --- a/typedapi/types/nodethreadpoolinfo.go +++ b/typedapi/types/nodethreadpoolinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // NodeThreadPoolInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L302-L309 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L317-L324 type NodeThreadPoolInfo struct { Core *int `json:"core,omitempty"` KeepAlive Duration `json:"keep_alive,omitempty"` @@ -148,5 +148,3 @@ func NewNodeThreadPoolInfo() *NodeThreadPoolInfo { return r } - -// false diff --git a/typedapi/types/nodeusage.go b/typedapi/types/nodeusage.go index 3e92db5725..30712c44a7 100644 --- a/typedapi/types/nodeusage.go +++ b/typedapi/types/nodeusage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // NodeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/usage/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/usage/types.ts#L25-L30 type NodeUsage struct { Aggregations map[string]json.RawMessage `json:"aggregations"` RestActions map[string]int `json:"rest_actions"` @@ -93,5 +93,3 @@ func NewNodeUsage() *NodeUsage { return r } - -// false diff --git a/typedapi/types/norianalyzer.go b/typedapi/types/norianalyzer.go index 7efc19bad8..1b5abb6429 100644 --- a/typedapi/types/norianalyzer.go +++ b/typedapi/types/norianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NoriAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L303-L309 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L303-L309 type NoriAnalyzer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` Stoptags []string `json:"stoptags,omitempty"` @@ -116,13 +116,3 @@ func NewNoriAnalyzer() *NoriAnalyzer { return r } - -// true - -type NoriAnalyzerVariant interface { - NoriAnalyzerCaster() *NoriAnalyzer -} - -func (s *NoriAnalyzer) NoriAnalyzerCaster() *NoriAnalyzer { - return s -} diff --git a/typedapi/types/noripartofspeechtokenfilter.go b/typedapi/types/noripartofspeechtokenfilter.go index 3cb9ef931c..ad1e996436 100644 --- a/typedapi/types/noripartofspeechtokenfilter.go +++ b/typedapi/types/noripartofspeechtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,8 +30,9 @@ import ( // NoriPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L274-L277 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/nori-plugin.ts#L37-L41 type NoriPartOfSpeechTokenFilter struct { + // Stoptags An array of part-of-speech tags that should be removed. Stoptags []string `json:"stoptags,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -92,13 +93,3 @@ func NewNoriPartOfSpeechTokenFilter() *NoriPartOfSpeechTokenFilter { return r } - -// true - -type NoriPartOfSpeechTokenFilterVariant interface { - NoriPartOfSpeechTokenFilterCaster() *NoriPartOfSpeechTokenFilter -} - -func (s *NoriPartOfSpeechTokenFilter) NoriPartOfSpeechTokenFilterCaster() *NoriPartOfSpeechTokenFilter { - return s -} diff --git a/typedapi/types/noritokenizer.go b/typedapi/types/noritokenizer.go index 07c98c951a..508ca4d462 100644 --- a/typedapi/types/noritokenizer.go +++ b/typedapi/types/noritokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NoriTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/nori-plugin.ts#L28-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/nori-plugin.ts#L29-L35 type NoriTokenizer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` @@ -132,13 +132,3 @@ func NewNoriTokenizer() *NoriTokenizer { return r } - -// true - -type NoriTokenizerVariant interface { - NoriTokenizerCaster() *NoriTokenizer -} - -func (s *NoriTokenizer) NoriTokenizerCaster() *NoriTokenizer { - return s -} diff --git a/typedapi/types/normalizeaggregation.go b/typedapi/types/normalizeaggregation.go index 7c4bf9030a..1d056e020c 100644 --- a/typedapi/types/normalizeaggregation.go +++ b/typedapi/types/normalizeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // NormalizeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L351-L359 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L351-L359 type NormalizeAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -101,13 +101,3 @@ func NewNormalizeAggregation() *NormalizeAggregation { return r } - -// true - -type NormalizeAggregationVariant interface { - NormalizeAggregationCaster() *NormalizeAggregation -} - -func (s *NormalizeAggregation) NormalizeAggregationCaster() *NormalizeAggregation { - return s -} diff --git a/typedapi/types/normalizer.go b/typedapi/types/normalizer.go index 19773eb293..b6a0891534 100644 --- a/typedapi/types/normalizer.go +++ b/typedapi/types/normalizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // LowercaseNormalizer // CustomNormalizer // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/normalizers.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/normalizers.ts#L20-L24 type Normalizer any - -type NormalizerVariant interface { - NormalizerCaster() *Normalizer -} diff --git a/typedapi/types/norwegiananalyzer.go b/typedapi/types/norwegiananalyzer.go index 843e7ef5cc..6ee5423afb 100644 --- a/typedapi/types/norwegiananalyzer.go +++ b/typedapi/types/norwegiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // NorwegianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L228-L233 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L228-L233 type NorwegianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *NorwegianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *NorwegianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewNorwegianAnalyzer() *NorwegianAnalyzer { return r } - -// true - -type NorwegianAnalyzerVariant interface { - NorwegianAnalyzerCaster() *NorwegianAnalyzer -} - -func (s *NorwegianAnalyzer) NorwegianAnalyzerCaster() *NorwegianAnalyzer { - return s -} diff --git a/typedapi/types/notfoundaliases.go b/typedapi/types/notfoundaliases.go new file mode 100644 index 0000000000..1360eae6af --- /dev/null +++ b/typedapi/types/notfoundaliases.go @@ -0,0 +1,127 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// NotFoundAliases type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_alias/_types/response.ts#L28-L36 +type NotFoundAliases struct { + Error string `json:"error"` + NotFoundAliases map[string]IndexAliases `json:"-"` + Status int `json:"status"` +} + +func (s *NotFoundAliases) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "error": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Error", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Error = o + + case "status": + if err := dec.Decode(&s.Status); err != nil { + return fmt.Errorf("%s | %w", "Status", err) + } + + default: + + if key, ok := t.(string); ok { + if s.NotFoundAliases == nil { + s.NotFoundAliases = make(map[string]IndexAliases, 0) + } + raw := NewIndexAliases() + if err := dec.Decode(&raw); err != nil { + return fmt.Errorf("%s | %w", "NotFoundAliases", err) + } + s.NotFoundAliases[key] = *raw + } + + } + } + return nil +} + +// MarhsalJSON overrides marshalling for types with additional properties +func (s NotFoundAliases) MarshalJSON() ([]byte, error) { + type opt NotFoundAliases + // We transform the struct to a map without the embedded additional properties map + tmp := make(map[string]any, 0) + + data, err := json.Marshal(opt(s)) + if err != nil { + return nil, err + } + err = json.Unmarshal(data, &tmp) + if err != nil { + return nil, err + } + + // We inline the additional fields from the underlying map + for key, value := range s.NotFoundAliases { + tmp[fmt.Sprintf("%s", key)] = value + } + delete(tmp, "NotFoundAliases") + + data, err = json.Marshal(tmp) + if err != nil { + return nil, err + } + + return data, nil +} + +// NewNotFoundAliases returns a NotFoundAliases. +func NewNotFoundAliases() *NotFoundAliases { + r := &NotFoundAliases{ + NotFoundAliases: make(map[string]IndexAliases), + } + + return r +} diff --git a/typedapi/types/numberrangequery.go b/typedapi/types/numberrangequery.go index e3fe5b3687..3e790acb1f 100644 --- a/typedapi/types/numberrangequery.go +++ b/typedapi/types/numberrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // NumberRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L172-L172 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L172-L172 type NumberRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -189,13 +189,3 @@ func NewNumberRangeQuery() *NumberRangeQuery { return r } - -// true - -type NumberRangeQueryVariant interface { - NumberRangeQueryCaster() *NumberRangeQuery -} - -func (s *NumberRangeQuery) NumberRangeQueryCaster() *NumberRangeQuery { - return s -} diff --git a/typedapi/types/numericdecayfunction.go b/typedapi/types/numericdecayfunction.go index feed3fe0a5..817c31c746 100644 --- a/typedapi/types/numericdecayfunction.go +++ b/typedapi/types/numericdecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // NumericDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L208-L208 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L208-L208 type NumericDecayFunction struct { DecayFunctionBasedoubledouble map[string]DecayPlacementdoubledouble `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the @@ -74,13 +74,3 @@ func NewNumericDecayFunction() *NumericDecayFunction { return r } - -// true - -type NumericDecayFunctionVariant interface { - NumericDecayFunctionCaster() *NumericDecayFunction -} - -func (s *NumericDecayFunction) NumericDecayFunctionCaster() *NumericDecayFunction { - return s -} diff --git a/typedapi/types/numericfielddata.go b/typedapi/types/numericfielddata.go index ad68a21b42..06d49699fe 100644 --- a/typedapi/types/numericfielddata.go +++ b/typedapi/types/numericfielddata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // NumericFielddata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/NumericFielddata.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/NumericFielddata.ts#L22-L24 type NumericFielddata struct { Format numericfielddataformat.NumericFielddataFormat `json:"format"` } @@ -37,13 +37,3 @@ func NewNumericFielddata() *NumericFielddata { return r } - -// true - -type NumericFielddataVariant interface { - NumericFielddataCaster() *NumericFielddata -} - -func (s *NumericFielddata) NumericFielddataCaster() *NumericFielddata { - return s -} diff --git a/typedapi/types/objectproperty.go b/typedapi/types/objectproperty.go index 5c1ef8567e..3fac9cd2af 100644 --- a/typedapi/types/objectproperty.go +++ b/typedapi/types/objectproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // ObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/complex.ts#L46-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/complex.ts#L47-L51 type ObjectProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` @@ -243,6 +243,12 @@ func (s *ObjectProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -598,6 +604,12 @@ func (s *ObjectProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -853,13 +865,3 @@ func NewObjectProperty() *ObjectProperty { return r } - -// true - -type ObjectPropertyVariant interface { - ObjectPropertyCaster() *ObjectProperty -} - -func (s *ObjectProperty) ObjectPropertyCaster() *ObjectProperty { - return s -} diff --git a/typedapi/types/onehotencodingpreprocessor.go b/typedapi/types/onehotencodingpreprocessor.go index ea7253147b..04fb383374 100644 --- a/typedapi/types/onehotencodingpreprocessor.go +++ b/typedapi/types/onehotencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OneHotEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L44-L47 type OneHotEncodingPreprocessor struct { Field string `json:"field"` HotMap map[string]string `json:"hot_map"` @@ -85,13 +85,3 @@ func NewOneHotEncodingPreprocessor() *OneHotEncodingPreprocessor { return r } - -// true - -type OneHotEncodingPreprocessorVariant interface { - OneHotEncodingPreprocessorCaster() *OneHotEncodingPreprocessor -} - -func (s *OneHotEncodingPreprocessor) OneHotEncodingPreprocessorCaster() *OneHotEncodingPreprocessor { - return s -} diff --git a/typedapi/types/openaiservicesettings.go b/typedapi/types/openaiservicesettings.go index 659d4ae133..fde19f984a 100644 --- a/typedapi/types/openaiservicesettings.go +++ b/typedapi/types/openaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OpenAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1013-L1055 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1554-L1596 type OpenAIServiceSettings struct { // ApiKey A valid API key of your OpenAI account. // You can find your OpenAI API keys in your OpenAI account under the API keys @@ -163,13 +163,3 @@ func NewOpenAIServiceSettings() *OpenAIServiceSettings { return r } - -// true - -type OpenAIServiceSettingsVariant interface { - OpenAIServiceSettingsCaster() *OpenAIServiceSettings -} - -func (s *OpenAIServiceSettings) OpenAIServiceSettingsCaster() *OpenAIServiceSettings { - return s -} diff --git a/typedapi/types/openaitasksettings.go b/typedapi/types/openaitasksettings.go index 1fe2c109af..03a0108c3f 100644 --- a/typedapi/types/openaitasksettings.go +++ b/typedapi/types/openaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OpenAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1057-L1063 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1598-L1604 type OpenAITaskSettings struct { // User For a `completion` or `text_embedding` task, specify the user issuing the // request. @@ -77,13 +77,3 @@ func NewOpenAITaskSettings() *OpenAITaskSettings { return r } - -// true - -type OpenAITaskSettingsVariant interface { - OpenAITaskSettingsCaster() *OpenAITaskSettings -} - -func (s *OpenAITaskSettings) OpenAITaskSettingsCaster() *OpenAITaskSettings { - return s -} diff --git a/typedapi/types/operatingsystem.go b/typedapi/types/operatingsystem.go index 1ffea9cad7..8e1c94a6e9 100644 --- a/typedapi/types/operatingsystem.go +++ b/typedapi/types/operatingsystem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1016-L1022 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1023-L1029 type OperatingSystem struct { Cgroup *Cgroup `json:"cgroup,omitempty"` Cpu *Cpu `json:"cpu,omitempty"` @@ -101,5 +101,3 @@ func NewOperatingSystem() *OperatingSystem { return r } - -// false diff --git a/typedapi/types/operatingsystemmemoryinfo.go b/typedapi/types/operatingsystemmemoryinfo.go index 4cc4b47a75..72abe7746c 100644 --- a/typedapi/types/operatingsystemmemoryinfo.go +++ b/typedapi/types/operatingsystemmemoryinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,18 +31,28 @@ import ( // OperatingSystemMemoryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/stats/types.ts#L541-L568 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L715-L763 type OperatingSystemMemoryInfo struct { + // AdjustedTotal Total amount of memory across all selected nodes, but using the value + // specified using the `es.total_memory_bytes` system property instead of + // measured total memory for those nodes where that system property was set. + AdjustedTotal ByteSize `json:"adjusted_total,omitempty"` // AdjustedTotalInBytes Total amount, in bytes, of memory across all selected nodes, but using the // value specified using the `es.total_memory_bytes` system property instead of // measured total memory for those nodes where that system property was set. AdjustedTotalInBytes *int64 `json:"adjusted_total_in_bytes,omitempty"` + // Free Amount of free physical memory across all selected nodes. + Free ByteSize `json:"free,omitempty"` // FreeInBytes Amount, in bytes, of free physical memory across all selected nodes. FreeInBytes int64 `json:"free_in_bytes"` // FreePercent Percentage of free physical memory across all selected nodes. FreePercent int `json:"free_percent"` + // Total Total amount of physical memory across all selected nodes. + Total ByteSize `json:"total,omitempty"` // TotalInBytes Total amount, in bytes, of physical memory across all selected nodes. TotalInBytes int64 `json:"total_in_bytes"` + // Used Amount of physical memory in use across all selected nodes. + Used ByteSize `json:"used,omitempty"` // UsedInBytes Amount, in bytes, of physical memory in use across all selected nodes. UsedInBytes int64 `json:"used_in_bytes"` // UsedPercent Percentage of physical memory in use across all selected nodes. @@ -64,6 +74,11 @@ func (s *OperatingSystemMemoryInfo) UnmarshalJSON(data []byte) error { switch t { + case "adjusted_total": + if err := dec.Decode(&s.AdjustedTotal); err != nil { + return fmt.Errorf("%s | %w", "AdjustedTotal", err) + } + case "adjusted_total_in_bytes": var tmp any dec.Decode(&tmp) @@ -79,6 +94,11 @@ func (s *OperatingSystemMemoryInfo) UnmarshalJSON(data []byte) error { s.AdjustedTotalInBytes = &f } + case "free": + if err := dec.Decode(&s.Free); err != nil { + return fmt.Errorf("%s | %w", "Free", err) + } + case "free_in_bytes": var tmp any dec.Decode(&tmp) @@ -110,6 +130,11 @@ func (s *OperatingSystemMemoryInfo) UnmarshalJSON(data []byte) error { s.FreePercent = f } + case "total": + if err := dec.Decode(&s.Total); err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + case "total_in_bytes": var tmp any dec.Decode(&tmp) @@ -125,6 +150,11 @@ func (s *OperatingSystemMemoryInfo) UnmarshalJSON(data []byte) error { s.TotalInBytes = f } + case "used": + if err := dec.Decode(&s.Used); err != nil { + return fmt.Errorf("%s | %w", "Used", err) + } + case "used_in_bytes": var tmp any dec.Decode(&tmp) @@ -167,5 +197,3 @@ func NewOperatingSystemMemoryInfo() *OperatingSystemMemoryInfo { return r } - -// false diff --git a/typedapi/types/operationcontainer.go b/typedapi/types/operationcontainer.go index d59fd8f298..839d291662 100644 --- a/typedapi/types/operationcontainer.go +++ b/typedapi/types/operationcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // OperationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L158-L180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L158-L180 type OperationContainer struct { AdditionalOperationContainerProperty map[string]json.RawMessage `json:"-"` // Create Index the specified document if it does not already exist. @@ -81,13 +81,3 @@ func NewOperationContainer() *OperationContainer { return r } - -// true - -type OperationContainerVariant interface { - OperationContainerCaster() *OperationContainer -} - -func (s *OperationContainer) OperationContainerCaster() *OperationContainer { - return s -} diff --git a/typedapi/types/outlierdetectionparameters.go b/typedapi/types/outlierdetectionparameters.go index d80e2aea13..cc1f8069ff 100644 --- a/typedapi/types/outlierdetectionparameters.go +++ b/typedapi/types/outlierdetectionparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OutlierDetectionParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L528-L562 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L528-L562 type OutlierDetectionParameters struct { // ComputeFeatureInfluence Specifies whether the feature influence calculation is enabled. ComputeFeatureInfluence *bool `json:"compute_feature_influence,omitempty"` @@ -178,5 +178,3 @@ func NewOutlierDetectionParameters() *OutlierDetectionParameters { return r } - -// false diff --git a/typedapi/types/overallbucket.go b/typedapi/types/overallbucket.go index 878c2367cf..74cc39a4b8 100644 --- a/typedapi/types/overallbucket.go +++ b/typedapi/types/overallbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OverallBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Bucket.ts#L129-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Bucket.ts#L129-L144 type OverallBucket struct { // BucketSpan The length of the bucket in seconds. Matches the job with the longest // bucket_span value. @@ -139,5 +139,3 @@ func NewOverallBucket() *OverallBucket { return r } - -// false diff --git a/typedapi/types/overallbucketjob.go b/typedapi/types/overallbucketjob.go index cfb6fc6569..e22d9d84b0 100644 --- a/typedapi/types/overallbucketjob.go +++ b/typedapi/types/overallbucketjob.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // OverallBucketJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Bucket.ts#L145-L148 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Bucket.ts#L145-L148 type OverallBucketJob struct { JobId string `json:"job_id"` MaxAnomalyScore Float64 `json:"max_anomaly_score"` @@ -84,5 +84,3 @@ func NewOverallBucketJob() *OverallBucketJob { return r } - -// false diff --git a/typedapi/types/overlapping.go b/typedapi/types/overlapping.go index f6c462efcc..ff59ad421c 100644 --- a/typedapi/types/overlapping.go +++ b/typedapi/types/overlapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Overlapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 type Overlapping struct { IndexPatterns []string `json:"index_patterns"` Name string `json:"name"` @@ -72,5 +72,3 @@ func NewOverlapping() *Overlapping { return r } - -// false diff --git a/typedapi/types/page.go b/typedapi/types/page.go index 9b73a17b2a..713336429c 100644 --- a/typedapi/types/page.go +++ b/typedapi/types/page.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Page type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Page.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Page.ts#L22-L33 type Page struct { // From Skips the specified number of items. From *int `json:"from,omitempty"` @@ -97,13 +97,3 @@ func NewPage() *Page { return r } - -// true - -type PageVariant interface { - PageCaster() *Page -} - -func (s *Page) PageCaster() *Page { - return s -} diff --git a/typedapi/types/pagerdutyaction.go b/typedapi/types/pagerdutyaction.go index ca616aac1c..ffce053625 100644 --- a/typedapi/types/pagerdutyaction.go +++ b/typedapi/types/pagerdutyaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // PagerDutyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L54-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L54-L54 type PagerDutyAction struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` @@ -161,13 +161,3 @@ func NewPagerDutyAction() *PagerDutyAction { return r } - -// true - -type PagerDutyActionVariant interface { - PagerDutyActionCaster() *PagerDutyAction -} - -func (s *PagerDutyAction) PagerDutyActionCaster() *PagerDutyAction { - return s -} diff --git a/typedapi/types/pagerdutycontext.go b/typedapi/types/pagerdutycontext.go index f15342b90e..2d42da4d53 100644 --- a/typedapi/types/pagerdutycontext.go +++ b/typedapi/types/pagerdutycontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // PagerDutyContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L61-L65 type PagerDutyContext struct { Href *string `json:"href,omitempty"` Src *string `json:"src,omitempty"` @@ -95,13 +95,3 @@ func NewPagerDutyContext() *PagerDutyContext { return r } - -// true - -type PagerDutyContextVariant interface { - PagerDutyContextCaster() *PagerDutyContext -} - -func (s *PagerDutyContext) PagerDutyContextCaster() *PagerDutyContext { - return s -} diff --git a/typedapi/types/pagerdutyevent.go b/typedapi/types/pagerdutyevent.go index 0378767096..b983951480 100644 --- a/typedapi/types/pagerdutyevent.go +++ b/typedapi/types/pagerdutyevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // PagerDutyEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L40-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L40-L52 type PagerDutyEvent struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` @@ -161,5 +161,3 @@ func NewPagerDutyEvent() *PagerDutyEvent { return r } - -// false diff --git a/typedapi/types/pagerdutyeventproxy.go b/typedapi/types/pagerdutyeventproxy.go index 888e02c853..0a184f7124 100644 --- a/typedapi/types/pagerdutyeventproxy.go +++ b/typedapi/types/pagerdutyeventproxy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PagerDutyEventProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L56-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L56-L59 type PagerDutyEventProxy struct { Host *string `json:"host,omitempty"` Port *int `json:"port,omitempty"` @@ -84,13 +84,3 @@ func NewPagerDutyEventProxy() *PagerDutyEventProxy { return r } - -// true - -type PagerDutyEventProxyVariant interface { - PagerDutyEventProxyCaster() *PagerDutyEventProxy -} - -func (s *PagerDutyEventProxy) PagerDutyEventProxyCaster() *PagerDutyEventProxy { - return s -} diff --git a/typedapi/types/pagerdutyresult.go b/typedapi/types/pagerdutyresult.go index e2e2478ad6..b8bdf4b233 100644 --- a/typedapi/types/pagerdutyresult.go +++ b/typedapi/types/pagerdutyresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PagerDutyResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L78-L83 type PagerDutyResult struct { Event PagerDutyEvent `json:"event"` Reason *string `json:"reason,omitempty"` @@ -92,5 +92,3 @@ func NewPagerDutyResult() *PagerDutyResult { return r } - -// false diff --git a/typedapi/types/painlesscontextsetup.go b/typedapi/types/painlesscontextsetup.go index 1c8e9f3ea0..5275fba49f 100644 --- a/typedapi/types/painlesscontextsetup.go +++ b/typedapi/types/painlesscontextsetup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // PainlessContextSetup type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/scripts_painless_execute/types.ts#L27-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/scripts_painless_execute/types.ts#L27-L46 type PainlessContextSetup struct { // Document Document that's temporarily indexed in-memory and accessible from the script. Document json.RawMessage `json:"document,omitempty"` @@ -92,13 +92,3 @@ func NewPainlessContextSetup() *PainlessContextSetup { return r } - -// true - -type PainlessContextSetupVariant interface { - PainlessContextSetupCaster() *PainlessContextSetup -} - -func (s *PainlessContextSetup) PainlessContextSetupCaster() *PainlessContextSetup { - return s -} diff --git a/typedapi/types/parentaggregate.go b/typedapi/types/parentaggregate.go index 9c62bb4d62..5dfbf95ccf 100644 --- a/typedapi/types/parentaggregate.go +++ b/typedapi/types/parentaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ParentAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L894-L898 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L896-L900 type ParentAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewParentAggregate() *ParentAggregate { return r } - -// false diff --git a/typedapi/types/parentaggregation.go b/typedapi/types/parentaggregation.go index 5efdbcfa1f..8dea7101c1 100644 --- a/typedapi/types/parentaggregation.go +++ b/typedapi/types/parentaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ParentAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L662-L667 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L662-L667 type ParentAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` @@ -67,13 +67,3 @@ func NewParentAggregation() *ParentAggregation { return r } - -// true - -type ParentAggregationVariant interface { - ParentAggregationCaster() *ParentAggregation -} - -func (s *ParentAggregation) ParentAggregationCaster() *ParentAggregation { - return s -} diff --git a/typedapi/types/parentidquery.go b/typedapi/types/parentidquery.go index cff72e7495..e42e4d7527 100644 --- a/typedapi/types/parentidquery.go +++ b/typedapi/types/parentidquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ParentIdQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/joining.ts#L141-L158 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/joining.ts#L141-L158 type ParentIdQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -127,13 +127,3 @@ func NewParentIdQuery() *ParentIdQuery { return r } - -// true - -type ParentIdQueryVariant interface { - ParentIdQueryCaster() *ParentIdQuery -} - -func (s *ParentIdQuery) ParentIdQueryCaster() *ParentIdQuery { - return s -} diff --git a/typedapi/types/parenttaskinfo.go b/typedapi/types/parenttaskinfo.go index ce8617040b..a3e49caf79 100644 --- a/typedapi/types/parenttaskinfo.go +++ b/typedapi/types/parenttaskinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ParentTaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 type ParentTaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` @@ -216,5 +216,3 @@ func NewParentTaskInfo() *ParentTaskInfo { return r } - -// false diff --git a/typedapi/types/passthroughinferenceoptions.go b/typedapi/types/passthroughinferenceoptions.go index 1d0a987f8f..bcd89d4fa9 100644 --- a/typedapi/types/passthroughinferenceoptions.go +++ b/typedapi/types/passthroughinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L239-L246 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L239-L246 type PassThroughInferenceOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. @@ -89,13 +89,3 @@ func NewPassThroughInferenceOptions() *PassThroughInferenceOptions { return r } - -// true - -type PassThroughInferenceOptionsVariant interface { - PassThroughInferenceOptionsCaster() *PassThroughInferenceOptions -} - -func (s *PassThroughInferenceOptions) PassThroughInferenceOptionsCaster() *PassThroughInferenceOptions { - return s -} diff --git a/typedapi/types/passthroughinferenceupdateoptions.go b/typedapi/types/passthroughinferenceupdateoptions.go index e4e4ab7dae..cf356f4bcb 100644 --- a/typedapi/types/passthroughinferenceupdateoptions.go +++ b/typedapi/types/passthroughinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L404-L409 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L404-L409 type PassThroughInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. @@ -83,13 +83,3 @@ func NewPassThroughInferenceUpdateOptions() *PassThroughInferenceUpdateOptions { return r } - -// true - -type PassThroughInferenceUpdateOptionsVariant interface { - PassThroughInferenceUpdateOptionsCaster() *PassThroughInferenceUpdateOptions -} - -func (s *PassThroughInferenceUpdateOptions) PassThroughInferenceUpdateOptionsCaster() *PassThroughInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/passthroughobjectproperty.go b/typedapi/types/passthroughobjectproperty.go index fbc8e156c6..3cb7b11c7f 100644 --- a/typedapi/types/passthroughobjectproperty.go +++ b/typedapi/types/passthroughobjectproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // PassthroughObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/complex.ts#L52-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/complex.ts#L53-L58 type PassthroughObjectProperty struct { CopyTo []string `json:"copy_to,omitempty"` Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` @@ -243,6 +243,12 @@ func (s *PassthroughObjectProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -614,6 +620,12 @@ func (s *PassthroughObjectProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -879,13 +891,3 @@ func NewPassthroughObjectProperty() *PassthroughObjectProperty { return r } - -// true - -type PassthroughObjectPropertyVariant interface { - PassthroughObjectPropertyCaster() *PassthroughObjectProperty -} - -func (s *PassthroughObjectProperty) PassthroughObjectPropertyCaster() *PassthroughObjectProperty { - return s -} diff --git a/typedapi/types/pathhierarchytokenizer.go b/typedapi/types/pathhierarchytokenizer.go index 6694ed19a5..1ec35255ab 100644 --- a/typedapi/types/pathhierarchytokenizer.go +++ b/typedapi/types/pathhierarchytokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PathHierarchyTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L95-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L97-L104 type PathHierarchyTokenizer struct { BufferSize Stringifiedinteger `json:"buffer_size,omitempty"` Delimiter *string `json:"delimiter,omitempty"` @@ -135,13 +135,3 @@ func NewPathHierarchyTokenizer() *PathHierarchyTokenizer { return r } - -// true - -type PathHierarchyTokenizerVariant interface { - PathHierarchyTokenizerCaster() *PathHierarchyTokenizer -} - -func (s *PathHierarchyTokenizer) PathHierarchyTokenizerCaster() *PathHierarchyTokenizer { - return s -} diff --git a/typedapi/types/patternanalyzer.go b/typedapi/types/patternanalyzer.go index 00b6fe4aa5..4af4cd00ac 100644 --- a/typedapi/types/patternanalyzer.go +++ b/typedapi/types/patternanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,14 +31,14 @@ import ( // PatternAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L311-L318 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L311-L318 type PatternAnalyzer struct { - Flags *string `json:"flags,omitempty"` - Lowercase *bool `json:"lowercase,omitempty"` - Pattern string `json:"pattern"` - Stopwords []string `json:"stopwords,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + Flags *string `json:"flags,omitempty"` + Lowercase *bool `json:"lowercase,omitempty"` + Pattern string `json:"pattern"` + Stopwords StopWords `json:"stopwords,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *PatternAnalyzer) UnmarshalJSON(data []byte) error { @@ -95,19 +95,8 @@ func (s *PatternAnalyzer) UnmarshalJSON(data []byte) error { s.Pattern = o case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "type": @@ -148,13 +137,3 @@ func NewPatternAnalyzer() *PatternAnalyzer { return r } - -// true - -type PatternAnalyzerVariant interface { - PatternAnalyzerCaster() *PatternAnalyzer -} - -func (s *PatternAnalyzer) PatternAnalyzerCaster() *PatternAnalyzer { - return s -} diff --git a/typedapi/types/patterncapturetokenfilter.go b/typedapi/types/patterncapturetokenfilter.go index 788925f290..d17cd07d07 100644 --- a/typedapi/types/patterncapturetokenfilter.go +++ b/typedapi/types/patterncapturetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,9 +30,11 @@ import ( // PatternCaptureTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L279-L283 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L374-L380 type PatternCaptureTokenFilter struct { - Patterns []string `json:"patterns"` + // Patterns A list of regular expressions to match. + Patterns []string `json:"patterns"` + // PreserveOriginal If set to `true` (the default) it will emit the original token. PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -99,13 +101,3 @@ func NewPatternCaptureTokenFilter() *PatternCaptureTokenFilter { return r } - -// true - -type PatternCaptureTokenFilterVariant interface { - PatternCaptureTokenFilterCaster() *PatternCaptureTokenFilter -} - -func (s *PatternCaptureTokenFilter) PatternCaptureTokenFilterCaster() *PatternCaptureTokenFilter { - return s -} diff --git a/typedapi/types/patternreplacecharfilter.go b/typedapi/types/patternreplacecharfilter.go index f24996e45e..644067e1d6 100644 --- a/typedapi/types/patternreplacecharfilter.go +++ b/typedapi/types/patternreplacecharfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PatternReplaceCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/char_filters.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/char_filters.ts#L57-L62 type PatternReplaceCharFilter struct { Flags *string `json:"flags,omitempty"` Pattern string `json:"pattern"` @@ -128,13 +128,3 @@ func NewPatternReplaceCharFilter() *PatternReplaceCharFilter { return r } - -// true - -type PatternReplaceCharFilterVariant interface { - PatternReplaceCharFilterCaster() *PatternReplaceCharFilter -} - -func (s *PatternReplaceCharFilter) PatternReplaceCharFilterCaster() *PatternReplaceCharFilter { - return s -} diff --git a/typedapi/types/patternreplacetokenfilter.go b/typedapi/types/patternreplacetokenfilter.go index a77ae1fa74..c9ad33d549 100644 --- a/typedapi/types/patternreplacetokenfilter.go +++ b/typedapi/types/patternreplacetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,18 @@ import ( // PatternReplaceTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L285-L291 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L382-L391 type PatternReplaceTokenFilter struct { - All *bool `json:"all,omitempty"` - Flags *string `json:"flags,omitempty"` - Pattern string `json:"pattern"` + // All If `true`, all substrings matching the pattern parameter’s regular expression + // are replaced. If `false`, the filter replaces only the first matching + // substring in each token. Defaults to `true`. + All *bool `json:"all,omitempty"` + Flags *string `json:"flags,omitempty"` + // Pattern Regular expression, written in Java’s regular expression syntax. The filter + // replaces token substrings matching this pattern with the substring in the + // `replacement` parameter. + Pattern string `json:"pattern"` + // Replacement Replacement substring. Defaults to an empty substring (`""`). Replacement *string `json:"replacement,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -144,13 +151,3 @@ func NewPatternReplaceTokenFilter() *PatternReplaceTokenFilter { return r } - -// true - -type PatternReplaceTokenFilterVariant interface { - PatternReplaceTokenFilterCaster() *PatternReplaceTokenFilter -} - -func (s *PatternReplaceTokenFilter) PatternReplaceTokenFilterCaster() *PatternReplaceTokenFilter { - return s -} diff --git a/typedapi/types/patterntokenizer.go b/typedapi/types/patterntokenizer.go index 70d0236f11..19d43dce46 100644 --- a/typedapi/types/patterntokenizer.go +++ b/typedapi/types/patterntokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L104-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L106-L111 type PatternTokenizer struct { Flags *string `json:"flags,omitempty"` Group *int `json:"group,omitempty"` @@ -132,13 +132,3 @@ func NewPatternTokenizer() *PatternTokenizer { return r } - -// true - -type PatternTokenizerVariant interface { - PatternTokenizerCaster() *PatternTokenizer -} - -func (s *PatternTokenizer) PatternTokenizerCaster() *PatternTokenizer { - return s -} diff --git a/typedapi/types/pendingtask.go b/typedapi/types/pendingtask.go index 7a0aec78c3..49aa49257a 100644 --- a/typedapi/types/pendingtask.go +++ b/typedapi/types/pendingtask.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PendingTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/pending_tasks/types.ts#L23-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/pending_tasks/types.ts#L23-L47 type PendingTask struct { // Executing Indicates whether the pending tasks are currently executing or not. Executing bool `json:"executing"` @@ -142,5 +142,3 @@ func NewPendingTask() *PendingTask { return r } - -// false diff --git a/typedapi/types/pendingtasksrecord.go b/typedapi/types/pendingtasksrecord.go index a4ab5808ae..65bea71ffe 100644 --- a/typedapi/types/pendingtasksrecord.go +++ b/typedapi/types/pendingtasksrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PendingTasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/pending_tasks/types.ts#L20-L41 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/pending_tasks/types.ts#L20-L41 type PendingTasksRecord struct { // InsertOrder The task insertion order. InsertOrder *string `json:"insertOrder,omitempty"` @@ -117,5 +117,3 @@ func NewPendingTasksRecord() *PendingTasksRecord { return r } - -// false diff --git a/typedapi/types/percentage.go b/typedapi/types/percentage.go index 9e9a20b3cc..f68391c3fc 100644 --- a/typedapi/types/percentage.go +++ b/typedapi/types/percentage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // float32 // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Numeric.ts#L28-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Numeric.ts#L28-L28 type Percentage any - -type PercentageVariant interface { - PercentageCaster() *Percentage -} diff --git a/typedapi/types/percentagescoreheuristic.go b/typedapi/types/percentagescoreheuristic.go index 867e48e64e..8d425fbce0 100644 --- a/typedapi/types/percentagescoreheuristic.go +++ b/typedapi/types/percentagescoreheuristic.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // PercentageScoreHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L811-L811 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L811-L811 type PercentageScoreHeuristic struct { } @@ -32,13 +32,3 @@ func NewPercentageScoreHeuristic() *PercentageScoreHeuristic { return r } - -// true - -type PercentageScoreHeuristicVariant interface { - PercentageScoreHeuristicCaster() *PercentageScoreHeuristic -} - -func (s *PercentageScoreHeuristic) PercentageScoreHeuristicCaster() *PercentageScoreHeuristic { - return s -} diff --git a/typedapi/types/percentileranksaggregation.go b/typedapi/types/percentileranksaggregation.go index dd36a1c759..40fd4d20fb 100644 --- a/typedapi/types/percentileranksaggregation.go +++ b/typedapi/types/percentileranksaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PercentileRanksAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L180-L202 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L192-L214 type PercentileRanksAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -136,13 +136,3 @@ func NewPercentileRanksAggregation() *PercentileRanksAggregation { return r } - -// true - -type PercentileRanksAggregationVariant interface { - PercentileRanksAggregationCaster() *PercentileRanksAggregation -} - -func (s *PercentileRanksAggregation) PercentileRanksAggregationCaster() *PercentileRanksAggregation { - return s -} diff --git a/typedapi/types/percentiles.go b/typedapi/types/percentiles.go index 2e65fe8919..f1b2ffad93 100644 --- a/typedapi/types/percentiles.go +++ b/typedapi/types/percentiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // KeyedPercentiles // []ArrayPercentilesItem // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L152-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L152-L153 type Percentiles any diff --git a/typedapi/types/percentilesaggregation.go b/typedapi/types/percentilesaggregation.go index a51b334b92..d8f1c3c0d6 100644 --- a/typedapi/types/percentilesaggregation.go +++ b/typedapi/types/percentilesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L204-L223 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L216-L235 type PercentilesAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -136,13 +136,3 @@ func NewPercentilesAggregation() *PercentilesAggregation { return r } - -// true - -type PercentilesAggregationVariant interface { - PercentilesAggregationCaster() *PercentilesAggregation -} - -func (s *PercentilesAggregation) PercentilesAggregationCaster() *PercentilesAggregation { - return s -} diff --git a/typedapi/types/percentilesbucketaggregate.go b/typedapi/types/percentilesbucketaggregate.go index 702909e9af..75cf67ee54 100644 --- a/typedapi/types/percentilesbucketaggregate.go +++ b/typedapi/types/percentilesbucketaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // PercentilesBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L180-L181 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L180-L181 type PercentilesBucketAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` @@ -88,5 +88,3 @@ func NewPercentilesBucketAggregate() *PercentilesBucketAggregate { return r } - -// false diff --git a/typedapi/types/percentilesbucketaggregation.go b/typedapi/types/percentilesbucketaggregation.go index a3fdbd8aa8..cb3196c20d 100644 --- a/typedapi/types/percentilesbucketaggregation.go +++ b/typedapi/types/percentilesbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // PercentilesBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L389-L397 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L389-L397 type PercentilesBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -100,13 +100,3 @@ func NewPercentilesBucketAggregation() *PercentilesBucketAggregation { return r } - -// true - -type PercentilesBucketAggregationVariant interface { - PercentilesBucketAggregationCaster() *PercentilesBucketAggregation -} - -func (s *PercentilesBucketAggregation) PercentilesBucketAggregationCaster() *PercentilesBucketAggregation { - return s -} diff --git a/typedapi/types/percolatequery.go b/typedapi/types/percolatequery.go index 255a5e404e..e6a5536413 100644 --- a/typedapi/types/percolatequery.go +++ b/typedapi/types/percolatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PercolateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L205-L245 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L205-L245 type PercolateQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -175,13 +175,3 @@ func NewPercolateQuery() *PercolateQuery { return r } - -// true - -type PercolateQueryVariant interface { - PercolateQueryCaster() *PercolateQuery -} - -func (s *PercolateQuery) PercolateQueryCaster() *PercolateQuery { - return s -} diff --git a/typedapi/types/percolatorproperty.go b/typedapi/types/percolatorproperty.go index c843925312..be0a60b420 100644 --- a/typedapi/types/percolatorproperty.go +++ b/typedapi/types/percolatorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // PercolatorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L202-L204 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L204-L206 type PercolatorProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -208,6 +208,12 @@ func (s *PercolatorProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -563,6 +569,12 @@ func (s *PercolatorProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -795,13 +807,3 @@ func NewPercolatorProperty() *PercolatorProperty { return r } - -// true - -type PercolatorPropertyVariant interface { - PercolatorPropertyCaster() *PercolatorProperty -} - -func (s *PercolatorProperty) PercolatorPropertyCaster() *PercolatorProperty { - return s -} diff --git a/typedapi/types/perpartitioncategorization.go b/typedapi/types/perpartitioncategorization.go index 801e3af550..f762efd7cf 100644 --- a/typedapi/types/perpartitioncategorization.go +++ b/typedapi/types/perpartitioncategorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PerPartitionCategorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Analysis.ts#L150-L159 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Analysis.ts#L150-L159 type PerPartitionCategorization struct { // Enabled To enable this setting, you must also set the `partition_field_name` property // to the same value in every detector that uses the keyword `mlcategory`. @@ -100,13 +100,3 @@ func NewPerPartitionCategorization() *PerPartitionCategorization { return r } - -// true - -type PerPartitionCategorizationVariant interface { - PerPartitionCategorizationCaster() *PerPartitionCategorization -} - -func (s *PerPartitionCategorization) PerPartitionCategorizationCaster() *PerPartitionCategorization { - return s -} diff --git a/typedapi/types/perrepositorystats.go b/typedapi/types/perrepositorystats.go new file mode 100644 index 0000000000..d3dcd09360 --- /dev/null +++ b/typedapi/types/perrepositorystats.go @@ -0,0 +1,94 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PerRepositoryStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L665-L670 +type PerRepositoryStats struct { + CurrentCounts RepositoryStatsCurrentCounts `json:"current_counts"` + OldestStartTime *string `json:"oldest_start_time,omitempty"` + OldestStartTimeMillis int64 `json:"oldest_start_time_millis"` + Type string `json:"type"` +} + +func (s *PerRepositoryStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "current_counts": + if err := dec.Decode(&s.CurrentCounts); err != nil { + return fmt.Errorf("%s | %w", "CurrentCounts", err) + } + + case "oldest_start_time": + if err := dec.Decode(&s.OldestStartTime); err != nil { + return fmt.Errorf("%s | %w", "OldestStartTime", err) + } + + case "oldest_start_time_millis": + if err := dec.Decode(&s.OldestStartTimeMillis); err != nil { + return fmt.Errorf("%s | %w", "OldestStartTimeMillis", err) + } + + case "type": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Type = o + + } + } + return nil +} + +// NewPerRepositoryStats returns a PerRepositoryStats. +func NewPerRepositoryStats() *PerRepositoryStats { + r := &PerRepositoryStats{} + + return r +} diff --git a/typedapi/types/persiananalyzer.go b/typedapi/types/persiananalyzer.go index 2f7277b710..2fb9a5797d 100644 --- a/typedapi/types/persiananalyzer.go +++ b/typedapi/types/persiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // PersianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L235-L239 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L235-L239 type PersianAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *PersianAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *PersianAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewPersianAnalyzer() *PersianAnalyzer { return r } - -// true - -type PersianAnalyzerVariant interface { - PersianAnalyzerCaster() *PersianAnalyzer -} - -func (s *PersianAnalyzer) PersianAnalyzerCaster() *PersianAnalyzer { - return s -} diff --git a/typedapi/types/persiannormalizationtokenfilter.go b/typedapi/types/persiannormalizationtokenfilter.go new file mode 100644 index 0000000000..ad48ac206e --- /dev/null +++ b/typedapi/types/persiannormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// PersianNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L527-L529 +type PersianNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *PersianNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s PersianNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerPersianNormalizationTokenFilter PersianNormalizationTokenFilter + tmp := innerPersianNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "persian_normalization" + + return json.Marshal(tmp) +} + +// NewPersianNormalizationTokenFilter returns a PersianNormalizationTokenFilter. +func NewPersianNormalizationTokenFilter() *PersianNormalizationTokenFilter { + r := &PersianNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/persianstemtokenfilter.go b/typedapi/types/persianstemtokenfilter.go new file mode 100644 index 0000000000..de1a6c1bfa --- /dev/null +++ b/typedapi/types/persianstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// PersianStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L571-L573 +type PersianStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *PersianStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s PersianStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerPersianStemTokenFilter PersianStemTokenFilter + tmp := innerPersianStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "persian_stem" + + return json.Marshal(tmp) +} + +// NewPersianStemTokenFilter returns a PersianStemTokenFilter. +func NewPersianStemTokenFilter() *PersianStemTokenFilter { + r := &PersianStemTokenFilter{} + + return r +} diff --git a/typedapi/types/persistenttaskstatus.go b/typedapi/types/persistenttaskstatus.go index 4dd41556ba..89cb15951f 100644 --- a/typedapi/types/persistenttaskstatus.go +++ b/typedapi/types/persistenttaskstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // PersistentTaskStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 type PersistentTaskStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } @@ -37,5 +37,3 @@ func NewPersistentTaskStatus() *PersistentTaskStatus { return r } - -// false diff --git a/typedapi/types/phase.go b/typedapi/types/phase.go index 7ad4b5a383..46f6556d0f 100644 --- a/typedapi/types/phase.go +++ b/typedapi/types/phase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Phase type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L26-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L26-L29 type Phase struct { Actions *IlmActions `json:"actions,omitempty"` MinAge Duration `json:"min_age,omitempty"` @@ -72,13 +72,3 @@ func NewPhase() *Phase { return r } - -// true - -type PhaseVariant interface { - PhaseCaster() *Phase -} - -func (s *Phase) PhaseCaster() *Phase { - return s -} diff --git a/typedapi/types/phases.go b/typedapi/types/phases.go index 2237d726d7..409465d469 100644 --- a/typedapi/types/phases.go +++ b/typedapi/types/phases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Phases type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L31-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L31-L37 type Phases struct { Cold *Phase `json:"cold,omitempty"` Delete *Phase `json:"delete,omitempty"` @@ -37,13 +37,3 @@ func NewPhases() *Phases { return r } - -// true - -type PhasesVariant interface { - PhasesCaster() *Phases -} - -func (s *Phases) PhasesCaster() *Phases { - return s -} diff --git a/typedapi/types/phonetictokenfilter.go b/typedapi/types/phonetictokenfilter.go index ec61d1c4ab..0548f9a4a4 100644 --- a/typedapi/types/phonetictokenfilter.go +++ b/typedapi/types/phonetictokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // PhoneticTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/phonetic-plugin.ts#L64-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/phonetic-plugin.ts#L64-L72 type PhoneticTokenFilter struct { Encoder phoneticencoder.PhoneticEncoder `json:"encoder"` Languageset []phoneticlanguage.PhoneticLanguage `json:"languageset,omitempty"` @@ -164,13 +164,3 @@ func NewPhoneticTokenFilter() *PhoneticTokenFilter { return r } - -// true - -type PhoneticTokenFilterVariant interface { - PhoneticTokenFilterCaster() *PhoneticTokenFilter -} - -func (s *PhoneticTokenFilter) PhoneticTokenFilterCaster() *PhoneticTokenFilter { - return s -} diff --git a/typedapi/types/phrasesuggest.go b/typedapi/types/phrasesuggest.go index 527cfbf961..5c9ad4c3c4 100644 --- a/typedapi/types/phrasesuggest.go +++ b/typedapi/types/phrasesuggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L57-L62 type PhraseSuggest struct { Length int `json:"length"` Offset int `json:"offset"` @@ -125,5 +125,3 @@ func NewPhraseSuggest() *PhraseSuggest { return r } - -// false diff --git a/typedapi/types/phrasesuggestcollate.go b/typedapi/types/phrasesuggestcollate.go index 290cf95122..9330219d5e 100644 --- a/typedapi/types/phrasesuggestcollate.go +++ b/typedapi/types/phrasesuggestcollate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestCollate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L333-L346 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L333-L346 type PhraseSuggestCollate struct { // Params Parameters to use if the query is templated. Params map[string]json.RawMessage `json:"params,omitempty"` @@ -97,13 +97,3 @@ func NewPhraseSuggestCollate() *PhraseSuggestCollate { return r } - -// true - -type PhraseSuggestCollateVariant interface { - PhraseSuggestCollateCaster() *PhraseSuggestCollate -} - -func (s *PhraseSuggestCollate) PhraseSuggestCollateCaster() *PhraseSuggestCollate { - return s -} diff --git a/typedapi/types/phrasesuggestcollatequery.go b/typedapi/types/phrasesuggestcollatequery.go index f3d3eddba3..a186bc8e63 100644 --- a/typedapi/types/phrasesuggestcollatequery.go +++ b/typedapi/types/phrasesuggestcollatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestCollateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L348-L357 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L348-L357 type PhraseSuggestCollateQuery struct { // Id The search template ID. Id *string `json:"id,omitempty"` @@ -82,13 +82,3 @@ func NewPhraseSuggestCollateQuery() *PhraseSuggestCollateQuery { return r } - -// true - -type PhraseSuggestCollateQueryVariant interface { - PhraseSuggestCollateQueryCaster() *PhraseSuggestCollateQuery -} - -func (s *PhraseSuggestCollateQuery) PhraseSuggestCollateQueryCaster() *PhraseSuggestCollateQuery { - return s -} diff --git a/typedapi/types/phrasesuggester.go b/typedapi/types/phrasesuggester.go index 1107294945..dc053a2688 100644 --- a/typedapi/types/phrasesuggester.go +++ b/typedapi/types/phrasesuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L359-L417 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L359-L417 type PhraseSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. @@ -299,13 +299,3 @@ func NewPhraseSuggester() *PhraseSuggester { return r } - -// true - -type PhraseSuggesterVariant interface { - PhraseSuggesterCaster() *PhraseSuggester -} - -func (s *PhraseSuggester) PhraseSuggesterCaster() *PhraseSuggester { - return s -} diff --git a/typedapi/types/phrasesuggesthighlight.go b/typedapi/types/phrasesuggesthighlight.go index 7f09d67795..164abdf127 100644 --- a/typedapi/types/phrasesuggesthighlight.go +++ b/typedapi/types/phrasesuggesthighlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L419-L428 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L419-L428 type PhraseSuggestHighlight struct { // PostTag Use in conjunction with `pre_tag` to define the HTML tags to use for the // highlighted text. @@ -91,13 +91,3 @@ func NewPhraseSuggestHighlight() *PhraseSuggestHighlight { return r } - -// true - -type PhraseSuggestHighlightVariant interface { - PhraseSuggestHighlightCaster() *PhraseSuggestHighlight -} - -func (s *PhraseSuggestHighlight) PhraseSuggestHighlightCaster() *PhraseSuggestHighlight { - return s -} diff --git a/typedapi/types/phrasesuggestoption.go b/typedapi/types/phrasesuggestoption.go index 4e4a9c6c92..8cbcab77c8 100644 --- a/typedapi/types/phrasesuggestoption.go +++ b/typedapi/types/phrasesuggestoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L86-L91 type PhraseSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Highlighted *string `json:"highlighted,omitempty"` @@ -119,5 +119,3 @@ func NewPhraseSuggestOption() *PhraseSuggestOption { return r } - -// false diff --git a/typedapi/types/pinneddoc.go b/typedapi/types/pinneddoc.go index 6db3d92a2e..ab87aff9ae 100644 --- a/typedapi/types/pinneddoc.go +++ b/typedapi/types/pinneddoc.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // PinnedDoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L269-L278 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L269-L278 type PinnedDoc struct { // Id_ The unique document ID. Id_ string `json:"_id"` @@ -74,13 +74,3 @@ func NewPinnedDoc() *PinnedDoc { return r } - -// true - -type PinnedDocVariant interface { - PinnedDocCaster() *PinnedDoc -} - -func (s *PinnedDoc) PinnedDocCaster() *PinnedDoc { - return s -} diff --git a/typedapi/types/pinnedquery.go b/typedapi/types/pinnedquery.go index 01d83658a5..16ff459b93 100644 --- a/typedapi/types/pinnedquery.go +++ b/typedapi/types/pinnedquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PinnedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L247-L267 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L247-L267 type PinnedQuery struct { AdditionalPinnedQueryProperty map[string]json.RawMessage `json:"-"` // Boost Floating point number used to decrease or increase the relevance scores of @@ -165,13 +165,3 @@ func NewPinnedQuery() *PinnedQuery { return r } - -// true - -type PinnedQueryVariant interface { - PinnedQueryCaster() *PinnedQuery -} - -func (s *PinnedQuery) PinnedQueryCaster() *PinnedQuery { - return s -} diff --git a/typedapi/types/pinnedretriever.go b/typedapi/types/pinnedretriever.go new file mode 100644 index 0000000000..f78957c332 --- /dev/null +++ b/typedapi/types/pinnedretriever.go @@ -0,0 +1,150 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PinnedRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L77-L83 +type PinnedRetriever struct { + Docs []SpecifiedDocument `json:"docs,omitempty"` + // Filter Query to filter the documents that can match. + Filter []Query `json:"filter,omitempty"` + Ids []string `json:"ids,omitempty"` + // MinScore Minimum _score for matching documents. Documents with a lower _score are not + // included in the top documents. + MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` + RankWindowSize *int `json:"rank_window_size,omitempty"` + // Retriever Inner retriever. + Retriever RetrieverContainer `json:"retriever"` +} + +func (s *PinnedRetriever) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "docs": + if err := dec.Decode(&s.Docs); err != nil { + return fmt.Errorf("%s | %w", "Docs", err) + } + + case "filter": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := NewQuery() + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + + s.Filter = append(s.Filter, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Filter); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + } + + case "ids": + if err := dec.Decode(&s.Ids); err != nil { + return fmt.Errorf("%s | %w", "Ids", err) + } + + case "min_score": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "MinScore", err) + } + f := float32(value) + s.MinScore = &f + case float64: + f := float32(v) + s.MinScore = &f + } + + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + + case "rank_window_size": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "RankWindowSize", err) + } + s.RankWindowSize = &value + case float64: + f := int(v) + s.RankWindowSize = &f + } + + case "retriever": + if err := dec.Decode(&s.Retriever); err != nil { + return fmt.Errorf("%s | %w", "Retriever", err) + } + + } + } + return nil +} + +// NewPinnedRetriever returns a PinnedRetriever. +func NewPinnedRetriever() *PinnedRetriever { + r := &PinnedRetriever{} + + return r +} diff --git a/typedapi/types/pipelineconfig.go b/typedapi/types/pipelineconfig.go index b89a0d68c1..bf2d87a697 100644 --- a/typedapi/types/pipelineconfig.go +++ b/typedapi/types/pipelineconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PipelineConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Pipeline.ts#L67-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Pipeline.ts#L67-L81 type PipelineConfig struct { // Description Description of the ingest pipeline. Description *string `json:"description,omitempty"` @@ -90,5 +90,3 @@ func NewPipelineConfig() *PipelineConfig { return r } - -// false diff --git a/typedapi/types/pipelinemetadata.go b/typedapi/types/pipelinemetadata.go index aeef8b2123..5cd944bd83 100644 --- a/typedapi/types/pipelinemetadata.go +++ b/typedapi/types/pipelinemetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PipelineMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/logstash/_types/Pipeline.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/logstash/_types/Pipeline.ts#L23-L26 type PipelineMetadata struct { Type string `json:"type"` Version string `json:"version"` @@ -87,13 +87,3 @@ func NewPipelineMetadata() *PipelineMetadata { return r } - -// true - -type PipelineMetadataVariant interface { - PipelineMetadataCaster() *PipelineMetadata -} - -func (s *PipelineMetadata) PipelineMetadataCaster() *PipelineMetadata { - return s -} diff --git a/typedapi/types/pipelineprocessor.go b/typedapi/types/pipelineprocessor.go index 3383875637..9cc989c775 100644 --- a/typedapi/types/pipelineprocessor.go +++ b/typedapi/types/pipelineprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PipelineProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1284-L1295 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1284-L1295 type PipelineProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -152,13 +152,3 @@ func NewPipelineProcessor() *PipelineProcessor { return r } - -// true - -type PipelineProcessorVariant interface { - PipelineProcessorCaster() *PipelineProcessor -} - -func (s *PipelineProcessor) PipelineProcessorCaster() *PipelineProcessor { - return s -} diff --git a/typedapi/types/pipelinesimulation.go b/typedapi/types/pipelineprocessorresult.go similarity index 63% rename from typedapi/types/pipelinesimulation.go rename to typedapi/types/pipelineprocessorresult.go index 44fa0231f7..a4cd211f6f 100644 --- a/typedapi/types/pipelinesimulation.go +++ b/typedapi/types/pipelineprocessorresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,23 +28,23 @@ import ( "io" "strconv" - "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/actionstatusoptions" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/pipelinesimulationstatusoptions" ) -// PipelineSimulation type. +// PipelineProcessorResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Simulation.ts#L52-L60 -type PipelineSimulation struct { - Description *string `json:"description,omitempty"` - Doc *DocumentSimulation `json:"doc,omitempty"` - Error *ErrorCause `json:"error,omitempty"` - IgnoredError *ErrorCause `json:"ignored_error,omitempty"` - ProcessorType *string `json:"processor_type,omitempty"` - Status *actionstatusoptions.ActionStatusOptions `json:"status,omitempty"` - Tag *string `json:"tag,omitempty"` +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L59-L67 +type PipelineProcessorResult struct { + Description *string `json:"description,omitempty"` + Doc *DocumentSimulation `json:"doc,omitempty"` + Error *ErrorCause `json:"error,omitempty"` + IgnoredError *ErrorCause `json:"ignored_error,omitempty"` + ProcessorType *string `json:"processor_type,omitempty"` + Status *pipelinesimulationstatusoptions.PipelineSimulationStatusOptions `json:"status,omitempty"` + Tag *string `json:"tag,omitempty"` } -func (s *PipelineSimulation) UnmarshalJSON(data []byte) error { +func (s *PipelineProcessorResult) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -120,11 +120,9 @@ func (s *PipelineSimulation) UnmarshalJSON(data []byte) error { return nil } -// NewPipelineSimulation returns a PipelineSimulation. -func NewPipelineSimulation() *PipelineSimulation { - r := &PipelineSimulation{} +// NewPipelineProcessorResult returns a PipelineProcessorResult. +func NewPipelineProcessorResult() *PipelineProcessorResult { + r := &PipelineProcessorResult{} return r } - -// false diff --git a/typedapi/types/pipelinesettings.go b/typedapi/types/pipelinesettings.go index 922483be29..0268160fa1 100644 --- a/typedapi/types/pipelinesettings.go +++ b/typedapi/types/pipelinesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PipelineSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/logstash/_types/Pipeline.ts#L28-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/logstash/_types/Pipeline.ts#L28-L55 type PipelineSettings struct { // PipelineBatchDelay When creating pipeline event batches, how long in milliseconds to wait for // each event before dispatching an undersized batch to pipeline workers. @@ -165,13 +165,3 @@ func NewPipelineSettings() *PipelineSettings { return r } - -// true - -type PipelineSettingsVariant interface { - PipelineSettingsCaster() *PipelineSettings -} - -func (s *PipelineSettings) PipelineSettingsCaster() *PipelineSettings { - return s -} diff --git a/typedapi/types/pipeseparatedflagssimplequerystringflag.go b/typedapi/types/pipeseparatedflagssimplequerystringflag.go index bdac1abf24..563b5539cc 100644 --- a/typedapi/types/pipeseparatedflagssimplequerystringflag.go +++ b/typedapi/types/pipeseparatedflagssimplequerystringflag.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // simplequerystringflag.SimpleQueryStringFlag // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 type PipeSeparatedFlagsSimpleQueryStringFlag any - -type PipeSeparatedFlagsSimpleQueryStringFlagVariant interface { - PipeSeparatedFlagsSimpleQueryStringFlagCaster() *PipeSeparatedFlagsSimpleQueryStringFlag -} diff --git a/typedapi/types/pivot.go b/typedapi/types/pivot.go index cded015e16..307d6a4840 100644 --- a/typedapi/types/pivot.go +++ b/typedapi/types/pivot.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Pivot type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L54-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L54-L68 type Pivot struct { // Aggregations Defines how to aggregate the grouped data. The following aggregations are // currently supported: average, bucket @@ -47,13 +47,3 @@ func NewPivot() *Pivot { return r } - -// true - -type PivotVariant interface { - PivotCaster() *Pivot -} - -func (s *Pivot) PivotCaster() *Pivot { - return s -} diff --git a/typedapi/types/pivotgroupbycontainer.go b/typedapi/types/pivotgroupbycontainer.go index 8b8d11b4b3..6e77e16bce 100644 --- a/typedapi/types/pivotgroupbycontainer.go +++ b/typedapi/types/pivotgroupbycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // PivotGroupByContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L70-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L70-L78 type PivotGroupByContainer struct { AdditionalPivotGroupByContainerProperty map[string]json.RawMessage `json:"-"` DateHistogram *DateHistogramAggregation `json:"date_histogram,omitempty"` @@ -73,13 +73,3 @@ func NewPivotGroupByContainer() *PivotGroupByContainer { return r } - -// true - -type PivotGroupByContainerVariant interface { - PivotGroupByContainerCaster() *PivotGroupByContainer -} - -func (s *PivotGroupByContainer) PivotGroupByContainerCaster() *PivotGroupByContainer { - return s -} diff --git a/typedapi/types/pluginsrecord.go b/typedapi/types/pluginsrecord.go index 5b156aafef..79291cad6e 100644 --- a/typedapi/types/pluginsrecord.go +++ b/typedapi/types/pluginsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PluginsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/plugins/types.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/plugins/types.ts#L22-L52 type PluginsRecord struct { // Component The component name. Component *string `json:"component,omitempty"` @@ -124,5 +124,3 @@ func NewPluginsRecord() *PluginsRecord { return r } - -// false diff --git a/typedapi/types/pluginsstatus.go b/typedapi/types/pluginsstatus.go index ae08d41a5e..86a5686855 100644 --- a/typedapi/types/pluginsstatus.go +++ b/typedapi/types/pluginsstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // PluginsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 type PluginsStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } @@ -37,5 +37,3 @@ func NewPluginsStatus() *PluginsStatus { return r } - -// false diff --git a/typedapi/types/pluginstats.go b/typedapi/types/pluginstats.go index 0ea0a689a2..11fd4174e5 100644 --- a/typedapi/types/pluginstats.go +++ b/typedapi/types/pluginstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PluginStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L183-L193 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L205-L215 type PluginStats struct { Classname string `json:"classname"` Description string `json:"description"` @@ -147,5 +147,3 @@ func NewPluginStats() *PluginStats { return r } - -// false diff --git a/typedapi/types/pointintimereference.go b/typedapi/types/pointintimereference.go index b34deb839c..25c7baffc4 100644 --- a/typedapi/types/pointintimereference.go +++ b/typedapi/types/pointintimereference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // PointInTimeReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 type PointInTimeReference struct { Id string `json:"id"` KeepAlive Duration `json:"keep_alive,omitempty"` @@ -72,13 +72,3 @@ func NewPointInTimeReference() *PointInTimeReference { return r } - -// true - -type PointInTimeReferenceVariant interface { - PointInTimeReferenceCaster() *PointInTimeReference -} - -func (s *PointInTimeReference) PointInTimeReferenceCaster() *PointInTimeReference { - return s -} diff --git a/typedapi/types/pointproperty.go b/typedapi/types/pointproperty.go index cd560d879b..2c23b5c034 100644 --- a/typedapi/types/pointproperty.go +++ b/typedapi/types/pointproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // PointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/geo.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L74-L79 type PointProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -244,6 +244,12 @@ func (s *PointProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -639,6 +645,12 @@ func (s *PointProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -891,13 +903,3 @@ func NewPointProperty() *PointProperty { return r } - -// true - -type PointPropertyVariant interface { - PointPropertyCaster() *PointProperty -} - -func (s *PointProperty) PointPropertyCaster() *PointProperty { - return s -} diff --git a/typedapi/types/pool.go b/typedapi/types/pool.go index 7641037359..1bd67d7a42 100644 --- a/typedapi/types/pool.go +++ b/typedapi/types/pool.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Pool type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L949-L966 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L956-L973 type Pool struct { // MaxInBytes Maximum amount of memory, in bytes, available for use by the heap. MaxInBytes *int64 `json:"max_in_bytes,omitempty"` @@ -129,5 +129,3 @@ func NewPool() *Pool { return r } - -// false diff --git a/typedapi/types/porterstemtokenfilter.go b/typedapi/types/porterstemtokenfilter.go index 0213c5b3dc..fd725a6f20 100644 --- a/typedapi/types/porterstemtokenfilter.go +++ b/typedapi/types/porterstemtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // PorterStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L293-L295 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L393-L395 type PorterStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewPorterStemTokenFilter() *PorterStemTokenFilter { return r } - -// true - -type PorterStemTokenFilterVariant interface { - PorterStemTokenFilterCaster() *PorterStemTokenFilter -} - -func (s *PorterStemTokenFilter) PorterStemTokenFilterCaster() *PorterStemTokenFilter { - return s -} diff --git a/typedapi/types/portugueseanalyzer.go b/typedapi/types/portugueseanalyzer.go index d408f443da..e945d3c6a2 100644 --- a/typedapi/types/portugueseanalyzer.go +++ b/typedapi/types/portugueseanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // PortugueseAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L241-L246 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L241-L246 type PortugueseAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *PortugueseAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *PortugueseAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewPortugueseAnalyzer() *PortugueseAnalyzer { return r } - -// true - -type PortugueseAnalyzerVariant interface { - PortugueseAnalyzerCaster() *PortugueseAnalyzer -} - -func (s *PortugueseAnalyzer) PortugueseAnalyzerCaster() *PortugueseAnalyzer { - return s -} diff --git a/typedapi/types/postmigrationfeature.go b/typedapi/types/postmigrationfeature.go index b65b3cca67..9ce9f3766a 100644 --- a/typedapi/types/postmigrationfeature.go +++ b/typedapi/types/postmigrationfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PostMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L28-L30 type PostMigrationFeature struct { FeatureName string `json:"feature_name"` } @@ -74,5 +74,3 @@ func NewPostMigrationFeature() *PostMigrationFeature { return r } - -// false diff --git a/typedapi/types/predicatetokenfilter.go b/typedapi/types/predicatetokenfilter.go index 78a75fa1f1..f6a143fb96 100644 --- a/typedapi/types/predicatetokenfilter.go +++ b/typedapi/types/predicatetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,8 +30,10 @@ import ( // PredicateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L297-L300 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L397-L401 type PredicateTokenFilter struct { + // Script Script containing a condition used to filter incoming tokens. Only tokens + // that match this script are included in the output. Script Script `json:"script"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -92,13 +94,3 @@ func NewPredicateTokenFilter() *PredicateTokenFilter { return r } - -// true - -type PredicateTokenFilterVariant interface { - PredicateTokenFilterCaster() *PredicateTokenFilter -} - -func (s *PredicateTokenFilter) PredicateTokenFilterCaster() *PredicateTokenFilter { - return s -} diff --git a/typedapi/types/predictedvalue.go b/typedapi/types/predictedvalue.go index 2db012ca18..a168c6325d 100644 --- a/typedapi/types/predictedvalue.go +++ b/typedapi/types/predictedvalue.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // PredictedValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L476-L476 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L476-L476 type PredictedValue []ScalarValue diff --git a/typedapi/types/prefixquery.go b/typedapi/types/prefixquery.go index 145875c41a..2e0f3210e1 100644 --- a/typedapi/types/prefixquery.go +++ b/typedapi/types/prefixquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L98-L120 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L98-L120 type PrefixQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -148,13 +148,3 @@ func NewPrefixQuery() *PrefixQuery { return r } - -// true - -type PrefixQueryVariant interface { - PrefixQueryCaster() *PrefixQuery -} - -func (s *PrefixQuery) PrefixQueryCaster() *PrefixQuery { - return s -} diff --git a/typedapi/types/preprocessor.go b/typedapi/types/preprocessor.go index 59b8a49e3c..ce3cfd1594 100644 --- a/typedapi/types/preprocessor.go +++ b/typedapi/types/preprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // Preprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L31-L36 type Preprocessor struct { AdditionalPreprocessorProperty map[string]json.RawMessage `json:"-"` FrequencyEncoding *FrequencyEncodingPreprocessor `json:"frequency_encoding,omitempty"` @@ -72,13 +72,3 @@ func NewPreprocessor() *Preprocessor { return r } - -// true - -type PreprocessorVariant interface { - PreprocessorCaster() *Preprocessor -} - -func (s *Preprocessor) PreprocessorCaster() *Preprocessor { - return s -} diff --git a/typedapi/types/pressurememory.go b/typedapi/types/pressurememory.go index be75e6765d..8dc77e00ac 100644 --- a/typedapi/types/pressurememory.go +++ b/typedapi/types/pressurememory.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L144-L199 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L144-L201 type PressureMemory struct { // All Memory consumed by indexing requests in the coordinating, primary, or replica // stage. @@ -53,9 +53,11 @@ type PressureMemory struct { // CoordinatingInBytes Memory consumed, in bytes, by indexing requests in the coordinating stage. CoordinatingInBytes *int64 `json:"coordinating_in_bytes,omitempty"` // CoordinatingRejections Number of indexing requests rejected in the coordinating stage. - CoordinatingRejections *int64 `json:"coordinating_rejections,omitempty"` + CoordinatingRejections *int64 `json:"coordinating_rejections,omitempty"` + LargeOperationRejections *int64 `json:"large_operation_rejections,omitempty"` // Primary Memory consumed by indexing requests in the primary stage. - Primary ByteSize `json:"primary,omitempty"` + Primary ByteSize `json:"primary,omitempty"` + PrimaryDocumentRejections *int64 `json:"primary_document_rejections,omitempty"` // PrimaryInBytes Memory consumed, in bytes, by indexing requests in the primary stage. PrimaryInBytes *int64 `json:"primary_in_bytes,omitempty"` // PrimaryRejections Number of indexing requests rejected in the primary stage. @@ -158,11 +160,41 @@ func (s *PressureMemory) UnmarshalJSON(data []byte) error { s.CoordinatingRejections = &f } + case "large_operation_rejections": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "LargeOperationRejections", err) + } + s.LargeOperationRejections = &value + case float64: + f := int64(v) + s.LargeOperationRejections = &f + } + case "primary": if err := dec.Decode(&s.Primary); err != nil { return fmt.Errorf("%s | %w", "Primary", err) } + case "primary_document_rejections": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PrimaryDocumentRejections", err) + } + s.PrimaryDocumentRejections = &value + case float64: + f := int64(v) + s.PrimaryDocumentRejections = &f + } + case "primary_in_bytes": var tmp any dec.Decode(&tmp) @@ -239,5 +271,3 @@ func NewPressureMemory() *PressureMemory { return r } - -// false diff --git a/typedapi/types/privileges.go b/typedapi/types/privileges.go index 270ab1a658..224597ca8a 100644 --- a/typedapi/types/privileges.go +++ b/typedapi/types/privileges.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Privileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/types.ts#L49-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/types.ts#L49-L49 type Privileges map[string]bool diff --git a/typedapi/types/privilegesactions.go b/typedapi/types/privilegesactions.go index 22302f333a..10c122864b 100644 --- a/typedapi/types/privilegesactions.go +++ b/typedapi/types/privilegesactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PrivilegesActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/put_privileges/types.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/put_privileges/types.ts#L22-L27 type PrivilegesActions struct { Actions []string `json:"actions"` Application *string `json:"application,omitempty"` @@ -92,13 +92,3 @@ func NewPrivilegesActions() *PrivilegesActions { return r } - -// true - -type PrivilegesActionsVariant interface { - PrivilegesActionsCaster() *PrivilegesActions -} - -func (s *PrivilegesActions) PrivilegesActionsCaster() *PrivilegesActions { - return s -} diff --git a/typedapi/types/privilegescheck.go b/typedapi/types/privilegescheck.go index 5069c4874c..f1730b64d1 100644 --- a/typedapi/types/privilegescheck.go +++ b/typedapi/types/privilegescheck.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // PrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges_user_profile/types.ts#L30-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges_user_profile/types.ts#L30-L37 type PrivilegesCheck struct { Application []ApplicationPrivilegesCheck `json:"application,omitempty"` // Cluster A list of the cluster privileges that you want to check. @@ -40,13 +40,3 @@ func NewPrivilegesCheck() *PrivilegesCheck { return r } - -// true - -type PrivilegesCheckVariant interface { - PrivilegesCheckCaster() *PrivilegesCheck -} - -func (s *PrivilegesCheck) PrivilegesCheckCaster() *PrivilegesCheck { - return s -} diff --git a/typedapi/types/process.go b/typedapi/types/process.go index 7b0cab746d..c100c23a68 100644 --- a/typedapi/types/process.go +++ b/typedapi/types/process.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Process type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1024-L1046 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1031-L1053 type Process struct { // Cpu Contains CPU statistics for the node. Cpu *Cpu `json:"cpu,omitempty"` @@ -131,5 +131,3 @@ func NewProcess() *Process { return r } - -// false diff --git a/typedapi/types/processor.go b/typedapi/types/processor.go index 9860b546f4..d76749623f 100644 --- a/typedapi/types/processor.go +++ b/typedapi/types/processor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Processor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L420-L437 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L422-L439 type Processor struct { // Count Number of documents transformed by the processor. Count *int64 `json:"count,omitempty"` @@ -119,5 +119,3 @@ func NewProcessor() *Processor { return r } - -// false diff --git a/typedapi/types/processorcontainer.go b/typedapi/types/processorcontainer.go index d1a7b5be26..9b6700cf9f 100644 --- a/typedapi/types/processorcontainer.go +++ b/typedapi/types/processorcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // ProcessorContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L27-L301 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L27-L301 type ProcessorContainer struct { AdditionalProcessorContainerProperty map[string]json.RawMessage `json:"-"` // Append Appends one or more values to an existing array if the field already exists @@ -254,13 +254,3 @@ func NewProcessorContainer() *ProcessorContainer { return r } - -// true - -type ProcessorContainerVariant interface { - ProcessorContainerCaster() *ProcessorContainer -} - -func (s *ProcessorContainer) ProcessorContainerCaster() *ProcessorContainer { - return s -} diff --git a/typedapi/types/profile.go b/typedapi/types/profile.go index 48fbc99031..0da0ab5841 100644 --- a/typedapi/types/profile.go +++ b/typedapi/types/profile.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Profile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L101-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L101-L103 type Profile struct { Shards []ShardProfile `json:"shards"` } @@ -33,5 +33,3 @@ func NewProfile() *Profile { return r } - -// false diff --git a/typedapi/types/property.go b/typedapi/types/property.go index a882921e3b..ffc87aa8e1 100644 --- a/typedapi/types/property.go +++ b/typedapi/types/property.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -43,6 +43,7 @@ package types // NestedProperty // ObjectProperty // PassthroughObjectProperty +// RankVectorProperty // SemanticTextProperty // SparseVectorProperty // CompletionProperty @@ -74,9 +75,5 @@ package types // LongRangeProperty // IcuCollationProperty // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/Property.ts#L119-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/Property.ts#L120-L191 type Property any - -type PropertyVariant interface { - PropertyCaster() *Property -} diff --git a/typedapi/types/publishedclusterstates.go b/typedapi/types/publishedclusterstates.go index 0aa4a76a39..020c87d0c3 100644 --- a/typedapi/types/publishedclusterstates.go +++ b/typedapi/types/publishedclusterstates.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // PublishedClusterStates type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L263-L276 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L265-L278 type PublishedClusterStates struct { // CompatibleDiffs Number of compatible differences between published cluster states. CompatibleDiffs *int64 `json:"compatible_diffs,omitempty"` @@ -112,5 +112,3 @@ func NewPublishedClusterStates() *PublishedClusterStates { return r } - -// false diff --git a/typedapi/types/queries.go b/typedapi/types/queries.go index 93730e945b..79c3c45e39 100644 --- a/typedapi/types/queries.go +++ b/typedapi/types/queries.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Queries type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L417-L419 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L417-L419 type Queries struct { Cache *CacheQueries `json:"cache,omitempty"` } @@ -33,13 +33,3 @@ func NewQueries() *Queries { return r } - -// true - -type QueriesVariant interface { - QueriesCaster() *Queries -} - -func (s *Queries) QueriesCaster() *Queries { - return s -} diff --git a/typedapi/types/query.go b/typedapi/types/query.go index 94b8ebe59d..bfc5378f35 100644 --- a/typedapi/types/query.go +++ b/typedapi/types/query.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Query type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L103-L434 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L103-L434 type Query struct { AdditionalQueryProperty map[string]json.RawMessage `json:"-"` // Bool matches documents matching boolean combinations of other queries. @@ -667,13 +667,3 @@ func NewQuery() *Query { return r } - -// true - -type QueryVariant interface { - QueryCaster() *Query -} - -func (s *Query) QueryCaster() *Query { - return s -} diff --git a/typedapi/types/querybreakdown.go b/typedapi/types/querybreakdown.go index a3d52f41ed..75f518ed18 100644 --- a/typedapi/types/querybreakdown.go +++ b/typedapi/types/querybreakdown.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L105-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L105-L126 type QueryBreakdown struct { Advance int64 `json:"advance"` AdvanceCount int64 `json:"advance_count"` @@ -381,5 +381,3 @@ func NewQueryBreakdown() *QueryBreakdown { return r } - -// false diff --git a/typedapi/types/querycachestats.go b/typedapi/types/querycachestats.go index 37211b8b35..49cf016e86 100644 --- a/typedapi/types/querycachestats.go +++ b/typedapi/types/querycachestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L195-L229 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L217-L251 type QueryCacheStats struct { // CacheCount Total number of entries added to the query cache across all shards assigned // to selected nodes. @@ -195,5 +195,3 @@ func NewQueryCacheStats() *QueryCacheStats { return r } - -// false diff --git a/typedapi/types/queryfeatureextractor.go b/typedapi/types/queryfeatureextractor.go index b752d498cd..bd8f5216f3 100644 --- a/typedapi/types/queryfeatureextractor.go +++ b/typedapi/types/queryfeatureextractor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryFeatureExtractor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L98-L105 type QueryFeatureExtractor struct { DefaultScore *float32 `json:"default_score,omitempty"` FeatureName string `json:"feature_name"` @@ -97,13 +97,3 @@ func NewQueryFeatureExtractor() *QueryFeatureExtractor { return r } - -// true - -type QueryFeatureExtractorVariant interface { - QueryFeatureExtractorCaster() *QueryFeatureExtractor -} - -func (s *QueryFeatureExtractor) QueryFeatureExtractorCaster() *QueryFeatureExtractor { - return s -} diff --git a/typedapi/types/queryprofile.go b/typedapi/types/queryprofile.go index fc0f62c355..ac66978a5f 100644 --- a/typedapi/types/queryprofile.go +++ b/typedapi/types/queryprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L128-L134 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L128-L134 type QueryProfile struct { Breakdown QueryBreakdown `json:"breakdown"` Children []QueryProfile `json:"children,omitempty"` @@ -105,5 +105,3 @@ func NewQueryProfile() *QueryProfile { return r } - -// false diff --git a/typedapi/types/queryrole.go b/typedapi/types/queryrole.go index f5390b0dcd..a3ce63f73f 100644 --- a/typedapi/types/queryrole.go +++ b/typedapi/types/queryrole.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // QueryRole type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_role/types.ts#L103-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_role/types.ts#L103-L109 type QueryRole struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -190,5 +190,3 @@ func NewQueryRole() *QueryRole { return r } - -// false diff --git a/typedapi/types/queryrule.go b/typedapi/types/queryrule.go index b448dbacb0..eccbf38fbc 100644 --- a/typedapi/types/queryrule.go +++ b/typedapi/types/queryrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // QueryRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/_types/QueryRuleset.ts#L36-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/_types/QueryRuleset.ts#L36-L58 type QueryRule struct { // Actions The actions to take when the rule is matched. // The format of this action depends on the rule type. @@ -125,13 +125,3 @@ func NewQueryRule() *QueryRule { return r } - -// true - -type QueryRuleVariant interface { - QueryRuleCaster() *QueryRule -} - -func (s *QueryRule) QueryRuleCaster() *QueryRule { - return s -} diff --git a/typedapi/types/queryruleactions.go b/typedapi/types/queryruleactions.go index 78b239e8a7..fb7b4505d1 100644 --- a/typedapi/types/queryruleactions.go +++ b/typedapi/types/queryruleactions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // QueryRuleActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/_types/QueryRuleset.ts#L110-L126 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/_types/QueryRuleset.ts#L110-L126 type QueryRuleActions struct { // Docs The documents to apply the rule to. // Only one of `ids` or `docs` may be specified and at least one must be @@ -45,13 +45,3 @@ func NewQueryRuleActions() *QueryRuleActions { return r } - -// true - -type QueryRuleActionsVariant interface { - QueryRuleActionsCaster() *QueryRuleActions -} - -func (s *QueryRuleActions) QueryRuleActionsCaster() *QueryRuleActions { - return s -} diff --git a/typedapi/types/queryrulecriteria.go b/typedapi/types/queryrulecriteria.go index b785b8c9cf..fcde7b92a8 100644 --- a/typedapi/types/queryrulecriteria.go +++ b/typedapi/types/queryrulecriteria.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // QueryRuleCriteria type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/_types/QueryRuleset.ts#L65-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/_types/QueryRuleset.ts#L65-L93 type QueryRuleCriteria struct { // Metadata The metadata field to match against. // This metadata will be used to match against `match_criteria` sent in the @@ -117,13 +117,3 @@ func NewQueryRuleCriteria() *QueryRuleCriteria { return r } - -// true - -type QueryRuleCriteriaVariant interface { - QueryRuleCriteriaCaster() *QueryRuleCriteria -} - -func (s *QueryRuleCriteria) QueryRuleCriteriaCaster() *QueryRuleCriteria { - return s -} diff --git a/typedapi/types/queryrulesetlistitem.go b/typedapi/types/queryrulesetlistitem.go index a22bf20ae3..5ceecd8fb3 100644 --- a/typedapi/types/queryrulesetlistitem.go +++ b/typedapi/types/queryrulesetlistitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryRulesetListItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/list_rulesets/types.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/list_rulesets/types.ts#L23-L44 type QueryRulesetListItem struct { // RuleCriteriaTypesCounts A map of criteria type (for example, `exact`) to the number of rules of that // type. @@ -114,5 +114,3 @@ func NewQueryRulesetListItem() *QueryRulesetListItem { return r } - -// false diff --git a/typedapi/types/queryrulesetmatchedrule.go b/typedapi/types/queryrulesetmatchedrule.go index 7177cc53e2..b733a6515a 100644 --- a/typedapi/types/queryrulesetmatchedrule.go +++ b/typedapi/types/queryrulesetmatchedrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // QueryRulesetMatchedRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/query_rules/test/QueryRulesetTestResponse.ts#L30-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/query_rules/test/QueryRulesetTestResponse.ts#L30-L39 type QueryRulesetMatchedRule struct { // RuleId Rule unique identifier within that ruleset RuleId string `json:"rule_id"` @@ -74,5 +74,3 @@ func NewQueryRulesetMatchedRule() *QueryRulesetMatchedRule { return r } - -// false diff --git a/typedapi/types/querystringquery.go b/typedapi/types/querystringquery.go index d16cba340f..ef6940ab45 100644 --- a/typedapi/types/querystringquery.go +++ b/typedapi/types/querystringquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // QueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L598-L721 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L649-L772 type QueryStringQuery struct { // AllowLeadingWildcard If `true`, the wildcard characters `*` and `?` are allowed as the first // character of the query string. @@ -433,13 +433,3 @@ func NewQueryStringQuery() *QueryStringQuery { return r } - -// true - -type QueryStringQueryVariant interface { - QueryStringQueryCaster() *QueryStringQuery -} - -func (s *QueryStringQuery) QueryStringQueryCaster() *QueryStringQuery { - return s -} diff --git a/typedapi/types/queryuser.go b/typedapi/types/queryuser.go index 7192cebb4c..11d9b40ee8 100644 --- a/typedapi/types/queryuser.go +++ b/typedapi/types/queryuser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_user/types.ts#L103-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_user/types.ts#L103-L105 type QueryUser struct { Email *string `json:"email,omitempty"` Enabled bool `json:"enabled"` @@ -125,5 +125,3 @@ func NewQueryUser() *QueryUser { return r } - -// false diff --git a/typedapi/types/queryvectorbuilder.go b/typedapi/types/queryvectorbuilder.go index f977c68de1..f94c2305a0 100644 --- a/typedapi/types/queryvectorbuilder.go +++ b/typedapi/types/queryvectorbuilder.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // QueryVectorBuilder type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Knn.ts#L89-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Knn.ts#L89-L92 type QueryVectorBuilder struct { AdditionalQueryVectorBuilderProperty map[string]json.RawMessage `json:"-"` TextEmbedding *TextEmbedding `json:"text_embedding,omitempty"` @@ -70,13 +70,3 @@ func NewQueryVectorBuilder() *QueryVectorBuilder { return r } - -// true - -type QueryVectorBuilderVariant interface { - QueryVectorBuilderCaster() *QueryVectorBuilder -} - -func (s *QueryVectorBuilder) QueryVectorBuilderCaster() *QueryVectorBuilder { - return s -} diff --git a/typedapi/types/querywatch.go b/typedapi/types/querywatch.go index df785fc8c5..2ef4f3c73b 100644 --- a/typedapi/types/querywatch.go +++ b/typedapi/types/querywatch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QueryWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Watch.ts#L58-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Watch.ts#L58-L64 type QueryWatch struct { Id_ string `json:"_id"` PrimaryTerm_ *int `json:"_primary_term,omitempty"` @@ -102,5 +102,3 @@ func NewQueryWatch() *QueryWatch { return r } - -// false diff --git a/typedapi/types/questionansweringinferenceoptions.go b/typedapi/types/questionansweringinferenceoptions.go index ecb0524e96..be3055fcf7 100644 --- a/typedapi/types/questionansweringinferenceoptions.go +++ b/typedapi/types/questionansweringinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L301-L311 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L301-L311 type QuestionAnsweringInferenceOptions struct { // MaxAnswerLength The maximum answer length to consider MaxAnswerLength *int `json:"max_answer_length,omitempty"` @@ -119,13 +119,3 @@ func NewQuestionAnsweringInferenceOptions() *QuestionAnsweringInferenceOptions { return r } - -// true - -type QuestionAnsweringInferenceOptionsVariant interface { - QuestionAnsweringInferenceOptionsCaster() *QuestionAnsweringInferenceOptions -} - -func (s *QuestionAnsweringInferenceOptions) QuestionAnsweringInferenceOptionsCaster() *QuestionAnsweringInferenceOptions { - return s -} diff --git a/typedapi/types/questionansweringinferenceupdateoptions.go b/typedapi/types/questionansweringinferenceupdateoptions.go index 6cfb111335..200a6163a3 100644 --- a/typedapi/types/questionansweringinferenceupdateoptions.go +++ b/typedapi/types/questionansweringinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L439-L450 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L439-L450 type QuestionAnsweringInferenceUpdateOptions struct { // MaxAnswerLength The maximum answer length to consider for extraction MaxAnswerLength *int `json:"max_answer_length,omitempty"` @@ -133,13 +133,3 @@ func NewQuestionAnsweringInferenceUpdateOptions() *QuestionAnsweringInferenceUpd return r } - -// true - -type QuestionAnsweringInferenceUpdateOptionsVariant interface { - QuestionAnsweringInferenceUpdateOptionsCaster() *QuestionAnsweringInferenceUpdateOptions -} - -func (s *QuestionAnsweringInferenceUpdateOptions) QuestionAnsweringInferenceUpdateOptionsCaster() *QuestionAnsweringInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/randomsampleraggregation.go b/typedapi/types/randomsampleraggregation.go index 9cd0fab90f..68ee47fd9d 100644 --- a/typedapi/types/randomsampleraggregation.go +++ b/typedapi/types/randomsampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RandomSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L749-L769 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L749-L769 type RandomSamplerAggregation struct { // Probability The probability that a document will be included in the aggregated data. // Must be greater than 0, less than 0.5, or exactly 1. @@ -120,13 +120,3 @@ func NewRandomSamplerAggregation() *RandomSamplerAggregation { return r } - -// true - -type RandomSamplerAggregationVariant interface { - RandomSamplerAggregationCaster() *RandomSamplerAggregation -} - -func (s *RandomSamplerAggregation) RandomSamplerAggregationCaster() *RandomSamplerAggregation { - return s -} diff --git a/typedapi/types/randomscorefunction.go b/typedapi/types/randomscorefunction.go index c9bd0402b5..f0cc187cd4 100644 --- a/typedapi/types/randomscorefunction.go +++ b/typedapi/types/randomscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,10 +31,10 @@ import ( // RandomScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L144-L147 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L144-L147 type RandomScoreFunction struct { Field *string `json:"field,omitempty"` - Seed string `json:"seed,omitempty"` + Seed *string `json:"seed,omitempty"` } func (s *RandomScoreFunction) UnmarshalJSON(data []byte) error { @@ -67,7 +67,7 @@ func (s *RandomScoreFunction) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Seed = o + s.Seed = &o } } @@ -80,13 +80,3 @@ func NewRandomScoreFunction() *RandomScoreFunction { return r } - -// true - -type RandomScoreFunctionVariant interface { - RandomScoreFunctionCaster() *RandomScoreFunction -} - -func (s *RandomScoreFunction) RandomScoreFunctionCaster() *RandomScoreFunction { - return s -} diff --git a/typedapi/types/rangeaggregate.go b/typedapi/types/rangeaggregate.go index a395987451..0a80f78c6a 100644 --- a/typedapi/types/rangeaggregate.go +++ b/typedapi/types/rangeaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L594-L598 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L594-L598 type RangeAggregate struct { Buckets BucketsRangeBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewRangeAggregate() *RangeAggregate { return r } - -// false diff --git a/typedapi/types/rangeaggregation.go b/typedapi/types/rangeaggregation.go index 9089c9f7c7..a8c125942b 100644 --- a/typedapi/types/rangeaggregation.go +++ b/typedapi/types/rangeaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L669-L689 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L669-L689 type RangeAggregation struct { // Field The date field whose values are use to build ranges. Field *string `json:"field,omitempty"` @@ -130,13 +130,3 @@ func NewRangeAggregation() *RangeAggregation { return r } - -// true - -type RangeAggregationVariant interface { - RangeAggregationCaster() *RangeAggregation -} - -func (s *RangeAggregation) RangeAggregationCaster() *RangeAggregation { - return s -} diff --git a/typedapi/types/rangebucket.go b/typedapi/types/rangebucket.go index b999faca06..dbb23c1e2c 100644 --- a/typedapi/types/rangebucket.go +++ b/typedapi/types/rangebucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // RangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L600-L607 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L600-L607 type RangeBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -704,5 +704,3 @@ func NewRangeBucket() *RangeBucket { return r } - -// false diff --git a/typedapi/types/rangequery.go b/typedapi/types/rangequery.go index 20434379ea..c842a83692 100644 --- a/typedapi/types/rangequery.go +++ b/typedapi/types/rangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,9 +27,5 @@ package types // NumberRangeQuery // TermRangeQuery // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L176-L186 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L176-L186 type RangeQuery any - -type RangeQueryVariant interface { - RangeQueryCaster() *RangeQuery -} diff --git a/typedapi/types/rankcontainer.go b/typedapi/types/rankcontainer.go index 0137a4522c..c5465f4285 100644 --- a/typedapi/types/rankcontainer.go +++ b/typedapi/types/rankcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // RankContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Rank.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Rank.ts#L22-L28 type RankContainer struct { AdditionalRankContainerProperty map[string]json.RawMessage `json:"-"` // Rrf The reciprocal rank fusion parameters @@ -71,13 +71,3 @@ func NewRankContainer() *RankContainer { return r } - -// true - -type RankContainerVariant interface { - RankContainerCaster() *RankContainer -} - -func (s *RankContainer) RankContainerCaster() *RankContainer { - return s -} diff --git a/typedapi/types/rankeddocument.go b/typedapi/types/rankeddocument.go index a8f6f914e4..c1615ec6db 100644 --- a/typedapi/types/rankeddocument.go +++ b/typedapi/types/rankeddocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Results.ts#L91-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Results.ts#L91-L101 type RankedDocument struct { Index int `json:"index"` RelevanceScore float32 `json:"relevance_score"` @@ -108,5 +108,3 @@ func NewRankedDocument() *RankedDocument { return r } - -// false diff --git a/typedapi/types/rankevalhit.go b/typedapi/types/rankevalhit.go index 5f4d24c962..1fa61e3e93 100644 --- a/typedapi/types/rankevalhit.go +++ b/typedapi/types/rankevalhit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L144-L148 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L144-L148 type RankEvalHit struct { Id_ string `json:"_id"` Index_ string `json:"_index"` @@ -90,5 +90,3 @@ func NewRankEvalHit() *RankEvalHit { return r } - -// false diff --git a/typedapi/types/rankevalhititem.go b/typedapi/types/rankevalhititem.go index 007b8cd053..efbb71ef07 100644 --- a/typedapi/types/rankevalhititem.go +++ b/typedapi/types/rankevalhititem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RankEvalHitItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L139-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L139-L142 type RankEvalHitItem struct { Hit RankEvalHit `json:"hit"` Rating *Float64 `json:"rating,omitempty"` @@ -72,5 +72,3 @@ func NewRankEvalHitItem() *RankEvalHitItem { return r } - -// false diff --git a/typedapi/types/rankevalmetric.go b/typedapi/types/rankevalmetric.go index 9ebf1419ec..b9cc9fae51 100644 --- a/typedapi/types/rankevalmetric.go +++ b/typedapi/types/rankevalmetric.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RankEvalMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L90-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L90-L96 type RankEvalMetric struct { Dcg *RankEvalMetricDiscountedCumulativeGain `json:"dcg,omitempty"` ExpectedReciprocalRank *RankEvalMetricExpectedReciprocalRank `json:"expected_reciprocal_rank,omitempty"` @@ -37,13 +37,3 @@ func NewRankEvalMetric() *RankEvalMetric { return r } - -// true - -type RankEvalMetricVariant interface { - RankEvalMetricCaster() *RankEvalMetric -} - -func (s *RankEvalMetric) RankEvalMetricCaster() *RankEvalMetric { - return s -} diff --git a/typedapi/types/rankevalmetricdetail.go b/typedapi/types/rankevalmetricdetail.go index ac0b408081..c9309cb075 100644 --- a/typedapi/types/rankevalmetricdetail.go +++ b/typedapi/types/rankevalmetricdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L128-L137 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L128-L137 type RankEvalMetricDetail struct { // Hits The hits section shows a grouping of the search results with their supplied // ratings @@ -111,5 +111,3 @@ func NewRankEvalMetricDetail() *RankEvalMetricDetail { return r } - -// false diff --git a/typedapi/types/rankevalmetricdiscountedcumulativegain.go b/typedapi/types/rankevalmetricdiscountedcumulativegain.go index b909371af8..cac77c24a3 100644 --- a/typedapi/types/rankevalmetricdiscountedcumulativegain.go +++ b/typedapi/types/rankevalmetricdiscountedcumulativegain.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDiscountedCumulativeGain type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L66-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L66-L77 type RankEvalMetricDiscountedCumulativeGain struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. @@ -96,13 +96,3 @@ func NewRankEvalMetricDiscountedCumulativeGain() *RankEvalMetricDiscountedCumula return r } - -// true - -type RankEvalMetricDiscountedCumulativeGainVariant interface { - RankEvalMetricDiscountedCumulativeGainCaster() *RankEvalMetricDiscountedCumulativeGain -} - -func (s *RankEvalMetricDiscountedCumulativeGain) RankEvalMetricDiscountedCumulativeGainCaster() *RankEvalMetricDiscountedCumulativeGain { - return s -} diff --git a/typedapi/types/rankevalmetricexpectedreciprocalrank.go b/typedapi/types/rankevalmetricexpectedreciprocalrank.go index a2a400f304..2e58465279 100644 --- a/typedapi/types/rankevalmetricexpectedreciprocalrank.go +++ b/typedapi/types/rankevalmetricexpectedreciprocalrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricExpectedReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L79-L88 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L79-L88 type RankEvalMetricExpectedReciprocalRank struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. @@ -98,13 +98,3 @@ func NewRankEvalMetricExpectedReciprocalRank() *RankEvalMetricExpectedReciprocal return r } - -// true - -type RankEvalMetricExpectedReciprocalRankVariant interface { - RankEvalMetricExpectedReciprocalRankCaster() *RankEvalMetricExpectedReciprocalRank -} - -func (s *RankEvalMetricExpectedReciprocalRank) RankEvalMetricExpectedReciprocalRankCaster() *RankEvalMetricExpectedReciprocalRank { - return s -} diff --git a/typedapi/types/rankevalmetricmeanreciprocalrank.go b/typedapi/types/rankevalmetricmeanreciprocalrank.go index ec4b60f7a1..00841f72e9 100644 --- a/typedapi/types/rankevalmetricmeanreciprocalrank.go +++ b/typedapi/types/rankevalmetricmeanreciprocalrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricMeanReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L60-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L60-L64 type RankEvalMetricMeanReciprocalRank struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. @@ -99,13 +99,3 @@ func NewRankEvalMetricMeanReciprocalRank() *RankEvalMetricMeanReciprocalRank { return r } - -// true - -type RankEvalMetricMeanReciprocalRankVariant interface { - RankEvalMetricMeanReciprocalRankCaster() *RankEvalMetricMeanReciprocalRank -} - -func (s *RankEvalMetricMeanReciprocalRank) RankEvalMetricMeanReciprocalRankCaster() *RankEvalMetricMeanReciprocalRank { - return s -} diff --git a/typedapi/types/rankevalmetricprecision.go b/typedapi/types/rankevalmetricprecision.go index d1b0f967b7..2771a94768 100644 --- a/typedapi/types/rankevalmetricprecision.go +++ b/typedapi/types/rankevalmetricprecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L42-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L42-L52 type RankEvalMetricPrecision struct { // IgnoreUnlabeled Controls how unlabeled documents in the search results are counted. If set to // true, unlabeled documents are ignored and neither count as relevant or @@ -117,13 +117,3 @@ func NewRankEvalMetricPrecision() *RankEvalMetricPrecision { return r } - -// true - -type RankEvalMetricPrecisionVariant interface { - RankEvalMetricPrecisionCaster() *RankEvalMetricPrecision -} - -func (s *RankEvalMetricPrecision) RankEvalMetricPrecisionCaster() *RankEvalMetricPrecision { - return s -} diff --git a/typedapi/types/rankevalmetricrecall.go b/typedapi/types/rankevalmetricrecall.go index 7132a8bccb..072e356d61 100644 --- a/typedapi/types/rankevalmetricrecall.go +++ b/typedapi/types/rankevalmetricrecall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L54-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L54-L58 type RankEvalMetricRecall struct { // K Sets the maximum number of documents retrieved per query. This value will act // in place of the usual size parameter in the query. @@ -99,13 +99,3 @@ func NewRankEvalMetricRecall() *RankEvalMetricRecall { return r } - -// true - -type RankEvalMetricRecallVariant interface { - RankEvalMetricRecallCaster() *RankEvalMetricRecall -} - -func (s *RankEvalMetricRecall) RankEvalMetricRecallCaster() *RankEvalMetricRecall { - return s -} diff --git a/typedapi/types/rankevalquery.go b/typedapi/types/rankevalquery.go index 1b6ff9c2e3..2c2ca2d448 100644 --- a/typedapi/types/rankevalquery.go +++ b/typedapi/types/rankevalquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankEvalQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L111-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L111-L117 type RankEvalQuery struct { Query Query `json:"query"` Size *int `json:"size,omitempty"` @@ -89,13 +89,3 @@ func NewRankEvalQuery() *RankEvalQuery { return r } - -// true - -type RankEvalQueryVariant interface { - RankEvalQueryCaster() *RankEvalQuery -} - -func (s *RankEvalQuery) RankEvalQueryCaster() *RankEvalQuery { - return s -} diff --git a/typedapi/types/rankevalrequestitem.go b/typedapi/types/rankevalrequestitem.go index 29a803c2db..1b15cdc2ac 100644 --- a/typedapi/types/rankevalrequestitem.go +++ b/typedapi/types/rankevalrequestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RankEvalRequestItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L98-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L98-L109 type RankEvalRequestItem struct { // Id The search request’s ID, used to group result details later. Id string `json:"id"` @@ -100,13 +100,3 @@ func NewRankEvalRequestItem() *RankEvalRequestItem { return r } - -// true - -type RankEvalRequestItemVariant interface { - RankEvalRequestItemCaster() *RankEvalRequestItem -} - -func (s *RankEvalRequestItem) RankEvalRequestItemCaster() *RankEvalRequestItem { - return s -} diff --git a/typedapi/types/rankfeaturefunctionlinear.go b/typedapi/types/rankfeaturefunctionlinear.go index 6e53565abc..17bb1bba64 100644 --- a/typedapi/types/rankfeaturefunctionlinear.go +++ b/typedapi/types/rankfeaturefunctionlinear.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RankFeatureFunctionLinear type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L282-L282 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L282-L282 type RankFeatureFunctionLinear struct { } @@ -32,13 +32,3 @@ func NewRankFeatureFunctionLinear() *RankFeatureFunctionLinear { return r } - -// true - -type RankFeatureFunctionLinearVariant interface { - RankFeatureFunctionLinearCaster() *RankFeatureFunctionLinear -} - -func (s *RankFeatureFunctionLinear) RankFeatureFunctionLinearCaster() *RankFeatureFunctionLinear { - return s -} diff --git a/typedapi/types/rankfeaturefunctionlogarithm.go b/typedapi/types/rankfeaturefunctionlogarithm.go index 5398e70994..9d44b7591a 100644 --- a/typedapi/types/rankfeaturefunctionlogarithm.go +++ b/typedapi/types/rankfeaturefunctionlogarithm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionLogarithm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L284-L289 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L284-L289 type RankFeatureFunctionLogarithm struct { // ScalingFactor Configurable scaling factor. ScalingFactor float32 `json:"scaling_factor"` @@ -79,13 +79,3 @@ func NewRankFeatureFunctionLogarithm() *RankFeatureFunctionLogarithm { return r } - -// true - -type RankFeatureFunctionLogarithmVariant interface { - RankFeatureFunctionLogarithmCaster() *RankFeatureFunctionLogarithm -} - -func (s *RankFeatureFunctionLogarithm) RankFeatureFunctionLogarithmCaster() *RankFeatureFunctionLogarithm { - return s -} diff --git a/typedapi/types/rankfeaturefunctionsaturation.go b/typedapi/types/rankfeaturefunctionsaturation.go index 50409696d9..44c8d7ef23 100644 --- a/typedapi/types/rankfeaturefunctionsaturation.go +++ b/typedapi/types/rankfeaturefunctionsaturation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSaturation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L291-L296 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L291-L296 type RankFeatureFunctionSaturation struct { // Pivot Configurable pivot value so that the result will be less than 0.5. Pivot *float32 `json:"pivot,omitempty"` @@ -79,13 +79,3 @@ func NewRankFeatureFunctionSaturation() *RankFeatureFunctionSaturation { return r } - -// true - -type RankFeatureFunctionSaturationVariant interface { - RankFeatureFunctionSaturationCaster() *RankFeatureFunctionSaturation -} - -func (s *RankFeatureFunctionSaturation) RankFeatureFunctionSaturationCaster() *RankFeatureFunctionSaturation { - return s -} diff --git a/typedapi/types/rankfeaturefunctionsigmoid.go b/typedapi/types/rankfeaturefunctionsigmoid.go index 7e539191b7..24a10b25aa 100644 --- a/typedapi/types/rankfeaturefunctionsigmoid.go +++ b/typedapi/types/rankfeaturefunctionsigmoid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSigmoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L298-L307 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L298-L307 type RankFeatureFunctionSigmoid struct { // Exponent Configurable Exponent. Exponent float32 `json:"exponent"` @@ -97,13 +97,3 @@ func NewRankFeatureFunctionSigmoid() *RankFeatureFunctionSigmoid { return r } - -// true - -type RankFeatureFunctionSigmoidVariant interface { - RankFeatureFunctionSigmoidCaster() *RankFeatureFunctionSigmoid -} - -func (s *RankFeatureFunctionSigmoid) RankFeatureFunctionSigmoidCaster() *RankFeatureFunctionSigmoid { - return s -} diff --git a/typedapi/types/rankfeatureproperty.go b/typedapi/types/rankfeatureproperty.go index 21287ca6a2..bfe072d206 100644 --- a/typedapi/types/rankfeatureproperty.go +++ b/typedapi/types/rankfeatureproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // RankFeatureProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L206-L209 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L208-L211 type RankFeatureProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -209,6 +209,12 @@ func (s *RankFeatureProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -578,6 +584,12 @@ func (s *RankFeatureProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -811,13 +823,3 @@ func NewRankFeatureProperty() *RankFeatureProperty { return r } - -// true - -type RankFeaturePropertyVariant interface { - RankFeaturePropertyCaster() *RankFeatureProperty -} - -func (s *RankFeatureProperty) RankFeaturePropertyCaster() *RankFeatureProperty { - return s -} diff --git a/typedapi/types/rankfeaturequery.go b/typedapi/types/rankfeaturequery.go index 186d4627e8..f063f63706 100644 --- a/typedapi/types/rankfeaturequery.go +++ b/typedapi/types/rankfeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RankFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L309-L335 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L309-L335 type RankFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -135,13 +135,3 @@ func NewRankFeatureQuery() *RankFeatureQuery { return r } - -// true - -type RankFeatureQueryVariant interface { - RankFeatureQueryCaster() *RankFeatureQuery -} - -func (s *RankFeatureQuery) RankFeatureQueryCaster() *RankFeatureQuery { - return s -} diff --git a/typedapi/types/rankfeaturesproperty.go b/typedapi/types/rankfeaturesproperty.go index fe8a9c920c..0d81cdb596 100644 --- a/typedapi/types/rankfeaturesproperty.go +++ b/typedapi/types/rankfeaturesproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // RankFeaturesProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L211-L214 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L213-L216 type RankFeaturesProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` @@ -209,6 +209,12 @@ func (s *RankFeaturesProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -578,6 +584,12 @@ func (s *RankFeaturesProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -811,13 +823,3 @@ func NewRankFeaturesProperty() *RankFeaturesProperty { return r } - -// true - -type RankFeaturesPropertyVariant interface { - RankFeaturesPropertyCaster() *RankFeaturesProperty -} - -func (s *RankFeaturesProperty) RankFeaturesPropertyCaster() *RankFeaturesProperty { - return s -} diff --git a/typedapi/types/rankvectorproperty.go b/typedapi/types/rankvectorproperty.go new file mode 100644 index 0000000000..7d38c2822b --- /dev/null +++ b/typedapi/types/rankvectorproperty.go @@ -0,0 +1,835 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/rankvectorelementtype" + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/syntheticsourcekeepenum" +) + +// RankVectorProperty type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L218-L225 +type RankVectorProperty struct { + Dims *int `json:"dims,omitempty"` + Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` + ElementType *rankvectorelementtype.RankVectorElementType `json:"element_type,omitempty"` + Fields map[string]Property `json:"fields,omitempty"` + IgnoreAbove *int `json:"ignore_above,omitempty"` + // Meta Metadata about the field. + Meta map[string]string `json:"meta,omitempty"` + Properties map[string]Property `json:"properties,omitempty"` + SyntheticSourceKeep *syntheticsourcekeepenum.SyntheticSourceKeepEnum `json:"synthetic_source_keep,omitempty"` + Type string `json:"type,omitempty"` +} + +func (s *RankVectorProperty) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "dims": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Dims", err) + } + s.Dims = &value + case float64: + f := int(v) + s.Dims = &f + } + + case "dynamic": + if err := dec.Decode(&s.Dynamic); err != nil { + return fmt.Errorf("%s | %w", "Dynamic", err) + } + + case "element_type": + if err := dec.Decode(&s.ElementType); err != nil { + return fmt.Errorf("%s | %w", "ElementType", err) + } + + case "fields": + if s.Fields == nil { + s.Fields = make(map[string]Property, 0) + } + refs := make(map[string]json.RawMessage, 0) + dec.Decode(&refs) + for key, message := range refs { + kind := make(map[string]any) + buf := bytes.NewReader(message) + localDec := json.NewDecoder(buf) + localDec.Decode(&kind) + buf.Seek(0, io.SeekStart) + if _, ok := kind["type"]; !ok { + kind["type"] = "object" + } + switch kind["type"] { + case "binary": + oo := NewBinaryProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "boolean": + oo := NewBooleanProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "{dynamic_type}": + oo := NewDynamicProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "join": + oo := NewJoinProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "keyword": + oo := NewKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "match_only_text": + oo := NewMatchOnlyTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "percolator": + oo := NewPercolatorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "rank_feature": + oo := NewRankFeatureProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "rank_features": + oo := NewRankFeaturesProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "search_as_you_type": + oo := NewSearchAsYouTypeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "text": + oo := NewTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "version": + oo := NewVersionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "wildcard": + oo := NewWildcardProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "date_nanos": + oo := NewDateNanosProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "date": + oo := NewDateProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "aggregate_metric_double": + oo := NewAggregateMetricDoubleProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "dense_vector": + oo := NewDenseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "flattened": + oo := NewFlattenedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "nested": + oo := NewNestedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "object": + oo := NewObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "passthrough": + oo := NewPassthroughObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "semantic_text": + oo := NewSemanticTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "sparse_vector": + oo := NewSparseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "completion": + oo := NewCompletionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "constant_keyword": + oo := NewConstantKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "counted_keyword": + oo := NewCountedKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "alias": + oo := NewFieldAliasProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "histogram": + oo := NewHistogramProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "ip": + oo := NewIpProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "murmur3": + oo := NewMurmur3HashProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "token_count": + oo := NewTokenCountProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "geo_point": + oo := NewGeoPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "geo_shape": + oo := NewGeoShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "point": + oo := NewPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "shape": + oo := NewShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "byte": + oo := NewByteNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "double": + oo := NewDoubleNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "float": + oo := NewFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "half_float": + oo := NewHalfFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "integer": + oo := NewIntegerNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "long": + oo := NewLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "scaled_float": + oo := NewScaledFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "short": + oo := NewShortNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "unsigned_long": + oo := NewUnsignedLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "date_range": + oo := NewDateRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "double_range": + oo := NewDoubleRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "float_range": + oo := NewFloatRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "integer_range": + oo := NewIntegerRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "ip_range": + oo := NewIpRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "long_range": + oo := NewLongRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + case "icu_collation_keyword": + oo := NewIcuCollationProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo + default: + oo := new(Property) + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("new(Property) | %w", err) + } + s.Fields[key] = oo + } + } + + case "ignore_above": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "IgnoreAbove", err) + } + s.IgnoreAbove = &value + case float64: + f := int(v) + s.IgnoreAbove = &f + } + + case "meta": + if s.Meta == nil { + s.Meta = make(map[string]string, 0) + } + if err := dec.Decode(&s.Meta); err != nil { + return fmt.Errorf("%s | %w", "Meta", err) + } + + case "properties": + if s.Properties == nil { + s.Properties = make(map[string]Property, 0) + } + refs := make(map[string]json.RawMessage, 0) + dec.Decode(&refs) + for key, message := range refs { + kind := make(map[string]any) + buf := bytes.NewReader(message) + localDec := json.NewDecoder(buf) + localDec.Decode(&kind) + buf.Seek(0, io.SeekStart) + if _, ok := kind["type"]; !ok { + kind["type"] = "object" + } + switch kind["type"] { + case "binary": + oo := NewBinaryProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "boolean": + oo := NewBooleanProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "{dynamic_type}": + oo := NewDynamicProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "join": + oo := NewJoinProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "keyword": + oo := NewKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "match_only_text": + oo := NewMatchOnlyTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "percolator": + oo := NewPercolatorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "rank_feature": + oo := NewRankFeatureProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "rank_features": + oo := NewRankFeaturesProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "search_as_you_type": + oo := NewSearchAsYouTypeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "text": + oo := NewTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "version": + oo := NewVersionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "wildcard": + oo := NewWildcardProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "date_nanos": + oo := NewDateNanosProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "date": + oo := NewDateProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "aggregate_metric_double": + oo := NewAggregateMetricDoubleProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "dense_vector": + oo := NewDenseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "flattened": + oo := NewFlattenedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "nested": + oo := NewNestedProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "object": + oo := NewObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "passthrough": + oo := NewPassthroughObjectProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "semantic_text": + oo := NewSemanticTextProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "sparse_vector": + oo := NewSparseVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "completion": + oo := NewCompletionProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "constant_keyword": + oo := NewConstantKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "counted_keyword": + oo := NewCountedKeywordProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "alias": + oo := NewFieldAliasProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "histogram": + oo := NewHistogramProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "ip": + oo := NewIpProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "murmur3": + oo := NewMurmur3HashProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "token_count": + oo := NewTokenCountProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "geo_point": + oo := NewGeoPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "geo_shape": + oo := NewGeoShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "point": + oo := NewPointProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "shape": + oo := NewShapeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "byte": + oo := NewByteNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "double": + oo := NewDoubleNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "float": + oo := NewFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "half_float": + oo := NewHalfFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "integer": + oo := NewIntegerNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "long": + oo := NewLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "scaled_float": + oo := NewScaledFloatNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "short": + oo := NewShortNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "unsigned_long": + oo := NewUnsignedLongNumberProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "date_range": + oo := NewDateRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "double_range": + oo := NewDoubleRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "float_range": + oo := NewFloatRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "integer_range": + oo := NewIntegerRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "ip_range": + oo := NewIpRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "long_range": + oo := NewLongRangeProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + case "icu_collation_keyword": + oo := NewIcuCollationProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo + default: + oo := new(Property) + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("new(Property) | %w", err) + } + s.Properties[key] = oo + } + } + + case "synthetic_source_keep": + if err := dec.Decode(&s.SyntheticSourceKeep); err != nil { + return fmt.Errorf("%s | %w", "SyntheticSourceKeep", err) + } + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s RankVectorProperty) MarshalJSON() ([]byte, error) { + type innerRankVectorProperty RankVectorProperty + tmp := innerRankVectorProperty{ + Dims: s.Dims, + Dynamic: s.Dynamic, + ElementType: s.ElementType, + Fields: s.Fields, + IgnoreAbove: s.IgnoreAbove, + Meta: s.Meta, + Properties: s.Properties, + SyntheticSourceKeep: s.SyntheticSourceKeep, + Type: s.Type, + } + + tmp.Type = "rank_vectors" + + return json.Marshal(tmp) +} + +// NewRankVectorProperty returns a RankVectorProperty. +func NewRankVectorProperty() *RankVectorProperty { + r := &RankVectorProperty{ + Fields: make(map[string]Property), + Meta: make(map[string]string), + Properties: make(map[string]Property), + } + + return r +} diff --git a/typedapi/types/raretermsaggregation.go b/typedapi/types/raretermsaggregation.go index dca9d286c1..91c975318d 100644 --- a/typedapi/types/raretermsaggregation.go +++ b/typedapi/types/raretermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RareTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L706-L739 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L706-L739 type RareTermsAggregation struct { // Exclude Terms that should be excluded from the aggregation. Exclude []string `json:"exclude,omitempty"` @@ -181,13 +181,3 @@ func NewRareTermsAggregation() *RareTermsAggregation { return r } - -// true - -type RareTermsAggregationVariant interface { - RareTermsAggregationCaster() *RareTermsAggregation -} - -func (s *RareTermsAggregation) RareTermsAggregationCaster() *RareTermsAggregation { - return s -} diff --git a/typedapi/types/rateaggregate.go b/typedapi/types/rateaggregate.go index 90efb5cac0..db2a60f45f 100644 --- a/typedapi/types/rateaggregate.go +++ b/typedapi/types/rateaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RateAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L847-L854 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L849-L856 type RateAggregate struct { Meta Metadata `json:"meta,omitempty"` Value Float64 `json:"value"` @@ -97,5 +97,3 @@ func NewRateAggregate() *RateAggregate { return r } - -// false diff --git a/typedapi/types/rateaggregation.go b/typedapi/types/rateaggregation.go index 080e16ab0d..7185a06231 100644 --- a/typedapi/types/rateaggregation.go +++ b/typedapi/types/rateaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // RateAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L239-L250 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L262-L273 type RateAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -113,13 +113,3 @@ func NewRateAggregation() *RateAggregation { return r } - -// true - -type RateAggregationVariant interface { - RateAggregationCaster() *RateAggregation -} - -func (s *RateAggregation) RateAggregationCaster() *RateAggregation { - return s -} diff --git a/typedapi/types/ratelimitsetting.go b/typedapi/types/ratelimitsetting.go index 5024275a77..9a54a14b7b 100644 --- a/typedapi/types/ratelimitsetting.go +++ b/typedapi/types/ratelimitsetting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RateLimitSetting type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Services.ts#L95-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Services.ts#L323-L328 type RateLimitSetting struct { // RequestsPerMinute The number of requests allowed per minute. RequestsPerMinute *int `json:"requests_per_minute,omitempty"` @@ -79,13 +79,3 @@ func NewRateLimitSetting() *RateLimitSetting { return r } - -// true - -type RateLimitSettingVariant interface { - RateLimitSettingCaster() *RateLimitSetting -} - -func (s *RateLimitSetting) RateLimitSettingCaster() *RateLimitSetting { - return s -} diff --git a/typedapi/types/readblobdetails.go b/typedapi/types/readblobdetails.go index 61372f21e9..8fdeed6ad1 100644 --- a/typedapi/types/readblobdetails.go +++ b/typedapi/types/readblobdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReadBlobDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L204-L248 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L204-L248 type ReadBlobDetails struct { // BeforeWriteComplete Indicates whether the read operation may have started before the write // operation was complete. @@ -156,5 +156,3 @@ func NewReadBlobDetails() *ReadBlobDetails { return r } - -// false diff --git a/typedapi/types/readexception.go b/typedapi/types/readexception.go index df6908e956..61c2b275ff 100644 --- a/typedapi/types/readexception.go +++ b/typedapi/types/readexception.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReadException type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ccr/_types/FollowIndexStats.ts#L111-L118 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ccr/_types/FollowIndexStats.ts#L111-L118 type ReadException struct { // Exception The exception that caused the read to fail. Exception ErrorCause `json:"exception"` @@ -93,5 +93,3 @@ func NewReadException() *ReadException { return r } - -// false diff --git a/typedapi/types/readonlyurlrepository.go b/typedapi/types/readonlyurlrepository.go index fd213beb68..1357149cd4 100644 --- a/typedapi/types/readonlyurlrepository.go +++ b/typedapi/types/readonlyurlrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ReadOnlyUrlRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L60-L63 type ReadOnlyUrlRepository struct { Settings ReadOnlyUrlRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewReadOnlyUrlRepository() *ReadOnlyUrlRepository { return r } - -// true - -type ReadOnlyUrlRepositoryVariant interface { - ReadOnlyUrlRepositoryCaster() *ReadOnlyUrlRepository -} - -func (s *ReadOnlyUrlRepository) ReadOnlyUrlRepositoryCaster() *ReadOnlyUrlRepository { - return s -} diff --git a/typedapi/types/readonlyurlrepositorysettings.go b/typedapi/types/readonlyurlrepositorysettings.go index 02055b4d1d..524cce33a3 100644 --- a/typedapi/types/readonlyurlrepositorysettings.go +++ b/typedapi/types/readonlyurlrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReadOnlyUrlRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L110-L115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L110-L115 type ReadOnlyUrlRepositorySettings struct { ChunkSize ByteSize `json:"chunk_size,omitempty"` Compress *bool `json:"compress,omitempty"` @@ -147,13 +147,3 @@ func NewReadOnlyUrlRepositorySettings() *ReadOnlyUrlRepositorySettings { return r } - -// true - -type ReadOnlyUrlRepositorySettingsVariant interface { - ReadOnlyUrlRepositorySettingsCaster() *ReadOnlyUrlRepositorySettings -} - -func (s *ReadOnlyUrlRepositorySettings) ReadOnlyUrlRepositorySettingsCaster() *ReadOnlyUrlRepositorySettings { - return s -} diff --git a/typedapi/types/readsummaryinfo.go b/typedapi/types/readsummaryinfo.go index a6bd569b2a..802942a543 100644 --- a/typedapi/types/readsummaryinfo.go +++ b/typedapi/types/readsummaryinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReadSummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L115-L160 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L115-L160 type ReadSummaryInfo struct { // Count The number of read operations performed in the test. Count int `json:"count"` @@ -165,5 +165,3 @@ func NewReadSummaryInfo() *ReadSummaryInfo { return r } - -// false diff --git a/typedapi/types/realmcache.go b/typedapi/types/realmcache.go index f94f15f6a5..a6810e5dbb 100644 --- a/typedapi/types/realmcache.go +++ b/typedapi/types/realmcache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RealmCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L276-L278 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L276-L278 type RealmCache struct { Size int64 `json:"size"` } @@ -77,5 +77,3 @@ func NewRealmCache() *RealmCache { return r } - -// false diff --git a/typedapi/types/realminfo.go b/typedapi/types/realminfo.go index 8af0607aea..6a771e541b 100644 --- a/typedapi/types/realminfo.go +++ b/typedapi/types/realminfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RealmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RealmInfo.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RealmInfo.ts#L22-L25 type RealmInfo struct { Name string `json:"name"` Type string `json:"type"` @@ -80,5 +80,3 @@ func NewRealmInfo() *RealmInfo { return r } - -// false diff --git a/typedapi/types/recording.go b/typedapi/types/recording.go index 44db833ee8..59b1a15fd6 100644 --- a/typedapi/types/recording.go +++ b/typedapi/types/recording.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Recording type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L227-L232 type Recording struct { CumulativeExecutionCount *int64 `json:"cumulative_execution_count,omitempty"` CumulativeExecutionTime Duration `json:"cumulative_execution_time,omitempty"` @@ -102,5 +102,3 @@ func NewRecording() *Recording { return r } - -// false diff --git a/typedapi/types/recoverybytes.go b/typedapi/types/recoverybytes.go index e196a32e89..3c0def7b43 100644 --- a/typedapi/types/recoverybytes.go +++ b/typedapi/types/recoverybytes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RecoveryBytes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L38-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L38-L48 type RecoveryBytes struct { Percent Percentage `json:"percent"` Recovered ByteSize `json:"recovered,omitempty"` @@ -114,5 +114,3 @@ func NewRecoveryBytes() *RecoveryBytes { return r } - -// false diff --git a/typedapi/types/recoveryfiles.go b/typedapi/types/recoveryfiles.go index 7a333597bc..9d4ac8a6a9 100644 --- a/typedapi/types/recoveryfiles.go +++ b/typedapi/types/recoveryfiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RecoveryFiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L56-L62 type RecoveryFiles struct { Details []FileDetails `json:"details,omitempty"` Percent Percentage `json:"percent"` @@ -121,5 +121,3 @@ func NewRecoveryFiles() *RecoveryFiles { return r } - -// false diff --git a/typedapi/types/recoveryindexstatus.go b/typedapi/types/recoveryindexstatus.go index 4ea1f4e5a7..a4bc39cb08 100644 --- a/typedapi/types/recoveryindexstatus.go +++ b/typedapi/types/recoveryindexstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RecoveryIndexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L64-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L64-L74 type RecoveryIndexStatus struct { Bytes *RecoveryBytes `json:"bytes,omitempty"` Files RecoveryFiles `json:"files"` @@ -114,5 +114,3 @@ func NewRecoveryIndexStatus() *RecoveryIndexStatus { return r } - -// false diff --git a/typedapi/types/recoveryorigin.go b/typedapi/types/recoveryorigin.go index 34c2f21898..f5c18c029a 100644 --- a/typedapi/types/recoveryorigin.go +++ b/typedapi/types/recoveryorigin.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RecoveryOrigin type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L76-L89 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L76-L89 type RecoveryOrigin struct { BootstrapNewHistoryUuid *bool `json:"bootstrap_new_history_uuid,omitempty"` Host *string `json:"host,omitempty"` @@ -149,5 +149,3 @@ func NewRecoveryOrigin() *RecoveryOrigin { return r } - -// false diff --git a/typedapi/types/recoveryrecord.go b/typedapi/types/recoveryrecord.go index a6e6324427..93b1f64e61 100644 --- a/typedapi/types/recoveryrecord.go +++ b/typedapi/types/recoveryrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RecoveryRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/recovery/types.ts#L24-L155 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/recovery/types.ts#L24-L155 type RecoveryRecord struct { // Bytes The number of bytes to recover. Bytes *string `json:"bytes,omitempty"` @@ -362,5 +362,3 @@ func NewRecoveryRecord() *RecoveryRecord { return r } - -// false diff --git a/typedapi/types/recoverystartstatus.go b/typedapi/types/recoverystartstatus.go index 16e44d9e5b..9ff65e95d5 100644 --- a/typedapi/types/recoverystartstatus.go +++ b/typedapi/types/recoverystartstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RecoveryStartStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L91-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L91-L96 type RecoveryStartStatus struct { CheckIndexTime Duration `json:"check_index_time,omitempty"` CheckIndexTimeInMillis int64 `json:"check_index_time_in_millis"` @@ -84,5 +84,3 @@ func NewRecoveryStartStatus() *RecoveryStartStatus { return r } - -// false diff --git a/typedapi/types/recoverystats.go b/typedapi/types/recoverystats.go index eb0399ab21..ec93b57e22 100644 --- a/typedapi/types/recoverystats.go +++ b/typedapi/types/recoverystats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RecoveryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L231-L236 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L253-L258 type RecoveryStats struct { CurrentAsSource int64 `json:"current_as_source"` CurrentAsTarget int64 `json:"current_as_target"` @@ -105,5 +105,3 @@ func NewRecoveryStats() *RecoveryStats { return r } - -// false diff --git a/typedapi/types/recoverystatus.go b/typedapi/types/recoverystatus.go index 3d3aec94c6..531c79ae76 100644 --- a/typedapi/types/recoverystatus.go +++ b/typedapi/types/recoverystatus.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RecoveryStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L98-L100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L98-L100 type RecoveryStatus struct { Shards []ShardRecovery `json:"shards"` } @@ -33,5 +33,3 @@ func NewRecoveryStatus() *RecoveryStatus { return r } - -// false diff --git a/typedapi/types/redact.go b/typedapi/types/redact.go index 5f3159406b..28761b6d15 100644 --- a/typedapi/types/redact.go +++ b/typedapi/types/redact.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Redact type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Simulation.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L38-L43 type Redact struct { // IsRedacted_ indicates if document has been redacted IsRedacted_ bool `json:"_is_redacted"` @@ -77,5 +77,3 @@ func NewRedact() *Redact { return r } - -// false diff --git a/typedapi/types/redactprocessor.go b/typedapi/types/redactprocessor.go index 54801c7dab..ada4a4aef0 100644 --- a/typedapi/types/redactprocessor.go +++ b/typedapi/types/redactprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RedactProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1297-L1338 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1297-L1338 type RedactProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -232,13 +232,3 @@ func NewRedactProcessor() *RedactProcessor { return r } - -// true - -type RedactProcessorVariant interface { - RedactProcessorCaster() *RedactProcessor -} - -func (s *RedactProcessor) RedactProcessorCaster() *RedactProcessor { - return s -} diff --git a/typedapi/types/refreshstats.go b/typedapi/types/refreshstats.go index 6ae33e2a3f..0c2957bbfe 100644 --- a/typedapi/types/refreshstats.go +++ b/typedapi/types/refreshstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RefreshStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L238-L245 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L260-L267 type RefreshStats struct { ExternalTotal int64 `json:"external_total"` ExternalTotalTimeInMillis int64 `json:"external_total_time_in_millis"` @@ -127,5 +127,3 @@ func NewRefreshStats() *RefreshStats { return r } - -// false diff --git a/typedapi/types/regexoptions.go b/typedapi/types/regexoptions.go index 01d567aae4..84035254f2 100644 --- a/typedapi/types/regexoptions.go +++ b/typedapi/types/regexoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,10 +31,10 @@ import ( // RegexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L183-L194 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L183-L194 type RegexOptions struct { // Flags Optional operators for the regular expression. - Flags string `json:"flags,omitempty"` + Flags *string `json:"flags,omitempty"` // MaxDeterminizedStates Maximum number of automaton states required for the query. MaxDeterminizedStates *int `json:"max_determinized_states,omitempty"` } @@ -64,7 +64,7 @@ func (s *RegexOptions) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Flags = o + s.Flags = &o case "max_determinized_states": @@ -93,13 +93,3 @@ func NewRegexOptions() *RegexOptions { return r } - -// true - -type RegexOptionsVariant interface { - RegexOptionsCaster() *RegexOptions -} - -func (s *RegexOptions) RegexOptionsCaster() *RegexOptions { - return s -} diff --git a/typedapi/types/regexpquery.go b/typedapi/types/regexpquery.go index 5510647b9a..79593aad27 100644 --- a/typedapi/types/regexpquery.go +++ b/typedapi/types/regexpquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RegexpQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L203-L236 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L203-L236 type RegexpQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -180,13 +180,3 @@ func NewRegexpQuery() *RegexpQuery { return r } - -// true - -type RegexpQueryVariant interface { - RegexpQueryCaster() *RegexpQuery -} - -func (s *RegexpQuery) RegexpQueryCaster() *RegexpQuery { - return s -} diff --git a/typedapi/types/regexvalidation.go b/typedapi/types/regexvalidation.go index 0a5a0ca8c9..c55e12b3bc 100644 --- a/typedapi/types/regexvalidation.go +++ b/typedapi/types/regexvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RegexValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L78-L81 type RegexValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` @@ -93,13 +93,3 @@ func NewRegexValidation() *RegexValidation { return r } - -// true - -type RegexValidationVariant interface { - RegexValidationCaster() *RegexValidation -} - -func (s *RegexValidation) RegexValidationCaster() *RegexValidation { - return s -} diff --git a/typedapi/types/registereddomainprocessor.go b/typedapi/types/registereddomainprocessor.go index 28d5e78844..17b8210974 100644 --- a/typedapi/types/registereddomainprocessor.go +++ b/typedapi/types/registereddomainprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RegisteredDomainProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1340-L1356 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1340-L1356 type RegisteredDomainProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewRegisteredDomainProcessor() *RegisteredDomainProcessor { return r } - -// true - -type RegisteredDomainProcessorVariant interface { - RegisteredDomainProcessorCaster() *RegisteredDomainProcessor -} - -func (s *RegisteredDomainProcessor) RegisteredDomainProcessorCaster() *RegisteredDomainProcessor { - return s -} diff --git a/typedapi/types/regressioninferenceoptions.go b/typedapi/types/regressioninferenceoptions.go index 7e77d69e6c..3b82870c18 100644 --- a/typedapi/types/regressioninferenceoptions.go +++ b/typedapi/types/regressioninferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RegressionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L107-L116 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L107-L116 type RegressionInferenceOptions struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` @@ -87,13 +87,3 @@ func NewRegressionInferenceOptions() *RegressionInferenceOptions { return r } - -// true - -type RegressionInferenceOptionsVariant interface { - RegressionInferenceOptionsCaster() *RegressionInferenceOptions -} - -func (s *RegressionInferenceOptions) RegressionInferenceOptionsCaster() *RegressionInferenceOptions { - return s -} diff --git a/typedapi/types/reindexdestination.go b/typedapi/types/reindexdestination.go index 053c873c71..d34167a182 100644 --- a/typedapi/types/reindexdestination.go +++ b/typedapi/types/reindexdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // ReindexDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex/types.ts#L39-L67 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex/types.ts#L39-L67 type ReindexDestination struct { // Index The name of the data stream, index, or index alias you are copying to. Index string `json:"index"` @@ -117,13 +117,3 @@ func NewReindexDestination() *ReindexDestination { return r } - -// true - -type ReindexDestinationVariant interface { - ReindexDestinationCaster() *ReindexDestination -} - -func (s *ReindexDestination) ReindexDestinationCaster() *ReindexDestination { - return s -} diff --git a/typedapi/types/reindexnode.go b/typedapi/types/reindexnode.go index 2542cea041..e7ba54d1d6 100644 --- a/typedapi/types/reindexnode.go +++ b/typedapi/types/reindexnode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ReindexNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex_rethrottle/types.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex_rethrottle/types.ts#L33-L35 type ReindexNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` @@ -113,5 +113,3 @@ func NewReindexNode() *ReindexNode { return r } - -// false diff --git a/typedapi/types/reindexsource.go b/typedapi/types/reindexsource.go index 9a6b5895da..530114f8a8 100644 --- a/typedapi/types/reindexsource.go +++ b/typedapi/types/reindexsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReindexSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex/types.ts#L69-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex/types.ts#L69-L110 type ReindexSource struct { // Index The name of the data stream, index, or alias you are copying from. // It accepts a comma-separated list to reindex from multiple sources. @@ -175,13 +175,3 @@ func NewReindexSource() *ReindexSource { return r } - -// true - -type ReindexSourceVariant interface { - ReindexSourceCaster() *ReindexSource -} - -func (s *ReindexSource) ReindexSourceCaster() *ReindexSource { - return s -} diff --git a/typedapi/types/reindexstatus.go b/typedapi/types/reindexstatus.go index 34fc22d4e9..80a52cca46 100644 --- a/typedapi/types/reindexstatus.go +++ b/typedapi/types/reindexstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReindexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex_rethrottle/types.ts#L37-L85 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex_rethrottle/types.ts#L37-L85 type ReindexStatus struct { // Batches The number of scroll responses pulled back by the reindex. Batches int64 `json:"batches"` @@ -237,5 +237,3 @@ func NewReindexStatus() *ReindexStatus { return r } - -// false diff --git a/typedapi/types/reindextask.go b/typedapi/types/reindextask.go index 67b59b1652..657382fe52 100644 --- a/typedapi/types/reindextask.go +++ b/typedapi/types/reindextask.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReindexTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex_rethrottle/types.ts#L87-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex_rethrottle/types.ts#L87-L98 type ReindexTask struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` @@ -161,5 +161,3 @@ func NewReindexTask() *ReindexTask { return r } - -// false diff --git a/typedapi/types/reloaddetails.go b/typedapi/types/reloaddetails.go index 1bc9e2cbec..1d3a43870c 100644 --- a/typedapi/types/reloaddetails.go +++ b/typedapi/types/reloaddetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReloadDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/reload_search_analyzers/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/reload_search_analyzers/types.ts#L27-L31 type ReloadDetails struct { Index string `json:"index"` ReloadedAnalyzers []string `json:"reloaded_analyzers"` @@ -86,5 +86,3 @@ func NewReloadDetails() *ReloadDetails { return r } - -// false diff --git a/typedapi/types/reloadresult.go b/typedapi/types/reloadresult.go index f2ca02f706..d8ce2fb9af 100644 --- a/typedapi/types/reloadresult.go +++ b/typedapi/types/reloadresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/reload_search_analyzers/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/reload_search_analyzers/types.ts#L22-L25 type ReloadResult struct { ReloadDetails []ReloadDetails `json:"reload_details"` Shards_ ShardStatistics `json:"_shards"` @@ -34,5 +34,3 @@ func NewReloadResult() *ReloadResult { return r } - -// false diff --git a/typedapi/types/relocationfailureinfo.go b/typedapi/types/relocationfailureinfo.go index 6e5e9888ab..fa09ab7931 100644 --- a/typedapi/types/relocationfailureinfo.go +++ b/typedapi/types/relocationfailureinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RelocationFailureInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Node.ts#L67-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Node.ts#L67-L69 type RelocationFailureInfo struct { FailedAttempts int `json:"failed_attempts"` } @@ -78,5 +78,3 @@ func NewRelocationFailureInfo() *RelocationFailureInfo { return r } - -// false diff --git a/typedapi/types/remoteclusterinfo.go b/typedapi/types/remoteclusterinfo.go new file mode 100644 index 0000000000..66e619039b --- /dev/null +++ b/typedapi/types/remoteclusterinfo.go @@ -0,0 +1,290 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/healthstatus" +) + +// RemoteClusterInfo type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L786-L817 +type RemoteClusterInfo struct { + // ClusterUuid The UUID of the remote cluster. + ClusterUuid string `json:"cluster_uuid"` + // IndicesCount The total number of indices in the remote cluster. + IndicesCount int `json:"indices_count"` + // IndicesTotalSize Total data set size of all shards assigned to selected nodes, as a + // human-readable string. + IndicesTotalSize *string `json:"indices_total_size,omitempty"` + // IndicesTotalSizeInBytes Total data set size, in bytes, of all shards assigned to selected nodes. + IndicesTotalSizeInBytes int64 `json:"indices_total_size_in_bytes"` + // MaxHeap Maximum amount of memory available for use by the heap across the nodes of + // the remote cluster, as a human-readable string. + MaxHeap *string `json:"max_heap,omitempty"` + // MaxHeapInBytes Maximum amount of memory, in bytes, available for use by the heap across the + // nodes of the remote cluster. + MaxHeapInBytes int64 `json:"max_heap_in_bytes"` + // MemTotal Total amount of physical memory across the nodes of the remote cluster, as a + // human-readable string. + MemTotal *string `json:"mem_total,omitempty"` + // MemTotalInBytes Total amount, in bytes, of physical memory across the nodes of the remote + // cluster. + MemTotalInBytes int64 `json:"mem_total_in_bytes"` + // Mode The connection mode used to communicate with the remote cluster. + Mode string `json:"mode"` + // NodesCount The total count of nodes in the remote cluster. + NodesCount int `json:"nodes_count"` + // ShardsCount The total number of shards in the remote cluster. + ShardsCount int `json:"shards_count"` + // SkipUnavailable The `skip_unavailable` setting used for this remote cluster. + SkipUnavailable bool `json:"skip_unavailable"` + // Status Health status of the cluster, based on the state of its primary and replica + // shards. + Status healthstatus.HealthStatus `json:"status"` + // TransportCompress Transport compression setting used for this remote cluster. + TransportCompress string `json:"transport.compress"` + // Version The list of Elasticsearch versions used by the nodes on the remote cluster. + Version []string `json:"version"` +} + +func (s *RemoteClusterInfo) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "cluster_uuid": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "ClusterUuid", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.ClusterUuid = o + + case "indices_count": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "IndicesCount", err) + } + s.IndicesCount = value + case float64: + f := int(v) + s.IndicesCount = f + } + + case "indices_total_size": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "IndicesTotalSize", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.IndicesTotalSize = &o + + case "indices_total_size_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "IndicesTotalSizeInBytes", err) + } + s.IndicesTotalSizeInBytes = value + case float64: + f := int64(v) + s.IndicesTotalSizeInBytes = f + } + + case "max_heap": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "MaxHeap", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.MaxHeap = &o + + case "max_heap_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "MaxHeapInBytes", err) + } + s.MaxHeapInBytes = value + case float64: + f := int64(v) + s.MaxHeapInBytes = f + } + + case "mem_total": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "MemTotal", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.MemTotal = &o + + case "mem_total_in_bytes": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "MemTotalInBytes", err) + } + s.MemTotalInBytes = value + case float64: + f := int64(v) + s.MemTotalInBytes = f + } + + case "mode": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Mode", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Mode = o + + case "nodes_count": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "NodesCount", err) + } + s.NodesCount = value + case float64: + f := int(v) + s.NodesCount = f + } + + case "shards_count": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ShardsCount", err) + } + s.ShardsCount = value + case float64: + f := int(v) + s.ShardsCount = f + } + + case "skip_unavailable": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "SkipUnavailable", err) + } + s.SkipUnavailable = value + case bool: + s.SkipUnavailable = v + } + + case "status": + if err := dec.Decode(&s.Status); err != nil { + return fmt.Errorf("%s | %w", "Status", err) + } + + case "transport.compress": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "TransportCompress", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.TransportCompress = o + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// NewRemoteClusterInfo returns a RemoteClusterInfo. +func NewRemoteClusterInfo() *RemoteClusterInfo { + r := &RemoteClusterInfo{} + + return r +} diff --git a/typedapi/types/remoteclusterprivileges.go b/typedapi/types/remoteclusterprivileges.go index 864389818c..70d079c760 100644 --- a/typedapi/types/remoteclusterprivileges.go +++ b/typedapi/types/remoteclusterprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // RemoteClusterPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L278-L290 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L278-L290 type RemoteClusterPrivileges struct { // Clusters A list of cluster aliases to which the permissions in this entry apply. Clusters []string `json:"clusters"` @@ -88,13 +88,3 @@ func NewRemoteClusterPrivileges() *RemoteClusterPrivileges { return r } - -// true - -type RemoteClusterPrivilegesVariant interface { - RemoteClusterPrivilegesCaster() *RemoteClusterPrivileges -} - -func (s *RemoteClusterPrivileges) RemoteClusterPrivilegesCaster() *RemoteClusterPrivileges { - return s -} diff --git a/typedapi/types/remoteindicesprivileges.go b/typedapi/types/remoteindicesprivileges.go index ad6f9b1640..1ee1e5397d 100644 --- a/typedapi/types/remoteindicesprivileges.go +++ b/typedapi/types/remoteindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RemoteIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L244-L276 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L244-L276 type RemoteIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -174,13 +174,3 @@ func NewRemoteIndicesPrivileges() *RemoteIndicesPrivileges { return r } - -// true - -type RemoteIndicesPrivilegesVariant interface { - RemoteIndicesPrivilegesCaster() *RemoteIndicesPrivileges -} - -func (s *RemoteIndicesPrivileges) RemoteIndicesPrivilegesCaster() *RemoteIndicesPrivileges { - return s -} diff --git a/typedapi/types/remotesource.go b/typedapi/types/remotesource.go index f48de6ab65..ace26384a2 100644 --- a/typedapi/types/remotesource.go +++ b/typedapi/types/remotesource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RemoteSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/reindex/types.ts#L112-L140 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/reindex/types.ts#L112-L140 type RemoteSource struct { // ConnectTimeout The remote connection timeout. ConnectTimeout Duration `json:"connect_timeout,omitempty"` @@ -108,13 +108,3 @@ func NewRemoteSource() *RemoteSource { return r } - -// true - -type RemoteSourceVariant interface { - RemoteSourceCaster() *RemoteSource -} - -func (s *RemoteSource) RemoteSourceCaster() *RemoteSource { - return s -} diff --git a/typedapi/types/remoteuserindicesprivileges.go b/typedapi/types/remoteuserindicesprivileges.go index bd8c5c1e52..4706aee131 100644 --- a/typedapi/types/remoteuserindicesprivileges.go +++ b/typedapi/types/remoteuserindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RemoteUserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L316-L339 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L316-L339 type RemoteUserIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -176,5 +176,3 @@ func NewRemoteUserIndicesPrivileges() *RemoteUserIndicesPrivileges { return r } - -// false diff --git a/typedapi/types/removeaction.go b/typedapi/types/removeaction.go index 4242f688b0..4fe5686bb0 100644 --- a/typedapi/types/removeaction.go +++ b/typedapi/types/removeaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RemoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/update_aliases/types.ts#L97-L122 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/update_aliases/types.ts#L97-L122 type RemoveAction struct { // Alias Alias for the action. // Index alias names support date math. @@ -131,13 +131,3 @@ func NewRemoveAction() *RemoveAction { return r } - -// true - -type RemoveActionVariant interface { - RemoveActionCaster() *RemoveAction -} - -func (s *RemoveAction) RemoveActionCaster() *RemoveAction { - return s -} diff --git a/typedapi/types/removeclusterserver.go b/typedapi/types/removeclusterserver.go new file mode 100644 index 0000000000..5c4eadd31c --- /dev/null +++ b/typedapi/types/removeclusterserver.go @@ -0,0 +1,74 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// RemoveClusterServer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/info/types.ts#L74-L77 +type RemoveClusterServer struct { + BoundAddress []string `json:"bound_address"` + PublishAddress string `json:"publish_address"` +} + +func (s *RemoveClusterServer) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "bound_address": + if err := dec.Decode(&s.BoundAddress); err != nil { + return fmt.Errorf("%s | %w", "BoundAddress", err) + } + + case "publish_address": + if err := dec.Decode(&s.PublishAddress); err != nil { + return fmt.Errorf("%s | %w", "PublishAddress", err) + } + + } + } + return nil +} + +// NewRemoveClusterServer returns a RemoveClusterServer. +func NewRemoveClusterServer() *RemoveClusterServer { + r := &RemoveClusterServer{} + + return r +} diff --git a/typedapi/types/removeduplicatestokenfilter.go b/typedapi/types/removeduplicatestokenfilter.go index 98ce1534bf..0e5de25a9e 100644 --- a/typedapi/types/removeduplicatestokenfilter.go +++ b/typedapi/types/removeduplicatestokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RemoveDuplicatesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L302-L304 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L403-L405 type RemoveDuplicatesTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewRemoveDuplicatesTokenFilter() *RemoveDuplicatesTokenFilter { return r } - -// true - -type RemoveDuplicatesTokenFilterVariant interface { - RemoveDuplicatesTokenFilterCaster() *RemoveDuplicatesTokenFilter -} - -func (s *RemoveDuplicatesTokenFilter) RemoveDuplicatesTokenFilterCaster() *RemoveDuplicatesTokenFilter { - return s -} diff --git a/typedapi/types/removeindexaction.go b/typedapi/types/removeindexaction.go index 5ffb11b668..01075eb4fd 100644 --- a/typedapi/types/removeindexaction.go +++ b/typedapi/types/removeindexaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RemoveIndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/update_aliases/types.ts#L124-L139 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/update_aliases/types.ts#L124-L139 type RemoveIndexAction struct { // Index Data stream or index for the action. // Supports wildcards (`*`). @@ -104,13 +104,3 @@ func NewRemoveIndexAction() *RemoveIndexAction { return r } - -// true - -type RemoveIndexActionVariant interface { - RemoveIndexActionCaster() *RemoveIndexAction -} - -func (s *RemoveIndexAction) RemoveIndexActionCaster() *RemoveIndexAction { - return s -} diff --git a/typedapi/types/removeprocessor.go b/typedapi/types/removeprocessor.go index 3a90bea48b..cdba412712 100644 --- a/typedapi/types/removeprocessor.go +++ b/typedapi/types/removeprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RemoveProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1358-L1372 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1358-L1372 type RemoveProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -182,13 +182,3 @@ func NewRemoveProcessor() *RemoveProcessor { return r } - -// true - -type RemoveProcessorVariant interface { - RemoveProcessorCaster() *RemoveProcessor -} - -func (s *RemoveProcessor) RemoveProcessorCaster() *RemoveProcessor { - return s -} diff --git a/typedapi/types/renameprocessor.go b/typedapi/types/renameprocessor.go index 832ec5b933..8649c7ba8d 100644 --- a/typedapi/types/renameprocessor.go +++ b/typedapi/types/renameprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RenameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1374-L1390 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1374-L1390 type RenameProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -161,13 +161,3 @@ func NewRenameProcessor() *RenameProcessor { return r } - -// true - -type RenameProcessorVariant interface { - RenameProcessorCaster() *RenameProcessor -} - -func (s *RenameProcessor) RenameProcessorCaster() *RenameProcessor { - return s -} diff --git a/typedapi/types/replicationaccess.go b/typedapi/types/replicationaccess.go index 59bfaf5d8f..964561b0d1 100644 --- a/typedapi/types/replicationaccess.go +++ b/typedapi/types/replicationaccess.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReplicationAccess type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L442-L452 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L442-L452 type ReplicationAccess struct { // AllowRestrictedIndices This needs to be set to true if the patterns in the names field should cover // system indices. @@ -97,13 +97,3 @@ func NewReplicationAccess() *ReplicationAccess { return r } - -// true - -type ReplicationAccessVariant interface { - ReplicationAccessCaster() *ReplicationAccess -} - -func (s *ReplicationAccess) ReplicationAccessCaster() *ReplicationAccess { - return s -} diff --git a/typedapi/types/reportingemailattachment.go b/typedapi/types/reportingemailattachment.go index f08b926d33..58cd37eed5 100644 --- a/typedapi/types/reportingemailattachment.go +++ b/typedapi/types/reportingemailattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReportingEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L224-L232 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L224-L232 type ReportingEmailAttachment struct { Inline *bool `json:"inline,omitempty"` Interval Duration `json:"interval,omitempty"` @@ -118,13 +118,3 @@ func NewReportingEmailAttachment() *ReportingEmailAttachment { return r } - -// true - -type ReportingEmailAttachmentVariant interface { - ReportingEmailAttachmentCaster() *ReportingEmailAttachment -} - -func (s *ReportingEmailAttachment) ReportingEmailAttachmentCaster() *ReportingEmailAttachment { - return s -} diff --git a/typedapi/types/repositoriesrecord.go b/typedapi/types/repositoriesrecord.go index b7e5895a95..29a9e6a484 100644 --- a/typedapi/types/repositoriesrecord.go +++ b/typedapi/types/repositoriesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RepositoriesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/repositories/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/repositories/types.ts#L20-L31 type RepositoriesRecord struct { // Id The unique repository identifier. Id *string `json:"id,omitempty"` @@ -89,5 +89,3 @@ func NewRepositoriesRecord() *RepositoriesRecord { return r } - -// false diff --git a/typedapi/types/repository.go b/typedapi/types/repository.go index 55d581f537..d8454ee9cc 100644 --- a/typedapi/types/repository.go +++ b/typedapi/types/repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,9 +29,5 @@ package types // ReadOnlyUrlRepository // SourceOnlyRepository // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 type Repository any - -type RepositoryVariant interface { - RepositoryCaster() *Repository -} diff --git a/typedapi/types/repositoryintegrityindicator.go b/typedapi/types/repositoryintegrityindicator.go index cab2c7fc0d..c4af1d7c68 100644 --- a/typedapi/types/repositoryintegrityindicator.go +++ b/typedapi/types/repositoryintegrityindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RepositoryIntegrityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L136-L140 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L137-L141 type RepositoryIntegrityIndicator struct { Details *RepositoryIntegrityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewRepositoryIntegrityIndicator() *RepositoryIntegrityIndicator { return r } - -// false diff --git a/typedapi/types/repositoryintegrityindicatordetails.go b/typedapi/types/repositoryintegrityindicatordetails.go index f5777ddf0a..a374c90c04 100644 --- a/typedapi/types/repositoryintegrityindicatordetails.go +++ b/typedapi/types/repositoryintegrityindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RepositoryIntegrityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L141-L145 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L142-L146 type RepositoryIntegrityIndicatorDetails struct { Corrupted []string `json:"corrupted,omitempty"` CorruptedRepositories *int64 `json:"corrupted_repositories,omitempty"` @@ -99,5 +99,3 @@ func NewRepositoryIntegrityIndicatorDetails() *RepositoryIntegrityIndicatorDetai return r } - -// false diff --git a/typedapi/types/repositorylocation.go b/typedapi/types/repositorylocation.go index 1ad2f201fc..7eed71581c 100644 --- a/typedapi/types/repositorylocation.go +++ b/typedapi/types/repositorylocation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RepositoryLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 type RepositoryLocation struct { BasePath string `json:"base_path"` // Bucket Bucket name (GCP, S3) @@ -102,5 +102,3 @@ func NewRepositoryLocation() *RepositoryLocation { return r } - -// false diff --git a/typedapi/types/repositorymeteringinformation.go b/typedapi/types/repositorymeteringinformation.go index 0b7aa3cb18..add2341481 100644 --- a/typedapi/types/repositorymeteringinformation.go +++ b/typedapi/types/repositorymeteringinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RepositoryMeteringInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/RepositoryMeteringInformation.ts#L24-L66 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/RepositoryMeteringInformation.ts#L24-L66 type RepositoryMeteringInformation struct { // Archived A flag that tells whether or not this object has been archived. When a // repository is closed or updated the @@ -154,5 +154,3 @@ func NewRepositoryMeteringInformation() *RepositoryMeteringInformation { return r } - -// false diff --git a/typedapi/types/repositorystatscurrentcounts.go b/typedapi/types/repositorystatscurrentcounts.go new file mode 100644 index 0000000000..78763a5bf3 --- /dev/null +++ b/typedapi/types/repositorystatscurrentcounts.go @@ -0,0 +1,171 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RepositoryStatsCurrentCounts type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L672-L680 +type RepositoryStatsCurrentCounts struct { + ActiveDeletions int `json:"active_deletions"` + Clones int `json:"clones"` + Deletions int `json:"deletions"` + Finalizations int `json:"finalizations"` + Shards RepositoryStatsShards `json:"shards"` + SnapshotDeletions int `json:"snapshot_deletions"` + Snapshots int `json:"snapshots"` +} + +func (s *RepositoryStatsCurrentCounts) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "active_deletions": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ActiveDeletions", err) + } + s.ActiveDeletions = value + case float64: + f := int(v) + s.ActiveDeletions = f + } + + case "clones": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Clones", err) + } + s.Clones = value + case float64: + f := int(v) + s.Clones = f + } + + case "deletions": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Deletions", err) + } + s.Deletions = value + case float64: + f := int(v) + s.Deletions = f + } + + case "finalizations": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Finalizations", err) + } + s.Finalizations = value + case float64: + f := int(v) + s.Finalizations = f + } + + case "shards": + if err := dec.Decode(&s.Shards); err != nil { + return fmt.Errorf("%s | %w", "Shards", err) + } + + case "snapshot_deletions": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "SnapshotDeletions", err) + } + s.SnapshotDeletions = value + case float64: + f := int(v) + s.SnapshotDeletions = f + } + + case "snapshots": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Snapshots", err) + } + s.Snapshots = value + case float64: + f := int(v) + s.Snapshots = f + } + + } + } + return nil +} + +// NewRepositoryStatsCurrentCounts returns a RepositoryStatsCurrentCounts. +func NewRepositoryStatsCurrentCounts() *RepositoryStatsCurrentCounts { + r := &RepositoryStatsCurrentCounts{} + + return r +} diff --git a/typedapi/types/repositorystatsshards.go b/typedapi/types/repositorystatsshards.go new file mode 100644 index 0000000000..c146008e72 --- /dev/null +++ b/typedapi/types/repositorystatsshards.go @@ -0,0 +1,127 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/shardstate" +) + +// RepositoryStatsShards type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L682-L687 +type RepositoryStatsShards struct { + Complete int `json:"complete"` + Incomplete int `json:"incomplete"` + States map[shardstate.ShardState]int `json:"states"` + Total int `json:"total"` +} + +func (s *RepositoryStatsShards) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "complete": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Complete", err) + } + s.Complete = value + case float64: + f := int(v) + s.Complete = f + } + + case "incomplete": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Incomplete", err) + } + s.Incomplete = value + case float64: + f := int(v) + s.Incomplete = f + } + + case "states": + if s.States == nil { + s.States = make(map[shardstate.ShardState]int, 0) + } + if err := dec.Decode(&s.States); err != nil { + return fmt.Errorf("%s | %w", "States", err) + } + + case "total": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + s.Total = value + case float64: + f := int(v) + s.Total = f + } + + } + } + return nil +} + +// NewRepositoryStatsShards returns a RepositoryStatsShards. +func NewRepositoryStatsShards() *RepositoryStatsShards { + r := &RepositoryStatsShards{ + States: make(map[shardstate.ShardState]int), + } + + return r +} diff --git a/typedapi/types/requestcachestats.go b/typedapi/types/requestcachestats.go index 2d0965976b..b11e64017c 100644 --- a/typedapi/types/requestcachestats.go +++ b/typedapi/types/requestcachestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RequestCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L247-L253 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L269-L275 type RequestCacheStats struct { Evictions int64 `json:"evictions"` HitCount int64 `json:"hit_count"` @@ -138,5 +138,3 @@ func NewRequestCacheStats() *RequestCacheStats { return r } - -// false diff --git a/typedapi/types/requestchatcompletion.go b/typedapi/types/requestchatcompletion.go index 139dad6c2d..e8ac8ec068 100644 --- a/typedapi/types/requestchatcompletion.go +++ b/typedapi/types/requestchatcompletion.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,16 @@ import ( // RequestChatCompletion type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L25-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L25-L97 type RequestChatCompletion struct { // MaxCompletionTokens The upper bound limit for the number of tokens that can be generated for a // completion request. MaxCompletionTokens *int64 `json:"max_completion_tokens,omitempty"` // Messages A list of objects representing the conversation. + // Requests should generally only add new messages from the user (role `user`). + // The other message roles (`assistant`, `system`, or `tool`) should generally + // only be copied from the response to a previous completion request, such that + // the messages array is built up throughout a conversation. Messages []Message `json:"messages"` // Model The ID of the model to use. Model *string `json:"model,omitempty"` @@ -46,8 +50,52 @@ type RequestChatCompletion struct { // Temperature The sampling temperature to use. Temperature *float32 `json:"temperature,omitempty"` // ToolChoice Controls which tool is called by the model. + // String representation: One of `auto`, `none`, or `requrired`. `auto` allows + // the model to choose between calling tools and generating a message. `none` + // causes the model to not call any tools. `required` forces the model to call + // one or more tools. + // Example (object representation): + // ``` + // + // { + // "tool_choice": { + // "type": "function", + // "function": { + // "name": "get_current_weather" + // } + // } + // } + // + // ``` ToolChoice CompletionToolType `json:"tool_choice,omitempty"` // Tools A list of tools that the model can call. + // Example: + // ``` + // + // { + // "tools": [ + // { + // "type": "function", + // "function": { + // "name": "get_price_of_item", + // "description": "Get the current price of an item", + // "parameters": { + // "type": "object", + // "properties": { + // "item": { + // "id": "12345" + // }, + // "unit": { + // "type": "currency" + // } + // } + // } + // } + // } + // ] + // } + // + // ``` Tools []CompletionTool `json:"tools,omitempty"` // TopP Nucleus sampling, an alternative to sampling with temperature. TopP *float32 `json:"top_p,omitempty"` @@ -189,13 +237,3 @@ func NewRequestChatCompletion() *RequestChatCompletion { return r } - -// true - -type RequestChatCompletionVariant interface { - RequestChatCompletionCaster() *RequestChatCompletion -} - -func (s *RequestChatCompletion) RequestChatCompletionCaster() *RequestChatCompletion { - return s -} diff --git a/typedapi/types/requestcounts.go b/typedapi/types/requestcounts.go index c757e6cbeb..aa6f43a3a0 100644 --- a/typedapi/types/requestcounts.go +++ b/typedapi/types/requestcounts.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RequestCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 type RequestCounts struct { // GetBlob Number of Get Blob requests (Azure) GetBlob *int64 `json:"GetBlob,omitempty"` @@ -253,5 +253,3 @@ func NewRequestCounts() *RequestCounts { return r } - -// false diff --git a/typedapi/types/requestitem.go b/typedapi/types/requestitem.go index cfeb27ba06..db88e707ad 100644 --- a/typedapi/types/requestitem.go +++ b/typedapi/types/requestitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // MultisearchHeader // TemplateConfig // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch_template/types.ts#L25-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch_template/types.ts#L25-L26 type RequestItem any - -type RequestItemVariant interface { - RequestItemCaster() *RequestItem -} diff --git a/typedapi/types/reroutedecision.go b/typedapi/types/reroutedecision.go index 9336e82f35..1c1881c250 100644 --- a/typedapi/types/reroutedecision.go +++ b/typedapi/types/reroutedecision.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RerouteDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L86-L90 type RerouteDecision struct { Decider string `json:"decider"` Decision string `json:"decision"` @@ -100,5 +100,3 @@ func NewRerouteDecision() *RerouteDecision { return r } - -// false diff --git a/typedapi/types/rerouteexplanation.go b/typedapi/types/rerouteexplanation.go index b12713ad5d..b7287c2104 100644 --- a/typedapi/types/rerouteexplanation.go +++ b/typedapi/types/rerouteexplanation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RerouteExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L92-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L92-L96 type RerouteExplanation struct { Command string `json:"command"` Decisions []RerouteDecision `json:"decisions"` @@ -86,5 +86,3 @@ func NewRerouteExplanation() *RerouteExplanation { return r } - -// false diff --git a/typedapi/types/rerouteparameters.go b/typedapi/types/rerouteparameters.go index fbc2867786..cdee851c8b 100644 --- a/typedapi/types/rerouteparameters.go +++ b/typedapi/types/rerouteparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RerouteParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/reroute/types.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/reroute/types.ts#L98-L105 type RerouteParameters struct { AllowPrimary bool `json:"allow_primary"` FromNode *string `json:"from_node,omitempty"` @@ -117,5 +117,3 @@ func NewRerouteParameters() *RerouteParameters { return r } - -// false diff --git a/typedapi/types/rerouteprocessor.go b/typedapi/types/rerouteprocessor.go index d2138f5370..304b70ee35 100644 --- a/typedapi/types/rerouteprocessor.go +++ b/typedapi/types/rerouteprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RerouteProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1392-L1420 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1392-L1420 type RerouteProcessor struct { // Dataset Field references or a static value for the dataset part of the data stream // name. @@ -203,13 +203,3 @@ func NewRerouteProcessor() *RerouteProcessor { return r } - -// true - -type RerouteProcessorVariant interface { - RerouteProcessorCaster() *RerouteProcessor -} - -func (s *RerouteProcessor) RerouteProcessorCaster() *RerouteProcessor { - return s -} diff --git a/typedapi/types/rescore.go b/typedapi/types/rescore.go index 30abe2900e..62b576c84c 100644 --- a/typedapi/types/rescore.go +++ b/typedapi/types/rescore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Rescore type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/rescoring.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/rescoring.ts#L25-L38 type Rescore struct { AdditionalRescoreProperty map[string]json.RawMessage `json:"-"` LearningToRank *LearningToRank `json:"learning_to_rank,omitempty"` @@ -135,13 +135,3 @@ func NewRescore() *Rescore { return r } - -// true - -type RescoreVariant interface { - RescoreCaster() *Rescore -} - -func (s *Rescore) RescoreCaster() *Rescore { - return s -} diff --git a/typedapi/types/rescorequery.go b/typedapi/types/rescorequery.go index 76ce260341..0d82fee59b 100644 --- a/typedapi/types/rescorequery.go +++ b/typedapi/types/rescorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RescoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/rescoring.ts#L40-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/rescoring.ts#L40-L62 type RescoreQuery struct { // Query The query to use for rescoring. // This query is only run on the Top-K results returned by the `query` and @@ -115,13 +115,3 @@ func NewRescoreQuery() *RescoreQuery { return r } - -// true - -type RescoreQueryVariant interface { - RescoreQueryCaster() *RescoreQuery -} - -func (s *RescoreQuery) RescoreQueryCaster() *RescoreQuery { - return s -} diff --git a/typedapi/types/rescorerretriever.go b/typedapi/types/rescorerretriever.go new file mode 100644 index 0000000000..f4d352d3ee --- /dev/null +++ b/typedapi/types/rescorerretriever.go @@ -0,0 +1,138 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RescorerRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L62-L66 +type RescorerRetriever struct { + // Filter Query to filter the documents that can match. + Filter []Query `json:"filter,omitempty"` + // MinScore Minimum _score for matching documents. Documents with a lower _score are not + // included in the top documents. + MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` + Rescore []Rescore `json:"rescore"` + // Retriever Inner retriever. + Retriever RetrieverContainer `json:"retriever"` +} + +func (s *RescorerRetriever) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "filter": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := NewQuery() + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + + s.Filter = append(s.Filter, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Filter); err != nil { + return fmt.Errorf("%s | %w", "Filter", err) + } + } + + case "min_score": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseFloat(v, 32) + if err != nil { + return fmt.Errorf("%s | %w", "MinScore", err) + } + f := float32(value) + s.MinScore = &f + case float64: + f := float32(v) + s.MinScore = &f + } + + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + + case "rescore": + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := NewRescore() + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Rescore", err) + } + + s.Rescore = append(s.Rescore, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Rescore); err != nil { + return fmt.Errorf("%s | %w", "Rescore", err) + } + } + + case "retriever": + if err := dec.Decode(&s.Retriever); err != nil { + return fmt.Errorf("%s | %w", "Retriever", err) + } + + } + } + return nil +} + +// NewRescorerRetriever returns a RescorerRetriever. +func NewRescorerRetriever() *RescorerRetriever { + r := &RescorerRetriever{} + + return r +} diff --git a/typedapi/types/rescorevector.go b/typedapi/types/rescorevector.go index 6a0f70cb44..50cab173c8 100644 --- a/typedapi/types/rescorevector.go +++ b/typedapi/types/rescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RescoreVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Knn.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Knn.ts#L30-L33 type RescoreVector struct { // Oversample Applies the specified oversample factor to k on the approximate kNN search Oversample float32 `json:"oversample"` @@ -79,13 +79,3 @@ func NewRescoreVector() *RescoreVector { return r } - -// true - -type RescoreVectorVariant interface { - RescoreVectorCaster() *RescoreVector -} - -func (s *RescoreVector) RescoreVectorCaster() *RescoreVector { - return s -} diff --git a/typedapi/types/reservedsize.go b/typedapi/types/reservedsize.go index b1cba662b2..ce15857942 100644 --- a/typedapi/types/reservedsize.go +++ b/typedapi/types/reservedsize.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ReservedSize type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L72-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L72-L77 type ReservedSize struct { NodeId string `json:"node_id"` Path string `json:"path"` @@ -102,5 +102,3 @@ func NewReservedSize() *ReservedSize { return r } - -// false diff --git a/typedapi/types/resolveclusterinfo.go b/typedapi/types/resolveclusterinfo.go index 779e1dbd24..a438568f71 100644 --- a/typedapi/types/resolveclusterinfo.go +++ b/typedapi/types/resolveclusterinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ResolveClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55 type ResolveClusterInfo struct { // Connected Whether the remote cluster is connected to the local (querying) cluster. Connected bool `json:"connected"` @@ -135,5 +135,3 @@ func NewResolveClusterInfo() *ResolveClusterInfo { return r } - -// false diff --git a/typedapi/types/resolveindexaliasitem.go b/typedapi/types/resolveindexaliasitem.go index 9cefb23155..11fc0ce0e8 100644 --- a/typedapi/types/resolveindexaliasitem.go +++ b/typedapi/types/resolveindexaliasitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ResolveIndexAliasItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/resolve_index/ResolveIndexResponse.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/resolve_index/ResolveIndexResponse.ts#L37-L40 type ResolveIndexAliasItem struct { Indices []string `json:"indices"` Name string `json:"name"` @@ -83,5 +83,3 @@ func NewResolveIndexAliasItem() *ResolveIndexAliasItem { return r } - -// false diff --git a/typedapi/types/resolveindexdatastreamsitem.go b/typedapi/types/resolveindexdatastreamsitem.go index aaa13d1f5e..362477797d 100644 --- a/typedapi/types/resolveindexdatastreamsitem.go +++ b/typedapi/types/resolveindexdatastreamsitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ResolveIndexDataStreamsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/resolve_index/ResolveIndexResponse.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/resolve_index/ResolveIndexResponse.ts#L42-L46 type ResolveIndexDataStreamsItem struct { BackingIndices []string `json:"backing_indices"` Name string `json:"name"` @@ -89,5 +89,3 @@ func NewResolveIndexDataStreamsItem() *ResolveIndexDataStreamsItem { return r } - -// false diff --git a/typedapi/types/resolveindexitem.go b/typedapi/types/resolveindexitem.go index 2bfa3dcd1e..cce67c4131 100644 --- a/typedapi/types/resolveindexitem.go +++ b/typedapi/types/resolveindexitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ResolveIndexItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/resolve_index/ResolveIndexResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/resolve_index/ResolveIndexResponse.ts#L30-L35 type ResolveIndexItem struct { Aliases []string `json:"aliases,omitempty"` Attributes []string `json:"attributes"` @@ -84,5 +84,3 @@ func NewResolveIndexItem() *ResolveIndexItem { return r } - -// false diff --git a/typedapi/types/resourceprivileges.go b/typedapi/types/resourceprivileges.go index 60b86244bc..3c872d2b94 100644 --- a/typedapi/types/resourceprivileges.go +++ b/typedapi/types/resourceprivileges.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ResourcePrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/has_privileges/types.ts#L48-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/has_privileges/types.ts#L48-L48 type ResourcePrivileges map[string]Privileges diff --git a/typedapi/types/responseitem.go b/typedapi/types/responseitem.go index 9b79d09f69..be4821af9e 100644 --- a/typedapi/types/responseitem.go +++ b/typedapi/types/responseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L37-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L37-L84 type ResponseItem struct { // Error Additional information about the failed operation. // The property is returned only for failed operations. @@ -204,5 +204,3 @@ func NewResponseItem() *ResponseItem { return r } - -// false diff --git a/typedapi/types/restriction.go b/typedapi/types/restriction.go index cb0b6684c2..f070ee17eb 100644 --- a/typedapi/types/restriction.go +++ b/typedapi/types/restriction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // Restriction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleDescriptor.ts#L135-L141 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleDescriptor.ts#L135-L141 type Restriction struct { // Workflows A list of workflows to which the API key is restricted. // NOTE: In order to use a role restriction, an API key must be created with a @@ -40,13 +40,3 @@ func NewRestriction() *Restriction { return r } - -// true - -type RestrictionVariant interface { - RestrictionCaster() *Restriction -} - -func (s *Restriction) RestrictionCaster() *Restriction { - return s -} diff --git a/typedapi/types/retention.go b/typedapi/types/retention.go index 5e5c7464d9..d2a8612e83 100644 --- a/typedapi/types/retention.go +++ b/typedapi/types/retention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Retention type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L94-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L94-L107 type Retention struct { // ExpireAfter Time period after which a snapshot is considered expired and eligible for // deletion. SLM deletes expired snapshots based on the slm.retention_schedule. @@ -107,13 +107,3 @@ func NewRetention() *Retention { return r } - -// true - -type RetentionVariant interface { - RetentionCaster() *Retention -} - -func (s *Retention) RetentionCaster() *Retention { - return s -} diff --git a/typedapi/types/retentionlease.go b/typedapi/types/retentionlease.go index d917ec15fd..ea2d2c260d 100644 --- a/typedapi/types/retentionlease.go +++ b/typedapi/types/retentionlease.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RetentionLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L66-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L66-L68 type RetentionLease struct { Period Duration `json:"period"` } @@ -66,13 +66,3 @@ func NewRetentionLease() *RetentionLease { return r } - -// true - -type RetentionLeaseVariant interface { - RetentionLeaseCaster() *RetentionLease -} - -func (s *RetentionLease) RetentionLeaseCaster() *RetentionLease { - return s -} diff --git a/typedapi/types/retentionpolicy.go b/typedapi/types/retentionpolicy.go index 0c4ee123f2..2c02d36702 100644 --- a/typedapi/types/retentionpolicy.go +++ b/typedapi/types/retentionpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RetentionPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L88-L96 type RetentionPolicy struct { // Field The date field that is used to calculate the age of the document. Field string `json:"field"` @@ -76,13 +76,3 @@ func NewRetentionPolicy() *RetentionPolicy { return r } - -// true - -type RetentionPolicyVariant interface { - RetentionPolicyCaster() *RetentionPolicy -} - -func (s *RetentionPolicy) RetentionPolicyCaster() *RetentionPolicy { - return s -} diff --git a/typedapi/types/retentionpolicycontainer.go b/typedapi/types/retentionpolicycontainer.go index 69834efeab..4b04220b82 100644 --- a/typedapi/types/retentionpolicycontainer.go +++ b/typedapi/types/retentionpolicycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // RetentionPolicyContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L80-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L80-L86 type RetentionPolicyContainer struct { AdditionalRetentionPolicyContainerProperty map[string]json.RawMessage `json:"-"` // Time Specifies that the transform uses a time field to set the retention policy. @@ -71,13 +71,3 @@ func NewRetentionPolicyContainer() *RetentionPolicyContainer { return r } - -// true - -type RetentionPolicyContainerVariant interface { - RetentionPolicyContainerCaster() *RetentionPolicyContainer -} - -func (s *RetentionPolicyContainer) RetentionPolicyContainerCaster() *RetentionPolicyContainer { - return s -} diff --git a/typedapi/types/retries.go b/typedapi/types/retries.go index 6d94ad1d7b..2655ae1879 100644 --- a/typedapi/types/retries.go +++ b/typedapi/types/retries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Retries type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retries.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retries.ts#L22-L31 type Retries struct { // Bulk The number of bulk actions retried. Bulk int64 `json:"bulk"` @@ -95,5 +95,3 @@ func NewRetries() *Retries { return r } - -// false diff --git a/typedapi/types/retrievercontainer.go b/typedapi/types/retrievercontainer.go index 625d2ee0de..1a7d52696d 100644 --- a/typedapi/types/retrievercontainer.go +++ b/typedapi/types/retrievercontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,11 +27,19 @@ import ( // RetrieverContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retriever.ts#L28-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L28-L51 type RetrieverContainer struct { AdditionalRetrieverContainerProperty map[string]json.RawMessage `json:"-"` // Knn A retriever that replaces the functionality of a knn search. Knn *KnnRetriever `json:"knn,omitempty"` + // Linear A retriever that supports the combination of different retrievers through a + // weighted linear combination. + Linear *LinearRetriever `json:"linear,omitempty"` + // Pinned A pinned retriever applies pinned documents to the underlying retriever. + // This retriever will rewrite to a PinnedQueryBuilder. + Pinned *PinnedRetriever `json:"pinned,omitempty"` + // Rescorer A retriever that re-scores only the results produced by its child retriever. + Rescorer *RescorerRetriever `json:"rescorer,omitempty"` // Rrf A retriever that produces top documents from reciprocal rank fusion (RRF). Rrf *RRFRetriever `json:"rrf,omitempty"` // Rule A retriever that replaces the functionality of a rule query. @@ -80,13 +88,3 @@ func NewRetrieverContainer() *RetrieverContainer { return r } - -// true - -type RetrieverContainerVariant interface { - RetrieverContainerCaster() *RetrieverContainer -} - -func (s *RetrieverContainer) RetrieverContainerCaster() *RetrieverContainer { - return s -} diff --git a/typedapi/types/reversenestedaggregate.go b/typedapi/types/reversenestedaggregate.go index cf7fba66e3..18c8c25003 100644 --- a/typedapi/types/reversenestedaggregate.go +++ b/typedapi/types/reversenestedaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ReverseNestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L540-L544 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L540-L544 type ReverseNestedAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewReverseNestedAggregate() *ReverseNestedAggregate { return r } - -// false diff --git a/typedapi/types/reversenestedaggregation.go b/typedapi/types/reversenestedaggregation.go index a900153a97..6ff56fc9cc 100644 --- a/typedapi/types/reversenestedaggregation.go +++ b/typedapi/types/reversenestedaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ReverseNestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L741-L747 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L741-L747 type ReverseNestedAggregation struct { // Path Defines the nested object field that should be joined back to. // The default is empty, which means that it joins back to the root/main @@ -69,13 +69,3 @@ func NewReverseNestedAggregation() *ReverseNestedAggregation { return r } - -// true - -type ReverseNestedAggregationVariant interface { - ReverseNestedAggregationCaster() *ReverseNestedAggregation -} - -func (s *ReverseNestedAggregation) ReverseNestedAggregationCaster() *ReverseNestedAggregation { - return s -} diff --git a/typedapi/types/reversetokenfilter.go b/typedapi/types/reversetokenfilter.go index 4b9515e819..9965cd1087 100644 --- a/typedapi/types/reversetokenfilter.go +++ b/typedapi/types/reversetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ReverseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L306-L308 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L407-L409 type ReverseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewReverseTokenFilter() *ReverseTokenFilter { return r } - -// true - -type ReverseTokenFilterVariant interface { - ReverseTokenFilterCaster() *ReverseTokenFilter -} - -func (s *ReverseTokenFilter) ReverseTokenFilterCaster() *ReverseTokenFilter { - return s -} diff --git a/typedapi/types/role.go b/typedapi/types/role.go index 6601366337..ce34eb513f 100644 --- a/typedapi/types/role.go +++ b/typedapi/types/role.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Role type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_role/types.ts#L32-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_role/types.ts#L32-L54 type Role struct { Applications []ApplicationPrivileges `json:"applications"` Cluster []clusterprivilege.ClusterPrivilege `json:"cluster"` @@ -145,5 +145,3 @@ func NewRole() *Role { return r } - -// false diff --git a/typedapi/types/roledescriptor.go b/typedapi/types/roledescriptor.go index efabf923a3..00a1a1482d 100644 --- a/typedapi/types/roledescriptor.go +++ b/typedapi/types/roledescriptor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RoleDescriptor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleDescriptor.ts#L33-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleDescriptor.ts#L33-L83 type RoleDescriptor struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -170,13 +170,3 @@ func NewRoleDescriptor() *RoleDescriptor { return r } - -// true - -type RoleDescriptorVariant interface { - RoleDescriptorCaster() *RoleDescriptor -} - -func (s *RoleDescriptor) RoleDescriptorCaster() *RoleDescriptor { - return s -} diff --git a/typedapi/types/roledescriptorread.go b/typedapi/types/roledescriptorread.go index 2cc3629e5a..43ee665e5e 100644 --- a/typedapi/types/roledescriptorread.go +++ b/typedapi/types/roledescriptorread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RoleDescriptorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleDescriptor.ts#L85-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleDescriptor.ts#L85-L133 type RoleDescriptorRead struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -167,5 +167,3 @@ func NewRoleDescriptorRead() *RoleDescriptorRead { return r } - -// false diff --git a/typedapi/types/roledescriptorwrapper.go b/typedapi/types/roledescriptorwrapper.go index 7720a4dcd2..7dde6923cb 100644 --- a/typedapi/types/roledescriptorwrapper.go +++ b/typedapi/types/roledescriptorwrapper.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RoleDescriptorWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_service_accounts/types.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_service_accounts/types.ts#L22-L24 type RoleDescriptorWrapper struct { RoleDescriptor RoleDescriptorRead `json:"role_descriptor"` } @@ -33,5 +33,3 @@ func NewRoleDescriptorWrapper() *RoleDescriptorWrapper { return r } - -// false diff --git a/typedapi/types/rolemappingrule.go b/typedapi/types/rolemappingrule.go index e4a75f946d..8a7141ccc4 100644 --- a/typedapi/types/rolemappingrule.go +++ b/typedapi/types/rolemappingrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // RoleMappingRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleMappingRule.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleMappingRule.ts#L22-L33 type RoleMappingRule struct { AdditionalRoleMappingRuleProperty map[string]json.RawMessage `json:"-"` All []RoleMappingRule `json:"all,omitempty"` @@ -73,13 +73,3 @@ func NewRoleMappingRule() *RoleMappingRule { return r } - -// true - -type RoleMappingRuleVariant interface { - RoleMappingRuleCaster() *RoleMappingRule -} - -func (s *RoleMappingRule) RoleMappingRuleCaster() *RoleMappingRule { - return s -} diff --git a/typedapi/types/rolequerycontainer.go b/typedapi/types/rolequerycontainer.go index c5fc441135..c449f8eb6e 100644 --- a/typedapi/types/rolequerycontainer.go +++ b/typedapi/types/rolequerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RoleQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_role/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_role/types.ts#L37-L101 type RoleQueryContainer struct { AdditionalRoleQueryContainerProperty map[string]json.RawMessage `json:"-"` // Bool matches roles matching boolean combinations of other queries. @@ -220,13 +220,3 @@ func NewRoleQueryContainer() *RoleQueryContainer { return r } - -// true - -type RoleQueryContainerVariant interface { - RoleQueryContainerCaster() *RoleQueryContainer -} - -func (s *RoleQueryContainer) RoleQueryContainerCaster() *RoleQueryContainer { - return s -} diff --git a/typedapi/types/roletemplate.go b/typedapi/types/roletemplate.go index 8073830ebc..efc60f9a86 100644 --- a/typedapi/types/roletemplate.go +++ b/typedapi/types/roletemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // RoleTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleTemplate.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleTemplate.ts#L28-L31 type RoleTemplate struct { Format *templateformat.TemplateFormat `json:"format,omitempty"` Template Script `json:"template"` @@ -38,13 +38,3 @@ func NewRoleTemplate() *RoleTemplate { return r } - -// true - -type RoleTemplateVariant interface { - RoleTemplateCaster() *RoleTemplate -} - -func (s *RoleTemplate) RoleTemplateCaster() *RoleTemplate { - return s -} diff --git a/typedapi/types/roletemplateinlinequery.go b/typedapi/types/roletemplateinlinequery.go index 39f1d3dd95..bff25f1752 100644 --- a/typedapi/types/roletemplateinlinequery.go +++ b/typedapi/types/roletemplateinlinequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // Query // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L383-L384 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L383-L384 type RoleTemplateInlineQuery any - -type RoleTemplateInlineQueryVariant interface { - RoleTemplateInlineQueryCaster() *RoleTemplateInlineQuery -} diff --git a/typedapi/types/roletemplatequery.go b/typedapi/types/roletemplatequery.go index e499fafa21..1433b90928 100644 --- a/typedapi/types/roletemplatequery.go +++ b/typedapi/types/roletemplatequery.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RoleTemplateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L351-L361 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L351-L361 type RoleTemplateQuery struct { // Template When you create a role, you can specify a query that defines the document // level security permissions. You can optionally @@ -41,13 +41,3 @@ func NewRoleTemplateQuery() *RoleTemplateQuery { return r } - -// true - -type RoleTemplateQueryVariant interface { - RoleTemplateQueryCaster() *RoleTemplateQuery -} - -func (s *RoleTemplateQuery) RoleTemplateQueryCaster() *RoleTemplateQuery { - return s -} diff --git a/typedapi/types/roletemplatescript.go b/typedapi/types/roletemplatescript.go index af5a374082..36f32e64e4 100644 --- a/typedapi/types/roletemplatescript.go +++ b/typedapi/types/roletemplatescript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // RoleTemplateScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L363-L381 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L363-L381 type RoleTemplateScript struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` @@ -141,13 +141,3 @@ func NewRoleTemplateScript() *RoleTemplateScript { return r } - -// true - -type RoleTemplateScriptVariant interface { - RoleTemplateScriptCaster() *RoleTemplateScript -} - -func (s *RoleTemplateScript) RoleTemplateScriptCaster() *RoleTemplateScript { - return s -} diff --git a/typedapi/types/rolloveraction.go b/typedapi/types/rolloveraction.go index 897d38b7d1..8d24520731 100644 --- a/typedapi/types/rolloveraction.go +++ b/typedapi/types/rolloveraction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RolloverAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L99-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L99-L110 type RolloverAction struct { MaxAge Duration `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` @@ -161,13 +161,3 @@ func NewRolloverAction() *RolloverAction { return r } - -// true - -type RolloverActionVariant interface { - RolloverActionCaster() *RolloverAction -} - -func (s *RolloverAction) RolloverActionCaster() *RolloverAction { - return s -} diff --git a/typedapi/types/rolloverconditions.go b/typedapi/types/rolloverconditions.go index 4b3edef47e..8f688d21ab 100644 --- a/typedapi/types/rolloverconditions.go +++ b/typedapi/types/rolloverconditions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/rollover/types.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/rollover/types.ts#L24-L40 type RolloverConditions struct { MaxAge Duration `json:"max_age,omitempty"` MaxAgeMillis *int64 `json:"max_age_millis,omitempty"` @@ -231,13 +231,3 @@ func NewRolloverConditions() *RolloverConditions { return r } - -// true - -type RolloverConditionsVariant interface { - RolloverConditionsCaster() *RolloverConditions -} - -func (s *RolloverConditions) RolloverConditionsCaster() *RolloverConditions { - return s -} diff --git a/typedapi/types/rollupcapabilities.go b/typedapi/types/rollupcapabilities.go index 32088d6b11..b88e53158d 100644 --- a/typedapi/types/rollupcapabilities.go +++ b/typedapi/types/rollupcapabilities.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RollupCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_caps/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_caps/types.ts#L24-L29 type RollupCapabilities struct { // RollupJobs There can be multiple, independent jobs configured for a single index or // index pattern. Each of these jobs may have different configurations, so the @@ -36,5 +36,3 @@ func NewRollupCapabilities() *RollupCapabilities { return r } - -// false diff --git a/typedapi/types/rollupcapabilitysummary.go b/typedapi/types/rollupcapabilitysummary.go index a33f816f38..bdd8d00c1c 100644 --- a/typedapi/types/rollupcapabilitysummary.go +++ b/typedapi/types/rollupcapabilitysummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RollupCapabilitySummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_caps/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_caps/types.ts#L31-L36 type RollupCapabilitySummary struct { Fields map[string][]RollupFieldSummary `json:"fields"` IndexPattern string `json:"index_pattern"` @@ -111,5 +111,3 @@ func NewRollupCapabilitySummary() *RollupCapabilitySummary { return r } - -// false diff --git a/typedapi/types/rollupfieldsummary.go b/typedapi/types/rollupfieldsummary.go index e0201cf48f..53df9c969a 100644 --- a/typedapi/types/rollupfieldsummary.go +++ b/typedapi/types/rollupfieldsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RollupFieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_caps/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_caps/types.ts#L38-L42 type RollupFieldSummary struct { Agg string `json:"agg"` CalendarInterval Duration `json:"calendar_interval,omitempty"` @@ -86,5 +86,3 @@ func NewRollupFieldSummary() *RollupFieldSummary { return r } - -// false diff --git a/typedapi/types/rollupjob.go b/typedapi/types/rollupjob.go index 1656a79f0a..b6ae1c7e7c 100644 --- a/typedapi/types/rollupjob.go +++ b/typedapi/types/rollupjob.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RollupJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_jobs/types.ts#L28-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_jobs/types.ts#L28-L43 type RollupJob struct { // Config The rollup job configuration. Config RollupJobConfiguration `json:"config"` @@ -41,5 +41,3 @@ func NewRollupJob() *RollupJob { return r } - -// false diff --git a/typedapi/types/rollupjobconfiguration.go b/typedapi/types/rollupjobconfiguration.go index e48be07e16..fc5f74a966 100644 --- a/typedapi/types/rollupjobconfiguration.go +++ b/typedapi/types/rollupjobconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RollupJobConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_jobs/types.ts#L45-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_jobs/types.ts#L45-L54 type RollupJobConfiguration struct { Cron string `json:"cron"` Groups Groupings `json:"groups"` @@ -133,5 +133,3 @@ func NewRollupJobConfiguration() *RollupJobConfiguration { return r } - -// false diff --git a/typedapi/types/rollupjobstats.go b/typedapi/types/rollupjobstats.go index 0d8bdccf33..74f1e9b79a 100644 --- a/typedapi/types/rollupjobstats.go +++ b/typedapi/types/rollupjobstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RollupJobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_jobs/types.ts#L56-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_jobs/types.ts#L56-L69 type RollupJobStats struct { DocumentsProcessed int64 `json:"documents_processed"` IndexFailures int64 `json:"index_failures"` @@ -223,5 +223,3 @@ func NewRollupJobStats() *RollupJobStats { return r } - -// false diff --git a/typedapi/types/rollupjobstatus.go b/typedapi/types/rollupjobstatus.go index a0ef7d7149..9791e00e6b 100644 --- a/typedapi/types/rollupjobstatus.go +++ b/typedapi/types/rollupjobstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RollupJobStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_jobs/types.ts#L71-L75 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_jobs/types.ts#L71-L75 type RollupJobStatus struct { CurrentPosition map[string]json.RawMessage `json:"current_position,omitempty"` JobState indexingjobstate.IndexingJobState `json:"job_state"` @@ -95,5 +95,3 @@ func NewRollupJobStatus() *RollupJobStatus { return r } - -// false diff --git a/typedapi/types/rollupjobsummary.go b/typedapi/types/rollupjobsummary.go index ccc5287424..b0efa3854d 100644 --- a/typedapi/types/rollupjobsummary.go +++ b/typedapi/types/rollupjobsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RollupJobSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 type RollupJobSummary struct { Fields map[string][]RollupJobSummaryField `json:"fields"` IndexPattern string `json:"index_pattern"` @@ -97,5 +97,3 @@ func NewRollupJobSummary() *RollupJobSummary { return r } - -// false diff --git a/typedapi/types/rollupjobsummaryfield.go b/typedapi/types/rollupjobsummaryfield.go index 37c1ff1162..5ebbdeb15c 100644 --- a/typedapi/types/rollupjobsummaryfield.go +++ b/typedapi/types/rollupjobsummaryfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RollupJobSummaryField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 type RollupJobSummaryField struct { Agg string `json:"agg"` CalendarInterval Duration `json:"calendar_interval,omitempty"` @@ -86,5 +86,3 @@ func NewRollupJobSummaryField() *RollupJobSummaryField { return r } - -// false diff --git a/typedapi/types/romaniananalyzer.go b/typedapi/types/romaniananalyzer.go index ed15066b89..7473919c0b 100644 --- a/typedapi/types/romaniananalyzer.go +++ b/typedapi/types/romaniananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // RomanianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L248-L253 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L248-L253 type RomanianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *RomanianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *RomanianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewRomanianAnalyzer() *RomanianAnalyzer { return r } - -// true - -type RomanianAnalyzerVariant interface { - RomanianAnalyzerCaster() *RomanianAnalyzer -} - -func (s *RomanianAnalyzer) RomanianAnalyzerCaster() *RomanianAnalyzer { - return s -} diff --git a/typedapi/types/routingfield.go b/typedapi/types/routingfield.go index f5c8ea0939..71d420a41b 100644 --- a/typedapi/types/routingfield.go +++ b/typedapi/types/routingfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RoutingField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L50-L52 type RoutingField struct { Required bool `json:"required"` } @@ -76,13 +76,3 @@ func NewRoutingField() *RoutingField { return r } - -// true - -type RoutingFieldVariant interface { - RoutingFieldCaster() *RoutingField -} - -func (s *RoutingField) RoutingFieldCaster() *RoutingField { - return s -} diff --git a/typedapi/types/rrfrank.go b/typedapi/types/rrfrank.go index d59b0632a6..7bfc820dfe 100644 --- a/typedapi/types/rrfrank.go +++ b/typedapi/types/rrfrank.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RrfRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Rank.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Rank.ts#L32-L37 type RrfRank struct { // RankConstant How much influence documents in individual result sets per query have over // the final ranked result set @@ -96,13 +96,3 @@ func NewRrfRank() *RrfRank { return r } - -// true - -type RrfRankVariant interface { - RrfRankCaster() *RrfRank -} - -func (s *RrfRank) RrfRankCaster() *RrfRank { - return s -} diff --git a/typedapi/types/rrfretriever.go b/typedapi/types/rrfretriever.go index 02aa6add6e..3ba5d7d9ac 100644 --- a/typedapi/types/rrfretriever.go +++ b/typedapi/types/rrfretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,13 +31,17 @@ import ( // RRFRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retriever.ts#L84-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L135-L144 type RRFRetriever struct { + Fields []string `json:"fields,omitempty"` // Filter Query to filter the documents that can match. Filter []Query `json:"filter,omitempty"` // MinScore Minimum _score for matching documents. Documents with a lower _score are not // included in the top documents. MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` + Query *string `json:"query,omitempty"` // RankConstant This value determines how much influence documents in individual result sets // per query have over the final ranked result set. RankConstant *int `json:"rank_constant,omitempty"` @@ -63,6 +67,11 @@ func (s *RRFRetriever) UnmarshalJSON(data []byte) error { switch t { + case "fields": + if err := dec.Decode(&s.Fields); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + case "filter": rawMsg := json.RawMessage{} dec.Decode(&rawMsg) @@ -95,6 +104,30 @@ func (s *RRFRetriever) UnmarshalJSON(data []byte) error { s.MinScore = &f } + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + + case "query": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Query", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Query = &o + case "rank_constant": var tmp any @@ -143,13 +176,3 @@ func NewRRFRetriever() *RRFRetriever { return r } - -// true - -type RRFRetrieverVariant interface { - RRFRetrieverCaster() *RRFRetriever -} - -func (s *RRFRetriever) RRFRetrieverCaster() *RRFRetriever { - return s -} diff --git a/typedapi/types/rulecondition.go b/typedapi/types/rulecondition.go index 9b9a4ae7c1..60fc1d64bc 100644 --- a/typedapi/types/rulecondition.go +++ b/typedapi/types/rulecondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // RuleCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Rule.ts#L52-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Rule.ts#L52-L65 type RuleCondition struct { // AppliesTo Specifies the result property to which the condition applies. If your // detector uses `lat_long`, `metric`, `rare`, or `freq_rare` functions, you can @@ -99,13 +99,3 @@ func NewRuleCondition() *RuleCondition { return r } - -// true - -type RuleConditionVariant interface { - RuleConditionCaster() *RuleCondition -} - -func (s *RuleCondition) RuleConditionCaster() *RuleCondition { - return s -} diff --git a/typedapi/types/rulequery.go b/typedapi/types/rulequery.go index 03348ff51f..2c73d1880a 100644 --- a/typedapi/types/rulequery.go +++ b/typedapi/types/rulequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RuleQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L398-L405 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L398-L406 type RuleQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -42,7 +42,8 @@ type RuleQuery struct { MatchCriteria json.RawMessage `json:"match_criteria,omitempty"` Organic Query `json:"organic"` QueryName_ *string `json:"_name,omitempty"` - RulesetIds []string `json:"ruleset_ids"` + RulesetId *string `json:"ruleset_id,omitempty"` + RulesetIds []string `json:"ruleset_ids,omitempty"` } func (s *RuleQuery) UnmarshalJSON(data []byte) error { @@ -98,9 +99,32 @@ func (s *RuleQuery) UnmarshalJSON(data []byte) error { } s.QueryName_ = &o + case "ruleset_id": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "RulesetId", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.RulesetId = &o + case "ruleset_ids": - if err := dec.Decode(&s.RulesetIds); err != nil { - return fmt.Errorf("%s | %w", "RulesetIds", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "RulesetIds", err) + } + + s.RulesetIds = append(s.RulesetIds, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.RulesetIds); err != nil { + return fmt.Errorf("%s | %w", "RulesetIds", err) + } } } @@ -114,13 +138,3 @@ func NewRuleQuery() *RuleQuery { return r } - -// true - -type RuleQueryVariant interface { - RuleQueryCaster() *RuleQuery -} - -func (s *RuleQuery) RuleQueryCaster() *RuleQuery { - return s -} diff --git a/typedapi/types/ruleretriever.go b/typedapi/types/ruleretriever.go index ae70c97f08..78ba5bf8ae 100644 --- a/typedapi/types/ruleretriever.go +++ b/typedapi/types/ruleretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RuleRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retriever.ts#L106-L115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L159-L168 type RuleRetriever struct { // Filter Query to filter the documents that can match. Filter []Query `json:"filter,omitempty"` @@ -41,6 +41,8 @@ type RuleRetriever struct { // MinScore Minimum _score for matching documents. Documents with a lower _score are not // included in the top documents. MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` // RankWindowSize This value determines the size of the individual result set. RankWindowSize *int `json:"rank_window_size,omitempty"` // Retriever The retriever whose results rules should be applied to. @@ -101,6 +103,18 @@ func (s *RuleRetriever) UnmarshalJSON(data []byte) error { s.MinScore = &f } + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + case "rank_window_size": var tmp any @@ -123,8 +137,19 @@ func (s *RuleRetriever) UnmarshalJSON(data []byte) error { } case "ruleset_ids": - if err := dec.Decode(&s.RulesetIds); err != nil { - return fmt.Errorf("%s | %w", "RulesetIds", err) + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + if !bytes.HasPrefix(rawMsg, []byte("[")) { + o := new(string) + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "RulesetIds", err) + } + + s.RulesetIds = append(s.RulesetIds, *o) + } else { + if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.RulesetIds); err != nil { + return fmt.Errorf("%s | %w", "RulesetIds", err) + } } } @@ -138,13 +163,3 @@ func NewRuleRetriever() *RuleRetriever { return r } - -// true - -type RuleRetrieverVariant interface { - RuleRetrieverCaster() *RuleRetriever -} - -func (s *RuleRetriever) RuleRetrieverCaster() *RuleRetriever { - return s -} diff --git a/typedapi/types/runningstatesearchinterval.go b/typedapi/types/runningstatesearchinterval.go index fd7c4af37b..9daa9d0b79 100644 --- a/typedapi/types/runningstatesearchinterval.go +++ b/typedapi/types/runningstatesearchinterval.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // RunningStateSearchInterval type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Datafeed.ts#L226-L243 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Datafeed.ts#L226-L243 type RunningStateSearchInterval struct { // End The end time. End Duration `json:"end,omitempty"` @@ -88,5 +88,3 @@ func NewRunningStateSearchInterval() *RunningStateSearchInterval { return r } - -// false diff --git a/typedapi/types/runtimefield.go b/typedapi/types/runtimefield.go index 2e5e3d8813..b6b1a3a2b1 100644 --- a/typedapi/types/runtimefield.go +++ b/typedapi/types/runtimefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // RuntimeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/RuntimeFields.ts#L26-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/RuntimeFields.ts#L26-L50 type RuntimeField struct { // FetchFields For type `lookup` FetchFields []RuntimeFieldFetchFields `json:"fetch_fields,omitempty"` @@ -132,13 +132,3 @@ func NewRuntimeField() *RuntimeField { return r } - -// true - -type RuntimeFieldVariant interface { - RuntimeFieldCaster() *RuntimeField -} - -func (s *RuntimeField) RuntimeFieldCaster() *RuntimeField { - return s -} diff --git a/typedapi/types/runtimefieldfetchfields.go b/typedapi/types/runtimefieldfetchfields.go index cf1e3180f3..843bfa2281 100644 --- a/typedapi/types/runtimefieldfetchfields.go +++ b/typedapi/types/runtimefieldfetchfields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldFetchFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/RuntimeFields.ts#L56-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/RuntimeFields.ts#L56-L60 type RuntimeFieldFetchFields struct { Field string `json:"field"` Format *string `json:"format,omitempty"` @@ -92,13 +92,3 @@ func NewRuntimeFieldFetchFields() *RuntimeFieldFetchFields { return r } - -// true - -type RuntimeFieldFetchFieldsVariant interface { - RuntimeFieldFetchFieldsCaster() *RuntimeFieldFetchFields -} - -func (s *RuntimeFieldFetchFields) RuntimeFieldFetchFieldsCaster() *RuntimeFieldFetchFields { - return s -} diff --git a/typedapi/types/runtimefields.go b/typedapi/types/runtimefields.go index 40d4c6e697..be7fe4f242 100644 --- a/typedapi/types/runtimefields.go +++ b/typedapi/types/runtimefields.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // RuntimeFields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/RuntimeFields.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/RuntimeFields.ts#L24-L24 type RuntimeFields map[string]RuntimeField - -type RuntimeFieldsVariant interface { - RuntimeFieldsCaster() *RuntimeFields -} diff --git a/typedapi/types/runtimefieldstype.go b/typedapi/types/runtimefieldstype.go index fd1620f70e..afc9242b72 100644 --- a/typedapi/types/runtimefieldstype.go +++ b/typedapi/types/runtimefieldstype.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldsType type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L289-L304 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L289-L304 type RuntimeFieldsType struct { CharsMax int64 `json:"chars_max"` CharsTotal int64 `json:"chars_total"` @@ -265,5 +265,3 @@ func NewRuntimeFieldsType() *RuntimeFieldsType { return r } - -// false diff --git a/typedapi/types/russiananalyzer.go b/typedapi/types/russiananalyzer.go index 39e5b897a1..638ef9170e 100644 --- a/typedapi/types/russiananalyzer.go +++ b/typedapi/types/russiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // RussianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L255-L260 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L255-L260 type RussianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *RussianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *RussianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewRussianAnalyzer() *RussianAnalyzer { return r } - -// true - -type RussianAnalyzerVariant interface { - RussianAnalyzerCaster() *RussianAnalyzer -} - -func (s *RussianAnalyzer) RussianAnalyzerCaster() *RussianAnalyzer { - return s -} diff --git a/typedapi/types/russianstemtokenfilter.go b/typedapi/types/russianstemtokenfilter.go new file mode 100644 index 0000000000..a10bdcedb0 --- /dev/null +++ b/typedapi/types/russianstemtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// RussianStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L567-L569 +type RussianStemTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *RussianStemTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s RussianStemTokenFilter) MarshalJSON() ([]byte, error) { + type innerRussianStemTokenFilter RussianStemTokenFilter + tmp := innerRussianStemTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "russian_stem" + + return json.Marshal(tmp) +} + +// NewRussianStemTokenFilter returns a RussianStemTokenFilter. +func NewRussianStemTokenFilter() *RussianStemTokenFilter { + r := &RussianStemTokenFilter{} + + return r +} diff --git a/typedapi/types/s3repository.go b/typedapi/types/s3repository.go index fdd8f2a92e..76c7f74eea 100644 --- a/typedapi/types/s3repository.go +++ b/typedapi/types/s3repository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // S3Repository type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L50-L53 type S3Repository struct { Settings S3RepositorySettings `json:"settings"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewS3Repository() *S3Repository { return r } - -// true - -type S3RepositoryVariant interface { - S3RepositoryCaster() *S3Repository -} - -func (s *S3Repository) S3RepositoryCaster() *S3Repository { - return s -} diff --git a/typedapi/types/s3repositorysettings.go b/typedapi/types/s3repositorysettings.go index fbf369ba58..1eb6e52232 100644 --- a/typedapi/types/s3repositorysettings.go +++ b/typedapi/types/s3repositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // S3RepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L93-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L93-L102 type S3RepositorySettings struct { BasePath *string `json:"base_path,omitempty"` Bucket string `json:"bucket"` @@ -195,13 +195,3 @@ func NewS3RepositorySettings() *S3RepositorySettings { return r } - -// true - -type S3RepositorySettingsVariant interface { - S3RepositorySettingsCaster() *S3RepositorySettings -} - -func (s *S3RepositorySettings) S3RepositorySettingsCaster() *S3RepositorySettings { - return s -} diff --git a/typedapi/types/samplediversity.go b/typedapi/types/samplediversity.go index 154b70bc36..db9bb05f3d 100644 --- a/typedapi/types/samplediversity.go +++ b/typedapi/types/samplediversity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SampleDiversity type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/ExploreControls.ts#L51-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/ExploreControls.ts#L51-L54 type SampleDiversity struct { Field string `json:"field"` MaxDocsPerValue int `json:"max_docs_per_value"` @@ -84,13 +84,3 @@ func NewSampleDiversity() *SampleDiversity { return r } - -// true - -type SampleDiversityVariant interface { - SampleDiversityCaster() *SampleDiversity -} - -func (s *SampleDiversity) SampleDiversityCaster() *SampleDiversity { - return s -} diff --git a/typedapi/types/sampleraggregate.go b/typedapi/types/sampleraggregate.go index 01be63dd54..aa8f9ffc9f 100644 --- a/typedapi/types/sampleraggregate.go +++ b/typedapi/types/sampleraggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // SamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L558-L559 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L558-L559 type SamplerAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewSamplerAggregate() *SamplerAggregate { return r } - -// false diff --git a/typedapi/types/sampleraggregation.go b/typedapi/types/sampleraggregation.go index 6cab66a08d..8e0c0bbd59 100644 --- a/typedapi/types/sampleraggregation.go +++ b/typedapi/types/sampleraggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L771-L780 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L771-L780 type SamplerAggregation struct { // ShardSize Limits how many top-scoring documents are collected in the sample processed // on each shard. @@ -80,13 +80,3 @@ func NewSamplerAggregation() *SamplerAggregation { return r } - -// true - -type SamplerAggregationVariant interface { - SamplerAggregationCaster() *SamplerAggregation -} - -func (s *SamplerAggregation) SamplerAggregationCaster() *SamplerAggregation { - return s -} diff --git a/typedapi/types/scalarvalue.go b/typedapi/types/scalarvalue.go index 159e95e196..d844dace2c 100644 --- a/typedapi/types/scalarvalue.go +++ b/typedapi/types/scalarvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,9 +28,5 @@ package types // bool // nil // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L39-L43 type ScalarValue any - -type ScalarValueVariant interface { - ScalarValueCaster() *ScalarValue -} diff --git a/typedapi/types/scaledfloatnumberproperty.go b/typedapi/types/scaledfloatnumberproperty.go index 71731dc7a6..1d46fb8223 100644 --- a/typedapi/types/scaledfloatnumberproperty.go +++ b/typedapi/types/scaledfloatnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // ScaledFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L196-L200 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L198-L202 type ScaledFloatNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -287,6 +287,12 @@ func (s *ScaledFloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -691,6 +697,12 @@ func (s *ScaledFloatNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -990,13 +1002,3 @@ func NewScaledFloatNumberProperty() *ScaledFloatNumberProperty { return r } - -// true - -type ScaledFloatNumberPropertyVariant interface { - ScaledFloatNumberPropertyCaster() *ScaledFloatNumberProperty -} - -func (s *ScaledFloatNumberProperty) ScaledFloatNumberPropertyCaster() *ScaledFloatNumberProperty { - return s -} diff --git a/typedapi/types/scandinavianfoldingtokenfilter.go b/typedapi/types/scandinavianfoldingtokenfilter.go new file mode 100644 index 0000000000..7e1068bae5 --- /dev/null +++ b/typedapi/types/scandinavianfoldingtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ScandinavianFoldingTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L531-L533 +type ScandinavianFoldingTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ScandinavianFoldingTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ScandinavianFoldingTokenFilter) MarshalJSON() ([]byte, error) { + type innerScandinavianFoldingTokenFilter ScandinavianFoldingTokenFilter + tmp := innerScandinavianFoldingTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "scandinavian_folding" + + return json.Marshal(tmp) +} + +// NewScandinavianFoldingTokenFilter returns a ScandinavianFoldingTokenFilter. +func NewScandinavianFoldingTokenFilter() *ScandinavianFoldingTokenFilter { + r := &ScandinavianFoldingTokenFilter{} + + return r +} diff --git a/typedapi/types/scandinaviannormalizationtokenfilter.go b/typedapi/types/scandinaviannormalizationtokenfilter.go new file mode 100644 index 0000000000..3513d5a044 --- /dev/null +++ b/typedapi/types/scandinaviannormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ScandinavianNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L535-L537 +type ScandinavianNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *ScandinavianNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s ScandinavianNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerScandinavianNormalizationTokenFilter ScandinavianNormalizationTokenFilter + tmp := innerScandinavianNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "scandinavian_normalization" + + return json.Marshal(tmp) +} + +// NewScandinavianNormalizationTokenFilter returns a ScandinavianNormalizationTokenFilter. +func NewScandinavianNormalizationTokenFilter() *ScandinavianNormalizationTokenFilter { + r := &ScandinavianNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/schedulecontainer.go b/typedapi/types/schedulecontainer.go index b834c0c8d4..ac998cd92f 100644 --- a/typedapi/types/schedulecontainer.go +++ b/typedapi/types/schedulecontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScheduleContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L80-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L80-L92 type ScheduleContainer struct { AdditionalScheduleContainerProperty map[string]json.RawMessage `json:"-"` Cron *string `json:"cron,omitempty"` @@ -194,13 +194,3 @@ func NewScheduleContainer() *ScheduleContainer { return r } - -// true - -type ScheduleContainerVariant interface { - ScheduleContainerCaster() *ScheduleContainer -} - -func (s *ScheduleContainer) ScheduleContainerCaster() *ScheduleContainer { - return s -} diff --git a/typedapi/types/scheduletimeofday.go b/typedapi/types/scheduletimeofday.go index 383726b9a1..1a15d0e764 100644 --- a/typedapi/types/scheduletimeofday.go +++ b/typedapi/types/scheduletimeofday.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // HourAndMinute // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L99-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L99-L104 type ScheduleTimeOfDay any - -type ScheduleTimeOfDayVariant interface { - ScheduleTimeOfDayCaster() *ScheduleTimeOfDay -} diff --git a/typedapi/types/scheduletriggerevent.go b/typedapi/types/scheduletriggerevent.go index 054a0e635a..3257f7ec5b 100644 --- a/typedapi/types/scheduletriggerevent.go +++ b/typedapi/types/scheduletriggerevent.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ScheduleTriggerEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L94-L97 type ScheduleTriggerEvent struct { ScheduledTime DateTime `json:"scheduled_time"` TriggeredTime DateTime `json:"triggered_time,omitempty"` @@ -72,13 +72,3 @@ func NewScheduleTriggerEvent() *ScheduleTriggerEvent { return r } - -// true - -type ScheduleTriggerEventVariant interface { - ScheduleTriggerEventCaster() *ScheduleTriggerEvent -} - -func (s *ScheduleTriggerEvent) ScheduleTriggerEventCaster() *ScheduleTriggerEvent { - return s -} diff --git a/typedapi/types/schedulingconfiguration.go b/typedapi/types/schedulingconfiguration.go index 94d843a8d4..3652d4c08a 100644 --- a/typedapi/types/schedulingconfiguration.go +++ b/typedapi/types/schedulingconfiguration.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SchedulingConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L246-L250 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L246-L250 type SchedulingConfiguration struct { AccessControl *ConnectorScheduling `json:"access_control,omitempty"` Full *ConnectorScheduling `json:"full,omitempty"` @@ -35,13 +35,3 @@ func NewSchedulingConfiguration() *SchedulingConfiguration { return r } - -// true - -type SchedulingConfigurationVariant interface { - SchedulingConfigurationCaster() *SchedulingConfiguration -} - -func (s *SchedulingConfiguration) SchedulingConfigurationCaster() *SchedulingConfiguration { - return s -} diff --git a/typedapi/types/scoresort.go b/typedapi/types/scoresort.go index 00894da906..506222200e 100644 --- a/typedapi/types/scoresort.go +++ b/typedapi/types/scoresort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // ScoreSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L54-L56 type ScoreSort struct { Order *sortorder.SortOrder `json:"order,omitempty"` } @@ -37,13 +37,3 @@ func NewScoreSort() *ScoreSort { return r } - -// true - -type ScoreSortVariant interface { - ScoreSortCaster() *ScoreSort -} - -func (s *ScoreSort) ScoreSortCaster() *ScoreSort { - return s -} diff --git a/typedapi/types/script.go b/typedapi/types/script.go index 9dcb57dc64..8efce2469c 100644 --- a/typedapi/types/script.go +++ b/typedapi/types/script.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Script type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Scripting.ts#L75-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Scripting.ts#L75-L99 type Script struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` @@ -126,13 +126,3 @@ func NewScript() *Script { return r } - -// true - -type ScriptVariant interface { - ScriptCaster() *Script -} - -func (s *Script) ScriptCaster() *Script { - return s -} diff --git a/typedapi/types/scriptcache.go b/typedapi/types/scriptcache.go index a4b6a7d624..09782d57ce 100644 --- a/typedapi/types/scriptcache.go +++ b/typedapi/types/scriptcache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1102-L1116 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1109-L1123 type ScriptCache struct { // CacheEvictions Total number of times the script cache has evicted old data. CacheEvictions *int64 `json:"cache_evictions,omitempty"` @@ -126,5 +126,3 @@ func NewScriptCache() *ScriptCache { return r } - -// false diff --git a/typedapi/types/scriptcondition.go b/typedapi/types/scriptcondition.go index 76dae60fc9..0a59dec10c 100644 --- a/typedapi/types/scriptcondition.go +++ b/typedapi/types/scriptcondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L79-L87 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L79-L87 type ScriptCondition struct { Id *string `json:"id,omitempty"` Lang *string `json:"lang,omitempty"` @@ -111,13 +111,3 @@ func NewScriptCondition() *ScriptCondition { return r } - -// true - -type ScriptConditionVariant interface { - ScriptConditionCaster() *ScriptCondition -} - -func (s *ScriptCondition) ScriptConditionCaster() *ScriptCondition { - return s -} diff --git a/typedapi/types/scriptedheuristic.go b/typedapi/types/scriptedheuristic.go index 4b567aeb7c..4d7601ecbc 100644 --- a/typedapi/types/scriptedheuristic.go +++ b/typedapi/types/scriptedheuristic.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ScriptedHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L813-L815 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L813-L815 type ScriptedHeuristic struct { Script Script `json:"script"` } @@ -33,13 +33,3 @@ func NewScriptedHeuristic() *ScriptedHeuristic { return r } - -// true - -type ScriptedHeuristicVariant interface { - ScriptedHeuristicCaster() *ScriptedHeuristic -} - -func (s *ScriptedHeuristic) ScriptedHeuristicCaster() *ScriptedHeuristic { - return s -} diff --git a/typedapi/types/scriptedmetricaggregate.go b/typedapi/types/scriptedmetricaggregate.go index 45e0dc82ee..fc72e0e7b4 100644 --- a/typedapi/types/scriptedmetricaggregate.go +++ b/typedapi/types/scriptedmetricaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L739-L745 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L741-L747 type ScriptedMetricAggregate struct { Meta Metadata `json:"meta,omitempty"` Value json.RawMessage `json:"value,omitempty"` @@ -72,5 +72,3 @@ func NewScriptedMetricAggregate() *ScriptedMetricAggregate { return r } - -// false diff --git a/typedapi/types/scriptedmetricaggregation.go b/typedapi/types/scriptedmetricaggregation.go index ff5a1eb048..79c5a32ac5 100644 --- a/typedapi/types/scriptedmetricaggregation.go +++ b/typedapi/types/scriptedmetricaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L263-L289 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L286-L312 type ScriptedMetricAggregation struct { // CombineScript Runs once on each shard after document collection is complete. // Allows the aggregation to consolidate the state returned from each shard. @@ -130,13 +130,3 @@ func NewScriptedMetricAggregation() *ScriptedMetricAggregation { return r } - -// true - -type ScriptedMetricAggregationVariant interface { - ScriptedMetricAggregationCaster() *ScriptedMetricAggregation -} - -func (s *ScriptedMetricAggregation) ScriptedMetricAggregationCaster() *ScriptedMetricAggregation { - return s -} diff --git a/typedapi/types/scriptfield.go b/typedapi/types/scriptfield.go index e537ff6d97..d50da1b9fe 100644 --- a/typedapi/types/scriptfield.go +++ b/typedapi/types/scriptfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Scripting.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Scripting.ts#L101-L104 type ScriptField struct { IgnoreFailure *bool `json:"ignore_failure,omitempty"` Script Script `json:"script"` @@ -82,13 +82,3 @@ func NewScriptField() *ScriptField { return r } - -// true - -type ScriptFieldVariant interface { - ScriptFieldCaster() *ScriptField -} - -func (s *ScriptField) ScriptFieldCaster() *ScriptField { - return s -} diff --git a/typedapi/types/scripting.go b/typedapi/types/scripting.go index ed800231f4..1eb97976a1 100644 --- a/typedapi/types/scripting.go +++ b/typedapi/types/scripting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Scripting type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1048-L1066 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1055-L1073 type Scripting struct { // CacheEvictions Total number of times the script cache has evicted old data. CacheEvictions *int64 `json:"cache_evictions,omitempty"` @@ -131,5 +131,3 @@ func NewScripting() *Scripting { return r } - -// false diff --git a/typedapi/types/scriptprocessor.go b/typedapi/types/scriptprocessor.go index 25eac61139..acb8659c68 100644 --- a/typedapi/types/scriptprocessor.go +++ b/typedapi/types/scriptprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1422-L1442 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1422-L1442 type ScriptProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -177,13 +177,3 @@ func NewScriptProcessor() *ScriptProcessor { return r } - -// true - -type ScriptProcessorVariant interface { - ScriptProcessorCaster() *ScriptProcessor -} - -func (s *ScriptProcessor) ScriptProcessorCaster() *ScriptProcessor { - return s -} diff --git a/typedapi/types/scriptquery.go b/typedapi/types/scriptquery.go index 96cf56327e..4115901bff 100644 --- a/typedapi/types/scriptquery.go +++ b/typedapi/types/scriptquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L337-L346 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L337-L346 type ScriptQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -104,13 +104,3 @@ func NewScriptQuery() *ScriptQuery { return r } - -// true - -type ScriptQueryVariant interface { - ScriptQueryCaster() *ScriptQuery -} - -func (s *ScriptQuery) ScriptQueryCaster() *ScriptQuery { - return s -} diff --git a/typedapi/types/scriptscorefunction.go b/typedapi/types/scriptscorefunction.go index 09acfe51fe..17db0a17ea 100644 --- a/typedapi/types/scriptscorefunction.go +++ b/typedapi/types/scriptscorefunction.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ScriptScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L137-L142 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L137-L142 type ScriptScoreFunction struct { // Script A script that computes a score. Script Script `json:"script"` @@ -34,13 +34,3 @@ func NewScriptScoreFunction() *ScriptScoreFunction { return r } - -// true - -type ScriptScoreFunctionVariant interface { - ScriptScoreFunctionCaster() *ScriptScoreFunction -} - -func (s *ScriptScoreFunction) ScriptScoreFunctionCaster() *ScriptScoreFunction { - return s -} diff --git a/typedapi/types/scriptscorequery.go b/typedapi/types/scriptscorequery.go index 55e4c2a17d..62b9d4ddb9 100644 --- a/typedapi/types/scriptscorequery.go +++ b/typedapi/types/scriptscorequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L348-L365 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L348-L365 type ScriptScoreQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -131,13 +131,3 @@ func NewScriptScoreQuery() *ScriptScoreQuery { return r } - -// true - -type ScriptScoreQueryVariant interface { - ScriptScoreQueryCaster() *ScriptScoreQuery -} - -func (s *ScriptScoreQuery) ScriptScoreQueryCaster() *ScriptScoreQuery { - return s -} diff --git a/typedapi/types/scriptsort.go b/typedapi/types/scriptsort.go index 8a599d4af7..5c28e4381a 100644 --- a/typedapi/types/scriptsort.go +++ b/typedapi/types/scriptsort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,7 +28,7 @@ import ( // ScriptSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L72-L78 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L72-L78 type ScriptSort struct { Mode *sortmode.SortMode `json:"mode,omitempty"` Nested *NestedSortValue `json:"nested,omitempty"` @@ -43,13 +43,3 @@ func NewScriptSort() *ScriptSort { return r } - -// true - -type ScriptSortVariant interface { - ScriptSortCaster() *ScriptSort -} - -func (s *ScriptSort) ScriptSortCaster() *ScriptSort { - return s -} diff --git a/typedapi/types/scripttransform.go b/typedapi/types/scripttransform.go index ada922bdf9..ec5b975de1 100644 --- a/typedapi/types/scripttransform.go +++ b/typedapi/types/scripttransform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ScriptTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Transform.ts#L36-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Transform.ts#L36-L44 type ScriptTransform struct { Id *string `json:"id,omitempty"` Lang *string `json:"lang,omitempty"` @@ -111,13 +111,3 @@ func NewScriptTransform() *ScriptTransform { return r } - -// true - -type ScriptTransformVariant interface { - ScriptTransformCaster() *ScriptTransform -} - -func (s *ScriptTransform) ScriptTransformCaster() *ScriptTransform { - return s -} diff --git a/typedapi/types/scrollids.go b/typedapi/types/scrollids.go index 1e26dc4e78..8908958ee6 100644 --- a/typedapi/types/scrollids.go +++ b/typedapi/types/scrollids.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ScrollIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L56-L56 type ScrollIds []string - -type ScrollIdsVariant interface { - ScrollIdsCaster() *ScrollIds -} diff --git a/typedapi/types/searchablesnapshotaction.go b/typedapi/types/searchablesnapshotaction.go index ed5df1b049..b4ea4a50c2 100644 --- a/typedapi/types/searchablesnapshotaction.go +++ b/typedapi/types/searchablesnapshotaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L128-L131 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L128-L131 type SearchableSnapshotAction struct { ForceMergeIndex *bool `json:"force_merge_index,omitempty"` SnapshotRepository string `json:"snapshot_repository"` @@ -89,13 +89,3 @@ func NewSearchableSnapshotAction() *SearchableSnapshotAction { return r } - -// true - -type SearchableSnapshotActionVariant interface { - SearchableSnapshotActionCaster() *SearchableSnapshotAction -} - -func (s *SearchableSnapshotAction) SearchableSnapshotActionCaster() *SearchableSnapshotAction { - return s -} diff --git a/typedapi/types/searchablesnapshots.go b/typedapi/types/searchablesnapshots.go index 5087ae8df7..d057400e2f 100644 --- a/typedapi/types/searchablesnapshots.go +++ b/typedapi/types/searchablesnapshots.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshots type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L438-L442 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L438-L442 type SearchableSnapshots struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -142,5 +142,3 @@ func NewSearchableSnapshots() *SearchableSnapshots { return r } - -// false diff --git a/typedapi/types/searchaccess.go b/typedapi/types/searchaccess.go index 4dd7555b03..c8c8a92070 100644 --- a/typedapi/types/searchaccess.go +++ b/typedapi/types/searchaccess.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SearchAccess type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L454-L474 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L454-L474 type SearchAccess struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -157,13 +157,3 @@ func NewSearchAccess() *SearchAccess { return r } - -// true - -type SearchAccessVariant interface { - SearchAccessCaster() *SearchAccess -} - -func (s *SearchAccess) SearchAccessCaster() *SearchAccess { - return s -} diff --git a/typedapi/types/searchapplication.go b/typedapi/types/searchapplication.go index 624c9a6550..43bc79f066 100644 --- a/typedapi/types/searchapplication.go +++ b/typedapi/types/searchapplication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SearchApplication type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/_types/SearchApplication.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/_types/SearchApplication.ts#L24-L33 type SearchApplication struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` @@ -95,5 +95,3 @@ func NewSearchApplication() *SearchApplication { return r } - -// false diff --git a/typedapi/types/searchapplicationparameters.go b/typedapi/types/searchapplicationparameters.go index 3b415706df..c33a7a0037 100644 --- a/typedapi/types/searchapplicationparameters.go +++ b/typedapi/types/searchapplicationparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SearchApplicationParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/_types/SearchApplicationParameters.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/_types/SearchApplicationParameters.ts#L23-L36 type SearchApplicationParameters struct { // AnalyticsCollectionName Analytics collection associated to the Search Application. AnalyticsCollectionName *string `json:"analytics_collection_name,omitempty"` @@ -81,13 +81,3 @@ func NewSearchApplicationParameters() *SearchApplicationParameters { return r } - -// true - -type SearchApplicationParametersVariant interface { - SearchApplicationParametersCaster() *SearchApplicationParameters -} - -func (s *SearchApplicationParameters) SearchApplicationParametersCaster() *SearchApplicationParameters { - return s -} diff --git a/typedapi/types/searchapplicationtemplate.go b/typedapi/types/searchapplicationtemplate.go index 9eefe67a65..21448353dd 100644 --- a/typedapi/types/searchapplicationtemplate.go +++ b/typedapi/types/searchapplicationtemplate.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SearchApplicationTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/search_application/_types/SearchApplicationTemplate.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/search_application/_types/SearchApplicationTemplate.ts#L22-L27 type SearchApplicationTemplate struct { // Script The associated mustache template. Script Script `json:"script"` @@ -34,13 +34,3 @@ func NewSearchApplicationTemplate() *SearchApplicationTemplate { return r } - -// true - -type SearchApplicationTemplateVariant interface { - SearchApplicationTemplateCaster() *SearchApplicationTemplate -} - -func (s *SearchApplicationTemplate) SearchApplicationTemplateCaster() *SearchApplicationTemplate { - return s -} diff --git a/typedapi/types/searchasyoutypeproperty.go b/typedapi/types/searchasyoutypeproperty.go index 033618372e..591213bcf2 100644 --- a/typedapi/types/searchasyoutypeproperty.go +++ b/typedapi/types/searchasyoutypeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // SearchAsYouTypeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L245-L256 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L270-L281 type SearchAsYouTypeProperty struct { Analyzer *string `json:"analyzer,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -249,6 +249,12 @@ func (s *SearchAsYouTypeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -653,6 +659,12 @@ func (s *SearchAsYouTypeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -951,13 +963,3 @@ func NewSearchAsYouTypeProperty() *SearchAsYouTypeProperty { return r } - -// true - -type SearchAsYouTypePropertyVariant interface { - SearchAsYouTypePropertyCaster() *SearchAsYouTypeProperty -} - -func (s *SearchAsYouTypeProperty) SearchAsYouTypePropertyCaster() *SearchAsYouTypeProperty { - return s -} diff --git a/typedapi/types/searchidle.go b/typedapi/types/searchidle.go index c51cc7de83..18444a4d7e 100644 --- a/typedapi/types/searchidle.go +++ b/typedapi/types/searchidle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SearchIdle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L253-L256 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L253-L256 type SearchIdle struct { After Duration `json:"after,omitempty"` } @@ -66,13 +66,3 @@ func NewSearchIdle() *SearchIdle { return r } - -// true - -type SearchIdleVariant interface { - SearchIdleCaster() *SearchIdle -} - -func (s *SearchIdle) SearchIdleCaster() *SearchIdle { - return s -} diff --git a/typedapi/types/searchinput.go b/typedapi/types/searchinput.go index be2e140c4e..1067e02e96 100644 --- a/typedapi/types/searchinput.go +++ b/typedapi/types/searchinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SearchInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L112-L116 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L109-L113 type SearchInput struct { Extract []string `json:"extract,omitempty"` Request SearchInputRequestDefinition `json:"request"` @@ -78,13 +78,3 @@ func NewSearchInput() *SearchInput { return r } - -// true - -type SearchInputVariant interface { - SearchInputCaster() *SearchInput -} - -func (s *SearchInput) SearchInputCaster() *SearchInput { - return s -} diff --git a/typedapi/types/searchinputrequestbody.go b/typedapi/types/searchinputrequestbody.go index 766e2245c7..56b04cc184 100644 --- a/typedapi/types/searchinputrequestbody.go +++ b/typedapi/types/searchinputrequestbody.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SearchInputRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L147-L149 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L144-L146 type SearchInputRequestBody struct { Query Query `json:"query"` } @@ -33,13 +33,3 @@ func NewSearchInputRequestBody() *SearchInputRequestBody { return r } - -// true - -type SearchInputRequestBodyVariant interface { - SearchInputRequestBodyCaster() *SearchInputRequestBody -} - -func (s *SearchInputRequestBody) SearchInputRequestBodyCaster() *SearchInputRequestBody { - return s -} diff --git a/typedapi/types/searchinputrequestdefinition.go b/typedapi/types/searchinputrequestdefinition.go index 65c317893e..47f68e93a8 100644 --- a/typedapi/types/searchinputrequestdefinition.go +++ b/typedapi/types/searchinputrequestdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SearchInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L118-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L115-L122 type SearchInputRequestDefinition struct { Body *SearchInputRequestBody `json:"body,omitempty"` Indices []string `json:"indices,omitempty"` @@ -108,13 +108,3 @@ func NewSearchInputRequestDefinition() *SearchInputRequestDefinition { return r } - -// true - -type SearchInputRequestDefinitionVariant interface { - SearchInputRequestDefinitionCaster() *SearchInputRequestDefinition -} - -func (s *SearchInputRequestDefinition) SearchInputRequestDefinitionCaster() *SearchInputRequestDefinition { - return s -} diff --git a/typedapi/types/searchprofile.go b/typedapi/types/searchprofile.go index 9748549747..017bf62ff9 100644 --- a/typedapi/types/searchprofile.go +++ b/typedapi/types/searchprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SearchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L136-L140 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L136-L140 type SearchProfile struct { Collector []Collector `json:"collector"` Query []QueryProfile `json:"query"` @@ -89,5 +89,3 @@ func NewSearchProfile() *SearchProfile { return r } - -// false diff --git a/typedapi/types/searchshardsnodeattributes.go b/typedapi/types/searchshardsnodeattributes.go index d54ccb73a8..227a1ec256 100644 --- a/typedapi/types/searchshardsnodeattributes.go +++ b/typedapi/types/searchshardsnodeattributes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SearchShardsNodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_shards/SearchShardsResponse.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_shards/SearchShardsResponse.ts#L42-L60 type SearchShardsNodeAttributes struct { // Attributes Lists node attributes. Attributes map[string]string `json:"attributes"` @@ -155,5 +155,3 @@ func NewSearchShardsNodeAttributes() *SearchShardsNodeAttributes { return r } - -// false diff --git a/typedapi/types/searchstats.go b/typedapi/types/searchstats.go index 16dd0f246a..557bdbb292 100644 --- a/typedapi/types/searchstats.go +++ b/typedapi/types/searchstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SearchStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L255-L274 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L277-L296 type SearchStats struct { FetchCurrent int64 `json:"fetch_current"` FetchTime Duration `json:"fetch_time,omitempty"` @@ -264,5 +264,3 @@ func NewSearchStats() *SearchStats { return r } - -// false diff --git a/typedapi/types/searchtemplaterequestbody.go b/typedapi/types/searchtemplaterequestbody.go index fc2417e317..9694993d1b 100644 --- a/typedapi/types/searchtemplaterequestbody.go +++ b/typedapi/types/searchtemplaterequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SearchTemplateRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L128-L145 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L125-L142 type SearchTemplateRequestBody struct { Explain *bool `json:"explain,omitempty"` // Id ID of the search template to use. If no source is specified, @@ -126,13 +126,3 @@ func NewSearchTemplateRequestBody() *SearchTemplateRequestBody { return r } - -// true - -type SearchTemplateRequestBodyVariant interface { - SearchTemplateRequestBodyCaster() *SearchTemplateRequestBody -} - -func (s *SearchTemplateRequestBody) SearchTemplateRequestBodyCaster() *SearchTemplateRequestBody { - return s -} diff --git a/typedapi/types/searchtransform.go b/typedapi/types/searchtransform.go index 345631bd35..8b40523dd3 100644 --- a/typedapi/types/searchtransform.go +++ b/typedapi/types/searchtransform.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SearchTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Transform.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Transform.ts#L46-L49 type SearchTransform struct { Request SearchInputRequestDefinition `json:"request"` Timeout Duration `json:"timeout"` @@ -72,13 +72,3 @@ func NewSearchTransform() *SearchTransform { return r } - -// true - -type SearchTransformVariant interface { - SearchTransformCaster() *SearchTransform -} - -func (s *SearchTransform) SearchTransformCaster() *SearchTransform { - return s -} diff --git a/typedapi/types/searchusagestats.go b/typedapi/types/searchusagestats.go new file mode 100644 index 0000000000..eaf775e342 --- /dev/null +++ b/typedapi/types/searchusagestats.go @@ -0,0 +1,120 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SearchUsageStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L149-L155 +type SearchUsageStats struct { + Queries map[string]int64 `json:"queries"` + Rescorers map[string]int64 `json:"rescorers"` + Retrievers map[string]int64 `json:"retrievers"` + Sections map[string]int64 `json:"sections"` + Total int64 `json:"total"` +} + +func (s *SearchUsageStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "queries": + if s.Queries == nil { + s.Queries = make(map[string]int64, 0) + } + if err := dec.Decode(&s.Queries); err != nil { + return fmt.Errorf("%s | %w", "Queries", err) + } + + case "rescorers": + if s.Rescorers == nil { + s.Rescorers = make(map[string]int64, 0) + } + if err := dec.Decode(&s.Rescorers); err != nil { + return fmt.Errorf("%s | %w", "Rescorers", err) + } + + case "retrievers": + if s.Retrievers == nil { + s.Retrievers = make(map[string]int64, 0) + } + if err := dec.Decode(&s.Retrievers); err != nil { + return fmt.Errorf("%s | %w", "Retrievers", err) + } + + case "sections": + if s.Sections == nil { + s.Sections = make(map[string]int64, 0) + } + if err := dec.Decode(&s.Sections); err != nil { + return fmt.Errorf("%s | %w", "Sections", err) + } + + case "total": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "Total", err) + } + s.Total = value + case float64: + f := int64(v) + s.Total = f + } + + } + } + return nil +} + +// NewSearchUsageStats returns a SearchUsageStats. +func NewSearchUsageStats() *SearchUsageStats { + r := &SearchUsageStats{ + Queries: make(map[string]int64), + Rescorers: make(map[string]int64), + Retrievers: make(map[string]int64), + Sections: make(map[string]int64), + } + + return r +} diff --git a/typedapi/types/security.go b/typedapi/types/security.go index 9c546a9355..1cb0cc5645 100644 --- a/typedapi/types/security.go +++ b/typedapi/types/security.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Security type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L444-L457 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L444-L457 type Security struct { Anonymous FeatureToggle `json:"anonymous"` ApiKeyService FeatureToggle `json:"api_key_service"` @@ -172,5 +172,3 @@ func NewSecurity() *Security { return r } - -// false diff --git a/typedapi/types/securityrolemapping.go b/typedapi/types/securityrolemapping.go index 068ca2073f..306975957e 100644 --- a/typedapi/types/securityrolemapping.go +++ b/typedapi/types/securityrolemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SecurityRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/RoleMapping.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/RoleMapping.ts#L25-L33 type SecurityRoleMapping struct { Enabled bool `json:"enabled"` Metadata Metadata `json:"metadata"` @@ -100,5 +100,3 @@ func NewSecurityRoleMapping() *SecurityRoleMapping { return r } - -// false diff --git a/typedapi/types/securityroles.go b/typedapi/types/securityroles.go index 3d79ffdfd9..bc950f134d 100644 --- a/typedapi/types/securityroles.go +++ b/typedapi/types/securityroles.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SecurityRoles type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L306-L310 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L306-L310 type SecurityRoles struct { Dls SecurityRolesDls `json:"dls"` File SecurityRolesFile `json:"file"` @@ -35,5 +35,3 @@ func NewSecurityRoles() *SecurityRoles { return r } - -// false diff --git a/typedapi/types/securityrolesdls.go b/typedapi/types/securityrolesdls.go index 25956b3bee..7b848ba3bf 100644 --- a/typedapi/types/securityrolesdls.go +++ b/typedapi/types/securityrolesdls.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SecurityRolesDls type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L318-L320 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L318-L320 type SecurityRolesDls struct { BitSetCache SecurityRolesDlsBitSetCache `json:"bit_set_cache"` } @@ -33,5 +33,3 @@ func NewSecurityRolesDls() *SecurityRolesDls { return r } - -// false diff --git a/typedapi/types/securityrolesdlsbitsetcache.go b/typedapi/types/securityrolesdlsbitsetcache.go index 0a7a0f0f64..c91845e414 100644 --- a/typedapi/types/securityrolesdlsbitsetcache.go +++ b/typedapi/types/securityrolesdlsbitsetcache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SecurityRolesDlsBitSetCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L322-L326 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L322-L326 type SecurityRolesDlsBitSetCache struct { Count int `json:"count"` Memory ByteSize `json:"memory,omitempty"` @@ -90,5 +90,3 @@ func NewSecurityRolesDlsBitSetCache() *SecurityRolesDlsBitSetCache { return r } - -// false diff --git a/typedapi/types/securityrolesfile.go b/typedapi/types/securityrolesfile.go index 85b0a6f87f..2b420e120e 100644 --- a/typedapi/types/securityrolesfile.go +++ b/typedapi/types/securityrolesfile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SecurityRolesFile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L328-L332 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L328-L332 type SecurityRolesFile struct { Dls bool `json:"dls"` Fls bool `json:"fls"` @@ -107,5 +107,3 @@ func NewSecurityRolesFile() *SecurityRolesFile { return r } - -// false diff --git a/typedapi/types/securityrolesnative.go b/typedapi/types/securityrolesnative.go index 5d379066cb..9ab9f5f721 100644 --- a/typedapi/types/securityrolesnative.go +++ b/typedapi/types/securityrolesnative.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SecurityRolesNative type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L312-L316 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L312-L316 type SecurityRolesNative struct { Dls bool `json:"dls"` Fls bool `json:"fls"` @@ -107,5 +107,3 @@ func NewSecurityRolesNative() *SecurityRolesNative { return r } - -// false diff --git a/typedapi/types/securitysettings.go b/typedapi/types/securitysettings.go index 7d99bac11f..d537be7186 100644 --- a/typedapi/types/securitysettings.go +++ b/typedapi/types/securitysettings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SecuritySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/SecuritySettings.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/SecuritySettings.ts#L22-L24 type SecuritySettings struct { Index *IndexSettings `json:"index,omitempty"` } @@ -33,13 +33,3 @@ func NewSecuritySettings() *SecuritySettings { return r } - -// true - -type SecuritySettingsVariant interface { - SecuritySettingsCaster() *SecuritySettings -} - -func (s *SecuritySettings) SecuritySettingsCaster() *SecuritySettings { - return s -} diff --git a/typedapi/types/segment.go b/typedapi/types/segment.go index 9e9a36cb72..473fcd8048 100644 --- a/typedapi/types/segment.go +++ b/typedapi/types/segment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Segment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/segments/types.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/segments/types.ts#L28-L38 type Segment struct { Attributes map[string]string `json:"attributes"` Committed bool `json:"committed"` @@ -189,5 +189,3 @@ func NewSegment() *Segment { return r } - -// false diff --git a/typedapi/types/segmentsrecord.go b/typedapi/types/segmentsrecord.go index 333aadbc75..03e74bc28d 100644 --- a/typedapi/types/segmentsrecord.go +++ b/typedapi/types/segmentsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SegmentsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/segments/types.ts#L22-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/segments/types.ts#L22-L107 type SegmentsRecord struct { // Committed If `true`, the segment is synced to disk. // Segments that are synced can survive a hard reboot. @@ -259,5 +259,3 @@ func NewSegmentsRecord() *SegmentsRecord { return r } - -// false diff --git a/typedapi/types/segmentsstats.go b/typedapi/types/segmentsstats.go index c25a6f2053..bb4e8dd01d 100644 --- a/typedapi/types/segmentsstats.go +++ b/typedapi/types/segmentsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SegmentsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L276-L369 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L298-L393 type SegmentsStats struct { // Count Total number of segments across all shards assigned to selected nodes. Count int `json:"count"` @@ -51,8 +51,7 @@ type SegmentsStats struct { FixedBitSet ByteSize `json:"fixed_bit_set,omitempty"` // FixedBitSetMemoryInBytes Total amount of memory, in bytes, used by fixed bit sets across all shards // assigned to selected nodes. - FixedBitSetMemoryInBytes int64 `json:"fixed_bit_set_memory_in_bytes"` - IndexWriterMaxMemoryInBytes *int64 `json:"index_writer_max_memory_in_bytes,omitempty"` + FixedBitSetMemoryInBytes int64 `json:"fixed_bit_set_memory_in_bytes"` // IndexWriterMemory Total amount of memory used by all index writers across all shards assigned // to selected nodes. IndexWriterMemory ByteSize `json:"index_writer_memory,omitempty"` @@ -80,16 +79,18 @@ type SegmentsStats struct { // PointsMemoryInBytes Total amount, in bytes, of memory used for points across all shards assigned // to selected nodes. PointsMemoryInBytes int64 `json:"points_memory_in_bytes"` + // StoredFieldsMemory Total amount of memory used for stored fields across all shards assigned to + // selected nodes. + StoredFieldsMemory ByteSize `json:"stored_fields_memory,omitempty"` // StoredFieldsMemoryInBytes Total amount, in bytes, of memory used for stored fields across all shards // assigned to selected nodes. - StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"` - StoredMemory ByteSize `json:"stored_memory,omitempty"` + StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"` + // TermVectorsMemory Total amount of memory used for term vectors across all shards assigned to + // selected nodes. + TermVectorsMemory ByteSize `json:"term_vectors_memory,omitempty"` // TermVectorsMemoryInBytes Total amount, in bytes, of memory used for term vectors across all shards // assigned to selected nodes. TermVectorsMemoryInBytes int64 `json:"term_vectors_memory_in_bytes"` - // TermVectoryMemory Total amount of memory used for term vectors across all shards assigned to - // selected nodes. - TermVectoryMemory ByteSize `json:"term_vectory_memory,omitempty"` // TermsMemory Total amount of memory used for terms across all shards assigned to selected // nodes. TermsMemory ByteSize `json:"terms_memory,omitempty"` @@ -183,21 +184,6 @@ func (s *SegmentsStats) UnmarshalJSON(data []byte) error { s.FixedBitSetMemoryInBytes = f } - case "index_writer_max_memory_in_bytes": - var tmp any - dec.Decode(&tmp) - switch v := tmp.(type) { - case string: - value, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("%s | %w", "IndexWriterMaxMemoryInBytes", err) - } - s.IndexWriterMaxMemoryInBytes = &value - case float64: - f := int64(v) - s.IndexWriterMaxMemoryInBytes = &f - } - case "index_writer_memory": if err := dec.Decode(&s.IndexWriterMemory); err != nil { return fmt.Errorf("%s | %w", "IndexWriterMemory", err) @@ -293,6 +279,11 @@ func (s *SegmentsStats) UnmarshalJSON(data []byte) error { s.PointsMemoryInBytes = f } + case "stored_fields_memory": + if err := dec.Decode(&s.StoredFieldsMemory); err != nil { + return fmt.Errorf("%s | %w", "StoredFieldsMemory", err) + } + case "stored_fields_memory_in_bytes": var tmp any dec.Decode(&tmp) @@ -308,9 +299,9 @@ func (s *SegmentsStats) UnmarshalJSON(data []byte) error { s.StoredFieldsMemoryInBytes = f } - case "stored_memory": - if err := dec.Decode(&s.StoredMemory); err != nil { - return fmt.Errorf("%s | %w", "StoredMemory", err) + case "term_vectors_memory": + if err := dec.Decode(&s.TermVectorsMemory); err != nil { + return fmt.Errorf("%s | %w", "TermVectorsMemory", err) } case "term_vectors_memory_in_bytes": @@ -328,11 +319,6 @@ func (s *SegmentsStats) UnmarshalJSON(data []byte) error { s.TermVectorsMemoryInBytes = f } - case "term_vectory_memory": - if err := dec.Decode(&s.TermVectoryMemory); err != nil { - return fmt.Errorf("%s | %w", "TermVectoryMemory", err) - } - case "terms_memory": if err := dec.Decode(&s.TermsMemory); err != nil { return fmt.Errorf("%s | %w", "TermsMemory", err) @@ -386,5 +372,3 @@ func NewSegmentsStats() *SegmentsStats { return r } - -// false diff --git a/typedapi/types/selectoption.go b/typedapi/types/selectoption.go index 037d436771..60bd2c74cf 100644 --- a/typedapi/types/selectoption.go +++ b/typedapi/types/selectoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SelectOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L25-L28 type SelectOption struct { Label string `json:"label"` Value ScalarValue `json:"value"` @@ -80,13 +80,3 @@ func NewSelectOption() *SelectOption { return r } - -// true - -type SelectOptionVariant interface { - SelectOptionCaster() *SelectOption -} - -func (s *SelectOption) SelectOptionCaster() *SelectOption { - return s -} diff --git a/typedapi/types/semanticquery.go b/typedapi/types/semanticquery.go index ae9e596c3b..b2525e5c65 100644 --- a/typedapi/types/semanticquery.go +++ b/typedapi/types/semanticquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SemanticQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/SemanticQuery.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/SemanticQuery.ts#L22-L30 type SemanticQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -124,13 +124,3 @@ func NewSemanticQuery() *SemanticQuery { return r } - -// true - -type SemanticQueryVariant interface { - SemanticQueryCaster() *SemanticQuery -} - -func (s *SemanticQuery) SemanticQueryCaster() *SemanticQuery { - return s -} diff --git a/typedapi/types/semantictextindexoptions.go b/typedapi/types/semantictextindexoptions.go new file mode 100644 index 0000000000..2e3b502d91 --- /dev/null +++ b/typedapi/types/semantictextindexoptions.go @@ -0,0 +1,35 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +// SemanticTextIndexOptions type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/SemanticTextIndexOptions.ts#L22-L24 +type SemanticTextIndexOptions struct { + DenseVector *DenseVectorIndexOptions `json:"dense_vector,omitempty"` +} + +// NewSemanticTextIndexOptions returns a SemanticTextIndexOptions. +func NewSemanticTextIndexOptions() *SemanticTextIndexOptions { + r := &SemanticTextIndexOptions{} + + return r +} diff --git a/typedapi/types/semantictextproperty.go b/typedapi/types/semantictextproperty.go index e55018d656..d05f4bb336 100644 --- a/typedapi/types/semantictextproperty.go +++ b/typedapi/types/semantictextproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SemanticTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L220-L243 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L239-L268 type SemanticTextProperty struct { // ChunkingSettings Settings for chunking text into smaller passages. If specified, these will // override the @@ -38,6 +38,10 @@ type SemanticTextProperty struct { // inference_id. If chunking settings are updated, // they will not be applied to existing documents until they are reindexed. ChunkingSettings *ChunkingSettings `json:"chunking_settings,omitempty"` + // IndexOptions Settings for index_options that override any defaults used by semantic_text, + // for example + // specific quantization settings. + IndexOptions *SemanticTextIndexOptions `json:"index_options,omitempty"` // InferenceId Inference endpoint that will be used to generate embeddings for the field. // This parameter cannot be updated. Use the Create inference API to create the // endpoint. @@ -74,6 +78,11 @@ func (s *SemanticTextProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "ChunkingSettings", err) } + case "index_options": + if err := dec.Decode(&s.IndexOptions); err != nil { + return fmt.Errorf("%s | %w", "IndexOptions", err) + } + case "inference_id": if err := dec.Decode(&s.InferenceId); err != nil { return fmt.Errorf("%s | %w", "InferenceId", err) @@ -107,6 +116,7 @@ func (s SemanticTextProperty) MarshalJSON() ([]byte, error) { type innerSemanticTextProperty SemanticTextProperty tmp := innerSemanticTextProperty{ ChunkingSettings: s.ChunkingSettings, + IndexOptions: s.IndexOptions, InferenceId: s.InferenceId, Meta: s.Meta, SearchInferenceId: s.SearchInferenceId, @@ -126,13 +136,3 @@ func NewSemanticTextProperty() *SemanticTextProperty { return r } - -// true - -type SemanticTextPropertyVariant interface { - SemanticTextPropertyCaster() *SemanticTextProperty -} - -func (s *SemanticTextProperty) SemanticTextPropertyCaster() *SemanticTextProperty { - return s -} diff --git a/typedapi/types/serbiananalyzer.go b/typedapi/types/serbiananalyzer.go index 0d59bfbcd0..b37672aa66 100644 --- a/typedapi/types/serbiananalyzer.go +++ b/typedapi/types/serbiananalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // SerbianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L262-L267 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L262-L267 type SerbianAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *SerbianAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *SerbianAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewSerbianAnalyzer() *SerbianAnalyzer { return r } - -// true - -type SerbianAnalyzerVariant interface { - SerbianAnalyzerCaster() *SerbianAnalyzer -} - -func (s *SerbianAnalyzer) SerbianAnalyzerCaster() *SerbianAnalyzer { - return s -} diff --git a/typedapi/types/serbiannormalizationtokenfilter.go b/typedapi/types/serbiannormalizationtokenfilter.go new file mode 100644 index 0000000000..eb3dde2b29 --- /dev/null +++ b/typedapi/types/serbiannormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// SerbianNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L539-L541 +type SerbianNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *SerbianNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s SerbianNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerSerbianNormalizationTokenFilter SerbianNormalizationTokenFilter + tmp := innerSerbianNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "serbian_normalization" + + return json.Marshal(tmp) +} + +// NewSerbianNormalizationTokenFilter returns a SerbianNormalizationTokenFilter. +func NewSerbianNormalizationTokenFilter() *SerbianNormalizationTokenFilter { + r := &SerbianNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/serialdifferencingaggregation.go b/typedapi/types/serialdifferencingaggregation.go index b49311a3d8..48e7fd0417 100644 --- a/typedapi/types/serialdifferencingaggregation.go +++ b/typedapi/types/serialdifferencingaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SerialDifferencingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L399-L408 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L399-L408 type SerialDifferencingAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -112,13 +112,3 @@ func NewSerialDifferencingAggregation() *SerialDifferencingAggregation { return r } - -// true - -type SerialDifferencingAggregationVariant interface { - SerialDifferencingAggregationCaster() *SerialDifferencingAggregation -} - -func (s *SerialDifferencingAggregation) SerialDifferencingAggregationCaster() *SerialDifferencingAggregation { - return s -} diff --git a/typedapi/types/serializedclusterstate.go b/typedapi/types/serializedclusterstate.go index f51b1aeac8..d7c73faf2e 100644 --- a/typedapi/types/serializedclusterstate.go +++ b/typedapi/types/serializedclusterstate.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SerializedClusterState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L232-L238 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L234-L240 type SerializedClusterState struct { Diffs *SerializedClusterStateDetail `json:"diffs,omitempty"` // FullStates Number of published cluster states. @@ -35,5 +35,3 @@ func NewSerializedClusterState() *SerializedClusterState { return r } - -// false diff --git a/typedapi/types/serializedclusterstatedetail.go b/typedapi/types/serializedclusterstatedetail.go index 5f7d97d367..f8e9d95146 100644 --- a/typedapi/types/serializedclusterstatedetail.go +++ b/typedapi/types/serializedclusterstatedetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SerializedClusterStateDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L240-L246 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L242-L248 type SerializedClusterStateDetail struct { CompressedSize *string `json:"compressed_size,omitempty"` CompressedSizeInBytes *int64 `json:"compressed_size_in_bytes,omitempty"` @@ -135,5 +135,3 @@ func NewSerializedClusterStateDetail() *SerializedClusterStateDetail { return r } - -// false diff --git a/typedapi/types/servicetoken.go b/typedapi/types/servicetoken.go index 804f52a877..629c2b8fc8 100644 --- a/typedapi/types/servicetoken.go +++ b/typedapi/types/servicetoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ServiceToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/create_service_token/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/create_service_token/types.ts#L22-L25 type ServiceToken struct { Name string `json:"name"` Value string `json:"value"` @@ -80,5 +80,3 @@ func NewServiceToken() *ServiceToken { return r } - -// false diff --git a/typedapi/types/setpriorityaction.go b/typedapi/types/setpriorityaction.go index 0a808948c2..4927b8d1d7 100644 --- a/typedapi/types/setpriorityaction.go +++ b/typedapi/types/setpriorityaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SetPriorityAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L95-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L95-L97 type SetPriorityAction struct { Priority *int `json:"priority,omitempty"` } @@ -78,13 +78,3 @@ func NewSetPriorityAction() *SetPriorityAction { return r } - -// true - -type SetPriorityActionVariant interface { - SetPriorityActionCaster() *SetPriorityAction -} - -func (s *SetPriorityAction) SetPriorityActionCaster() *SetPriorityAction { - return s -} diff --git a/typedapi/types/setprocessor.go b/typedapi/types/setprocessor.go index 5b55799cdb..b1fd5f09ae 100644 --- a/typedapi/types/setprocessor.go +++ b/typedapi/types/setprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SetProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1444-L1478 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1444-L1478 type SetProcessor struct { // CopyFrom The origin field which will be copied to `field`, cannot set `value` // simultaneously. @@ -207,13 +207,3 @@ func NewSetProcessor() *SetProcessor { return r } - -// true - -type SetProcessorVariant interface { - SetProcessorCaster() *SetProcessor -} - -func (s *SetProcessor) SetProcessorCaster() *SetProcessor { - return s -} diff --git a/typedapi/types/setsecurityuserprocessor.go b/typedapi/types/setsecurityuserprocessor.go index 3419ad8711..66fc6956ba 100644 --- a/typedapi/types/setsecurityuserprocessor.go +++ b/typedapi/types/setsecurityuserprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SetSecurityUserProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1480-L1489 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1480-L1489 type SetSecurityUserProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -142,13 +142,3 @@ func NewSetSecurityUserProcessor() *SetSecurityUserProcessor { return r } - -// true - -type SetSecurityUserProcessorVariant interface { - SetSecurityUserProcessorCaster() *SetSecurityUserProcessor -} - -func (s *SetSecurityUserProcessor) SetSecurityUserProcessorCaster() *SetSecurityUserProcessor { - return s -} diff --git a/typedapi/types/settings.go b/typedapi/types/settings.go index 69abdb4f0b..3765dcf0f9 100644 --- a/typedapi/types/settings.go +++ b/typedapi/types/settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Settings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L98-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L98-L144 type Settings struct { // AlignCheckpoints Specifies whether the transform checkpoint ranges should be optimized for // performance. Such optimization can align @@ -182,13 +182,3 @@ func NewSettings() *Settings { return r } - -// true - -type SettingsVariant interface { - SettingsCaster() *Settings -} - -func (s *Settings) SettingsCaster() *Settings { - return s -} diff --git a/typedapi/types/settingsanalyze.go b/typedapi/types/settingsanalyze.go index b1d4e58dd8..43d474e429 100644 --- a/typedapi/types/settingsanalyze.go +++ b/typedapi/types/settingsanalyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SettingsAnalyze type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L243-L246 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L243-L246 type SettingsAnalyze struct { MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` } @@ -66,13 +66,3 @@ func NewSettingsAnalyze() *SettingsAnalyze { return r } - -// true - -type SettingsAnalyzeVariant interface { - SettingsAnalyzeCaster() *SettingsAnalyze -} - -func (s *SettingsAnalyze) SettingsAnalyzeCaster() *SettingsAnalyze { - return s -} diff --git a/typedapi/types/settingshighlight.go b/typedapi/types/settingshighlight.go index a4e0bb6b8b..df88bafdcc 100644 --- a/typedapi/types/settingshighlight.go +++ b/typedapi/types/settingshighlight.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SettingsHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L238-L241 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L238-L241 type SettingsHighlight struct { MaxAnalyzedOffset *int `json:"max_analyzed_offset,omitempty"` } @@ -78,13 +78,3 @@ func NewSettingsHighlight() *SettingsHighlight { return r } - -// true - -type SettingsHighlightVariant interface { - SettingsHighlightCaster() *SettingsHighlight -} - -func (s *SettingsHighlight) SettingsHighlightCaster() *SettingsHighlight { - return s -} diff --git a/typedapi/types/settingsquerystring.go b/typedapi/types/settingsquerystring.go index 941fd2942f..64d0c087a5 100644 --- a/typedapi/types/settingsquerystring.go +++ b/typedapi/types/settingsquerystring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SettingsQueryString type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L258-L260 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L258-L260 type SettingsQueryString struct { Lenient Stringifiedboolean `json:"lenient"` } @@ -66,13 +66,3 @@ func NewSettingsQueryString() *SettingsQueryString { return r } - -// true - -type SettingsQueryStringVariant interface { - SettingsQueryStringCaster() *SettingsQueryString -} - -func (s *SettingsQueryString) SettingsQueryStringCaster() *SettingsQueryString { - return s -} diff --git a/typedapi/types/settingssearch.go b/typedapi/types/settingssearch.go index 25486362bc..be85fe2d2a 100644 --- a/typedapi/types/settingssearch.go +++ b/typedapi/types/settingssearch.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SettingsSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L248-L251 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L248-L251 type SettingsSearch struct { Idle *SearchIdle `json:"idle,omitempty"` Slowlog *SlowlogSettings `json:"slowlog,omitempty"` @@ -34,13 +34,3 @@ func NewSettingsSearch() *SettingsSearch { return r } - -// true - -type SettingsSearchVariant interface { - SettingsSearchCaster() *SettingsSearch -} - -func (s *SettingsSearch) SettingsSearchCaster() *SettingsSearch { - return s -} diff --git a/typedapi/types/settingssimilarity.go b/typedapi/types/settingssimilarity.go index e4a1606c6e..2a3004b70e 100644 --- a/typedapi/types/settingssimilarity.go +++ b/typedapi/types/settingssimilarity.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,9 +31,5 @@ package types // SettingsSimilarityLmj // SettingsSimilarityScripted // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L178-L190 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L178-L190 type SettingsSimilarity any - -type SettingsSimilarityVariant interface { - SettingsSimilarityCaster() *SettingsSimilarity -} diff --git a/typedapi/types/settingssimilaritybm25.go b/typedapi/types/settingssimilaritybm25.go index da90d51ef9..4703d60b9c 100644 --- a/typedapi/types/settingssimilaritybm25.go +++ b/typedapi/types/settingssimilaritybm25.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityBm25 type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L196-L201 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L196-L201 type SettingsSimilarityBm25 struct { B *Float64 `json:"b,omitempty"` DiscountOverlaps *bool `json:"discount_overlaps,omitempty"` @@ -131,13 +131,3 @@ func NewSettingsSimilarityBm25() *SettingsSimilarityBm25 { return r } - -// true - -type SettingsSimilarityBm25Variant interface { - SettingsSimilarityBm25Caster() *SettingsSimilarityBm25 -} - -func (s *SettingsSimilarityBm25) SettingsSimilarityBm25Caster() *SettingsSimilarityBm25 { - return s -} diff --git a/typedapi/types/settingssimilarityboolean.go b/typedapi/types/settingssimilarityboolean.go index c66161003f..cb0b770360 100644 --- a/typedapi/types/settingssimilarityboolean.go +++ b/typedapi/types/settingssimilarityboolean.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityBoolean type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L192-L194 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L192-L194 type SettingsSimilarityBoolean struct { Type string `json:"type,omitempty"` } @@ -49,13 +49,3 @@ func NewSettingsSimilarityBoolean() *SettingsSimilarityBoolean { return r } - -// true - -type SettingsSimilarityBooleanVariant interface { - SettingsSimilarityBooleanCaster() *SettingsSimilarityBoolean -} - -func (s *SettingsSimilarityBoolean) SettingsSimilarityBooleanCaster() *SettingsSimilarityBoolean { - return s -} diff --git a/typedapi/types/settingssimilaritydfi.go b/typedapi/types/settingssimilaritydfi.go index aefed909d3..e124ec9f07 100644 --- a/typedapi/types/settingssimilaritydfi.go +++ b/typedapi/types/settingssimilaritydfi.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,7 +28,7 @@ import ( // SettingsSimilarityDfi type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L203-L206 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L203-L206 type SettingsSimilarityDfi struct { IndependenceMeasure dfiindependencemeasure.DFIIndependenceMeasure `json:"independence_measure"` Type string `json:"type,omitempty"` @@ -53,13 +53,3 @@ func NewSettingsSimilarityDfi() *SettingsSimilarityDfi { return r } - -// true - -type SettingsSimilarityDfiVariant interface { - SettingsSimilarityDfiCaster() *SettingsSimilarityDfi -} - -func (s *SettingsSimilarityDfi) SettingsSimilarityDfiCaster() *SettingsSimilarityDfi { - return s -} diff --git a/typedapi/types/settingssimilaritydfr.go b/typedapi/types/settingssimilaritydfr.go index 465633bc64..66c213415a 100644 --- a/typedapi/types/settingssimilaritydfr.go +++ b/typedapi/types/settingssimilaritydfr.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityDfr type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L208-L213 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L208-L213 type SettingsSimilarityDfr struct { AfterEffect dfraftereffect.DFRAfterEffect `json:"after_effect"` BasicModel dfrbasicmodel.DFRBasicModel `json:"basic_model"` @@ -59,13 +59,3 @@ func NewSettingsSimilarityDfr() *SettingsSimilarityDfr { return r } - -// true - -type SettingsSimilarityDfrVariant interface { - SettingsSimilarityDfrCaster() *SettingsSimilarityDfr -} - -func (s *SettingsSimilarityDfr) SettingsSimilarityDfrCaster() *SettingsSimilarityDfr { - return s -} diff --git a/typedapi/types/settingssimilarityib.go b/typedapi/types/settingssimilarityib.go index a7ece13d1f..7dd8bff953 100644 --- a/typedapi/types/settingssimilarityib.go +++ b/typedapi/types/settingssimilarityib.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityIb type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L215-L220 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L215-L220 type SettingsSimilarityIb struct { Distribution ibdistribution.IBDistribution `json:"distribution"` Lambda iblambda.IBLambda `json:"lambda"` @@ -59,13 +59,3 @@ func NewSettingsSimilarityIb() *SettingsSimilarityIb { return r } - -// true - -type SettingsSimilarityIbVariant interface { - SettingsSimilarityIbCaster() *SettingsSimilarityIb -} - -func (s *SettingsSimilarityIb) SettingsSimilarityIbCaster() *SettingsSimilarityIb { - return s -} diff --git a/typedapi/types/settingssimilaritylmd.go b/typedapi/types/settingssimilaritylmd.go index f724ed80b9..e1763b6a53 100644 --- a/typedapi/types/settingssimilaritylmd.go +++ b/typedapi/types/settingssimilaritylmd.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmd type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L222-L225 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L222-L225 type SettingsSimilarityLmd struct { Mu *Float64 `json:"mu,omitempty"` Type string `json:"type,omitempty"` @@ -97,13 +97,3 @@ func NewSettingsSimilarityLmd() *SettingsSimilarityLmd { return r } - -// true - -type SettingsSimilarityLmdVariant interface { - SettingsSimilarityLmdCaster() *SettingsSimilarityLmd -} - -func (s *SettingsSimilarityLmd) SettingsSimilarityLmdCaster() *SettingsSimilarityLmd { - return s -} diff --git a/typedapi/types/settingssimilaritylmj.go b/typedapi/types/settingssimilaritylmj.go index d104170521..0b772c77e0 100644 --- a/typedapi/types/settingssimilaritylmj.go +++ b/typedapi/types/settingssimilaritylmj.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmj type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L227-L230 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L227-L230 type SettingsSimilarityLmj struct { Lambda *Float64 `json:"lambda,omitempty"` Type string `json:"type,omitempty"` @@ -97,13 +97,3 @@ func NewSettingsSimilarityLmj() *SettingsSimilarityLmj { return r } - -// true - -type SettingsSimilarityLmjVariant interface { - SettingsSimilarityLmjCaster() *SettingsSimilarityLmj -} - -func (s *SettingsSimilarityLmj) SettingsSimilarityLmjCaster() *SettingsSimilarityLmj { - return s -} diff --git a/typedapi/types/settingssimilarityscripted.go b/typedapi/types/settingssimilarityscripted.go index 4d7b703c94..a73832a066 100644 --- a/typedapi/types/settingssimilarityscripted.go +++ b/typedapi/types/settingssimilarityscripted.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityScripted type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L232-L236 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L232-L236 type SettingsSimilarityScripted struct { Script Script `json:"script"` Type string `json:"type,omitempty"` @@ -53,13 +53,3 @@ func NewSettingsSimilarityScripted() *SettingsSimilarityScripted { return r } - -// true - -type SettingsSimilarityScriptedVariant interface { - SettingsSimilarityScriptedCaster() *SettingsSimilarityScripted -} - -func (s *SettingsSimilarityScripted) SettingsSimilarityScriptedCaster() *SettingsSimilarityScripted { - return s -} diff --git a/typedapi/types/shapefieldquery.go b/typedapi/types/shapefieldquery.go index c327e1170b..5044c3c11b 100644 --- a/typedapi/types/shapefieldquery.go +++ b/typedapi/types/shapefieldquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L383-L396 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L383-L396 type ShapeFieldQuery struct { // IndexedShape Queries using a pre-indexed shape. IndexedShape *FieldLookup `json:"indexed_shape,omitempty"` @@ -84,13 +84,3 @@ func NewShapeFieldQuery() *ShapeFieldQuery { return r } - -// true - -type ShapeFieldQueryVariant interface { - ShapeFieldQueryCaster() *ShapeFieldQuery -} - -func (s *ShapeFieldQuery) ShapeFieldQueryCaster() *ShapeFieldQuery { - return s -} diff --git a/typedapi/types/shapeproperty.go b/typedapi/types/shapeproperty.go index d4a35e3449..106a9bb1b0 100644 --- a/typedapi/types/shapeproperty.go +++ b/typedapi/types/shapeproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // ShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/geo.ts#L74-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/geo.ts#L81-L93 type ShapeProperty struct { Coerce *bool `json:"coerce,omitempty"` CopyTo []string `json:"copy_to,omitempty"` @@ -260,6 +260,12 @@ func (s *ShapeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -648,6 +654,12 @@ func (s *ShapeProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -901,13 +913,3 @@ func NewShapeProperty() *ShapeProperty { return r } - -// true - -type ShapePropertyVariant interface { - ShapePropertyCaster() *ShapeProperty -} - -func (s *ShapeProperty) ShapePropertyCaster() *ShapeProperty { - return s -} diff --git a/typedapi/types/shapequery.go b/typedapi/types/shapequery.go index efd1cd51c4..4b434bc3f2 100644 --- a/typedapi/types/shapequery.go +++ b/typedapi/types/shapequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L367-L381 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L367-L381 type ShapeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -158,13 +158,3 @@ func NewShapeQuery() *ShapeQuery { return r } - -// true - -type ShapeQueryVariant interface { - ShapeQueryCaster() *ShapeQuery -} - -func (s *ShapeQuery) ShapeQueryCaster() *ShapeQuery { - return s -} diff --git a/typedapi/types/shardcommit.go b/typedapi/types/shardcommit.go index 7528e8326c..597acefc58 100644 --- a/typedapi/types/shardcommit.go +++ b/typedapi/types/shardcommit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardCommit type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L112-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L112-L117 type ShardCommit struct { Generation int `json:"generation"` Id string `json:"id"` @@ -111,5 +111,3 @@ func NewShardCommit() *ShardCommit { return r } - -// false diff --git a/typedapi/types/shardfailure.go b/typedapi/types/shardfailure.go index 618faebd64..8ed3882b15 100644 --- a/typedapi/types/shardfailure.go +++ b/typedapi/types/shardfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Errors.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Errors.ts#L52-L58 type ShardFailure struct { Index *string `json:"index,omitempty"` Node *string `json:"node,omitempty"` @@ -116,5 +116,3 @@ func NewShardFailure() *ShardFailure { return r } - -// false diff --git a/typedapi/types/shardfilesizeinfo.go b/typedapi/types/shardfilesizeinfo.go index 5ccdc0ab7e..1caf0a5411 100644 --- a/typedapi/types/shardfilesizeinfo.go +++ b/typedapi/types/shardfilesizeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardFileSizeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L124-L131 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L124-L131 type ShardFileSizeInfo struct { AverageSizeInBytes *int64 `json:"average_size_in_bytes,omitempty"` Count *int64 `json:"count,omitempty"` @@ -154,5 +154,3 @@ func NewShardFileSizeInfo() *ShardFileSizeInfo { return r } - -// false diff --git a/typedapi/types/shardhealthstats.go b/typedapi/types/shardhealthstats.go index ec6f850fe6..3fb159534a 100644 --- a/typedapi/types/shardhealthstats.go +++ b/typedapi/types/shardhealthstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ShardHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/health/types.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/health/types.ts#L37-L45 type ShardHealthStats struct { ActiveShards int `json:"active_shards"` InitializingShards int `json:"initializing_shards"` @@ -169,5 +169,3 @@ func NewShardHealthStats() *ShardHealthStats { return r } - -// false diff --git a/typedapi/types/shardlease.go b/typedapi/types/shardlease.go index f71ba9adcc..161307ab3d 100644 --- a/typedapi/types/shardlease.go +++ b/typedapi/types/shardlease.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L133-L138 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L133-L138 type ShardLease struct { Id string `json:"id"` RetainingSeqNo int64 `json:"retaining_seq_no"` @@ -102,5 +102,3 @@ func NewShardLease() *ShardLease { return r } - -// false diff --git a/typedapi/types/shardmigrationstatus.go b/typedapi/types/shardmigrationstatus.go index eef82be272..7172ad6af9 100644 --- a/typedapi/types/shardmigrationstatus.go +++ b/typedapi/types/shardmigrationstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // ShardMigrationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 type ShardMigrationStatus struct { Status shutdownstatus.ShutdownStatus `json:"status"` } @@ -37,5 +37,3 @@ func NewShardMigrationStatus() *ShardMigrationStatus { return r } - -// false diff --git a/typedapi/types/shardpath.go b/typedapi/types/shardpath.go index ad7f21e943..9554302051 100644 --- a/typedapi/types/shardpath.go +++ b/typedapi/types/shardpath.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L140-L144 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L140-L144 type ShardPath struct { DataPath string `json:"data_path"` IsCustomDataPath bool `json:"is_custom_data_path"` @@ -102,5 +102,3 @@ func NewShardPath() *ShardPath { return r } - -// false diff --git a/typedapi/types/shardprofile.go b/typedapi/types/shardprofile.go index 50a8567bf5..a97282bc22 100644 --- a/typedapi/types/shardprofile.go +++ b/typedapi/types/shardprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/profile.ts#L142-L152 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/profile.ts#L142-L152 type ShardProfile struct { Aggregations []AggregationProfile `json:"aggregations"` Cluster string `json:"cluster"` @@ -41,7 +41,7 @@ type ShardProfile struct { Index string `json:"index"` NodeId string `json:"node_id"` Searches []SearchProfile `json:"searches"` - ShardId int64 `json:"shard_id"` + ShardId int `json:"shard_id"` } func (s *ShardProfile) UnmarshalJSON(data []byte) error { @@ -114,17 +114,18 @@ func (s *ShardProfile) UnmarshalJSON(data []byte) error { } case "shard_id": + var tmp any dec.Decode(&tmp) switch v := tmp.(type) { case string: - value, err := strconv.ParseInt(v, 10, 64) + value, err := strconv.Atoi(v) if err != nil { return fmt.Errorf("%s | %w", "ShardId", err) } s.ShardId = value case float64: - f := int64(v) + f := int(v) s.ShardId = f } @@ -139,5 +140,3 @@ func NewShardProfile() *ShardProfile { return r } - -// false diff --git a/typedapi/types/shardquerycache.go b/typedapi/types/shardquerycache.go index 2bca25286a..1d8bb62463 100644 --- a/typedapi/types/shardquerycache.go +++ b/typedapi/types/shardquerycache.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardQueryCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L146-L154 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L146-L154 type ShardQueryCache struct { CacheCount int64 `json:"cache_count"` CacheSize int64 `json:"cache_size"` @@ -173,5 +173,3 @@ func NewShardQueryCache() *ShardQueryCache { return r } - -// false diff --git a/typedapi/types/shardrecovery.go b/typedapi/types/shardrecovery.go index cc69a19545..b5dfabbd9d 100644 --- a/typedapi/types/shardrecovery.go +++ b/typedapi/types/shardrecovery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L118-L135 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L118-L135 type ShardRecovery struct { Id int64 `json:"id"` Index RecoveryIndexStatus `json:"index"` @@ -190,5 +190,3 @@ func NewShardRecovery() *ShardRecovery { return r } - -// false diff --git a/typedapi/types/shardretentionleases.go b/typedapi/types/shardretentionleases.go index 89eb77a318..c7ecba212c 100644 --- a/typedapi/types/shardretentionleases.go +++ b/typedapi/types/shardretentionleases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardRetentionLeases type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L156-L160 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L156-L160 type ShardRetentionLeases struct { Leases []ShardLease `json:"leases"` PrimaryTerm int64 `json:"primary_term"` @@ -89,5 +89,3 @@ func NewShardRetentionLeases() *ShardRetentionLeases { return r } - -// false diff --git a/typedapi/types/shardrouting.go b/typedapi/types/shardrouting.go index 9e3a7f11f7..d1d78de829 100644 --- a/typedapi/types/shardrouting.go +++ b/typedapi/types/shardrouting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ShardRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L162-L167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L162-L167 type ShardRouting struct { Node string `json:"node"` Primary bool `json:"primary"` @@ -110,5 +110,3 @@ func NewShardRouting() *ShardRouting { return r } - -// false diff --git a/typedapi/types/shardsavailabilityindicator.go b/typedapi/types/shardsavailabilityindicator.go index c80f3f8637..2416e58531 100644 --- a/typedapi/types/shardsavailabilityindicator.go +++ b/typedapi/types/shardsavailabilityindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ShardsAvailabilityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L105-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L106-L110 type ShardsAvailabilityIndicator struct { Details *ShardsAvailabilityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewShardsAvailabilityIndicator() *ShardsAvailabilityIndicator { return r } - -// false diff --git a/typedapi/types/shardsavailabilityindicatordetails.go b/typedapi/types/shardsavailabilityindicatordetails.go index 6ecd11b723..dee71e862a 100644 --- a/typedapi/types/shardsavailabilityindicatordetails.go +++ b/typedapi/types/shardsavailabilityindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardsAvailabilityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L110-L121 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L111-L122 type ShardsAvailabilityIndicatorDetails struct { CreatingPrimaries int64 `json:"creating_primaries"` CreatingReplicas int64 `json:"creating_replicas"` @@ -221,5 +221,3 @@ func NewShardsAvailabilityIndicatorDetails() *ShardsAvailabilityIndicatorDetails return r } - -// false diff --git a/typedapi/types/shardscapacityindicator.go b/typedapi/types/shardscapacityindicator.go index 61d068a817..19ddc7c3c3 100644 --- a/typedapi/types/shardscapacityindicator.go +++ b/typedapi/types/shardscapacityindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // ShardsCapacityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L190-L194 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L191-L195 type ShardsCapacityIndicator struct { Details *ShardsCapacityIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewShardsCapacityIndicator() *ShardsCapacityIndicator { return r } - -// false diff --git a/typedapi/types/shardscapacityindicatordetails.go b/typedapi/types/shardscapacityindicatordetails.go index 3838507711..64c9c6056b 100644 --- a/typedapi/types/shardscapacityindicatordetails.go +++ b/typedapi/types/shardscapacityindicatordetails.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ShardsCapacityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L196-L199 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L197-L200 type ShardsCapacityIndicatorDetails struct { Data ShardsCapacityIndicatorTierDetail `json:"data"` Frozen ShardsCapacityIndicatorTierDetail `json:"frozen"` @@ -34,5 +34,3 @@ func NewShardsCapacityIndicatorDetails() *ShardsCapacityIndicatorDetails { return r } - -// false diff --git a/typedapi/types/shardscapacityindicatortierdetail.go b/typedapi/types/shardscapacityindicatortierdetail.go index b5c4de1ad9..05908fe106 100644 --- a/typedapi/types/shardscapacityindicatortierdetail.go +++ b/typedapi/types/shardscapacityindicatortierdetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardsCapacityIndicatorTierDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L201-L204 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L202-L205 type ShardsCapacityIndicatorTierDetail struct { CurrentUsedShards *int `json:"current_used_shards,omitempty"` MaxShardsInCluster int `json:"max_shards_in_cluster"` @@ -95,5 +95,3 @@ func NewShardsCapacityIndicatorTierDetail() *ShardsCapacityIndicatorTierDetail { return r } - -// false diff --git a/typedapi/types/shardsegmentrouting.go b/typedapi/types/shardsegmentrouting.go index 6ab3c662f1..729b033129 100644 --- a/typedapi/types/shardsegmentrouting.go +++ b/typedapi/types/shardsegmentrouting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardSegmentRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/segments/types.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/segments/types.ts#L40-L44 type ShardSegmentRouting struct { Node string `json:"node"` Primary bool `json:"primary"` @@ -102,5 +102,3 @@ func NewShardSegmentRouting() *ShardSegmentRouting { return r } - -// false diff --git a/typedapi/types/shardsequencenumber.go b/typedapi/types/shardsequencenumber.go index 1e4ad46822..5d5f02c4e5 100644 --- a/typedapi/types/shardsequencenumber.go +++ b/typedapi/types/shardsequencenumber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardSequenceNumber type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L176-L180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L176-L180 type ShardSequenceNumber struct { GlobalCheckpoint int64 `json:"global_checkpoint"` LocalCheckpoint int64 `json:"local_checkpoint"` @@ -99,5 +99,3 @@ func NewShardSequenceNumber() *ShardSequenceNumber { return r } - -// false diff --git a/typedapi/types/shardsrecord.go b/typedapi/types/shardsrecord.go index 284de089fb..db393cf84b 100644 --- a/typedapi/types/shardsrecord.go +++ b/typedapi/types/shardsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/shards/types.ts#L20-L427 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/shards/types.ts#L20-L427 type ShardsRecord struct { // BulkAvgSizeInBytes The average size in bytes of shard bulk operations. BulkAvgSizeInBytes *string `json:"bulk.avg_size_in_bytes,omitempty"` @@ -1179,5 +1179,3 @@ func NewShardsRecord() *ShardsRecord { return r } - -// false diff --git a/typedapi/types/shardssegment.go b/typedapi/types/shardssegment.go index c8fecb8152..bf2009c7f2 100644 --- a/typedapi/types/shardssegment.go +++ b/typedapi/types/shardssegment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardsSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/segments/types.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/segments/types.ts#L46-L51 type ShardsSegment struct { NumCommittedSegments int `json:"num_committed_segments"` NumSearchSegments int `json:"num_search_segments"` @@ -112,5 +112,3 @@ func NewShardsSegment() *ShardsSegment { return r } - -// false diff --git a/typedapi/types/shardsstatssummary.go b/typedapi/types/shardsstatssummary.go index 0dedbc3812..e4e9599dd3 100644 --- a/typedapi/types/shardsstatssummary.go +++ b/typedapi/types/shardsstatssummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ShardsStatsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 type ShardsStatsSummary struct { Incremental ShardsStatsSummaryItem `json:"incremental"` StartTimeInMillis int64 `json:"start_time_in_millis"` @@ -90,5 +90,3 @@ func NewShardsStatsSummary() *ShardsStatsSummary { return r } - -// false diff --git a/typedapi/types/shardsstatssummaryitem.go b/typedapi/types/shardsstatssummaryitem.go index 72d3da6b76..31d8b2c4ea 100644 --- a/typedapi/types/shardsstatssummaryitem.go +++ b/typedapi/types/shardsstatssummaryitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardsStatsSummaryItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 type ShardsStatsSummaryItem struct { FileCount int64 `json:"file_count"` SizeInBytes int64 `json:"size_in_bytes"` @@ -93,5 +93,3 @@ func NewShardsStatsSummaryItem() *ShardsStatsSummaryItem { return r } - -// false diff --git a/typedapi/types/shardstatistics.go b/typedapi/types/shardstatistics.go index 19f9affffe..3261d2cba1 100644 --- a/typedapi/types/shardstatistics.go +++ b/typedapi/types/shardstatistics.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ShardStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L54-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L54-L69 type ShardStatistics struct { // Failed The number of shards the operation or search attempted to run on but failed. Failed uint `json:"failed"` @@ -40,5 +40,3 @@ func NewShardStatistics() *ShardStatistics { return r } - -// false diff --git a/typedapi/types/shardstore.go b/typedapi/types/shardstore.go index a3de00cf85..c9fa1c5422 100644 --- a/typedapi/types/shardstore.go +++ b/typedapi/types/shardstore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // ShardStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L29-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L29-L36 type ShardStore struct { Allocation shardstoreallocation.ShardStoreAllocation `json:"allocation"` AllocationId *string `json:"allocation_id,omitempty"` @@ -125,5 +125,3 @@ func NewShardStore() *ShardStore { return r } - -// false diff --git a/typedapi/types/shardstoreexception.go b/typedapi/types/shardstoreexception.go index 2c4c5a9352..1c1bfd65a4 100644 --- a/typedapi/types/shardstoreexception.go +++ b/typedapi/types/shardstoreexception.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardStoreException type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L53-L56 type ShardStoreException struct { Reason string `json:"reason"` Type string `json:"type"` @@ -87,5 +87,3 @@ func NewShardStoreException() *ShardStoreException { return r } - -// false diff --git a/typedapi/types/shardstoreindex.go b/typedapi/types/shardstoreindex.go index eeced2884f..7760fcd9f6 100644 --- a/typedapi/types/shardstoreindex.go +++ b/typedapi/types/shardstoreindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ShardStoreIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search_shards/SearchShardsResponse.ts#L62-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search_shards/SearchShardsResponse.ts#L62-L65 type ShardStoreIndex struct { Aliases []string `json:"aliases,omitempty"` Filter *Query `json:"filter,omitempty"` @@ -34,5 +34,3 @@ func NewShardStoreIndex() *ShardStoreIndex { return r } - -// false diff --git a/typedapi/types/shardstorenode.go b/typedapi/types/shardstorenode.go index c84a2d0c70..70169a326c 100644 --- a/typedapi/types/shardstorenode.go +++ b/typedapi/types/shardstorenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardStoreNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L38-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L38-L45 type ShardStoreNode struct { Attributes map[string]string `json:"attributes"` EphemeralId *string `json:"ephemeral_id,omitempty"` @@ -116,5 +116,3 @@ func NewShardStoreNode() *ShardStoreNode { return r } - -// false diff --git a/typedapi/types/shardstorewrapper.go b/typedapi/types/shardstorewrapper.go index 9552cd8759..167ec74992 100644 --- a/typedapi/types/shardstorewrapper.go +++ b/typedapi/types/shardstorewrapper.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // ShardStoreWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/shard_stores/types.ts#L58-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/shard_stores/types.ts#L58-L60 type ShardStoreWrapper struct { Stores []ShardStore `json:"stores"` } @@ -33,5 +33,3 @@ func NewShardStoreWrapper() *ShardStoreWrapper { return r } - -// false diff --git a/typedapi/types/shardstotalstats.go b/typedapi/types/shardstotalstats.go index 75af841e32..b80d0284b8 100644 --- a/typedapi/types/shardstotalstats.go +++ b/typedapi/types/shardstotalstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShardsTotalStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/stats/types.ts#L182-L184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/stats/types.ts#L182-L184 type ShardsTotalStats struct { TotalCount int64 `json:"total_count"` } @@ -77,5 +77,3 @@ func NewShardsTotalStats() *ShardsTotalStats { return r } - -// false diff --git a/typedapi/types/shared.go b/typedapi/types/shared.go index bd0cfb819c..350dc5aa1e 100644 --- a/typedapi/types/shared.go +++ b/typedapi/types/shared.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Shared type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/searchable_snapshots/cache_stats/Response.ts#L34-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/searchable_snapshots/cache_stats/Response.ts#L34-L43 type Shared struct { BytesReadInBytes ByteSize `json:"bytes_read_in_bytes"` BytesWrittenInBytes ByteSize `json:"bytes_written_in_bytes"` @@ -150,5 +150,3 @@ func NewShared() *Shared { return r } - -// false diff --git a/typedapi/types/sharedfilesystemrepository.go b/typedapi/types/sharedfilesystemrepository.go index 0f1bd1a98d..79b71987b0 100644 --- a/typedapi/types/sharedfilesystemrepository.go +++ b/typedapi/types/sharedfilesystemrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SharedFileSystemRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L55-L58 type SharedFileSystemRepository struct { Settings SharedFileSystemRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewSharedFileSystemRepository() *SharedFileSystemRepository { return r } - -// true - -type SharedFileSystemRepositoryVariant interface { - SharedFileSystemRepositoryCaster() *SharedFileSystemRepository -} - -func (s *SharedFileSystemRepository) SharedFileSystemRepositoryCaster() *SharedFileSystemRepository { - return s -} diff --git a/typedapi/types/sharedfilesystemrepositorysettings.go b/typedapi/types/sharedfilesystemrepositorysettings.go index 6aafa81a66..34363b1442 100644 --- a/typedapi/types/sharedfilesystemrepositorysettings.go +++ b/typedapi/types/sharedfilesystemrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SharedFileSystemRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L104-L108 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L104-L108 type SharedFileSystemRepositorySettings struct { ChunkSize ByteSize `json:"chunk_size,omitempty"` Compress *bool `json:"compress,omitempty"` @@ -139,13 +139,3 @@ func NewSharedFileSystemRepositorySettings() *SharedFileSystemRepositorySettings return r } - -// true - -type SharedFileSystemRepositorySettingsVariant interface { - SharedFileSystemRepositorySettingsCaster() *SharedFileSystemRepositorySettings -} - -func (s *SharedFileSystemRepositorySettings) SharedFileSystemRepositorySettingsCaster() *SharedFileSystemRepositorySettings { - return s -} diff --git a/typedapi/types/shingletokenfilter.go b/typedapi/types/shingletokenfilter.go index 661423603d..d81f5777f8 100644 --- a/typedapi/types/shingletokenfilter.go +++ b/typedapi/types/shingletokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,16 +31,31 @@ import ( // ShingleTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L86-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L109-L123 type ShingleTokenFilter struct { - FillerToken *string `json:"filler_token,omitempty"` - MaxShingleSize string `json:"max_shingle_size,omitempty"` - MinShingleSize string `json:"min_shingle_size,omitempty"` - OutputUnigrams *bool `json:"output_unigrams,omitempty"` - OutputUnigramsIfNoShingles *bool `json:"output_unigrams_if_no_shingles,omitempty"` - TokenSeparator *string `json:"token_separator,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // FillerToken String used in shingles as a replacement for empty positions that do not + // contain a token. This filler token is only used in shingles, not original + // unigrams. Defaults to an underscore (`_`). + FillerToken *string `json:"filler_token,omitempty"` + // MaxShingleSize Maximum number of tokens to concatenate when creating shingles. Defaults to + // `2`. + MaxShingleSize Stringifiedinteger `json:"max_shingle_size,omitempty"` + // MinShingleSize Minimum number of tokens to concatenate when creating shingles. Defaults to + // `2`. + MinShingleSize Stringifiedinteger `json:"min_shingle_size,omitempty"` + // OutputUnigrams If `true`, the output includes the original input tokens. If `false`, the + // output only includes shingles; the original input tokens are removed. + // Defaults to `true`. + OutputUnigrams *bool `json:"output_unigrams,omitempty"` + // OutputUnigramsIfNoShingles If `true`, the output includes the original input tokens only if no shingles + // are produced; if shingles are produced, the output only includes shingles. + // Defaults to `false`. + OutputUnigramsIfNoShingles *bool `json:"output_unigrams_if_no_shingles,omitempty"` + // TokenSeparator Separator used to concatenate adjacent tokens to form a shingle. Defaults to + // a space (`" "`). + TokenSeparator *string `json:"token_separator,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *ShingleTokenFilter) UnmarshalJSON(data []byte) error { @@ -71,28 +86,14 @@ func (s *ShingleTokenFilter) UnmarshalJSON(data []byte) error { s.FillerToken = &o case "max_shingle_size": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.MaxShingleSize); err != nil { return fmt.Errorf("%s | %w", "MaxShingleSize", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.MaxShingleSize = o case "min_shingle_size": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { + if err := dec.Decode(&s.MinShingleSize); err != nil { return fmt.Errorf("%s | %w", "MinShingleSize", err) } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.MinShingleSize = o case "output_unigrams": var tmp any @@ -174,13 +175,3 @@ func NewShingleTokenFilter() *ShingleTokenFilter { return r } - -// true - -type ShingleTokenFilterVariant interface { - ShingleTokenFilterCaster() *ShingleTokenFilter -} - -func (s *ShingleTokenFilter) ShingleTokenFilterCaster() *ShingleTokenFilter { - return s -} diff --git a/typedapi/types/shortnumberproperty.go b/typedapi/types/shortnumberproperty.go index 34214db821..7fc14adccc 100644 --- a/typedapi/types/shortnumberproperty.go +++ b/typedapi/types/shortnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // ShortNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L183-L186 type ShortNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *ShortNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -679,6 +685,12 @@ func (s *ShortNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -961,13 +973,3 @@ func NewShortNumberProperty() *ShortNumberProperty { return r } - -// true - -type ShortNumberPropertyVariant interface { - ShortNumberPropertyCaster() *ShortNumberProperty -} - -func (s *ShortNumberProperty) ShortNumberPropertyCaster() *ShortNumberProperty { - return s -} diff --git a/typedapi/types/shrinkaction.go b/typedapi/types/shrinkaction.go index 3f41f43290..ff4541617c 100644 --- a/typedapi/types/shrinkaction.go +++ b/typedapi/types/shrinkaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ShrinkAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L117-L121 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L117-L121 type ShrinkAction struct { AllowWriteAfterShrink *bool `json:"allow_write_after_shrink,omitempty"` MaxPrimaryShardSize ByteSize `json:"max_primary_shard_size,omitempty"` @@ -99,13 +99,3 @@ func NewShrinkAction() *ShrinkAction { return r } - -// true - -type ShrinkActionVariant interface { - ShrinkActionCaster() *ShrinkAction -} - -func (s *ShrinkAction) ShrinkActionCaster() *ShrinkAction { - return s -} diff --git a/typedapi/types/significantlongtermsaggregate.go b/typedapi/types/significantlongtermsaggregate.go index 6c56ecf249..faefe0a7a9 100644 --- a/typedapi/types/significantlongtermsaggregate.go +++ b/typedapi/types/significantlongtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SignificantLongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L668-L670 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L670-L672 type SignificantLongTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantLongTermsBucket `json:"buckets"` @@ -121,5 +121,3 @@ func NewSignificantLongTermsAggregate() *SignificantLongTermsAggregate { return r } - -// false diff --git a/typedapi/types/significantlongtermsbucket.go b/typedapi/types/significantlongtermsbucket.go index 654688d165..67f82bf29c 100644 --- a/typedapi/types/significantlongtermsbucket.go +++ b/typedapi/types/significantlongtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // SignificantLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L677-L680 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L679-L682 type SignificantLongTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` BgCount int64 `json:"bg_count"` @@ -692,5 +692,3 @@ func NewSignificantLongTermsBucket() *SignificantLongTermsBucket { return r } - -// false diff --git a/typedapi/types/significantstringtermsaggregate.go b/typedapi/types/significantstringtermsaggregate.go index fde825e476..fd25dbfd52 100644 --- a/typedapi/types/significantstringtermsaggregate.go +++ b/typedapi/types/significantstringtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SignificantStringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L682-L684 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L684-L686 type SignificantStringTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsSignificantStringTermsBucket `json:"buckets"` @@ -121,5 +121,3 @@ func NewSignificantStringTermsAggregate() *SignificantStringTermsAggregate { return r } - -// false diff --git a/typedapi/types/significantstringtermsbucket.go b/typedapi/types/significantstringtermsbucket.go index 06c61e541e..fcce9b7629 100644 --- a/typedapi/types/significantstringtermsbucket.go +++ b/typedapi/types/significantstringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // SignificantStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L686-L688 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L688-L690 type SignificantStringTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` BgCount int64 `json:"bg_count"` @@ -676,5 +676,3 @@ func NewSignificantStringTermsBucket() *SignificantStringTermsBucket { return r } - -// false diff --git a/typedapi/types/significanttermsaggregation.go b/typedapi/types/significanttermsaggregation.go index 83af6d9e52..17d9b2bc32 100644 --- a/typedapi/types/significanttermsaggregation.go +++ b/typedapi/types/significanttermsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SignificantTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L817-L884 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L817-L884 type SignificantTermsAggregation struct { // BackgroundFilter A background filter that can be used to focus in on significant terms within // a narrower context, instead of the entire index. @@ -263,13 +263,3 @@ func NewSignificantTermsAggregation() *SignificantTermsAggregation { return r } - -// true - -type SignificantTermsAggregationVariant interface { - SignificantTermsAggregationCaster() *SignificantTermsAggregation -} - -func (s *SignificantTermsAggregation) SignificantTermsAggregationCaster() *SignificantTermsAggregation { - return s -} diff --git a/typedapi/types/significanttextaggregation.go b/typedapi/types/significanttextaggregation.go index 9f95cc6ad1..d629f951fa 100644 --- a/typedapi/types/significanttextaggregation.go +++ b/typedapi/types/significanttextaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SignificantTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L886-L961 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L886-L961 type SignificantTextAggregation struct { // BackgroundFilter A background filter that can be used to focus in on significant terms within // a narrower context, instead of the entire index. @@ -297,13 +297,3 @@ func NewSignificantTextAggregation() *SignificantTextAggregation { return r } - -// true - -type SignificantTextAggregationVariant interface { - SignificantTextAggregationCaster() *SignificantTextAggregation -} - -func (s *SignificantTextAggregation) SignificantTextAggregationCaster() *SignificantTextAggregation { - return s -} diff --git a/typedapi/types/simpleanalyzer.go b/typedapi/types/simpleanalyzer.go index 480c8275d6..a576264dd1 100644 --- a/typedapi/types/simpleanalyzer.go +++ b/typedapi/types/simpleanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SimpleAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L320-L323 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L320-L323 type SimpleAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewSimpleAnalyzer() *SimpleAnalyzer { return r } - -// true - -type SimpleAnalyzerVariant interface { - SimpleAnalyzerCaster() *SimpleAnalyzer -} - -func (s *SimpleAnalyzer) SimpleAnalyzerCaster() *SimpleAnalyzer { - return s -} diff --git a/typedapi/types/simplemovingaverageaggregation.go b/typedapi/types/simplemovingaverageaggregation.go index 1661d0b201..015bbd438d 100644 --- a/typedapi/types/simplemovingaverageaggregation.go +++ b/typedapi/types/simplemovingaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SimpleMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L273-L276 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L273-L276 type SimpleMovingAverageAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -173,13 +173,3 @@ func NewSimpleMovingAverageAggregation() *SimpleMovingAverageAggregation { return r } - -// true - -type SimpleMovingAverageAggregationVariant interface { - SimpleMovingAverageAggregationCaster() *SimpleMovingAverageAggregation -} - -func (s *SimpleMovingAverageAggregation) SimpleMovingAverageAggregationCaster() *SimpleMovingAverageAggregation { - return s -} diff --git a/typedapi/types/simplepatternsplittokenizer.go b/typedapi/types/simplepatternsplittokenizer.go index f77ff7ddb0..034c155abc 100644 --- a/typedapi/types/simplepatternsplittokenizer.go +++ b/typedapi/types/simplepatternsplittokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SimplePatternSplitTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L116-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L118-L121 type SimplePatternSplitTokenizer struct { Pattern *string `json:"pattern,omitempty"` Type string `json:"type,omitempty"` @@ -100,13 +100,3 @@ func NewSimplePatternSplitTokenizer() *SimplePatternSplitTokenizer { return r } - -// true - -type SimplePatternSplitTokenizerVariant interface { - SimplePatternSplitTokenizerCaster() *SimplePatternSplitTokenizer -} - -func (s *SimplePatternSplitTokenizer) SimplePatternSplitTokenizerCaster() *SimplePatternSplitTokenizer { - return s -} diff --git a/typedapi/types/simplepatterntokenizer.go b/typedapi/types/simplepatterntokenizer.go index a2b4d6932e..9e4333f811 100644 --- a/typedapi/types/simplepatterntokenizer.go +++ b/typedapi/types/simplepatterntokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SimplePatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L113-L116 type SimplePatternTokenizer struct { Pattern *string `json:"pattern,omitempty"` Type string `json:"type,omitempty"` @@ -100,13 +100,3 @@ func NewSimplePatternTokenizer() *SimplePatternTokenizer { return r } - -// true - -type SimplePatternTokenizerVariant interface { - SimplePatternTokenizerCaster() *SimplePatternTokenizer -} - -func (s *SimplePatternTokenizer) SimplePatternTokenizerCaster() *SimplePatternTokenizer { - return s -} diff --git a/typedapi/types/simplequerystringflags.go b/typedapi/types/simplequerystringflags.go index 20ff44da25..4642bc6775 100644 --- a/typedapi/types/simplequerystringflags.go +++ b/typedapi/types/simplequerystringflags.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SimpleQueryStringFlags type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L723-L727 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L774-L778 type SimpleQueryStringFlags PipeSeparatedFlagsSimpleQueryStringFlag - -type SimpleQueryStringFlagsVariant interface { - SimpleQueryStringFlagsCaster() *SimpleQueryStringFlags -} diff --git a/typedapi/types/simplequerystringquery.go b/typedapi/types/simplequerystringquery.go index 4c3d94977d..84b7a669f5 100644 --- a/typedapi/types/simplequerystringquery.go +++ b/typedapi/types/simplequerystringquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SimpleQueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/fulltext.ts#L786-L854 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/fulltext.ts#L837-L905 type SimpleQueryStringQuery struct { // AnalyzeWildcard If `true`, the query attempts to analyze wildcard terms in the query string. AnalyzeWildcard *bool `json:"analyze_wildcard,omitempty"` @@ -278,13 +278,3 @@ func NewSimpleQueryStringQuery() *SimpleQueryStringQuery { return r } - -// true - -type SimpleQueryStringQueryVariant interface { - SimpleQueryStringQueryCaster() *SimpleQueryStringQuery -} - -func (s *SimpleQueryStringQuery) SimpleQueryStringQueryCaster() *SimpleQueryStringQuery { - return s -} diff --git a/typedapi/types/simplevalueaggregate.go b/typedapi/types/simplevalueaggregate.go index 308eb44cbc..92ec3f7c9d 100644 --- a/typedapi/types/simplevalueaggregate.go +++ b/typedapi/types/simplevalueaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SimpleValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L238-L239 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L238-L239 type SimpleValueAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewSimpleValueAggregate() *SimpleValueAggregate { return r } - -// false diff --git a/typedapi/types/simulatedactions.go b/typedapi/types/simulatedactions.go index 82aab5b3d5..4362bed95f 100644 --- a/typedapi/types/simulatedactions.go +++ b/typedapi/types/simulatedactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SimulatedActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L90-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L90-L94 type SimulatedActions struct { Actions []string `json:"actions"` All *SimulatedActions `json:"all,omitempty"` @@ -88,13 +88,3 @@ func NewSimulatedActions() *SimulatedActions { return r } - -// true - -type SimulatedActionsVariant interface { - SimulatedActionsCaster() *SimulatedActions -} - -func (s *SimulatedActions) SimulatedActionsCaster() *SimulatedActions { - return s -} diff --git a/typedapi/types/simulatedocumentresult.go b/typedapi/types/simulatedocumentresult.go index 78f899c436..bc5b81ae70 100644 --- a/typedapi/types/simulatedocumentresult.go +++ b/typedapi/types/simulatedocumentresult.go @@ -16,17 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SimulateDocumentResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Simulation.ts#L46-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Simulation.ts#L45-L49 type SimulateDocumentResult struct { - Doc *DocumentSimulation `json:"doc,omitempty"` - Error *ErrorCause `json:"error,omitempty"` - ProcessorResults []PipelineSimulation `json:"processor_results,omitempty"` + Doc *DocumentSimulation `json:"doc,omitempty"` + Error *ErrorCause `json:"error,omitempty"` + ProcessorResults []PipelineProcessorResult `json:"processor_results,omitempty"` } // NewSimulateDocumentResult returns a SimulateDocumentResult. @@ -35,5 +35,3 @@ func NewSimulateDocumentResult() *SimulateDocumentResult { return r } - -// false diff --git a/typedapi/types/simulateingestdocumentresult.go b/typedapi/types/simulateingestdocumentresult.go index 4495e77667..7fe3913a97 100644 --- a/typedapi/types/simulateingestdocumentresult.go +++ b/typedapi/types/simulateingestdocumentresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SimulateIngestDocumentResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/simulate/ingest/SimulateIngestResponse.ts#L31-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/simulate/ingest/SimulateIngestResponse.ts#L31-L33 type SimulateIngestDocumentResult struct { Doc *IngestDocumentSimulation `json:"doc,omitempty"` } @@ -33,5 +33,3 @@ func NewSimulateIngestDocumentResult() *SimulateIngestDocumentResult { return r } - -// false diff --git a/typedapi/types/sizefield.go b/typedapi/types/sizefield.go index 1a86a14fd3..5f88c50a30 100644 --- a/typedapi/types/sizefield.go +++ b/typedapi/types/sizefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SizeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L54-L56 type SizeField struct { Enabled bool `json:"enabled"` } @@ -76,13 +76,3 @@ func NewSizeField() *SizeField { return r } - -// true - -type SizeFieldVariant interface { - SizeFieldCaster() *SizeField -} - -func (s *SizeField) SizeFieldCaster() *SizeField { - return s -} diff --git a/typedapi/types/sizehttphistogram.go b/typedapi/types/sizehttphistogram.go index 43a05f8bdb..7778893473 100644 --- a/typedapi/types/sizehttphistogram.go +++ b/typedapi/types/sizehttphistogram.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SizeHttpHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L714-L718 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L716-L720 type SizeHttpHistogram struct { Count int64 `json:"count"` GeBytes *int64 `json:"ge_bytes,omitempty"` @@ -109,5 +109,3 @@ func NewSizeHttpHistogram() *SizeHttpHistogram { return r } - -// false diff --git a/typedapi/types/slackaction.go b/typedapi/types/slackaction.go index afade496b8..3a55d6968f 100644 --- a/typedapi/types/slackaction.go +++ b/typedapi/types/slackaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlackAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L91-L94 type SlackAction struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` @@ -80,13 +80,3 @@ func NewSlackAction() *SlackAction { return r } - -// true - -type SlackActionVariant interface { - SlackActionCaster() *SlackAction -} - -func (s *SlackAction) SlackActionCaster() *SlackAction { - return s -} diff --git a/typedapi/types/slackattachment.go b/typedapi/types/slackattachment.go index 3bfe9b246b..000199088e 100644 --- a/typedapi/types/slackattachment.go +++ b/typedapi/types/slackattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlackAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L101-L117 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L101-L117 type SlackAttachment struct { AuthorIcon *string `json:"author_icon,omitempty"` AuthorLink *string `json:"author_link,omitempty"` @@ -242,13 +242,3 @@ func NewSlackAttachment() *SlackAttachment { return r } - -// true - -type SlackAttachmentVariant interface { - SlackAttachmentCaster() *SlackAttachment -} - -func (s *SlackAttachment) SlackAttachmentCaster() *SlackAttachment { - return s -} diff --git a/typedapi/types/slackattachmentfield.go b/typedapi/types/slackattachmentfield.go index 0fae612087..65a3d74fb4 100644 --- a/typedapi/types/slackattachmentfield.go +++ b/typedapi/types/slackattachmentfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlackAttachmentField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L119-L123 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L119-L123 type SlackAttachmentField struct { Int bool `json:"short"` Title string `json:"title"` @@ -102,13 +102,3 @@ func NewSlackAttachmentField() *SlackAttachmentField { return r } - -// true - -type SlackAttachmentFieldVariant interface { - SlackAttachmentFieldCaster() *SlackAttachmentField -} - -func (s *SlackAttachmentField) SlackAttachmentFieldCaster() *SlackAttachmentField { - return s -} diff --git a/typedapi/types/slackdynamicattachment.go b/typedapi/types/slackdynamicattachment.go index 2cbd660afa..2a087a3fa7 100644 --- a/typedapi/types/slackdynamicattachment.go +++ b/typedapi/types/slackdynamicattachment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlackDynamicAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L125-L128 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L125-L128 type SlackDynamicAttachment struct { AttachmentTemplate SlackAttachment `json:"attachment_template"` ListPath string `json:"list_path"` @@ -80,13 +80,3 @@ func NewSlackDynamicAttachment() *SlackDynamicAttachment { return r } - -// true - -type SlackDynamicAttachmentVariant interface { - SlackDynamicAttachmentCaster() *SlackDynamicAttachment -} - -func (s *SlackDynamicAttachment) SlackDynamicAttachmentCaster() *SlackDynamicAttachment { - return s -} diff --git a/typedapi/types/slackmessage.go b/typedapi/types/slackmessage.go index 38ecf738ad..c30e9c3da8 100644 --- a/typedapi/types/slackmessage.go +++ b/typedapi/types/slackmessage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlackMessage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L130-L137 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L130-L137 type SlackMessage struct { Attachments []SlackAttachment `json:"attachments"` DynamicAttachments *SlackDynamicAttachment `json:"dynamic_attachments,omitempty"` @@ -118,13 +118,3 @@ func NewSlackMessage() *SlackMessage { return r } - -// true - -type SlackMessageVariant interface { - SlackMessageCaster() *SlackMessage -} - -func (s *SlackMessage) SlackMessageCaster() *SlackMessage { - return s -} diff --git a/typedapi/types/slackresult.go b/typedapi/types/slackresult.go index 4665b901e0..363c3ba05f 100644 --- a/typedapi/types/slackresult.go +++ b/typedapi/types/slackresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlackResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L96-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L96-L99 type SlackResult struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` @@ -80,5 +80,3 @@ func NewSlackResult() *SlackResult { return r } - -// false diff --git a/typedapi/types/slicedscroll.go b/typedapi/types/slicedscroll.go index a8c89909a2..0b19cb69fc 100644 --- a/typedapi/types/slicedscroll.go +++ b/typedapi/types/slicedscroll.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlicedScroll type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/SlicedScroll.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/SlicedScroll.ts#L23-L27 type SlicedScroll struct { Field *string `json:"field,omitempty"` Id string `json:"id"` @@ -90,13 +90,3 @@ func NewSlicedScroll() *SlicedScroll { return r } - -// true - -type SlicedScrollVariant interface { - SlicedScrollCaster() *SlicedScroll -} - -func (s *SlicedScroll) SlicedScrollCaster() *SlicedScroll { - return s -} diff --git a/typedapi/types/slices.go b/typedapi/types/slices.go index a402081e76..da6389327f 100644 --- a/typedapi/types/slices.go +++ b/typedapi/types/slices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // int // slicescalculation.SlicesCalculation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L368-L373 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L370-L375 type Slices any diff --git a/typedapi/types/slm.go b/typedapi/types/slm.go index 0403ca0eaf..f7ec7b4ebe 100644 --- a/typedapi/types/slm.go +++ b/typedapi/types/slm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Slm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L459-L462 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L459-L462 type Slm struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -114,5 +114,3 @@ func NewSlm() *Slm { return r } - -// false diff --git a/typedapi/types/slmindicator.go b/typedapi/types/slmindicator.go index 1b8417c49f..8e7fbb4dfc 100644 --- a/typedapi/types/slmindicator.go +++ b/typedapi/types/slmindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L174-L178 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L175-L179 type SlmIndicator struct { Details *SlmIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewSlmIndicator() *SlmIndicator { return r } - -// false diff --git a/typedapi/types/slmindicatordetails.go b/typedapi/types/slmindicatordetails.go index 6fda8f1fa4..bcf09a1e04 100644 --- a/typedapi/types/slmindicatordetails.go +++ b/typedapi/types/slmindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L179-L183 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L180-L184 type SlmIndicatorDetails struct { Policies int64 `json:"policies"` SlmStatus lifecycleoperationmode.LifecycleOperationMode `json:"slm_status"` @@ -91,5 +91,3 @@ func NewSlmIndicatorDetails() *SlmIndicatorDetails { return r } - -// false diff --git a/typedapi/types/slmindicatorunhealthypolicies.go b/typedapi/types/slmindicatorunhealthypolicies.go index 38846361aa..9498c56ded 100644 --- a/typedapi/types/slmindicatorunhealthypolicies.go +++ b/typedapi/types/slmindicatorunhealthypolicies.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlmIndicatorUnhealthyPolicies type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L185-L188 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L186-L189 type SlmIndicatorUnhealthyPolicies struct { Count int64 `json:"count"` InvocationsSinceLastSuccess map[string]int64 `json:"invocations_since_last_success,omitempty"` @@ -88,5 +88,3 @@ func NewSlmIndicatorUnhealthyPolicies() *SlmIndicatorUnhealthyPolicies { return r } - -// false diff --git a/typedapi/types/slmpolicy.go b/typedapi/types/slmpolicy.go index 62a511ac42..81f8f76bc9 100644 --- a/typedapi/types/slmpolicy.go +++ b/typedapi/types/slmpolicy.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SLMPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L86-L92 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L86-L92 type SLMPolicy struct { Config *Configuration `json:"config,omitempty"` Name string `json:"name"` @@ -98,5 +98,3 @@ func NewSLMPolicy() *SLMPolicy { return r } - -// false diff --git a/typedapi/types/slowlogsettings.go b/typedapi/types/slowlogsettings.go index 9bbbac9051..c0cbe34d76 100644 --- a/typedapi/types/slowlogsettings.go +++ b/typedapi/types/slowlogsettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L515-L520 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L515-L520 type SlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` @@ -112,13 +112,3 @@ func NewSlowlogSettings() *SlowlogSettings { return r } - -// true - -type SlowlogSettingsVariant interface { - SlowlogSettingsCaster() *SlowlogSettings -} - -func (s *SlowlogSettings) SlowlogSettingsCaster() *SlowlogSettings { - return s -} diff --git a/typedapi/types/slowlogtresholdlevels.go b/typedapi/types/slowlogtresholdlevels.go index 5c562b9a20..613679d35f 100644 --- a/typedapi/types/slowlogtresholdlevels.go +++ b/typedapi/types/slowlogtresholdlevels.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SlowlogTresholdLevels type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L527-L532 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L527-L532 type SlowlogTresholdLevels struct { Debug Duration `json:"debug,omitempty"` Info Duration `json:"info,omitempty"` @@ -84,13 +84,3 @@ func NewSlowlogTresholdLevels() *SlowlogTresholdLevels { return r } - -// true - -type SlowlogTresholdLevelsVariant interface { - SlowlogTresholdLevelsCaster() *SlowlogTresholdLevels -} - -func (s *SlowlogTresholdLevels) SlowlogTresholdLevelsCaster() *SlowlogTresholdLevels { - return s -} diff --git a/typedapi/types/slowlogtresholds.go b/typedapi/types/slowlogtresholds.go index 9a5fae30f6..9ba6c9a8ce 100644 --- a/typedapi/types/slowlogtresholds.go +++ b/typedapi/types/slowlogtresholds.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L522-L525 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L522-L525 type SlowlogTresholds struct { Fetch *SlowlogTresholdLevels `json:"fetch,omitempty"` Query *SlowlogTresholdLevels `json:"query,omitempty"` @@ -34,13 +34,3 @@ func NewSlowlogTresholds() *SlowlogTresholds { return r } - -// true - -type SlowlogTresholdsVariant interface { - SlowlogTresholdsCaster() *SlowlogTresholds -} - -func (s *SlowlogTresholds) SlowlogTresholdsCaster() *SlowlogTresholds { - return s -} diff --git a/typedapi/types/smoothingmodelcontainer.go b/typedapi/types/smoothingmodelcontainer.go index 8e5cb6302c..1aad03c652 100644 --- a/typedapi/types/smoothingmodelcontainer.go +++ b/typedapi/types/smoothingmodelcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // SmoothingModelContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L445-L461 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L445-L461 type SmoothingModelContainer struct { AdditionalSmoothingModelContainerProperty map[string]json.RawMessage `json:"-"` // Laplace A smoothing model that uses an additive smoothing where a constant (typically @@ -79,13 +79,3 @@ func NewSmoothingModelContainer() *SmoothingModelContainer { return r } - -// true - -type SmoothingModelContainerVariant interface { - SmoothingModelContainerCaster() *SmoothingModelContainer -} - -func (s *SmoothingModelContainer) SmoothingModelContainerCaster() *SmoothingModelContainer { - return s -} diff --git a/typedapi/types/snapshotcurrentcounts.go b/typedapi/types/snapshotcurrentcounts.go new file mode 100644 index 0000000000..9796a95ef0 --- /dev/null +++ b/typedapi/types/snapshotcurrentcounts.go @@ -0,0 +1,154 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SnapshotCurrentCounts type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L642-L663 +type SnapshotCurrentCounts struct { + // Cleanups Cleanups in progress, not counted in concurrent_operations as they are not + // concurrent + Cleanups int `json:"cleanups"` + // ConcurrentOperations Sum of snapshots and snapshot_deletions + ConcurrentOperations int `json:"concurrent_operations"` + // ShardSnapshots Incomplete shard snapshots + ShardSnapshots int `json:"shard_snapshots"` + // SnapshotDeletions Snapshots deletions in progress + SnapshotDeletions int `json:"snapshot_deletions"` + // Snapshots Snapshots currently in progress + Snapshots int `json:"snapshots"` +} + +func (s *SnapshotCurrentCounts) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "cleanups": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Cleanups", err) + } + s.Cleanups = value + case float64: + f := int(v) + s.Cleanups = f + } + + case "concurrent_operations": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ConcurrentOperations", err) + } + s.ConcurrentOperations = value + case float64: + f := int(v) + s.ConcurrentOperations = f + } + + case "shard_snapshots": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ShardSnapshots", err) + } + s.ShardSnapshots = value + case float64: + f := int(v) + s.ShardSnapshots = f + } + + case "snapshot_deletions": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "SnapshotDeletions", err) + } + s.SnapshotDeletions = value + case float64: + f := int(v) + s.SnapshotDeletions = f + } + + case "snapshots": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Snapshots", err) + } + s.Snapshots = value + case float64: + f := int(v) + s.Snapshots = f + } + + } + } + return nil +} + +// NewSnapshotCurrentCounts returns a SnapshotCurrentCounts. +func NewSnapshotCurrentCounts() *SnapshotCurrentCounts { + r := &SnapshotCurrentCounts{} + + return r +} diff --git a/typedapi/types/snapshotindexstats.go b/typedapi/types/snapshotindexstats.go index deab45fa53..4e4d09eec1 100644 --- a/typedapi/types/snapshotindexstats.go +++ b/typedapi/types/snapshotindexstats.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SnapshotIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 type SnapshotIndexStats struct { Shards map[string]SnapshotShardsStatus `json:"shards"` ShardsStats SnapshotShardsStats `json:"shards_stats"` @@ -37,5 +37,3 @@ func NewSnapshotIndexStats() *SnapshotIndexStats { return r } - -// false diff --git a/typedapi/types/snapshotinfo.go b/typedapi/types/snapshotinfo.go index 1b4636d0a2..f25854af40 100644 --- a/typedapi/types/snapshotinfo.go +++ b/typedapi/types/snapshotinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SnapshotInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 type SnapshotInfo struct { DataStreams []string `json:"data_streams"` Duration Duration `json:"duration,omitempty"` @@ -215,5 +215,3 @@ func NewSnapshotInfo() *SnapshotInfo { return r } - -// false diff --git a/typedapi/types/snapshotlifecycle.go b/typedapi/types/snapshotlifecycle.go index a5114a4635..1ca365e3a3 100644 --- a/typedapi/types/snapshotlifecycle.go +++ b/typedapi/types/snapshotlifecycle.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SnapshotLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L38-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L38-L59 type SnapshotLifecycle struct { InProgress *InProgress `json:"in_progress,omitempty"` LastFailure *Invocation `json:"last_failure,omitempty"` @@ -124,5 +124,3 @@ func NewSnapshotLifecycle() *SnapshotLifecycle { return r } - -// false diff --git a/typedapi/types/snapshotnodeinfo.go b/typedapi/types/snapshotnodeinfo.go index 1f12b4415f..2919dae3a3 100644 --- a/typedapi/types/snapshotnodeinfo.go +++ b/typedapi/types/snapshotnodeinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SnapshotNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113 type SnapshotNodeInfo struct { Id string `json:"id"` Name string `json:"name"` @@ -72,5 +72,3 @@ func NewSnapshotNodeInfo() *SnapshotNodeInfo { return r } - -// false diff --git a/typedapi/types/snapshotpolicystats.go b/typedapi/types/snapshotpolicystats.go new file mode 100644 index 0000000000..adb3f34e3f --- /dev/null +++ b/typedapi/types/snapshotpolicystats.go @@ -0,0 +1,140 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SnapshotPolicyStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L153-L159 +type SnapshotPolicyStats struct { + Policy string `json:"policy"` + SnapshotDeletionFailures int64 `json:"snapshot_deletion_failures"` + SnapshotsDeleted int64 `json:"snapshots_deleted"` + SnapshotsFailed int64 `json:"snapshots_failed"` + SnapshotsTaken int64 `json:"snapshots_taken"` +} + +func (s *SnapshotPolicyStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "policy": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Policy", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Policy = o + + case "snapshot_deletion_failures": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "SnapshotDeletionFailures", err) + } + s.SnapshotDeletionFailures = value + case float64: + f := int64(v) + s.SnapshotDeletionFailures = f + } + + case "snapshots_deleted": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "SnapshotsDeleted", err) + } + s.SnapshotsDeleted = value + case float64: + f := int64(v) + s.SnapshotsDeleted = f + } + + case "snapshots_failed": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "SnapshotsFailed", err) + } + s.SnapshotsFailed = value + case float64: + f := int64(v) + s.SnapshotsFailed = f + } + + case "snapshots_taken": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "SnapshotsTaken", err) + } + s.SnapshotsTaken = value + case float64: + f := int64(v) + s.SnapshotsTaken = f + } + + } + } + return nil +} + +// NewSnapshotPolicyStats returns a SnapshotPolicyStats. +func NewSnapshotPolicyStats() *SnapshotPolicyStats { + r := &SnapshotPolicyStats{} + + return r +} diff --git a/typedapi/types/snapshotresponseitem.go b/typedapi/types/snapshotresponseitem.go index 87a4ff659c..0416684ae1 100644 --- a/typedapi/types/snapshotresponseitem.go +++ b/typedapi/types/snapshotresponseitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SnapshotResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/get/SnapshotGetResponse.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/get/SnapshotGetResponse.ts#L44-L48 type SnapshotResponseItem struct { Error *ErrorCause `json:"error,omitempty"` Repository string `json:"repository"` @@ -78,5 +78,3 @@ func NewSnapshotResponseItem() *SnapshotResponseItem { return r } - -// false diff --git a/typedapi/types/snapshotrestore.go b/typedapi/types/snapshotrestore.go index 73d65990b8..57115c5a21 100644 --- a/typedapi/types/snapshotrestore.go +++ b/typedapi/types/snapshotrestore.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SnapshotRestore type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/restore/SnapshotRestoreResponse.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/restore/SnapshotRestoreResponse.ts#L30-L34 type SnapshotRestore struct { Indices []string `json:"indices"` Shards ShardStatistics `json:"shards"` @@ -86,5 +86,3 @@ func NewSnapshotRestore() *SnapshotRestore { return r } - -// false diff --git a/typedapi/types/snapshotshardfailure.go b/typedapi/types/snapshotshardfailure.go index 068cded11b..b6a088f044 100644 --- a/typedapi/types/snapshotshardfailure.go +++ b/typedapi/types/snapshotshardfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,13 +31,13 @@ import ( // SnapshotShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotShardFailure.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotShardFailure.ts#L23-L30 type SnapshotShardFailure struct { Index string `json:"index"` IndexUuid string `json:"index_uuid"` NodeId *string `json:"node_id,omitempty"` Reason string `json:"reason"` - ShardId string `json:"shard_id"` + ShardId int `json:"shard_id"` Status string `json:"status"` } @@ -84,8 +84,19 @@ func (s *SnapshotShardFailure) UnmarshalJSON(data []byte) error { s.Reason = o case "shard_id": - if err := dec.Decode(&s.ShardId); err != nil { - return fmt.Errorf("%s | %w", "ShardId", err) + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "ShardId", err) + } + s.ShardId = value + case float64: + f := int(v) + s.ShardId = f } case "status": @@ -111,5 +122,3 @@ func NewSnapshotShardFailure() *SnapshotShardFailure { return r } - -// false diff --git a/typedapi/types/snapshotshardsstats.go b/typedapi/types/snapshotshardsstats.go index 49ef726dbe..ad98d39dab 100644 --- a/typedapi/types/snapshotshardsstats.go +++ b/typedapi/types/snapshotshardsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SnapshotShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L29 type SnapshotShardsStats struct { Done int64 `json:"done"` Failed int64 `json:"failed"` @@ -157,5 +157,3 @@ func NewSnapshotShardsStats() *SnapshotShardsStats { return r } - -// false diff --git a/typedapi/types/snapshotshardsstatus.go b/typedapi/types/snapshotshardsstatus.go index 757c93bc28..b924d8310f 100644 --- a/typedapi/types/snapshotshardsstatus.go +++ b/typedapi/types/snapshotshardsstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // SnapshotShardsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 type SnapshotShardsStatus struct { Stage shardsstatsstage.ShardsStatsStage `json:"stage"` Stats ShardsStatsSummary `json:"stats"` @@ -38,5 +38,3 @@ func NewSnapshotShardsStatus() *SnapshotShardsStatus { return r } - -// false diff --git a/typedapi/types/snapshotsrecord.go b/typedapi/types/snapshotsrecord.go index 6208c18da3..9fee96fc1a 100644 --- a/typedapi/types/snapshotsrecord.go +++ b/typedapi/types/snapshotsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SnapshotsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/snapshots/types.ts#L24-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/snapshots/types.ts#L24-L96 type SnapshotsRecord struct { // Duration The time it took the snapshot process to complete, in time units. Duration Duration `json:"duration,omitempty"` @@ -248,5 +248,3 @@ func NewSnapshotsRecord() *SnapshotsRecord { return r } - -// false diff --git a/typedapi/types/snapshotstats.go b/typedapi/types/snapshotstats.go index db266698ad..3e0aecc4a3 100644 --- a/typedapi/types/snapshotstats.go +++ b/typedapi/types/snapshotstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotStats.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotStats.ts#L23-L29 type SnapshotStats struct { Incremental FileCountSnapshotStats `json:"incremental"` StartTimeInMillis int64 `json:"start_time_in_millis"` @@ -90,5 +90,3 @@ func NewSnapshotStats() *SnapshotStats { return r } - -// false diff --git a/typedapi/types/snowballanalyzer.go b/typedapi/types/snowballanalyzer.go index 476a7df5e1..034536d350 100644 --- a/typedapi/types/snowballanalyzer.go +++ b/typedapi/types/snowballanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,10 +32,10 @@ import ( // SnowballAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L325-L330 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L325-L330 type SnowballAnalyzer struct { Language snowballlanguage.SnowballLanguage `json:"language"` - Stopwords []string `json:"stopwords,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` } @@ -61,19 +61,8 @@ func (s *SnowballAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "type": @@ -112,13 +101,3 @@ func NewSnowballAnalyzer() *SnowballAnalyzer { return r } - -// true - -type SnowballAnalyzerVariant interface { - SnowballAnalyzerCaster() *SnowballAnalyzer -} - -func (s *SnowballAnalyzer) SnowballAnalyzerCaster() *SnowballAnalyzer { - return s -} diff --git a/typedapi/types/snowballtokenfilter.go b/typedapi/types/snowballtokenfilter.go index 7b106db43e..85bfe33534 100644 --- a/typedapi/types/snowballtokenfilter.go +++ b/typedapi/types/snowballtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,8 +32,9 @@ import ( // SnowballTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L310-L313 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L411-L415 type SnowballTokenFilter struct { + // Language Controls the language used by the stemmer. Language *snowballlanguage.SnowballLanguage `json:"language,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -94,13 +95,3 @@ func NewSnowballTokenFilter() *SnowballTokenFilter { return r } - -// true - -type SnowballTokenFilterVariant interface { - SnowballTokenFilterCaster() *SnowballTokenFilter -} - -func (s *SnowballTokenFilter) SnowballTokenFilterCaster() *SnowballTokenFilter { - return s -} diff --git a/typedapi/types/softdeletes.go b/typedapi/types/softdeletes.go index d9888afe5b..7904e42965 100644 --- a/typedapi/types/softdeletes.go +++ b/typedapi/types/softdeletes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SoftDeletes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L51-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L51-L64 type SoftDeletes struct { // Enabled Indicates whether soft deletes are enabled on the index. Enabled *bool `json:"enabled,omitempty"` @@ -90,13 +90,3 @@ func NewSoftDeletes() *SoftDeletes { return r } - -// true - -type SoftDeletesVariant interface { - SoftDeletesCaster() *SoftDeletes -} - -func (s *SoftDeletes) SoftDeletesCaster() *SoftDeletes { - return s -} diff --git a/typedapi/types/soranianalyzer.go b/typedapi/types/soranianalyzer.go index 1de7f5209c..2b1414064d 100644 --- a/typedapi/types/soranianalyzer.go +++ b/typedapi/types/soranianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // SoraniAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L269-L274 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L269-L274 type SoraniAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *SoraniAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *SoraniAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewSoraniAnalyzer() *SoraniAnalyzer { return r } - -// true - -type SoraniAnalyzerVariant interface { - SoraniAnalyzerCaster() *SoraniAnalyzer -} - -func (s *SoraniAnalyzer) SoraniAnalyzerCaster() *SoraniAnalyzer { - return s -} diff --git a/typedapi/types/soraninormalizationtokenfilter.go b/typedapi/types/soraninormalizationtokenfilter.go new file mode 100644 index 0000000000..50829ea305 --- /dev/null +++ b/typedapi/types/soraninormalizationtokenfilter.go @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// SoraniNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L543-L545 +type SoraniNormalizationTokenFilter struct { + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` +} + +func (s *SoraniNormalizationTokenFilter) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "type": + if err := dec.Decode(&s.Type); err != nil { + return fmt.Errorf("%s | %w", "Type", err) + } + + case "version": + if err := dec.Decode(&s.Version); err != nil { + return fmt.Errorf("%s | %w", "Version", err) + } + + } + } + return nil +} + +// MarshalJSON override marshalling to include literal value +func (s SoraniNormalizationTokenFilter) MarshalJSON() ([]byte, error) { + type innerSoraniNormalizationTokenFilter SoraniNormalizationTokenFilter + tmp := innerSoraniNormalizationTokenFilter{ + Type: s.Type, + Version: s.Version, + } + + tmp.Type = "sorani_normalization" + + return json.Marshal(tmp) +} + +// NewSoraniNormalizationTokenFilter returns a SoraniNormalizationTokenFilter. +func NewSoraniNormalizationTokenFilter() *SoraniNormalizationTokenFilter { + r := &SoraniNormalizationTokenFilter{} + + return r +} diff --git a/typedapi/types/sort.go b/typedapi/types/sort.go index 550f16c788..3174bf0ffd 100644 --- a/typedapi/types/sort.go +++ b/typedapi/types/sort.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Sort type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L104-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L104-L104 type Sort []SortCombinations - -type SortVariant interface { - SortCaster() *Sort -} diff --git a/typedapi/types/sortcombinations.go b/typedapi/types/sortcombinations.go index 12b4e05f8e..75eeb64cfc 100644 --- a/typedapi/types/sortcombinations.go +++ b/typedapi/types/sortcombinations.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // SortOptions // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L98-L102 type SortCombinations any - -type SortCombinationsVariant interface { - SortCombinationsCaster() *SortCombinations -} diff --git a/typedapi/types/sortoptions.go b/typedapi/types/sortoptions.go index 720eec4b52..ed5f927237 100644 --- a/typedapi/types/sortoptions.go +++ b/typedapi/types/sortoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // SortOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/sort.ts#L86-L96 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/sort.ts#L86-L96 type SortOptions struct { Doc_ *ScoreSort `json:"_doc,omitempty"` GeoDistance_ *GeoDistanceSort `json:"_geo_distance,omitempty"` @@ -73,13 +73,3 @@ func NewSortOptions() *SortOptions { return r } - -// true - -type SortOptionsVariant interface { - SortOptionsCaster() *SortOptions -} - -func (s *SortOptions) SortOptionsCaster() *SortOptions { - return s -} diff --git a/typedapi/types/sortprocessor.go b/typedapi/types/sortprocessor.go index a2548b1226..f1d6dab289 100644 --- a/typedapi/types/sortprocessor.go +++ b/typedapi/types/sortprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SortProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1496-L1512 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1496-L1512 type SortProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -153,13 +153,3 @@ func NewSortProcessor() *SortProcessor { return r } - -// true - -type SortProcessorVariant interface { - SortProcessorCaster() *SortProcessor -} - -func (s *SortProcessor) SortProcessorCaster() *SortProcessor { - return s -} diff --git a/typedapi/types/sourceconfig.go b/typedapi/types/sourceconfig.go index 8fa3fe501c..348060f671 100644 --- a/typedapi/types/sourceconfig.go +++ b/typedapi/types/sourceconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // bool // SourceFilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/SourceFilter.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/SourceFilter.ts#L50-L54 type SourceConfig any - -type SourceConfigVariant interface { - SourceConfigCaster() *SourceConfig -} diff --git a/typedapi/types/sourceconfigparam.go b/typedapi/types/sourceconfigparam.go index dd85848338..e836c0f386 100644 --- a/typedapi/types/sourceconfigparam.go +++ b/typedapi/types/sourceconfigparam.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // bool // []string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/SourceFilter.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/SourceFilter.ts#L56-L62 type SourceConfigParam any diff --git a/typedapi/types/sourcefield.go b/typedapi/types/sourcefield.go index bf26719a37..2493aa7665 100644 --- a/typedapi/types/sourcefield.go +++ b/typedapi/types/sourcefield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SourceField type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/meta-fields.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/meta-fields.ts#L58-L65 type SourceField struct { Compress *bool `json:"compress,omitempty"` CompressThreshold *string `json:"compress_threshold,omitempty"` @@ -124,13 +124,3 @@ func NewSourceField() *SourceField { return r } - -// true - -type SourceFieldVariant interface { - SourceFieldCaster() *SourceField -} - -func (s *SourceField) SourceFieldCaster() *SourceField { - return s -} diff --git a/typedapi/types/sourcefilter.go b/typedapi/types/sourcefilter.go index 965165c92b..9412ee83b5 100644 --- a/typedapi/types/sourcefilter.go +++ b/typedapi/types/sourcefilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,13 +26,21 @@ import ( "errors" "fmt" "io" + "strconv" ) // SourceFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/SourceFilter.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/SourceFilter.ts#L23-L48 type SourceFilter struct { + // ExcludeVectors If `true`, vector fields are excluded from the returned source. + // + // This option takes precedence over `includes`: any vector field will + // remain excluded even if it matches an `includes` rule. + ExcludeVectors *bool `json:"exclude_vectors,omitempty"` + // Excludes A list of fields to exclude from the returned source. Excludes []string `json:"excludes,omitempty"` + // Includes A list of fields to include in the returned source. Includes []string `json:"includes,omitempty"` } @@ -61,6 +69,20 @@ func (s *SourceFilter) UnmarshalJSON(data []byte) error { switch t { + case "exclude_vectors": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ExcludeVectors", err) + } + s.ExcludeVectors = &value + case bool: + s.ExcludeVectors = &v + } + case "excludes", "exclude": rawMsg := json.RawMessage{} dec.Decode(&rawMsg) @@ -104,13 +126,3 @@ func NewSourceFilter() *SourceFilter { return r } - -// true - -type SourceFilterVariant interface { - SourceFilterCaster() *SourceFilter -} - -func (s *SourceFilter) SourceFilterCaster() *SourceFilter { - return s -} diff --git a/typedapi/types/sourceindex.go b/typedapi/types/sourceindex.go index 2366c18916..dd7e673c47 100644 --- a/typedapi/types/sourceindex.go +++ b/typedapi/types/sourceindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SourceIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L50-L52 type SourceIndex struct { Index string `json:"index"` } @@ -66,13 +66,3 @@ func NewSourceIndex() *SourceIndex { return r } - -// true - -type SourceIndexVariant interface { - SourceIndexCaster() *SourceIndex -} - -func (s *SourceIndex) SourceIndexCaster() *SourceIndex { - return s -} diff --git a/typedapi/types/sourceonlyrepository.go b/typedapi/types/sourceonlyrepository.go index 3140e1278d..4f09a24dda 100644 --- a/typedapi/types/sourceonlyrepository.go +++ b/typedapi/types/sourceonlyrepository.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SourceOnlyRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L65-L68 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L65-L68 type SourceOnlyRepository struct { Settings SourceOnlyRepositorySettings `json:"settings"` Type string `json:"type,omitempty"` @@ -92,13 +92,3 @@ func NewSourceOnlyRepository() *SourceOnlyRepository { return r } - -// true - -type SourceOnlyRepositoryVariant interface { - SourceOnlyRepositoryCaster() *SourceOnlyRepository -} - -func (s *SourceOnlyRepository) SourceOnlyRepositoryCaster() *SourceOnlyRepository { - return s -} diff --git a/typedapi/types/sourceonlyrepositorysettings.go b/typedapi/types/sourceonlyrepositorysettings.go index 91f09cd53f..04f27e7b56 100644 --- a/typedapi/types/sourceonlyrepositorysettings.go +++ b/typedapi/types/sourceonlyrepositorysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SourceOnlyRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotRepository.ts#L117-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotRepository.ts#L117-L124 type SourceOnlyRepositorySettings struct { ChunkSize ByteSize `json:"chunk_size,omitempty"` Compress *bool `json:"compress,omitempty"` @@ -139,13 +139,3 @@ func NewSourceOnlyRepositorySettings() *SourceOnlyRepositorySettings { return r } - -// true - -type SourceOnlyRepositorySettingsVariant interface { - SourceOnlyRepositorySettingsCaster() *SourceOnlyRepositorySettings -} - -func (s *SourceOnlyRepositorySettings) SourceOnlyRepositorySettingsCaster() *SourceOnlyRepositorySettings { - return s -} diff --git a/typedapi/types/spancontainingquery.go b/typedapi/types/spancontainingquery.go index b09c16edda..ff0db06d0c 100644 --- a/typedapi/types/spancontainingquery.go +++ b/typedapi/types/spancontainingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanContainingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L25-L39 type SpanContainingQuery struct { // Big Can be any span query. // Matching spans from `big` that contain matches from `little` are returned. @@ -112,13 +112,3 @@ func NewSpanContainingQuery() *SpanContainingQuery { return r } - -// true - -type SpanContainingQueryVariant interface { - SpanContainingQueryCaster() *SpanContainingQuery -} - -func (s *SpanContainingQuery) SpanContainingQueryCaster() *SpanContainingQuery { - return s -} diff --git a/typedapi/types/spanfieldmaskingquery.go b/typedapi/types/spanfieldmaskingquery.go index 786c0e2ced..0b6db8a606 100644 --- a/typedapi/types/spanfieldmaskingquery.go +++ b/typedapi/types/spanfieldmaskingquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanFieldMaskingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L41-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L41-L47 type SpanFieldMaskingQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -108,13 +108,3 @@ func NewSpanFieldMaskingQuery() *SpanFieldMaskingQuery { return r } - -// true - -type SpanFieldMaskingQueryVariant interface { - SpanFieldMaskingQueryCaster() *SpanFieldMaskingQuery -} - -func (s *SpanFieldMaskingQuery) SpanFieldMaskingQueryCaster() *SpanFieldMaskingQuery { - return s -} diff --git a/typedapi/types/spanfirstquery.go b/typedapi/types/spanfirstquery.go index 0a40f82851..82f4c4670f 100644 --- a/typedapi/types/spanfirstquery.go +++ b/typedapi/types/spanfirstquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanFirstQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L49-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L49-L61 type SpanFirstQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -121,13 +121,3 @@ func NewSpanFirstQuery() *SpanFirstQuery { return r } - -// true - -type SpanFirstQueryVariant interface { - SpanFirstQueryCaster() *SpanFirstQuery -} - -func (s *SpanFirstQuery) SpanFirstQueryCaster() *SpanFirstQuery { - return s -} diff --git a/typedapi/types/spangapquery.go b/typedapi/types/spangapquery.go index a0d3c2fa26..a714d82ffa 100644 --- a/typedapi/types/spangapquery.go +++ b/typedapi/types/spangapquery.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SpanGapQuery type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L63-L65 type SpanGapQuery map[string]int - -type SpanGapQueryVariant interface { - SpanGapQueryCaster() *SpanGapQuery -} diff --git a/typedapi/types/spanishanalyzer.go b/typedapi/types/spanishanalyzer.go index bd19ce08f5..8e0644d78f 100644 --- a/typedapi/types/spanishanalyzer.go +++ b/typedapi/types/spanishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // SpanishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L276-L281 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L276-L281 type SpanishAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *SpanishAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *SpanishAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewSpanishAnalyzer() *SpanishAnalyzer { return r } - -// true - -type SpanishAnalyzerVariant interface { - SpanishAnalyzerCaster() *SpanishAnalyzer -} - -func (s *SpanishAnalyzer) SpanishAnalyzerCaster() *SpanishAnalyzer { - return s -} diff --git a/typedapi/types/spanmultitermquery.go b/typedapi/types/spanmultitermquery.go index 0e733c21e1..5f76620f9a 100644 --- a/typedapi/types/spanmultitermquery.go +++ b/typedapi/types/spanmultitermquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanMultiTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L67-L75 type SpanMultiTermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -104,13 +104,3 @@ func NewSpanMultiTermQuery() *SpanMultiTermQuery { return r } - -// true - -type SpanMultiTermQueryVariant interface { - SpanMultiTermQueryCaster() *SpanMultiTermQuery -} - -func (s *SpanMultiTermQuery) SpanMultiTermQueryCaster() *SpanMultiTermQuery { - return s -} diff --git a/typedapi/types/spannearquery.go b/typedapi/types/spannearquery.go index f3f69e1f93..e17f9b70ae 100644 --- a/typedapi/types/spannearquery.go +++ b/typedapi/types/spannearquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanNearQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L77-L93 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L77-L93 type SpanNearQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -137,13 +137,3 @@ func NewSpanNearQuery() *SpanNearQuery { return r } - -// true - -type SpanNearQueryVariant interface { - SpanNearQueryCaster() *SpanNearQuery -} - -func (s *SpanNearQuery) SpanNearQueryCaster() *SpanNearQuery { - return s -} diff --git a/typedapi/types/spannotquery.go b/typedapi/types/spannotquery.go index 07b93ddce7..ab742fbb87 100644 --- a/typedapi/types/spannotquery.go +++ b/typedapi/types/spannotquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanNotQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L95-L122 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L95-L122 type SpanNotQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -168,13 +168,3 @@ func NewSpanNotQuery() *SpanNotQuery { return r } - -// true - -type SpanNotQueryVariant interface { - SpanNotQueryCaster() *SpanNotQuery -} - -func (s *SpanNotQuery) SpanNotQueryCaster() *SpanNotQuery { - return s -} diff --git a/typedapi/types/spanorquery.go b/typedapi/types/spanorquery.go index 95776f59fe..85f91f44b4 100644 --- a/typedapi/types/spanorquery.go +++ b/typedapi/types/spanorquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanOrQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L124-L132 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L124-L132 type SpanOrQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -103,13 +103,3 @@ func NewSpanOrQuery() *SpanOrQuery { return r } - -// true - -type SpanOrQueryVariant interface { - SpanOrQueryCaster() *SpanOrQuery -} - -func (s *SpanOrQuery) SpanOrQueryCaster() *SpanOrQuery { - return s -} diff --git a/typedapi/types/spanquery.go b/typedapi/types/spanquery.go index d37f06308f..c9aa789eb1 100644 --- a/typedapi/types/spanquery.go +++ b/typedapi/types/spanquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SpanQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L158-L200 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L158-L200 type SpanQuery struct { AdditionalSpanQueryProperty map[string]json.RawMessage `json:"-"` // SpanContaining Accepts a list of span queries, but only returns those spans which also match @@ -183,13 +183,3 @@ func NewSpanQuery() *SpanQuery { return r } - -// true - -type SpanQueryVariant interface { - SpanQueryCaster() *SpanQuery -} - -func (s *SpanQuery) SpanQueryCaster() *SpanQuery { - return s -} diff --git a/typedapi/types/spantermquery.go b/typedapi/types/spantermquery.go index f2586a6cd7..accfcebe44 100644 --- a/typedapi/types/spantermquery.go +++ b/typedapi/types/spantermquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L134-L140 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L134-L140 type SpanTermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -121,13 +121,3 @@ func NewSpanTermQuery() *SpanTermQuery { return r } - -// true - -type SpanTermQueryVariant interface { - SpanTermQueryCaster() *SpanTermQuery -} - -func (s *SpanTermQuery) SpanTermQueryCaster() *SpanTermQuery { - return s -} diff --git a/typedapi/types/spanwithinquery.go b/typedapi/types/spanwithinquery.go index 4cf1d05e52..8cae16a93f 100644 --- a/typedapi/types/spanwithinquery.go +++ b/typedapi/types/spanwithinquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SpanWithinQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/span.ts#L142-L156 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/span.ts#L142-L156 type SpanWithinQuery struct { // Big Can be any span query. // Matching spans from `little` that are enclosed within `big` are returned. @@ -112,13 +112,3 @@ func NewSpanWithinQuery() *SpanWithinQuery { return r } - -// true - -type SpanWithinQueryVariant interface { - SpanWithinQueryCaster() *SpanWithinQuery -} - -func (s *SpanWithinQuery) SpanWithinQueryCaster() *SpanWithinQuery { - return s -} diff --git a/typedapi/types/sparseembeddingresult.go b/typedapi/types/sparseembeddingresult.go index 3a4ae4cd60..c38e1dd12b 100644 --- a/typedapi/types/sparseembeddingresult.go +++ b/typedapi/types/sparseembeddingresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SparseEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Results.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Results.ts#L36-L38 type SparseEmbeddingResult struct { Embedding SparseVector `json:"embedding"` } @@ -66,5 +66,3 @@ func NewSparseEmbeddingResult() *SparseEmbeddingResult { return r } - -// false diff --git a/typedapi/types/sparsevector.go b/typedapi/types/sparsevector.go index cb4df7fa50..9ef1265dce 100644 --- a/typedapi/types/sparsevector.go +++ b/typedapi/types/sparsevector.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SparseVector type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Results.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Results.ts#L24-L28 type SparseVector map[string]float32 diff --git a/typedapi/types/sparsevectorindexoptions.go b/typedapi/types/sparsevectorindexoptions.go new file mode 100644 index 0000000000..9294121f70 --- /dev/null +++ b/typedapi/types/sparsevectorindexoptions.go @@ -0,0 +1,95 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SparseVectorIndexOptions type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/SparseVectorIndexOptions.ts#L22-L42 +type SparseVectorIndexOptions struct { + // Prune Whether to perform pruning, omitting the non-significant tokens from the + // query to improve query performance. + // If prune is true but the pruning_config is not specified, pruning will occur + // but default values will be used. + // Default: false + Prune *bool `json:"prune,omitempty"` + // PruningConfig Optional pruning configuration. + // If enabled, this will omit non-significant tokens from the query in order to + // improve query performance. + // This is only used if prune is set to true. + // If prune is set to true but pruning_config is not specified, default values + // will be used. + PruningConfig *TokenPruningConfig `json:"pruning_config,omitempty"` +} + +func (s *SparseVectorIndexOptions) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "prune": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "Prune", err) + } + s.Prune = &value + case bool: + s.Prune = &v + } + + case "pruning_config": + if err := dec.Decode(&s.PruningConfig); err != nil { + return fmt.Errorf("%s | %w", "PruningConfig", err) + } + + } + } + return nil +} + +// NewSparseVectorIndexOptions returns a SparseVectorIndexOptions. +func NewSparseVectorIndexOptions() *SparseVectorIndexOptions { + r := &SparseVectorIndexOptions{} + + return r +} diff --git a/typedapi/types/sparsevectorproperty.go b/typedapi/types/sparsevectorproperty.go index 601c17194f..665756bf11 100644 --- a/typedapi/types/sparsevectorproperty.go +++ b/typedapi/types/sparsevectorproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,14 +34,18 @@ import ( // SparseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L216-L218 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L227-L237 type SparseVectorProperty struct { Dynamic *dynamicmapping.DynamicMapping `json:"dynamic,omitempty"` Fields map[string]Property `json:"fields,omitempty"` IgnoreAbove *int `json:"ignore_above,omitempty"` + // IndexOptions Additional index options for the sparse vector field that controls the + // token pruning behavior of the sparse vector field. + IndexOptions *SparseVectorIndexOptions `json:"index_options,omitempty"` // Meta Metadata about the field. Meta map[string]string `json:"meta,omitempty"` Properties map[string]Property `json:"properties,omitempty"` + Store *bool `json:"store,omitempty"` SyntheticSourceKeep *syntheticsourcekeepenum.SyntheticSourceKeepEnum `json:"synthetic_source_keep,omitempty"` Type string `json:"type,omitempty"` } @@ -208,6 +212,12 @@ func (s *SparseVectorProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -413,6 +423,11 @@ func (s *SparseVectorProperty) UnmarshalJSON(data []byte) error { s.IgnoreAbove = &f } + case "index_options": + if err := dec.Decode(&s.IndexOptions); err != nil { + return fmt.Errorf("%s | %w", "IndexOptions", err) + } + case "meta": if s.Meta == nil { s.Meta = make(map[string]string, 0) @@ -563,6 +578,12 @@ func (s *SparseVectorProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -752,6 +773,20 @@ func (s *SparseVectorProperty) UnmarshalJSON(data []byte) error { } } + case "store": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "Store", err) + } + s.Store = &value + case bool: + s.Store = &v + } + case "synthetic_source_keep": if err := dec.Decode(&s.SyntheticSourceKeep); err != nil { return fmt.Errorf("%s | %w", "SyntheticSourceKeep", err) @@ -774,8 +809,10 @@ func (s SparseVectorProperty) MarshalJSON() ([]byte, error) { Dynamic: s.Dynamic, Fields: s.Fields, IgnoreAbove: s.IgnoreAbove, + IndexOptions: s.IndexOptions, Meta: s.Meta, Properties: s.Properties, + Store: s.Store, SyntheticSourceKeep: s.SyntheticSourceKeep, Type: s.Type, } @@ -795,13 +832,3 @@ func NewSparseVectorProperty() *SparseVectorProperty { return r } - -// true - -type SparseVectorPropertyVariant interface { - SparseVectorPropertyCaster() *SparseVectorProperty -} - -func (s *SparseVectorProperty) SparseVectorPropertyCaster() *SparseVectorProperty { - return s -} diff --git a/typedapi/types/sparsevectorquery.go b/typedapi/types/sparsevectorquery.go index 6e8508c4fc..89dacbeeef 100644 --- a/typedapi/types/sparsevectorquery.go +++ b/typedapi/types/sparsevectorquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SparseVectorQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L80 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L80 type SparseVectorQuery struct { AdditionalSparseVectorQueryProperty map[string]json.RawMessage `json:"-"` // Boost Floating point number used to decrease or increase the relevance scores of @@ -221,13 +221,3 @@ func NewSparseVectorQuery() *SparseVectorQuery { return r } - -// true - -type SparseVectorQueryVariant interface { - SparseVectorQueryCaster() *SparseVectorQuery -} - -func (s *SparseVectorQuery) SparseVectorQueryCaster() *SparseVectorQuery { - return s -} diff --git a/typedapi/types/sparsevectorstats.go b/typedapi/types/sparsevectorstats.go new file mode 100644 index 0000000000..8feb5b48bb --- /dev/null +++ b/typedapi/types/sparsevectorstats.go @@ -0,0 +1,79 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SparseVectorStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L162-L164 +type SparseVectorStats struct { + ValueCount int64 `json:"value_count"` +} + +func (s *SparseVectorStats) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "value_count": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "ValueCount", err) + } + s.ValueCount = value + case float64: + f := int64(v) + s.ValueCount = f + } + + } + } + return nil +} + +// NewSparseVectorStats returns a SparseVectorStats. +func NewSparseVectorStats() *SparseVectorStats { + r := &SparseVectorStats{} + + return r +} diff --git a/typedapi/types/specifieddocument.go b/typedapi/types/specifieddocument.go new file mode 100644 index 0000000000..19e9056c93 --- /dev/null +++ b/typedapi/types/specifieddocument.go @@ -0,0 +1,74 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// SpecifiedDocument type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L97-L100 +type SpecifiedDocument struct { + Id string `json:"id"` + Index *string `json:"index,omitempty"` +} + +func (s *SpecifiedDocument) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "id": + if err := dec.Decode(&s.Id); err != nil { + return fmt.Errorf("%s | %w", "Id", err) + } + + case "index": + if err := dec.Decode(&s.Index); err != nil { + return fmt.Errorf("%s | %w", "Index", err) + } + + } + } + return nil +} + +// NewSpecifiedDocument returns a SpecifiedDocument. +func NewSpecifiedDocument() *SpecifiedDocument { + r := &SpecifiedDocument{} + + return r +} diff --git a/typedapi/types/splitprocessor.go b/typedapi/types/splitprocessor.go index e07aa315a2..8a72d39a92 100644 --- a/typedapi/types/splitprocessor.go +++ b/typedapi/types/splitprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SplitProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1514-L1539 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1514-L1539 type SplitProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -190,13 +190,3 @@ func NewSplitProcessor() *SplitProcessor { return r } - -// true - -type SplitProcessorVariant interface { - SplitProcessorCaster() *SplitProcessor -} - -func (s *SplitProcessor) SplitProcessorCaster() *SplitProcessor { - return s -} diff --git a/typedapi/types/sql.go b/typedapi/types/sql.go index 21d03d6ced..1388acc7cf 100644 --- a/typedapi/types/sql.go +++ b/typedapi/types/sql.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Sql type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L396-L399 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L396-L399 type Sql struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -112,5 +112,3 @@ func NewSql() *Sql { return r } - -// false diff --git a/typedapi/types/ssl.go b/typedapi/types/ssl.go index c79232c88a..0ef6021bb0 100644 --- a/typedapi/types/ssl.go +++ b/typedapi/types/ssl.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Ssl type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L401-L404 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L401-L404 type Ssl struct { Http FeatureToggle `json:"http"` Transport FeatureToggle `json:"transport"` @@ -34,5 +34,3 @@ func NewSsl() *Ssl { return r } - -// false diff --git a/typedapi/types/stagnatingbackingindices.go b/typedapi/types/stagnatingbackingindices.go index 7d1d52e5c9..b4b03edd95 100644 --- a/typedapi/types/stagnatingbackingindices.go +++ b/typedapi/types/stagnatingbackingindices.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StagnatingBackingIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/health_report/types.ts#L157-L161 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/health_report/types.ts#L158-L162 type StagnatingBackingIndices struct { FirstOccurrenceTimestamp int64 `json:"first_occurrence_timestamp"` IndexName string `json:"index_name"` @@ -100,5 +100,3 @@ func NewStagnatingBackingIndices() *StagnatingBackingIndices { return r } - -// false diff --git a/typedapi/types/standardanalyzer.go b/typedapi/types/standardanalyzer.go index 499f7a389e..77f27d8979 100644 --- a/typedapi/types/standardanalyzer.go +++ b/typedapi/types/standardanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // StandardAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L332-L336 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L332-L336 type StandardAnalyzer struct { - MaxTokenLength *int `json:"max_token_length,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - Type string `json:"type,omitempty"` + MaxTokenLength *int `json:"max_token_length,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + Type string `json:"type,omitempty"` } func (s *StandardAnalyzer) UnmarshalJSON(data []byte) error { @@ -70,19 +70,8 @@ func (s *StandardAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "type": @@ -115,13 +104,3 @@ func NewStandardAnalyzer() *StandardAnalyzer { return r } - -// true - -type StandardAnalyzerVariant interface { - StandardAnalyzerCaster() *StandardAnalyzer -} - -func (s *StandardAnalyzer) StandardAnalyzerCaster() *StandardAnalyzer { - return s -} diff --git a/typedapi/types/standarddeviationbounds.go b/typedapi/types/standarddeviationbounds.go index f41f13a62b..e10e1e39fb 100644 --- a/typedapi/types/standarddeviationbounds.go +++ b/typedapi/types/standarddeviationbounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // StandardDeviationBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L281-L288 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L281-L288 type StandardDeviationBounds struct { Lower *Float64 `json:"lower,omitempty"` LowerPopulation *Float64 `json:"lower_population,omitempty"` @@ -96,5 +96,3 @@ func NewStandardDeviationBounds() *StandardDeviationBounds { return r } - -// false diff --git a/typedapi/types/standarddeviationboundsasstring.go b/typedapi/types/standarddeviationboundsasstring.go index 11ecfbcde4..ea37128371 100644 --- a/typedapi/types/standarddeviationboundsasstring.go +++ b/typedapi/types/standarddeviationboundsasstring.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StandardDeviationBoundsAsString type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L290-L297 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L290-L297 type StandardDeviationBoundsAsString struct { Lower string `json:"lower"` LowerPopulation string `json:"lower_population"` @@ -139,5 +139,3 @@ func NewStandardDeviationBoundsAsString() *StandardDeviationBoundsAsString { return r } - -// false diff --git a/typedapi/types/standardretriever.go b/typedapi/types/standardretriever.go index 4c7895b514..79e988ede0 100644 --- a/typedapi/types/standardretriever.go +++ b/typedapi/types/standardretriever.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StandardRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retriever.ts#L51-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L102-L113 type StandardRetriever struct { // Collapse Collapses the top documents by a specified key into a single top document per // key. @@ -41,6 +41,8 @@ type StandardRetriever struct { // MinScore Minimum _score for matching documents. Documents with a lower _score are not // included in the top documents. MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` // Query Defines a query to retrieve a set of top documents. Query *Query `json:"query,omitempty"` // SearchAfter Defines a search after object parameter used for pagination. @@ -103,6 +105,18 @@ func (s *StandardRetriever) UnmarshalJSON(data []byte) error { s.MinScore = &f } + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + case "query": if err := dec.Decode(&s.Query); err != nil { return fmt.Errorf("%s | %w", "Query", err) @@ -156,13 +170,3 @@ func NewStandardRetriever() *StandardRetriever { return r } - -// true - -type StandardRetrieverVariant interface { - StandardRetrieverCaster() *StandardRetriever -} - -func (s *StandardRetriever) StandardRetrieverCaster() *StandardRetriever { - return s -} diff --git a/typedapi/types/standardtokenizer.go b/typedapi/types/standardtokenizer.go index 9daaa26dc4..8ca8404840 100644 --- a/typedapi/types/standardtokenizer.go +++ b/typedapi/types/standardtokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StandardTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L121-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L123-L126 type StandardTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -104,13 +104,3 @@ func NewStandardTokenizer() *StandardTokenizer { return r } - -// true - -type StandardTokenizerVariant interface { - StandardTokenizerCaster() *StandardTokenizer -} - -func (s *StandardTokenizer) StandardTokenizerCaster() *StandardTokenizer { - return s -} diff --git a/typedapi/types/statistics.go b/typedapi/types/statistics.go index d2bb1ed9b2..6b90c1dcbf 100644 --- a/typedapi/types/statistics.go +++ b/typedapi/types/statistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Statistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/slm/_types/SnapshotLifecycle.ts#L61-L84 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/slm/_types/SnapshotLifecycle.ts#L61-L84 type Statistics struct { Policy *string `json:"policy,omitempty"` RetentionDeletionTime Duration `json:"retention_deletion_time,omitempty"` @@ -191,5 +191,3 @@ func NewStatistics() *Statistics { return r } - -// false diff --git a/typedapi/types/stats.go b/typedapi/types/stats.go index fdaac3b2fb..2dbe9e2322 100644 --- a/typedapi/types/stats.go +++ b/typedapi/types/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Stats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L30-L114 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L30-L114 type Stats struct { // AdaptiveSelection Statistics about adaptive replica selection. AdaptiveSelection map[string]AdaptiveSelection `json:"adaptive_selection,omitempty"` @@ -279,5 +279,3 @@ func NewStats() *Stats { return r } - -// false diff --git a/typedapi/types/statsaggregate.go b/typedapi/types/statsaggregate.go index 6b5a1fd445..2b68ea1bd9 100644 --- a/typedapi/types/statsaggregate.go +++ b/typedapi/types/statsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L257-L273 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L257-L273 type StatsAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` @@ -170,5 +170,3 @@ func NewStatsAggregate() *StatsAggregate { return r } - -// false diff --git a/typedapi/types/statsaggregation.go b/typedapi/types/statsaggregation.go index 5ea39fc275..3e59b2d644 100644 --- a/typedapi/types/statsaggregation.go +++ b/typedapi/types/statsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L291-L291 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L314-L314 type StatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -95,13 +95,3 @@ func NewStatsAggregation() *StatsAggregation { return r } - -// true - -type StatsAggregationVariant interface { - StatsAggregationCaster() *StatsAggregation -} - -func (s *StatsAggregation) StatsAggregationCaster() *StatsAggregation { - return s -} diff --git a/typedapi/types/statsbucketaggregate.go b/typedapi/types/statsbucketaggregate.go index 6afa9f273a..0bde113761 100644 --- a/typedapi/types/statsbucketaggregate.go +++ b/typedapi/types/statsbucketaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L275-L279 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L275-L279 type StatsBucketAggregate struct { Avg *Float64 `json:"avg,omitempty"` AvgAsString *string `json:"avg_as_string,omitempty"` @@ -170,5 +170,3 @@ func NewStatsBucketAggregate() *StatsBucketAggregate { return r } - -// false diff --git a/typedapi/types/statsbucketaggregation.go b/typedapi/types/statsbucketaggregation.go index b407a59793..9f4767f2da 100644 --- a/typedapi/types/statsbucketaggregation.go +++ b/typedapi/types/statsbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // StatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L410-L410 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L410-L410 type StatsBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewStatsBucketAggregation() *StatsBucketAggregation { return r } - -// true - -type StatsBucketAggregationVariant interface { - StatsBucketAggregationCaster() *StatsBucketAggregation -} - -func (s *StatsBucketAggregation) StatsBucketAggregationCaster() *StatsBucketAggregation { - return s -} diff --git a/typedapi/types/status.go b/typedapi/types/status.go index e6d3575fce..6f6ec6e7f7 100644 --- a/typedapi/types/status.go +++ b/typedapi/types/status.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Status type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/_types/SnapshotStatus.ts#L26-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/_types/SnapshotStatus.ts#L26-L35 type Status struct { IncludeGlobalState bool `json:"include_global_state"` Indices map[string]SnapshotIndexStats `json:"indices"` @@ -144,5 +144,3 @@ func NewStatus() *Status { return r } - -// false diff --git a/typedapi/types/statuserror.go b/typedapi/types/statuserror.go index 36b8fb96ed..3f92f757f3 100644 --- a/typedapi/types/statuserror.go +++ b/typedapi/types/statuserror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StatusError type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L44-L47 type StatusError struct { Index string `json:"index"` Message string `json:"message"` @@ -87,5 +87,3 @@ func NewStatusError() *StatusError { return r } - -// false diff --git a/typedapi/types/statusinprogress.go b/typedapi/types/statusinprogress.go index c4dca3de91..0f98100744 100644 --- a/typedapi/types/statusinprogress.go +++ b/typedapi/types/statusinprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StatusInProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L38-L42 type StatusInProgress struct { Index string `json:"index"` ReindexedDocCount int64 `json:"reindexed_doc_count"` @@ -106,5 +106,3 @@ func NewStatusInProgress() *StatusInProgress { return r } - -// false diff --git a/typedapi/types/stemmeroverridetokenfilter.go b/typedapi/types/stemmeroverridetokenfilter.go index 8540ea5610..0595b0386e 100644 --- a/typedapi/types/stemmeroverridetokenfilter.go +++ b/typedapi/types/stemmeroverridetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,15 @@ import ( // StemmerOverrideTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L315-L319 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L417-L423 type StemmerOverrideTokenFilter struct { - Rules []string `json:"rules,omitempty"` - RulesPath *string `json:"rules_path,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // Rules A list of mapping rules to use. + Rules []string `json:"rules,omitempty"` + // RulesPath A path (either relative to `config` location, or absolute) to a list of + // mappings. + RulesPath *string `json:"rules_path,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *StemmerOverrideTokenFilter) UnmarshalJSON(data []byte) error { @@ -107,13 +110,3 @@ func NewStemmerOverrideTokenFilter() *StemmerOverrideTokenFilter { return r } - -// true - -type StemmerOverrideTokenFilterVariant interface { - StemmerOverrideTokenFilterCaster() *StemmerOverrideTokenFilter -} - -func (s *StemmerOverrideTokenFilter) StemmerOverrideTokenFilterCaster() *StemmerOverrideTokenFilter { - return s -} diff --git a/typedapi/types/stemmertokenfilter.go b/typedapi/types/stemmertokenfilter.go index ad48bcca27..c8e43ad4b8 100644 --- a/typedapi/types/stemmertokenfilter.go +++ b/typedapi/types/stemmertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L321-L325 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L425-L429 type StemmerTokenFilter struct { Language *string `json:"language,omitempty"` Type string `json:"type,omitempty"` @@ -100,13 +100,3 @@ func NewStemmerTokenFilter() *StemmerTokenFilter { return r } - -// true - -type StemmerTokenFilterVariant interface { - StemmerTokenFilterCaster() *StemmerTokenFilter -} - -func (s *StemmerTokenFilter) StemmerTokenFilterCaster() *StemmerTokenFilter { - return s -} diff --git a/typedapi/types/stepkey.go b/typedapi/types/stepkey.go index 35bd662b69..ff75900f5b 100644 --- a/typedapi/types/stepkey.go +++ b/typedapi/types/stepkey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StepKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/move_to_step/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/move_to_step/types.ts#L20-L31 type StepKey struct { // Action The optional action to which the index will be moved. Action *string `json:"action,omitempty"` @@ -102,13 +102,3 @@ func NewStepKey() *StepKey { return r } - -// true - -type StepKeyVariant interface { - StepKeyCaster() *StepKey -} - -func (s *StepKey) StepKeyCaster() *StepKey { - return s -} diff --git a/typedapi/types/stopanalyzer.go b/typedapi/types/stopanalyzer.go index b3f70c1cd7..f8e8c3f608 100644 --- a/typedapi/types/stopanalyzer.go +++ b/typedapi/types/stopanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // StopAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L338-L343 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L338-L343 type StopAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *StopAnalyzer) UnmarshalJSON(data []byte) error { @@ -55,19 +55,8 @@ func (s *StopAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewStopAnalyzer() *StopAnalyzer { return r } - -// true - -type StopAnalyzerVariant interface { - StopAnalyzerCaster() *StopAnalyzer -} - -func (s *StopAnalyzer) StopAnalyzerCaster() *StopAnalyzer { - return s -} diff --git a/typedapi/types/stoptokenfilter.go b/typedapi/types/stoptokenfilter.go index 185edc429e..1a424b5dda 100644 --- a/typedapi/types/stoptokenfilter.go +++ b/typedapi/types/stoptokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,14 +31,24 @@ import ( // StopTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L96-L102 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L125-L136 type StopTokenFilter struct { - IgnoreCase *bool `json:"ignore_case,omitempty"` - RemoveTrailing *bool `json:"remove_trailing,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` - Version *string `json:"version,omitempty"` + // IgnoreCase If `true`, stop word matching is case insensitive. For example, if `true`, a + // stop word of the matches and removes `The`, `THE`, or `the`. Defaults to + // `false`. + IgnoreCase *bool `json:"ignore_case,omitempty"` + // RemoveTrailing If `true`, the last token of a stream is removed if it’s a stop word. + // Defaults to `true`. + RemoveTrailing *bool `json:"remove_trailing,omitempty"` + // Stopwords Language value, such as `_arabic_` or `_thai_`. Defaults to `_english_`. + Stopwords StopWords `json:"stopwords,omitempty"` + // StopwordsPath Path to a file that contains a list of stop words to remove. + // This path must be absolute or relative to the `config` location, and the file + // must be UTF-8 encoded. Each stop word in the file must be separated by a line + // break. + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` } func (s *StopTokenFilter) UnmarshalJSON(data []byte) error { @@ -85,19 +95,8 @@ func (s *StopTokenFilter) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -150,13 +149,3 @@ func NewStopTokenFilter() *StopTokenFilter { return r } - -// true - -type StopTokenFilterVariant interface { - StopTokenFilterCaster() *StopTokenFilter -} - -func (s *StopTokenFilter) StopTokenFilterCaster() *StopTokenFilter { - return s -} diff --git a/typedapi/types/stopwords.go b/typedapi/types/stopwords.go index d33666bb70..22a70d3c7e 100644 --- a/typedapi/types/stopwords.go +++ b/typedapi/types/stopwords.go @@ -16,15 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types -// StopWords type alias. +// StopWords holds the union for the following types: // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/StopWords.ts#L20-L26 -type StopWords []string - -type StopWordsVariant interface { - StopWordsCaster() *StopWords -} +// stopwordlanguage.StopWordLanguage +// []string +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/StopWords.ts#L60-L66 +type StopWords any diff --git a/typedapi/types/storage.go b/typedapi/types/storage.go index 0d4f835dc0..ce5fd23a07 100644 --- a/typedapi/types/storage.go +++ b/typedapi/types/storage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // Storage type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L534-L543 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L534-L545 type Storage struct { // AllowMmap You can restrict the use of the mmapfs and the related hybridfs store type // via the setting node.store.allow_mmap. @@ -42,8 +42,10 @@ type Storage struct { // setting is useful, for example, if you are in an environment where you can // not control the ability to create a lot // of memory maps so you need disable the ability to use memory-mapping. - AllowMmap *bool `json:"allow_mmap,omitempty"` - Type storagetype.StorageType `json:"type"` + AllowMmap *bool `json:"allow_mmap,omitempty"` + // StatsRefreshInterval How often store statistics are refreshed + StatsRefreshInterval Duration `json:"stats_refresh_interval,omitempty"` + Type storagetype.StorageType `json:"type"` } func (s *Storage) UnmarshalJSON(data []byte) error { @@ -75,6 +77,11 @@ func (s *Storage) UnmarshalJSON(data []byte) error { s.AllowMmap = &v } + case "stats_refresh_interval": + if err := dec.Decode(&s.StatsRefreshInterval); err != nil { + return fmt.Errorf("%s | %w", "StatsRefreshInterval", err) + } + case "type": if err := dec.Decode(&s.Type); err != nil { return fmt.Errorf("%s | %w", "Type", err) @@ -91,13 +98,3 @@ func NewStorage() *Storage { return r } - -// true - -type StorageVariant interface { - StorageCaster() *Storage -} - -func (s *Storage) StorageCaster() *Storage { - return s -} diff --git a/typedapi/types/storedscript.go b/typedapi/types/storedscript.go index 1483c162e6..69b44704e8 100644 --- a/typedapi/types/storedscript.go +++ b/typedapi/types/storedscript.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // StoredScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Scripting.ts#L47-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Scripting.ts#L47-L59 type StoredScript struct { // Lang The language the script is written in. // For serach templates, use `mustache`. @@ -97,13 +97,3 @@ func NewStoredScript() *StoredScript { return r } - -// true - -type StoredScriptVariant interface { - StoredScriptCaster() *StoredScript -} - -func (s *StoredScript) StoredScriptCaster() *StoredScript { - return s -} diff --git a/typedapi/types/storestats.go b/typedapi/types/storestats.go index 9feecc6d4b..63bffd6041 100644 --- a/typedapi/types/storestats.go +++ b/typedapi/types/storestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StoreStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L371-L398 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L395-L422 type StoreStats struct { // Reserved A prediction of how much larger the shard stores will eventually grow due to // ongoing peer recoveries, restoring snapshots, and similar activities. @@ -140,5 +140,3 @@ func NewStoreStats() *StoreStats { return r } - -// false diff --git a/typedapi/types/streamresult.go b/typedapi/types/streamresult.go index 2f1b34d34a..a0ab078c66 100644 --- a/typedapi/types/streamresult.go +++ b/typedapi/types/streamresult.go @@ -16,11 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // StreamResult type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Binary.ts#L27-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Binary.ts#L24-L24 type StreamResult []byte diff --git a/typedapi/types/stringifiedboolean.go b/typedapi/types/stringifiedboolean.go index 465cce79a5..1377bcf28e 100644 --- a/typedapi/types/stringifiedboolean.go +++ b/typedapi/types/stringifiedboolean.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // bool // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedboolean any - -type StringifiedbooleanVariant interface { - StringifiedbooleanCaster() *Stringifiedboolean -} diff --git a/typedapi/types/stringifieddouble.go b/typedapi/types/stringifieddouble.go index 404f347641..35c3d8cd7c 100644 --- a/typedapi/types/stringifieddouble.go +++ b/typedapi/types/stringifieddouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifieddouble any diff --git a/typedapi/types/stringifiedepochtimeunitmillis.go b/typedapi/types/stringifiedepochtimeunitmillis.go index 9de37432ab..0e75bccaf6 100644 --- a/typedapi/types/stringifiedepochtimeunitmillis.go +++ b/typedapi/types/stringifiedepochtimeunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitMillis any - -type StringifiedEpochTimeUnitMillisVariant interface { - StringifiedEpochTimeUnitMillisCaster() *StringifiedEpochTimeUnitMillis -} diff --git a/typedapi/types/stringifiedepochtimeunitseconds.go b/typedapi/types/stringifiedepochtimeunitseconds.go index 5a7adbe859..f9238ca546 100644 --- a/typedapi/types/stringifiedepochtimeunitseconds.go +++ b/typedapi/types/stringifiedepochtimeunitseconds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitSeconds any diff --git a/typedapi/types/stringifiedinteger.go b/typedapi/types/stringifiedinteger.go index e1ef6f818b..aa473bcd96 100644 --- a/typedapi/types/stringifiedinteger.go +++ b/typedapi/types/stringifiedinteger.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedinteger any - -type StringifiedintegerVariant interface { - StringifiedintegerCaster() *Stringifiedinteger -} diff --git a/typedapi/types/stringifiedversionnumber.go b/typedapi/types/stringifiedversionnumber.go index 71c043ce06..3fa6f0c914 100644 --- a/typedapi/types/stringifiedversionnumber.go +++ b/typedapi/types/stringifiedversionnumber.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedVersionNumber any diff --git a/typedapi/types/stringraretermsaggregate.go b/typedapi/types/stringraretermsaggregate.go index 82d79b6ac4..b55c72c85d 100644 --- a/typedapi/types/stringraretermsaggregate.go +++ b/typedapi/types/stringraretermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // StringRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L483-L487 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L483-L487 type StringRareTermsAggregate struct { Buckets BucketsStringRareTermsBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewStringRareTermsAggregate() *StringRareTermsAggregate { return r } - -// false diff --git a/typedapi/types/stringraretermsbucket.go b/typedapi/types/stringraretermsbucket.go index d75d53210f..87eced5c44 100644 --- a/typedapi/types/stringraretermsbucket.go +++ b/typedapi/types/stringraretermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // StringRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L489-L491 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L489-L491 type StringRareTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -643,5 +643,3 @@ func NewStringRareTermsBucket() *StringRareTermsBucket { return r } - -// false diff --git a/typedapi/types/stringstatsaggregate.go b/typedapi/types/stringstatsaggregate.go index 0d49ae0e83..87bff2d410 100644 --- a/typedapi/types/stringstatsaggregate.go +++ b/typedapi/types/stringstatsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L793-L804 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L795-L806 type StringStatsAggregate struct { AvgLength *Float64 `json:"avg_length,omitempty"` AvgLengthAsString *string `json:"avg_length_as_string,omitempty"` @@ -152,5 +152,3 @@ func NewStringStatsAggregate() *StringStatsAggregate { return r } - -// false diff --git a/typedapi/types/stringstatsaggregation.go b/typedapi/types/stringstatsaggregation.go index 5c6d32f588..b56f4c10e4 100644 --- a/typedapi/types/stringstatsaggregation.go +++ b/typedapi/types/stringstatsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L293-L299 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L316-L322 type StringStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -98,13 +98,3 @@ func NewStringStatsAggregation() *StringStatsAggregation { return r } - -// true - -type StringStatsAggregationVariant interface { - StringStatsAggregationCaster() *StringStatsAggregation -} - -func (s *StringStatsAggregation) StringStatsAggregationCaster() *StringStatsAggregation { - return s -} diff --git a/typedapi/types/stringtermsaggregate.go b/typedapi/types/stringtermsaggregate.go index ff54410e9f..695d58e6e7 100644 --- a/typedapi/types/stringtermsaggregate.go +++ b/typedapi/types/stringtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L424-L429 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L424-L429 type StringTermsAggregate struct { Buckets BucketsStringTermsBucket `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` @@ -121,5 +121,3 @@ func NewStringTermsAggregate() *StringTermsAggregate { return r } - -// false diff --git a/typedapi/types/stringtermsbucket.go b/typedapi/types/stringtermsbucket.go index 7787d4085f..6f5a7dd33a 100644 --- a/typedapi/types/stringtermsbucket.go +++ b/typedapi/types/stringtermsbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // StringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L435-L437 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L435-L437 type StringTermsBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -652,5 +652,3 @@ func NewStringTermsBucket() *StringTermsBucket { return r } - -// false diff --git a/typedapi/types/stupidbackoffsmoothingmodel.go b/typedapi/types/stupidbackoffsmoothingmodel.go index 140b2bec36..e2c9e1fa98 100644 --- a/typedapi/types/stupidbackoffsmoothingmodel.go +++ b/typedapi/types/stupidbackoffsmoothingmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // StupidBackoffSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L463-L468 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L463-L468 type StupidBackoffSmoothingModel struct { // Discount A constant factor that the lower order n-gram model is discounted by. Discount Float64 `json:"discount"` @@ -79,13 +79,3 @@ func NewStupidBackoffSmoothingModel() *StupidBackoffSmoothingModel { return r } - -// true - -type StupidBackoffSmoothingModelVariant interface { - StupidBackoffSmoothingModelCaster() *StupidBackoffSmoothingModel -} - -func (s *StupidBackoffSmoothingModel) StupidBackoffSmoothingModelCaster() *StupidBackoffSmoothingModel { - return s -} diff --git a/typedapi/types/suggest.go b/typedapi/types/suggest.go index 2f1ea2c417..3efe9161cf 100644 --- a/typedapi/types/suggest.go +++ b/typedapi/types/suggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,5 +26,5 @@ package types // PhraseSuggest // TermSuggest // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L34-L40 type Suggest any diff --git a/typedapi/types/suggestcontext.go b/typedapi/types/suggestcontext.go index f0838f558e..4dad2af92d 100644 --- a/typedapi/types/suggestcontext.go +++ b/typedapi/types/suggestcontext.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // SuggestContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L43-L48 type SuggestContext struct { Name string `json:"name"` Path *string `json:"path,omitempty"` - Precision string `json:"precision,omitempty"` + Precision *string `json:"precision,omitempty"` Type string `json:"type"` } @@ -74,7 +74,7 @@ func (s *SuggestContext) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Precision = o + s.Precision = &o case "type": var tmp json.RawMessage @@ -99,13 +99,3 @@ func NewSuggestContext() *SuggestContext { return r } - -// true - -type SuggestContextVariant interface { - SuggestContextCaster() *SuggestContext -} - -func (s *SuggestContext) SuggestContextCaster() *SuggestContext { - return s -} diff --git a/typedapi/types/suggester.go b/typedapi/types/suggester.go index 57d9028a73..20e41d5b6b 100644 --- a/typedapi/types/suggester.go +++ b/typedapi/types/suggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Suggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L101-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L101-L107 type Suggester struct { Suggesters map[string]FieldSuggester `json:"-"` // Text Global suggest text, to avoid repetition when the same text is used in @@ -121,13 +121,3 @@ func NewSuggester() *Suggester { return r } - -// true - -type SuggesterVariant interface { - SuggesterCaster() *Suggester -} - -func (s *Suggester) SuggesterCaster() *Suggester { - return s -} diff --git a/typedapi/types/suggestfuzziness.go b/typedapi/types/suggestfuzziness.go index 6dcc045b7a..963d32febc 100644 --- a/typedapi/types/suggestfuzziness.go +++ b/typedapi/types/suggestfuzziness.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SuggestFuzziness type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L196-L224 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L196-L224 type SuggestFuzziness struct { // Fuzziness The fuzziness factor. Fuzziness Fuzziness `json:"fuzziness,omitempty"` @@ -138,13 +138,3 @@ func NewSuggestFuzziness() *SuggestFuzziness { return r } - -// true - -type SuggestFuzzinessVariant interface { - SuggestFuzzinessCaster() *SuggestFuzziness -} - -func (s *SuggestFuzziness) SuggestFuzzinessCaster() *SuggestFuzziness { - return s -} diff --git a/typedapi/types/sumaggregate.go b/typedapi/types/sumaggregate.go index be8c98e3e2..741d014d76 100644 --- a/typedapi/types/sumaggregate.go +++ b/typedapi/types/sumaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SumAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L211-L216 type SumAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewSumAggregate() *SumAggregate { return r } - -// false diff --git a/typedapi/types/sumaggregation.go b/typedapi/types/sumaggregation.go index e9bd1c8c99..180df866aa 100644 --- a/typedapi/types/sumaggregation.go +++ b/typedapi/types/sumaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L301-L301 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L324-L324 type SumAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -95,13 +95,3 @@ func NewSumAggregation() *SumAggregation { return r } - -// true - -type SumAggregationVariant interface { - SumAggregationCaster() *SumAggregation -} - -func (s *SumAggregation) SumAggregationCaster() *SumAggregation { - return s -} diff --git a/typedapi/types/sumbucketaggregation.go b/typedapi/types/sumbucketaggregation.go index 6b8e501710..fe83d2afbc 100644 --- a/typedapi/types/sumbucketaggregation.go +++ b/typedapi/types/sumbucketaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // SumBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/pipeline.ts#L412-L415 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/pipeline.ts#L412-L415 type SumBucketAggregation struct { // BucketsPath Path to the buckets that contain one set of values to correlate. BucketsPath BucketsPath `json:"buckets_path,omitempty"` @@ -93,13 +93,3 @@ func NewSumBucketAggregation() *SumBucketAggregation { return r } - -// true - -type SumBucketAggregationVariant interface { - SumBucketAggregationCaster() *SumBucketAggregation -} - -func (s *SumBucketAggregation) SumBucketAggregationCaster() *SumBucketAggregation { - return s -} diff --git a/typedapi/types/summary.go b/typedapi/types/summary.go index be2b05b738..7d804dbf5b 100644 --- a/typedapi/types/summary.go +++ b/typedapi/types/summary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // Summary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/enrich/_types/Policy.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/enrich/_types/Policy.ts#L24-L26 type Summary struct { Config map[policytype.PolicyType]EnrichPolicy `json:"config"` } @@ -39,5 +39,3 @@ func NewSummary() *Summary { return r } - -// false diff --git a/typedapi/types/summaryinfo.go b/typedapi/types/summaryinfo.go index 0974125f26..5945944a8f 100644 --- a/typedapi/types/summaryinfo.go +++ b/typedapi/types/summaryinfo.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202 type SummaryInfo struct { // Read A collection of statistics that summarise the results of the read operations // in the test. @@ -38,5 +38,3 @@ func NewSummaryInfo() *SummaryInfo { return r } - -// false diff --git a/typedapi/types/swedishanalyzer.go b/typedapi/types/swedishanalyzer.go index 32b71207d2..54334ef422 100644 --- a/typedapi/types/swedishanalyzer.go +++ b/typedapi/types/swedishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // SwedishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L283-L288 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L283-L288 type SwedishAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *SwedishAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *SwedishAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewSwedishAnalyzer() *SwedishAnalyzer { return r } - -// true - -type SwedishAnalyzerVariant interface { - SwedishAnalyzerCaster() *SwedishAnalyzer -} - -func (s *SwedishAnalyzer) SwedishAnalyzerCaster() *SwedishAnalyzer { - return s -} diff --git a/typedapi/types/synccontainer.go b/typedapi/types/synccontainer.go index d8cf3d7288..948d46b893 100644 --- a/typedapi/types/synccontainer.go +++ b/typedapi/types/synccontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // SyncContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L169-L175 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L169-L175 type SyncContainer struct { AdditionalSyncContainerProperty map[string]json.RawMessage `json:"-"` // Time Specifies that the transform uses a time field to synchronize the source and @@ -72,13 +72,3 @@ func NewSyncContainer() *SyncContainer { return r } - -// true - -type SyncContainerVariant interface { - SyncContainerCaster() *SyncContainer -} - -func (s *SyncContainer) SyncContainerCaster() *SyncContainer { - return s -} diff --git a/typedapi/types/syncjobconnectorreference.go b/typedapi/types/syncjobconnectorreference.go index 4eea498fb1..6c7c27a6a2 100644 --- a/typedapi/types/syncjobconnectorreference.go +++ b/typedapi/types/syncjobconnectorreference.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SyncJobConnectorReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/SyncJob.ts#L31-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/SyncJob.ts#L31-L40 type SyncJobConnectorReference struct { Configuration ConnectorConfiguration `json:"configuration"` Filtering FilteringRules `json:"filtering"` @@ -130,5 +130,3 @@ func NewSyncJobConnectorReference() *SyncJobConnectorReference { return r } - -// false diff --git a/typedapi/types/syncrulesfeature.go b/typedapi/types/syncrulesfeature.go index 12891f1da8..4624be345c 100644 --- a/typedapi/types/syncrulesfeature.go +++ b/typedapi/types/syncrulesfeature.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // SyncRulesFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L219-L228 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L219-L228 type SyncRulesFeature struct { // Advanced Indicates whether advanced sync rules are enabled. Advanced *FeatureEnabled `json:"advanced,omitempty"` @@ -36,13 +36,3 @@ func NewSyncRulesFeature() *SyncRulesFeature { return r } - -// true - -type SyncRulesFeatureVariant interface { - SyncRulesFeatureCaster() *SyncRulesFeature -} - -func (s *SyncRulesFeature) SyncRulesFeatureCaster() *SyncRulesFeature { - return s -} diff --git a/typedapi/types/synonymgraphtokenfilter.go b/typedapi/types/synonymgraphtokenfilter.go index e19e8de73b..cb2c92b021 100644 --- a/typedapi/types/synonymgraphtokenfilter.go +++ b/typedapi/types/synonymgraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,18 +33,31 @@ import ( // SynonymGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L109-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L163-L165 type SynonymGraphTokenFilter struct { - Expand *bool `json:"expand,omitempty"` - Format *synonymformat.SynonymFormat `json:"format,omitempty"` - Lenient *bool `json:"lenient,omitempty"` - Synonyms []string `json:"synonyms,omitempty"` - SynonymsPath *string `json:"synonyms_path,omitempty"` - SynonymsSet *string `json:"synonyms_set,omitempty"` - Tokenizer *string `json:"tokenizer,omitempty"` - Type string `json:"type,omitempty"` - Updateable *bool `json:"updateable,omitempty"` - Version *string `json:"version,omitempty"` + // Expand Expands definitions for equivalent synonym rules. Defaults to `true`. + Expand *bool `json:"expand,omitempty"` + // Format Sets the synonym rules format. + Format *synonymformat.SynonymFormat `json:"format,omitempty"` + // Lenient If `true` ignores errors while parsing the synonym rules. It is important to + // note that only those synonym rules which cannot get parsed are ignored. + // Defaults to the value of the `updateable` setting. + Lenient *bool `json:"lenient,omitempty"` + // Synonyms Used to define inline synonyms. + Synonyms []string `json:"synonyms,omitempty"` + // SynonymsPath Used to provide a synonym file. This path must be absolute or relative to the + // `config` location. + SynonymsPath *string `json:"synonyms_path,omitempty"` + // SynonymsSet Provide a synonym set created via Synonyms Management APIs. + SynonymsSet *string `json:"synonyms_set,omitempty"` + // Tokenizer Controls the tokenizers that will be used to tokenize the synonym, this + // parameter is for backwards compatibility for indices that created before 6.0. + Tokenizer *string `json:"tokenizer,omitempty"` + Type string `json:"type,omitempty"` + // Updateable If `true` allows reloading search analyzers to pick up changes to synonym + // files. Only to be used for search analyzers. Defaults to `false`. + Updateable *bool `json:"updateable,omitempty"` + Version *string `json:"version,omitempty"` } func (s *SynonymGraphTokenFilter) UnmarshalJSON(data []byte) error { @@ -192,13 +205,3 @@ func NewSynonymGraphTokenFilter() *SynonymGraphTokenFilter { return r } - -// true - -type SynonymGraphTokenFilterVariant interface { - SynonymGraphTokenFilterCaster() *SynonymGraphTokenFilter -} - -func (s *SynonymGraphTokenFilter) SynonymGraphTokenFilterCaster() *SynonymGraphTokenFilter { - return s -} diff --git a/typedapi/types/synonymrule.go b/typedapi/types/synonymrule.go index dcc3f829f3..d9bdd30240 100644 --- a/typedapi/types/synonymrule.go +++ b/typedapi/types/synonymrule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SynonymRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/_types/SynonymRule.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/_types/SynonymRule.ts#L26-L37 type SynonymRule struct { // Id The identifier for the synonym rule. // If you do not specify a synonym rule ID when you create a rule, an identifier @@ -76,13 +76,3 @@ func NewSynonymRule() *SynonymRule { return r } - -// true - -type SynonymRuleVariant interface { - SynonymRuleCaster() *SynonymRule -} - -func (s *SynonymRule) SynonymRuleCaster() *SynonymRule { - return s -} diff --git a/typedapi/types/synonymruleread.go b/typedapi/types/synonymruleread.go index 20287c06da..7387f2f655 100644 --- a/typedapi/types/synonymruleread.go +++ b/typedapi/types/synonymruleread.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // SynonymRuleRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/_types/SynonymRule.ts#L40-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/_types/SynonymRule.ts#L40-L49 type SynonymRuleRead struct { // Id Synonym Rule identifier Id string `json:"id"` @@ -75,5 +75,3 @@ func NewSynonymRuleRead() *SynonymRuleRead { return r } - -// false diff --git a/typedapi/types/synonymssetitem.go b/typedapi/types/synonymssetitem.go index 96632d5e56..7951280d64 100644 --- a/typedapi/types/synonymssetitem.go +++ b/typedapi/types/synonymssetitem.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // SynonymsSetItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L36-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L36-L45 type SynonymsSetItem struct { // Count Number of synonym rules that the synonym set contains Count int `json:"count"` @@ -86,5 +86,3 @@ func NewSynonymsSetItem() *SynonymsSetItem { return r } - -// false diff --git a/typedapi/types/nodeinfonetwork.go b/typedapi/types/synonymsstats.go similarity index 59% rename from typedapi/types/nodeinfonetwork.go rename to typedapi/types/synonymsstats.go index 6a75fb8e7e..f98864d218 100644 --- a/typedapi/types/nodeinfonetwork.go +++ b/typedapi/types/synonymsstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,15 +29,15 @@ import ( "strconv" ) -// NodeInfoNetwork type. +// SynonymsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/info/types.ts#L336-L339 -type NodeInfoNetwork struct { - PrimaryInterface NodeInfoNetworkInterface `json:"primary_interface"` - RefreshInterval int `json:"refresh_interval"` +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/stats/types.ts#L354-L357 +type SynonymsStats struct { + Count int `json:"count"` + IndexCount int `json:"index_count"` } -func (s *NodeInfoNetwork) UnmarshalJSON(data []byte) error { +func (s *SynonymsStats) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -52,12 +52,23 @@ func (s *NodeInfoNetwork) UnmarshalJSON(data []byte) error { switch t { - case "primary_interface": - if err := dec.Decode(&s.PrimaryInterface); err != nil { - return fmt.Errorf("%s | %w", "PrimaryInterface", err) + case "count": + + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.Atoi(v) + if err != nil { + return fmt.Errorf("%s | %w", "Count", err) + } + s.Count = value + case float64: + f := int(v) + s.Count = f } - case "refresh_interval": + case "index_count": var tmp any dec.Decode(&tmp) @@ -65,12 +76,12 @@ func (s *NodeInfoNetwork) UnmarshalJSON(data []byte) error { case string: value, err := strconv.Atoi(v) if err != nil { - return fmt.Errorf("%s | %w", "RefreshInterval", err) + return fmt.Errorf("%s | %w", "IndexCount", err) } - s.RefreshInterval = value + s.IndexCount = value case float64: f := int(v) - s.RefreshInterval = f + s.IndexCount = f } } @@ -78,11 +89,9 @@ func (s *NodeInfoNetwork) UnmarshalJSON(data []byte) error { return nil } -// NewNodeInfoNetwork returns a NodeInfoNetwork. -func NewNodeInfoNetwork() *NodeInfoNetwork { - r := &NodeInfoNetwork{} +// NewSynonymsStats returns a SynonymsStats. +func NewSynonymsStats() *SynonymsStats { + r := &SynonymsStats{} return r } - -// false diff --git a/typedapi/types/synonymtokenfilter.go b/typedapi/types/synonymtokenfilter.go index 0076e05d29..ba04c8cdfd 100644 --- a/typedapi/types/synonymtokenfilter.go +++ b/typedapi/types/synonymtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,18 +33,31 @@ import ( // SynonymTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L121-L131 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L167-L169 type SynonymTokenFilter struct { - Expand *bool `json:"expand,omitempty"` - Format *synonymformat.SynonymFormat `json:"format,omitempty"` - Lenient *bool `json:"lenient,omitempty"` - Synonyms []string `json:"synonyms,omitempty"` - SynonymsPath *string `json:"synonyms_path,omitempty"` - SynonymsSet *string `json:"synonyms_set,omitempty"` - Tokenizer *string `json:"tokenizer,omitempty"` - Type string `json:"type,omitempty"` - Updateable *bool `json:"updateable,omitempty"` - Version *string `json:"version,omitempty"` + // Expand Expands definitions for equivalent synonym rules. Defaults to `true`. + Expand *bool `json:"expand,omitempty"` + // Format Sets the synonym rules format. + Format *synonymformat.SynonymFormat `json:"format,omitempty"` + // Lenient If `true` ignores errors while parsing the synonym rules. It is important to + // note that only those synonym rules which cannot get parsed are ignored. + // Defaults to the value of the `updateable` setting. + Lenient *bool `json:"lenient,omitempty"` + // Synonyms Used to define inline synonyms. + Synonyms []string `json:"synonyms,omitempty"` + // SynonymsPath Used to provide a synonym file. This path must be absolute or relative to the + // `config` location. + SynonymsPath *string `json:"synonyms_path,omitempty"` + // SynonymsSet Provide a synonym set created via Synonyms Management APIs. + SynonymsSet *string `json:"synonyms_set,omitempty"` + // Tokenizer Controls the tokenizers that will be used to tokenize the synonym, this + // parameter is for backwards compatibility for indices that created before 6.0. + Tokenizer *string `json:"tokenizer,omitempty"` + Type string `json:"type,omitempty"` + // Updateable If `true` allows reloading search analyzers to pick up changes to synonym + // files. Only to be used for search analyzers. Defaults to `false`. + Updateable *bool `json:"updateable,omitempty"` + Version *string `json:"version,omitempty"` } func (s *SynonymTokenFilter) UnmarshalJSON(data []byte) error { @@ -192,13 +205,3 @@ func NewSynonymTokenFilter() *SynonymTokenFilter { return r } - -// true - -type SynonymTokenFilterVariant interface { - SynonymTokenFilterCaster() *SynonymTokenFilter -} - -func (s *SynonymTokenFilter) SynonymTokenFilterCaster() *SynonymTokenFilter { - return s -} diff --git a/typedapi/types/tablevaluescontainer.go b/typedapi/types/tablevaluescontainer.go index 1cd02da1e7..89be71d8c3 100644 --- a/typedapi/types/tablevaluescontainer.go +++ b/typedapi/types/tablevaluescontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // TableValuesContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/_types/TableValuesContainer.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/TableValuesContainer.ts#L22-L28 type TableValuesContainer struct { AdditionalTableValuesContainerProperty map[string]json.RawMessage `json:"-"` Float64 [][]Float64 `json:"double,omitempty"` @@ -73,13 +73,3 @@ func NewTableValuesContainer() *TableValuesContainer { return r } - -// true - -type TableValuesContainerVariant interface { - TableValuesContainerCaster() *TableValuesContainer -} - -func (s *TableValuesContainer) TableValuesContainerCaster() *TableValuesContainer { - return s -} diff --git a/typedapi/types/tablevaluesintegervalue.go b/typedapi/types/tablevaluesintegervalue.go index eaba7579bf..3c7306d3e9 100644 --- a/typedapi/types/tablevaluesintegervalue.go +++ b/typedapi/types/tablevaluesintegervalue.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TableValuesIntegerValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/_types/TableValuesContainer.ts#L30-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/TableValuesContainer.ts#L30-L30 type TableValuesIntegerValue []int - -type TableValuesIntegerValueVariant interface { - TableValuesIntegerValueCaster() *TableValuesIntegerValue -} diff --git a/typedapi/types/tablevalueskeywordvalue.go b/typedapi/types/tablevalueskeywordvalue.go index 3abcfd2eec..b770585198 100644 --- a/typedapi/types/tablevalueskeywordvalue.go +++ b/typedapi/types/tablevalueskeywordvalue.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TableValuesKeywordValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/_types/TableValuesContainer.ts#L31-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/TableValuesContainer.ts#L31-L31 type TableValuesKeywordValue []string - -type TableValuesKeywordValueVariant interface { - TableValuesKeywordValueCaster() *TableValuesKeywordValue -} diff --git a/typedapi/types/tablevalueslongdouble.go b/typedapi/types/tablevalueslongdouble.go index d85d043de0..20740550e9 100644 --- a/typedapi/types/tablevalueslongdouble.go +++ b/typedapi/types/tablevalueslongdouble.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TableValuesLongDouble type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/_types/TableValuesContainer.ts#L33-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/TableValuesContainer.ts#L33-L33 type TableValuesLongDouble []Float64 - -type TableValuesLongDoubleVariant interface { - TableValuesLongDoubleCaster() *TableValuesLongDouble -} diff --git a/typedapi/types/tablevalueslongvalue.go b/typedapi/types/tablevalueslongvalue.go index c833c3c6e6..f958d3fc4e 100644 --- a/typedapi/types/tablevalueslongvalue.go +++ b/typedapi/types/tablevalueslongvalue.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TableValuesLongValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/esql/_types/TableValuesContainer.ts#L32-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/esql/_types/TableValuesContainer.ts#L32-L32 type TableValuesLongValue []int64 - -type TableValuesLongValueVariant interface { - TableValuesLongValueCaster() *TableValuesLongValue -} diff --git a/typedapi/types/targetmeanencodingpreprocessor.go b/typedapi/types/targetmeanencodingpreprocessor.go index ecb97f195c..833185ddab 100644 --- a/typedapi/types/targetmeanencodingpreprocessor.go +++ b/typedapi/types/targetmeanencodingpreprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TargetMeanEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L49-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L49-L54 type TargetMeanEncodingPreprocessor struct { DefaultValue Float64 `json:"default_value"` FeatureName string `json:"feature_name"` @@ -115,13 +115,3 @@ func NewTargetMeanEncodingPreprocessor() *TargetMeanEncodingPreprocessor { return r } - -// true - -type TargetMeanEncodingPreprocessorVariant interface { - TargetMeanEncodingPreprocessorCaster() *TargetMeanEncodingPreprocessor -} - -func (s *TargetMeanEncodingPreprocessor) TargetMeanEncodingPreprocessorCaster() *TargetMeanEncodingPreprocessor { - return s -} diff --git a/typedapi/types/taskfailure.go b/typedapi/types/taskfailure.go index e320dfe7d7..4363eb3bda 100644 --- a/typedapi/types/taskfailure.go +++ b/typedapi/types/taskfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TaskFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Errors.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Errors.ts#L67-L72 type TaskFailure struct { NodeId string `json:"node_id"` Reason ErrorCause `json:"reason"` @@ -102,5 +102,3 @@ func NewTaskFailure() *TaskFailure { return r } - -// false diff --git a/typedapi/types/taskid.go b/typedapi/types/taskid.go index 75552f798d..0c32b265bd 100644 --- a/typedapi/types/taskid.go +++ b/typedapi/types/taskid.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L136-L136 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L136-L136 type TaskId any diff --git a/typedapi/types/taskinfo.go b/typedapi/types/taskinfo.go index 6ac5385bca..c698b5ef7a 100644 --- a/typedapi/types/taskinfo.go +++ b/typedapi/types/taskinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/_types/TaskInfo.ts#L32-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/_types/TaskInfo.ts#L32-L58 type TaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` @@ -210,5 +210,3 @@ func NewTaskInfo() *TaskInfo { return r } - -// false diff --git a/typedapi/types/taskinfos.go b/typedapi/types/taskinfos.go index a375247c8a..84a867182a 100644 --- a/typedapi/types/taskinfos.go +++ b/typedapi/types/taskinfos.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // []TaskInfo // map[string]ParentTaskInfo // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 type TaskInfos any diff --git a/typedapi/types/tasksrecord.go b/typedapi/types/tasksrecord.go index 8fb7e7a913..4613af6f0b 100644 --- a/typedapi/types/tasksrecord.go +++ b/typedapi/types/tasksrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/tasks/types.ts#L22-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/tasks/types.ts#L22-L101 type TasksRecord struct { // Action The task action. Action *string `json:"action,omitempty"` @@ -257,5 +257,3 @@ func NewTasksRecord() *TasksRecord { return r } - -// false diff --git a/typedapi/types/tdigest.go b/typedapi/types/tdigest.go index 8468044909..8f94a0800c 100644 --- a/typedapi/types/tdigest.go +++ b/typedapi/types/tdigest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,16 +27,25 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/tdigestexecutionhint" ) // TDigest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L232-L237 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L244-L255 type TDigest struct { // Compression Limits the maximum number of nodes used by the underlying TDigest algorithm // to `20 * compression`, enabling control of memory usage and approximation // error. Compression *int `json:"compression,omitempty"` + // ExecutionHint The default implementation of TDigest is optimized for performance, scaling + // to millions or even billions of sample values while maintaining acceptable + // accuracy levels (close to 1% relative error for millions of samples in some + // cases). + // To use an implementation optimized for accuracy, set this parameter to + // high_accuracy instead. + ExecutionHint *tdigestexecutionhint.TDigestExecutionHint `json:"execution_hint,omitempty"` } func (s *TDigest) UnmarshalJSON(data []byte) error { @@ -70,6 +79,11 @@ func (s *TDigest) UnmarshalJSON(data []byte) error { s.Compression = &f } + case "execution_hint": + if err := dec.Decode(&s.ExecutionHint); err != nil { + return fmt.Errorf("%s | %w", "ExecutionHint", err) + } + } } return nil @@ -81,13 +95,3 @@ func NewTDigest() *TDigest { return r } - -// true - -type TDigestVariant interface { - TDigestCaster() *TDigest -} - -func (s *TDigest) TDigestCaster() *TDigest { - return s -} diff --git a/typedapi/types/tdigestpercentileranksaggregate.go b/typedapi/types/tdigestpercentileranksaggregate.go index 25fbd888ea..24268f6388 100644 --- a/typedapi/types/tdigestpercentileranksaggregate.go +++ b/typedapi/types/tdigestpercentileranksaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TDigestPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L177-L178 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L177-L178 type TDigestPercentileRanksAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` @@ -88,5 +88,3 @@ func NewTDigestPercentileRanksAggregate() *TDigestPercentileRanksAggregate { return r } - -// false diff --git a/typedapi/types/tdigestpercentilesaggregate.go b/typedapi/types/tdigestpercentilesaggregate.go index 599ff26f38..a9c1bf0018 100644 --- a/typedapi/types/tdigestpercentilesaggregate.go +++ b/typedapi/types/tdigestpercentilesaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TDigestPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L174-L175 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L174-L175 type TDigestPercentilesAggregate struct { Meta Metadata `json:"meta,omitempty"` Values Percentiles `json:"values"` @@ -88,5 +88,3 @@ func NewTDigestPercentilesAggregate() *TDigestPercentilesAggregate { return r } - -// false diff --git a/typedapi/types/template.go b/typedapi/types/template.go index 56551d08e8..019308109c 100644 --- a/typedapi/types/template.go +++ b/typedapi/types/template.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Template type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 type Template struct { Aliases map[string]Alias `json:"aliases"` Mappings TypeMapping `json:"mappings"` @@ -37,5 +37,3 @@ func NewTemplate() *Template { return r } - -// false diff --git a/typedapi/types/templateconfig.go b/typedapi/types/templateconfig.go index 2b5e4b3003..f3334bee8b 100644 --- a/typedapi/types/templateconfig.go +++ b/typedapi/types/templateconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TemplateConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/msearch_template/types.ts#L28-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/msearch_template/types.ts#L28-L54 type TemplateConfig struct { // Explain If `true`, returns detailed information about score calculation as part of // each hit. @@ -133,13 +133,3 @@ func NewTemplateConfig() *TemplateConfig { return r } - -// true - -type TemplateConfigVariant interface { - TemplateConfigCaster() *TemplateConfig -} - -func (s *TemplateConfig) TemplateConfigCaster() *TemplateConfig { - return s -} diff --git a/typedapi/types/templatemapping.go b/typedapi/types/templatemapping.go index 7211a08ed5..46585b44f7 100644 --- a/typedapi/types/templatemapping.go +++ b/typedapi/types/templatemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/TemplateMapping.ts#L27-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/TemplateMapping.ts#L27-L34 type TemplateMapping struct { Aliases map[string]Alias `json:"aliases"` IndexPatterns []string `json:"index_patterns"` @@ -117,5 +117,3 @@ func NewTemplateMapping() *TemplateMapping { return r } - -// false diff --git a/typedapi/types/templatesrecord.go b/typedapi/types/templatesrecord.go index 0c83d2bd07..3bba2583d3 100644 --- a/typedapi/types/templatesrecord.go +++ b/typedapi/types/templatesrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TemplatesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/templates/types.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/templates/types.ts#L22-L48 type TemplatesRecord struct { // ComposedOf The component templates that comprise the index template. ComposedOf *string `json:"composed_of,omitempty"` @@ -117,5 +117,3 @@ func NewTemplatesRecord() *TemplatesRecord { return r } - -// false diff --git a/typedapi/types/term.go b/typedapi/types/term.go index c500c57ee1..45b276c503 100644 --- a/typedapi/types/term.go +++ b/typedapi/types/term.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Term type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/types.ts#L34-L40 type Term struct { DocFreq *int `json:"doc_freq,omitempty"` Score *Float64 `json:"score,omitempty"` @@ -135,5 +135,3 @@ func NewTerm() *Term { return r } - -// false diff --git a/typedapi/types/terminateprocessor.go b/typedapi/types/terminateprocessor.go index e99c9e65ae..282f0b0e76 100644 --- a/typedapi/types/terminateprocessor.go +++ b/typedapi/types/terminateprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TerminateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1541-L1541 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1541-L1541 type TerminateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -128,13 +128,3 @@ func NewTerminateProcessor() *TerminateProcessor { return r } - -// true - -type TerminateProcessorVariant interface { - TerminateProcessorCaster() *TerminateProcessor -} - -func (s *TerminateProcessor) TerminateProcessorCaster() *TerminateProcessor { - return s -} diff --git a/typedapi/types/termquery.go b/typedapi/types/termquery.go index c14acb8e3a..e22ddd2223 100644 --- a/typedapi/types/termquery.go +++ b/typedapi/types/termquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L238-L255 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L238-L255 type TermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -127,13 +127,3 @@ func NewTermQuery() *TermQuery { return r } - -// true - -type TermQueryVariant interface { - TermQueryCaster() *TermQuery -} - -func (s *TermQuery) TermQueryCaster() *TermQuery { - return s -} diff --git a/typedapi/types/termrangequery.go b/typedapi/types/termrangequery.go index f26ec9d613..a333ef028d 100644 --- a/typedapi/types/termrangequery.go +++ b/typedapi/types/termrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TermRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L174-L174 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L174-L174 type TermRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -187,13 +187,3 @@ func NewTermRangeQuery() *TermRangeQuery { return r } - -// true - -type TermRangeQueryVariant interface { - TermRangeQueryCaster() *TermRangeQuery -} - -func (s *TermRangeQuery) TermRangeQueryCaster() *TermRangeQuery { - return s -} diff --git a/typedapi/types/termsaggregation.go b/typedapi/types/termsaggregation.go index 2de9992908..175ec6e4ce 100644 --- a/typedapi/types/termsaggregation.go +++ b/typedapi/types/termsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // TermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L963-L1031 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L963-L1031 type TermsAggregation struct { // CollectMode Determines how child aggregations should be calculated: breadth-first or // depth-first. @@ -326,13 +326,3 @@ func NewTermsAggregation() *TermsAggregation { return r } - -// true - -type TermsAggregationVariant interface { - TermsAggregationCaster() *TermsAggregation -} - -func (s *TermsAggregation) TermsAggregationCaster() *TermsAggregation { - return s -} diff --git a/typedapi/types/termsexclude.go b/typedapi/types/termsexclude.go index 5cc85aa1f9..8667043572 100644 --- a/typedapi/types/termsexclude.go +++ b/typedapi/types/termsexclude.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TermsExclude type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1077-L1078 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1077-L1078 type TermsExclude []string - -type TermsExcludeVariant interface { - TermsExcludeCaster() *TermsExclude -} diff --git a/typedapi/types/termsgrouping.go b/typedapi/types/termsgrouping.go index 556f9c176c..36959833d1 100644 --- a/typedapi/types/termsgrouping.go +++ b/typedapi/types/termsgrouping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TermsGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/rollup/_types/Groupings.ts#L75-L82 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/rollup/_types/Groupings.ts#L75-L82 type TermsGrouping struct { // Fields The set of fields that you wish to collect terms for. // This array can contain fields that are both keyword and numerics. @@ -80,13 +80,3 @@ func NewTermsGrouping() *TermsGrouping { return r } - -// true - -type TermsGroupingVariant interface { - TermsGroupingCaster() *TermsGrouping -} - -func (s *TermsGrouping) TermsGroupingCaster() *TermsGrouping { - return s -} diff --git a/typedapi/types/termsinclude.go b/typedapi/types/termsinclude.go index 562238f73b..5d5929bb68 100644 --- a/typedapi/types/termsinclude.go +++ b/typedapi/types/termsinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,9 +26,5 @@ package types // []string // TermsPartition // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1074-L1075 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1074-L1075 type TermsInclude any - -type TermsIncludeVariant interface { - TermsIncludeCaster() *TermsInclude -} diff --git a/typedapi/types/termslookup.go b/typedapi/types/termslookup.go index 17fd94dc79..36fb448a6c 100644 --- a/typedapi/types/termslookup.go +++ b/typedapi/types/termslookup.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TermsLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L270-L275 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L270-L275 type TermsLookup struct { Id string `json:"id"` Index string `json:"index"` @@ -84,13 +84,3 @@ func NewTermsLookup() *TermsLookup { return r } - -// true - -type TermsLookupVariant interface { - TermsLookupCaster() *TermsLookup -} - -func (s *TermsLookup) TermsLookupCaster() *TermsLookup { - return s -} diff --git a/typedapi/types/termspartition.go b/typedapi/types/termspartition.go index b404436bdf..82d0082849 100644 --- a/typedapi/types/termspartition.go +++ b/typedapi/types/termspartition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermsPartition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1080-L1089 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1080-L1089 type TermsPartition struct { // NumPartitions The number of partitions. NumPartitions int64 `json:"num_partitions"` @@ -95,13 +95,3 @@ func NewTermsPartition() *TermsPartition { return r } - -// true - -type TermsPartitionVariant interface { - TermsPartitionCaster() *TermsPartition -} - -func (s *TermsPartition) TermsPartitionCaster() *TermsPartition { - return s -} diff --git a/typedapi/types/termsquery.go b/typedapi/types/termsquery.go index 9bd5f7f32d..bff13339fd 100644 --- a/typedapi/types/termsquery.go +++ b/typedapi/types/termsquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L257-L263 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L257-L263 type TermsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -141,13 +141,3 @@ func NewTermsQuery() *TermsQuery { return r } - -// true - -type TermsQueryVariant interface { - TermsQueryCaster() *TermsQuery -} - -func (s *TermsQuery) TermsQueryCaster() *TermsQuery { - return s -} diff --git a/typedapi/types/termsqueryfield.go b/typedapi/types/termsqueryfield.go index d44af16508..0a6defb203 100644 --- a/typedapi/types/termsqueryfield.go +++ b/typedapi/types/termsqueryfield.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // []FieldValue // TermsLookup // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L265-L268 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L265-L268 type TermsQueryField any - -type TermsQueryFieldVariant interface { - TermsQueryFieldCaster() *TermsQueryField -} diff --git a/typedapi/types/termssetquery.go b/typedapi/types/termssetquery.go index 3d74be9924..96aa6bdacc 100644 --- a/typedapi/types/termssetquery.go +++ b/typedapi/types/termssetquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermsSetQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L277-L299 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L277-L299 type TermsSetQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -127,13 +127,3 @@ func NewTermsSetQuery() *TermsSetQuery { return r } - -// true - -type TermsSetQueryVariant interface { - TermsSetQueryCaster() *TermsSetQuery -} - -func (s *TermsSetQuery) TermsSetQueryCaster() *TermsSetQuery { - return s -} diff --git a/typedapi/types/termsuggest.go b/typedapi/types/termsuggest.go index 6999b381f0..6b26604144 100644 --- a/typedapi/types/termsuggest.go +++ b/typedapi/types/termsuggest.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L64-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L64-L69 type TermSuggest struct { Length int `json:"length"` Offset int `json:"offset"` @@ -125,5 +125,3 @@ func NewTermSuggest() *TermSuggest { return r } - -// false diff --git a/typedapi/types/termsuggester.go b/typedapi/types/termsuggester.go index 811f52ac35..9b7f0ab8c8 100644 --- a/typedapi/types/termsuggester.go +++ b/typedapi/types/termsuggester.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -35,7 +35,7 @@ import ( // TermSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L506-L568 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L506-L568 type TermSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. @@ -300,13 +300,3 @@ func NewTermSuggester() *TermSuggester { return r } - -// true - -type TermSuggesterVariant interface { - TermSuggesterCaster() *TermSuggester -} - -func (s *TermSuggester) TermSuggesterCaster() *TermSuggester { - return s -} diff --git a/typedapi/types/termsuggestoption.go b/typedapi/types/termsuggestoption.go index 31d3ba236d..b737dfbc80 100644 --- a/typedapi/types/termsuggestoption.go +++ b/typedapi/types/termsuggestoption.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/suggester.ts#L93-L99 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/suggester.ts#L93-L99 type TermSuggestOption struct { CollateMatch *bool `json:"collate_match,omitempty"` Freq int64 `json:"freq"` @@ -135,5 +135,3 @@ func NewTermSuggestOption() *TermSuggestOption { return r } - -// false diff --git a/typedapi/types/termvector.go b/typedapi/types/termvector.go index dc57d0c5ec..a87fc96461 100644 --- a/typedapi/types/termvector.go +++ b/typedapi/types/termvector.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TermVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/types.ts#L23-L26 type TermVector struct { FieldStatistics *FieldStatistics `json:"field_statistics,omitempty"` Terms map[string]Term `json:"terms"` @@ -36,5 +36,3 @@ func NewTermVector() *TermVector { return r } - -// false diff --git a/typedapi/types/termvectorsfilter.go b/typedapi/types/termvectorsfilter.go index f3435a21b6..71ac299a9b 100644 --- a/typedapi/types/termvectorsfilter.go +++ b/typedapi/types/termvectorsfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermVectorsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/types.ts#L49-L86 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/types.ts#L49-L86 type TermVectorsFilter struct { // MaxDocFreq Ignore words which occur in more than this many docs. // Defaults to unbounded. @@ -190,13 +190,3 @@ func NewTermVectorsFilter() *TermVectorsFilter { return r } - -// true - -type TermVectorsFilterVariant interface { - TermVectorsFilterCaster() *TermVectorsFilter -} - -func (s *TermVectorsFilter) TermVectorsFilterCaster() *TermVectorsFilter { - return s -} diff --git a/typedapi/types/termvectorsresult.go b/typedapi/types/termvectorsresult.go index 9700a9c8ba..bed7b76a7a 100644 --- a/typedapi/types/termvectorsresult.go +++ b/typedapi/types/termvectorsresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermVectorsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/mtermvectors/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/mtermvectors/types.ts#L96-L104 type TermVectorsResult struct { Error *ErrorCause `json:"error,omitempty"` Found *bool `json:"found,omitempty"` @@ -127,5 +127,3 @@ func NewTermVectorsResult() *TermVectorsResult { return r } - -// false diff --git a/typedapi/types/termvectorstoken.go b/typedapi/types/termvectorstoken.go index d608c5b618..8aa9c55205 100644 --- a/typedapi/types/termvectorstoken.go +++ b/typedapi/types/termvectorstoken.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TermVectorsToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/termvectors/types.ts#L42-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/termvectors/types.ts#L42-L47 type TermVectorsToken struct { EndOffset *int `json:"end_offset,omitempty"` Payload *string `json:"payload,omitempty"` @@ -125,5 +125,3 @@ func NewTermVectorsToken() *TermVectorsToken { return r } - -// false diff --git a/typedapi/types/testpopulation.go b/typedapi/types/testpopulation.go index 6f6f660d21..82c66830ad 100644 --- a/typedapi/types/testpopulation.go +++ b/typedapi/types/testpopulation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TestPopulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L319-L329 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L342-L352 type TestPopulation struct { // Field The field to aggregate. Field string `json:"field"` @@ -80,13 +80,3 @@ func NewTestPopulation() *TestPopulation { return r } - -// true - -type TestPopulationVariant interface { - TestPopulationCaster() *TestPopulation -} - -func (s *TestPopulation) TestPopulationCaster() *TestPopulation { - return s -} diff --git a/typedapi/types/textclassificationinferenceoptions.go b/typedapi/types/textclassificationinferenceoptions.go index 0be4f5ec2d..fff2bc2415 100644 --- a/typedapi/types/textclassificationinferenceoptions.go +++ b/typedapi/types/textclassificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L202-L214 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L202-L214 type TextClassificationInferenceOptions struct { // ClassificationLabels Classification labels to apply other than the stored labels. Must have the // same deminsions as the default configured labels @@ -115,13 +115,3 @@ func NewTextClassificationInferenceOptions() *TextClassificationInferenceOptions return r } - -// true - -type TextClassificationInferenceOptionsVariant interface { - TextClassificationInferenceOptionsCaster() *TextClassificationInferenceOptions -} - -func (s *TextClassificationInferenceOptions) TextClassificationInferenceOptionsCaster() *TextClassificationInferenceOptions { - return s -} diff --git a/typedapi/types/textclassificationinferenceupdateoptions.go b/typedapi/types/textclassificationinferenceupdateoptions.go index 821a09cb60..5f48366365 100644 --- a/typedapi/types/textclassificationinferenceupdateoptions.go +++ b/typedapi/types/textclassificationinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L382-L391 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L382-L391 type TextClassificationInferenceUpdateOptions struct { // ClassificationLabels Classification labels to apply other than the stored labels. Must have the // same deminsions as the default configured labels @@ -109,13 +109,3 @@ func NewTextClassificationInferenceUpdateOptions() *TextClassificationInferenceU return r } - -// true - -type TextClassificationInferenceUpdateOptionsVariant interface { - TextClassificationInferenceUpdateOptionsCaster() *TextClassificationInferenceUpdateOptions -} - -func (s *TextClassificationInferenceUpdateOptions) TextClassificationInferenceUpdateOptionsCaster() *TextClassificationInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/textembedding.go b/typedapi/types/textembedding.go index 4e3da587a1..daaea46b90 100644 --- a/typedapi/types/textembedding.go +++ b/typedapi/types/textembedding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextEmbedding type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Knn.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Knn.ts#L94-L97 type TextEmbedding struct { ModelId string `json:"model_id"` ModelText string `json:"model_text"` @@ -87,13 +87,3 @@ func NewTextEmbedding() *TextEmbedding { return r } - -// true - -type TextEmbeddingVariant interface { - TextEmbeddingCaster() *TextEmbedding -} - -func (s *TextEmbedding) TextEmbeddingCaster() *TextEmbedding { - return s -} diff --git a/typedapi/types/textembeddingbyteresult.go b/typedapi/types/textembeddingbyteresult.go index f8a5b1c354..1e57582de0 100644 --- a/typedapi/types/textembeddingbyteresult.go +++ b/typedapi/types/textembeddingbyteresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingByteResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Results.ts#L53-L58 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Results.ts#L53-L58 type TextEmbeddingByteResult struct { Embedding []byte `json:"embedding"` } @@ -66,5 +66,3 @@ func NewTextEmbeddingByteResult() *TextEmbeddingByteResult { return r } - -// false diff --git a/typedapi/types/textembeddinginferenceoptions.go b/typedapi/types/textembeddinginferenceoptions.go index a716beaadb..46f04b5d99 100644 --- a/typedapi/types/textembeddinginferenceoptions.go +++ b/typedapi/types/textembeddinginferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L252-L262 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L252-L262 type TextEmbeddingInferenceOptions struct { // EmbeddingSize The number of dimensions in the embedding output EmbeddingSize *int `json:"embedding_size,omitempty"` @@ -107,13 +107,3 @@ func NewTextEmbeddingInferenceOptions() *TextEmbeddingInferenceOptions { return r } - -// true - -type TextEmbeddingInferenceOptionsVariant interface { - TextEmbeddingInferenceOptionsCaster() *TextEmbeddingInferenceOptions -} - -func (s *TextEmbeddingInferenceOptions) TextEmbeddingInferenceOptionsCaster() *TextEmbeddingInferenceOptions { - return s -} diff --git a/typedapi/types/textembeddinginferenceupdateoptions.go b/typedapi/types/textembeddinginferenceupdateoptions.go index a3034db952..98fbc11832 100644 --- a/typedapi/types/textembeddinginferenceupdateoptions.go +++ b/typedapi/types/textembeddinginferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L411-L415 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L411-L415 type TextEmbeddingInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. @@ -82,13 +82,3 @@ func NewTextEmbeddingInferenceUpdateOptions() *TextEmbeddingInferenceUpdateOptio return r } - -// true - -type TextEmbeddingInferenceUpdateOptionsVariant interface { - TextEmbeddingInferenceUpdateOptionsCaster() *TextEmbeddingInferenceUpdateOptions -} - -func (s *TextEmbeddingInferenceUpdateOptions) TextEmbeddingInferenceUpdateOptionsCaster() *TextEmbeddingInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/textembeddingresult.go b/typedapi/types/textembeddingresult.go index b8c909796c..2694c6ee0b 100644 --- a/typedapi/types/textembeddingresult.go +++ b/typedapi/types/textembeddingresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/Results.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/Results.ts#L60-L65 type TextEmbeddingResult struct { Embedding []float32 `json:"embedding"` } @@ -66,5 +66,3 @@ func NewTextEmbeddingResult() *TextEmbeddingResult { return r } - -// false diff --git a/typedapi/types/textexpansioninferenceoptions.go b/typedapi/types/textexpansioninferenceoptions.go index 17dc2c85b4..3a7598dc34 100644 --- a/typedapi/types/textexpansioninferenceoptions.go +++ b/typedapi/types/textexpansioninferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextExpansionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L264-L271 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L264-L271 type TextExpansionInferenceOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. @@ -89,13 +89,3 @@ func NewTextExpansionInferenceOptions() *TextExpansionInferenceOptions { return r } - -// true - -type TextExpansionInferenceOptionsVariant interface { - TextExpansionInferenceOptionsCaster() *TextExpansionInferenceOptions -} - -func (s *TextExpansionInferenceOptions) TextExpansionInferenceOptionsCaster() *TextExpansionInferenceOptions { - return s -} diff --git a/typedapi/types/textexpansioninferenceupdateoptions.go b/typedapi/types/textexpansioninferenceupdateoptions.go index 4ff03b1632..a987301371 100644 --- a/typedapi/types/textexpansioninferenceupdateoptions.go +++ b/typedapi/types/textexpansioninferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextExpansionInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L417-L421 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L417-L421 type TextExpansionInferenceUpdateOptions struct { // ResultsField The field that is added to incoming documents to contain the inference // prediction. Defaults to predicted_value. @@ -82,13 +82,3 @@ func NewTextExpansionInferenceUpdateOptions() *TextExpansionInferenceUpdateOptio return r } - -// true - -type TextExpansionInferenceUpdateOptionsVariant interface { - TextExpansionInferenceUpdateOptionsCaster() *TextExpansionInferenceUpdateOptions -} - -func (s *TextExpansionInferenceUpdateOptions) TextExpansionInferenceUpdateOptionsCaster() *TextExpansionInferenceUpdateOptions { - return s -} diff --git a/typedapi/types/textexpansionquery.go b/typedapi/types/textexpansionquery.go index 8f07b57582..6383a4871f 100644 --- a/typedapi/types/textexpansionquery.go +++ b/typedapi/types/textexpansionquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextExpansionQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/TextExpansionQuery.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/TextExpansionQuery.ts#L23-L36 type TextExpansionQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -131,13 +131,3 @@ func NewTextExpansionQuery() *TextExpansionQuery { return r } - -// true - -type TextExpansionQueryVariant interface { - TextExpansionQueryCaster() *TextExpansionQuery -} - -func (s *TextExpansionQuery) TextExpansionQueryCaster() *TextExpansionQuery { - return s -} diff --git a/typedapi/types/textindexprefixes.go b/typedapi/types/textindexprefixes.go index b0cd242e8c..3e82f871b6 100644 --- a/typedapi/types/textindexprefixes.go +++ b/typedapi/types/textindexprefixes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TextIndexPrefixes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L298-L301 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L323-L326 type TextIndexPrefixes struct { MaxChars int `json:"max_chars"` MinChars int `json:"min_chars"` @@ -95,13 +95,3 @@ func NewTextIndexPrefixes() *TextIndexPrefixes { return r } - -// true - -type TextIndexPrefixesVariant interface { - TextIndexPrefixesCaster() *TextIndexPrefixes -} - -func (s *TextIndexPrefixes) TextIndexPrefixesCaster() *TextIndexPrefixes { - return s -} diff --git a/typedapi/types/textproperty.go b/typedapi/types/textproperty.go index a85b1eee36..b3e8fa6bdf 100644 --- a/typedapi/types/textproperty.go +++ b/typedapi/types/textproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // TextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L303-L320 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L328-L345 type TextProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` @@ -304,6 +304,12 @@ func (s *TextProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -727,6 +733,12 @@ func (s *TextProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -1031,13 +1043,3 @@ func NewTextProperty() *TextProperty { return r } - -// true - -type TextPropertyVariant interface { - TextPropertyCaster() *TextProperty -} - -func (s *TextProperty) TextPropertyCaster() *TextProperty { - return s -} diff --git a/typedapi/types/textsimilarityreranker.go b/typedapi/types/textsimilarityreranker.go index b59ac1bf2f..ad0d401ba8 100644 --- a/typedapi/types/textsimilarityreranker.go +++ b/typedapi/types/textsimilarityreranker.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,20 +31,22 @@ import ( // TextSimilarityReranker type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Retriever.ts#L93-L104 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Retriever.ts#L146-L157 type TextSimilarityReranker struct { // Field The document field to be used for text similarity comparisons. This field // should contain the text that will be evaluated against the inference_text - Field *string `json:"field,omitempty"` + Field string `json:"field"` // Filter Query to filter the documents that can match. Filter []Query `json:"filter,omitempty"` // InferenceId Unique identifier of the inference endpoint created using the inference API. InferenceId *string `json:"inference_id,omitempty"` // InferenceText The text snippet used as the basis for similarity comparison - InferenceText *string `json:"inference_text,omitempty"` + InferenceText string `json:"inference_text"` // MinScore Minimum _score for matching documents. Documents with a lower _score are not // included in the top documents. MinScore *float32 `json:"min_score,omitempty"` + // Name_ Retriever name. + Name_ *string `json:"_name,omitempty"` // RankWindowSize This value determines how many documents we will consider from the nested // retriever. RankWindowSize *int `json:"rank_window_size,omitempty"` @@ -78,7 +80,7 @@ func (s *TextSimilarityReranker) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.Field = &o + s.Field = o case "filter": rawMsg := json.RawMessage{} @@ -118,7 +120,7 @@ func (s *TextSimilarityReranker) UnmarshalJSON(data []byte) error { if err != nil { o = string(tmp[:]) } - s.InferenceText = &o + s.InferenceText = o case "min_score": var tmp any @@ -136,6 +138,18 @@ func (s *TextSimilarityReranker) UnmarshalJSON(data []byte) error { s.MinScore = &f } + case "_name": + var tmp json.RawMessage + if err := dec.Decode(&tmp); err != nil { + return fmt.Errorf("%s | %w", "Name_", err) + } + o := string(tmp[:]) + o, err = strconv.Unquote(o) + if err != nil { + o = string(tmp[:]) + } + s.Name_ = &o + case "rank_window_size": var tmp any @@ -168,13 +182,3 @@ func NewTextSimilarityReranker() *TextSimilarityReranker { return r } - -// true - -type TextSimilarityRerankerVariant interface { - TextSimilarityRerankerCaster() *TextSimilarityReranker -} - -func (s *TextSimilarityReranker) TextSimilarityRerankerCaster() *TextSimilarityReranker { - return s -} diff --git a/typedapi/types/texttoanalyze.go b/typedapi/types/texttoanalyze.go index 2e36c84130..f400ad4aca 100644 --- a/typedapi/types/texttoanalyze.go +++ b/typedapi/types/texttoanalyze.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TextToAnalyze type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L69-L69 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L69-L69 type TextToAnalyze []string - -type TextToAnalyzeVariant interface { - TextToAnalyzeCaster() *TextToAnalyze -} diff --git a/typedapi/types/thaianalyzer.go b/typedapi/types/thaianalyzer.go index 8dc131187c..345ad00725 100644 --- a/typedapi/types/thaianalyzer.go +++ b/typedapi/types/thaianalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,11 +31,11 @@ import ( // ThaiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L297-L301 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L297-L301 type ThaiAnalyzer struct { - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *ThaiAnalyzer) UnmarshalJSON(data []byte) error { @@ -54,19 +54,8 @@ func (s *ThaiAnalyzer) UnmarshalJSON(data []byte) error { switch t { case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -111,13 +100,3 @@ func NewThaiAnalyzer() *ThaiAnalyzer { return r } - -// true - -type ThaiAnalyzerVariant interface { - ThaiAnalyzerCaster() *ThaiAnalyzer -} - -func (s *ThaiAnalyzer) ThaiAnalyzerCaster() *ThaiAnalyzer { - return s -} diff --git a/typedapi/types/thaitokenizer.go b/typedapi/types/thaitokenizer.go index 4728d555bc..56e1cebb3c 100644 --- a/typedapi/types/thaitokenizer.go +++ b/typedapi/types/thaitokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // ThaiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L126-L128 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L128-L130 type ThaiTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewThaiTokenizer() *ThaiTokenizer { return r } - -// true - -type ThaiTokenizerVariant interface { - ThaiTokenizerCaster() *ThaiTokenizer -} - -func (s *ThaiTokenizer) ThaiTokenizerCaster() *ThaiTokenizer { - return s -} diff --git a/typedapi/types/threadcount.go b/typedapi/types/threadcount.go index c110ac7fbd..57c9ff9522 100644 --- a/typedapi/types/threadcount.go +++ b/typedapi/types/threadcount.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ThreadCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1075-L1100 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1082-L1107 type ThreadCount struct { // Active Number of active threads in the thread pool. Active *int64 `json:"active,omitempty"` @@ -163,5 +163,3 @@ func NewThreadCount() *ThreadCount { return r } - -// false diff --git a/typedapi/types/threadpoolrecord.go b/typedapi/types/threadpoolrecord.go index e4f7fa7303..6530c00af8 100644 --- a/typedapi/types/threadpoolrecord.go +++ b/typedapi/types/threadpoolrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ThreadPoolRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/thread_pool/types.ts#L22-L124 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/thread_pool/types.ts#L22-L124 type ThreadPoolRecord struct { // Active The number of active threads in the current thread pool. Active *string `json:"active,omitempty"` @@ -336,5 +336,3 @@ func NewThreadPoolRecord() *ThreadPoolRecord { return r } - -// false diff --git a/typedapi/types/throttlestate.go b/typedapi/types/throttlestate.go index 03ca8a7f08..619a70a35f 100644 --- a/typedapi/types/throttlestate.go +++ b/typedapi/types/throttlestate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ThrottleState type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L120-L123 type ThrottleState struct { Reason string `json:"reason"` Timestamp DateTime `json:"timestamp"` @@ -80,13 +80,3 @@ func NewThrottleState() *ThrottleState { return r } - -// true - -type ThrottleStateVariant interface { - ThrottleStateCaster() *ThrottleState -} - -func (s *ThrottleState) ThrottleStateCaster() *ThrottleState { - return s -} diff --git a/typedapi/types/timehttphistogram.go b/typedapi/types/timehttphistogram.go index cc676aeff3..30cc892083 100644 --- a/typedapi/types/timehttphistogram.go +++ b/typedapi/types/timehttphistogram.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TimeHttpHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L708-L712 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L710-L714 type TimeHttpHistogram struct { Count int64 `json:"count"` GeMillis *int64 `json:"ge_millis,omitempty"` @@ -109,5 +109,3 @@ func NewTimeHttpHistogram() *TimeHttpHistogram { return r } - -// false diff --git a/typedapi/types/timeofmonth.go b/typedapi/types/timeofmonth.go index 4a599052e7..61389f34d4 100644 --- a/typedapi/types/timeofmonth.go +++ b/typedapi/types/timeofmonth.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TimeOfMonth type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L111-L114 type TimeOfMonth struct { At []string `json:"at"` On []int `json:"on"` @@ -34,13 +34,3 @@ func NewTimeOfMonth() *TimeOfMonth { return r } - -// true - -type TimeOfMonthVariant interface { - TimeOfMonthCaster() *TimeOfMonth -} - -func (s *TimeOfMonth) TimeOfMonthCaster() *TimeOfMonth { - return s -} diff --git a/typedapi/types/timeofweek.go b/typedapi/types/timeofweek.go index 480518d6af..7e80d0579a 100644 --- a/typedapi/types/timeofweek.go +++ b/typedapi/types/timeofweek.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // TimeOfWeek type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L116-L119 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L116-L119 type TimeOfWeek struct { At []string `json:"at"` On []day.Day `json:"on"` @@ -38,13 +38,3 @@ func NewTimeOfWeek() *TimeOfWeek { return r } - -// true - -type TimeOfWeekVariant interface { - TimeOfWeekCaster() *TimeOfWeek -} - -func (s *TimeOfWeek) TimeOfWeekCaster() *TimeOfWeek { - return s -} diff --git a/typedapi/types/timeofyear.go b/typedapi/types/timeofyear.go index 4ec97e8be0..e497c30349 100644 --- a/typedapi/types/timeofyear.go +++ b/typedapi/types/timeofyear.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // TimeOfYear type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Schedule.ts#L121-L125 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Schedule.ts#L121-L125 type TimeOfYear struct { At []string `json:"at"` Int []month.Month `json:"int"` @@ -39,13 +39,3 @@ func NewTimeOfYear() *TimeOfYear { return r } - -// true - -type TimeOfYearVariant interface { - TimeOfYearCaster() *TimeOfYear -} - -func (s *TimeOfYear) TimeOfYearCaster() *TimeOfYear { - return s -} diff --git a/typedapi/types/timeseriesaggregate.go b/typedapi/types/timeseriesaggregate.go index 5b773a554f..b67189b6bc 100644 --- a/typedapi/types/timeseriesaggregate.go +++ b/typedapi/types/timeseriesaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TimeSeriesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L730-L731 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L732-L733 type TimeSeriesAggregate struct { Buckets BucketsTimeSeriesBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewTimeSeriesAggregate() *TimeSeriesAggregate { return r } - -// false diff --git a/typedapi/types/timeseriesaggregation.go b/typedapi/types/timeseriesaggregation.go index 46a76ce50c..0057526458 100644 --- a/typedapi/types/timeseriesaggregation.go +++ b/typedapi/types/timeseriesaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TimeSeriesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1033-L1046 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1033-L1046 type TimeSeriesAggregation struct { // Keyed Set to `true` to associate a unique string key with each bucket and returns // the ranges as a hash rather than an array. @@ -96,13 +96,3 @@ func NewTimeSeriesAggregation() *TimeSeriesAggregation { return r } - -// true - -type TimeSeriesAggregationVariant interface { - TimeSeriesAggregationCaster() *TimeSeriesAggregation -} - -func (s *TimeSeriesAggregation) TimeSeriesAggregationCaster() *TimeSeriesAggregation { - return s -} diff --git a/typedapi/types/timeseriesbucket.go b/typedapi/types/timeseriesbucket.go index 4c82824c0f..27f93a8702 100644 --- a/typedapi/types/timeseriesbucket.go +++ b/typedapi/types/timeseriesbucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // TimeSeriesBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L733-L735 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L735-L737 type TimeSeriesBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -640,5 +640,3 @@ func NewTimeSeriesBucket() *TimeSeriesBucket { return r } - -// false diff --git a/typedapi/types/timesync.go b/typedapi/types/timesync.go index e250321da9..ca49bee3a4 100644 --- a/typedapi/types/timesync.go +++ b/typedapi/types/timesync.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TimeSync type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L177-L189 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L177-L189 type TimeSync struct { // Delay The time delay between the current time and the latest input data time. Delay Duration `json:"delay,omitempty"` @@ -78,13 +78,3 @@ func NewTimeSync() *TimeSync { return r } - -// true - -type TimeSyncVariant interface { - TimeSyncCaster() *TimeSync -} - -func (s *TimeSync) TimeSyncCaster() *TimeSync { - return s -} diff --git a/typedapi/types/timingstats.go b/typedapi/types/timingstats.go index d0ecbf561d..4fa0f8832c 100644 --- a/typedapi/types/timingstats.go +++ b/typedapi/types/timingstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L564-L569 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L564-L569 type TimingStats struct { // ElapsedTime Runtime of the analysis in milliseconds. ElapsedTime int64 `json:"elapsed_time"` @@ -74,5 +74,3 @@ func NewTimingStats() *TimingStats { return r } - -// false diff --git a/typedapi/types/tokencountproperty.go b/typedapi/types/tokencountproperty.go index 8a368a860d..d3e55dff9c 100644 --- a/typedapi/types/tokencountproperty.go +++ b/typedapi/types/tokencountproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // TokenCountProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/specialized.ts#L94-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/specialized.ts#L94-L101 type TokenCountProperty struct { Analyzer *string `json:"analyzer,omitempty"` Boost *Float64 `json:"boost,omitempty"` @@ -288,6 +288,12 @@ func (s *TokenCountProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -673,6 +679,12 @@ func (s *TokenCountProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -927,13 +939,3 @@ func NewTokenCountProperty() *TokenCountProperty { return r } - -// true - -type TokenCountPropertyVariant interface { - TokenCountPropertyCaster() *TokenCountProperty -} - -func (s *TokenCountProperty) TokenCountPropertyCaster() *TokenCountProperty { - return s -} diff --git a/typedapi/types/tokendetail.go b/typedapi/types/tokendetail.go index c2c83ddbc9..c445f53b63 100644 --- a/typedapi/types/tokendetail.go +++ b/typedapi/types/tokendetail.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TokenDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/analyze/types.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/analyze/types.ts#L71-L74 type TokenDetail struct { Name string `json:"name"` Tokens []ExplainAnalyzeToken `json:"tokens"` @@ -80,5 +80,3 @@ func NewTokenDetail() *TokenDetail { return r } - -// false diff --git a/typedapi/types/tokenfilter.go b/typedapi/types/tokenfilter.go index 68cb5b38d6..be11859e03 100644 --- a/typedapi/types/tokenfilter.go +++ b/typedapi/types/tokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // TokenFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L345-L350 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L575-L580 type TokenFilter any - -type TokenFilterVariant interface { - TokenFilterCaster() *TokenFilter -} diff --git a/typedapi/types/tokenfilterdefinition.go b/typedapi/types/tokenfilterdefinition.go index a05e1ce60e..2648e34a81 100644 --- a/typedapi/types/tokenfilterdefinition.go +++ b/typedapi/types/tokenfilterdefinition.go @@ -16,39 +16,65 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TokenFilterDefinition holds the union for the following types: // +// ApostropheTokenFilter +// ArabicStemTokenFilter +// ArabicNormalizationTokenFilter // AsciiFoldingTokenFilter +// BengaliNormalizationTokenFilter +// BrazilianStemTokenFilter +// CjkBigramTokenFilter +// CjkWidthTokenFilter +// ClassicTokenFilter // CommonGramsTokenFilter // ConditionTokenFilter +// CzechStemTokenFilter +// DecimalDigitTokenFilter // DelimitedPayloadTokenFilter +// DutchStemTokenFilter // EdgeNGramTokenFilter // ElisionTokenFilter // FingerprintTokenFilter +// FlattenGraphTokenFilter +// FrenchStemTokenFilter +// GermanNormalizationTokenFilter +// GermanStemTokenFilter +// HindiNormalizationTokenFilter // HunspellTokenFilter // HyphenationDecompounderTokenFilter +// IndicNormalizationTokenFilter // KeepTypesTokenFilter // KeepWordsTokenFilter // KeywordMarkerTokenFilter +// KeywordRepeatTokenFilter // KStemTokenFilter // LengthTokenFilter // LimitTokenCountTokenFilter // LowercaseTokenFilter +// MinHashTokenFilter // MultiplexerTokenFilter // NGramTokenFilter // NoriPartOfSpeechTokenFilter // PatternCaptureTokenFilter // PatternReplaceTokenFilter +// PersianNormalizationTokenFilter +// PersianStemTokenFilter // PorterStemTokenFilter // PredicateTokenFilter // RemoveDuplicatesTokenFilter // ReverseTokenFilter +// RussianStemTokenFilter +// ScandinavianFoldingTokenFilter +// ScandinavianNormalizationTokenFilter +// SerbianNormalizationTokenFilter // ShingleTokenFilter // SnowballTokenFilter +// SoraniNormalizationTokenFilter // StemmerOverrideTokenFilter // StemmerTokenFilter // StopTokenFilter @@ -60,6 +86,7 @@ package types // UppercaseTokenFilter // WordDelimiterGraphTokenFilter // WordDelimiterTokenFilter +// JaStopTokenFilter // KuromojiStemmerTokenFilter // KuromojiReadingFormTokenFilter // KuromojiPartOfSpeechTokenFilter @@ -70,9 +97,5 @@ package types // PhoneticTokenFilter // DictionaryDecompounderTokenFilter // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L352-L404 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L582-L660 type TokenFilterDefinition any - -type TokenFilterDefinitionVariant interface { - TokenFilterDefinitionCaster() *TokenFilterDefinition -} diff --git a/typedapi/types/tokenizationconfigcontainer.go b/typedapi/types/tokenizationconfigcontainer.go index 4d56edeef6..d637b5d482 100644 --- a/typedapi/types/tokenizationconfigcontainer.go +++ b/typedapi/types/tokenizationconfigcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // TokenizationConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L135-L158 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L135-L158 type TokenizationConfigContainer struct { AdditionalTokenizationConfigContainerProperty map[string]json.RawMessage `json:"-"` // Bert Indicates BERT tokenization and its options @@ -78,13 +78,3 @@ func NewTokenizationConfigContainer() *TokenizationConfigContainer { return r } - -// true - -type TokenizationConfigContainerVariant interface { - TokenizationConfigContainerCaster() *TokenizationConfigContainer -} - -func (s *TokenizationConfigContainer) TokenizationConfigContainerCaster() *TokenizationConfigContainer { - return s -} diff --git a/typedapi/types/tokenizer.go b/typedapi/types/tokenizer.go index 98bf3006de..54c3b24ce8 100644 --- a/typedapi/types/tokenizer.go +++ b/typedapi/types/tokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // string // TokenizerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L140-L145 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L142-L147 type Tokenizer any - -type TokenizerVariant interface { - TokenizerCaster() *Tokenizer -} diff --git a/typedapi/types/tokenizerdefinition.go b/typedapi/types/tokenizerdefinition.go index e41f567de7..9f7ff812cf 100644 --- a/typedapi/types/tokenizerdefinition.go +++ b/typedapi/types/tokenizerdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -41,9 +41,5 @@ package types // KuromojiTokenizer // NoriTokenizer // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L147-L170 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L149-L172 type TokenizerDefinition any - -type TokenizerDefinitionVariant interface { - TokenizerDefinitionCaster() *TokenizerDefinition -} diff --git a/typedapi/types/tokenpruningconfig.go b/typedapi/types/tokenpruningconfig.go index 1e7d11cda4..0feb796023 100644 --- a/typedapi/types/tokenpruningconfig.go +++ b/typedapi/types/tokenpruningconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TokenPruningConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/TokenPruningConfig.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/TokenPruningConfig.ts#L22-L35 type TokenPruningConfig struct { // OnlyScorePrunedTokens Whether to only score pruned tokens, vs only scoring kept tokens. OnlyScorePrunedTokens *bool `json:"only_score_pruned_tokens,omitempty"` @@ -116,13 +116,3 @@ func NewTokenPruningConfig() *TokenPruningConfig { return r } - -// true - -type TokenPruningConfigVariant interface { - TokenPruningConfigCaster() *TokenPruningConfig -} - -func (s *TokenPruningConfig) TokenPruningConfigCaster() *TokenPruningConfig { - return s -} diff --git a/typedapi/types/toolcall.go b/typedapi/types/toolcall.go index 75ae49f788..81ae2bcca6 100644 --- a/typedapi/types/toolcall.go +++ b/typedapi/types/toolcall.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ToolCall type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L112-L128 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L151-L167 type ToolCall struct { // Function The function that the model called. Function ToolCallFunction `json:"function"` @@ -89,13 +89,3 @@ func NewToolCall() *ToolCall { return r } - -// true - -type ToolCallVariant interface { - ToolCallCaster() *ToolCall -} - -func (s *ToolCall) ToolCallCaster() *ToolCall { - return s -} diff --git a/typedapi/types/toolcallfunction.go b/typedapi/types/toolcallfunction.go index d113b3d715..98447fc15a 100644 --- a/typedapi/types/toolcallfunction.go +++ b/typedapi/types/toolcallfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ToolCallFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L98-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L137-L149 type ToolCallFunction struct { // Arguments The arguments to call the function with in JSON format. Arguments string `json:"arguments"` @@ -89,13 +89,3 @@ func NewToolCallFunction() *ToolCallFunction { return r } - -// true - -type ToolCallFunctionVariant interface { - ToolCallFunctionCaster() *ToolCallFunction -} - -func (s *ToolCallFunction) ToolCallFunctionCaster() *ToolCallFunction { - return s -} diff --git a/typedapi/types/topclassentry.go b/typedapi/types/topclassentry.go index 45d8575b30..0a78650e63 100644 --- a/typedapi/types/topclassentry.go +++ b/typedapi/types/topclassentry.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L459-L463 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L459-L463 type TopClassEntry struct { ClassName string `json:"class_name"` ClassProbability Float64 `json:"class_probability"` @@ -108,5 +108,3 @@ func NewTopClassEntry() *TopClassEntry { return r } - -// false diff --git a/typedapi/types/tophit.go b/typedapi/types/tophit.go index dcf7249c2f..456e4dc39c 100644 --- a/typedapi/types/tophit.go +++ b/typedapi/types/tophit.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TopHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/text_structure/_types/Structure.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/text_structure/_types/Structure.ts#L35-L38 type TopHit struct { Count int64 `json:"count"` Value json.RawMessage `json:"value,omitempty"` @@ -83,5 +83,3 @@ func NewTopHit() *TopHit { return r } - -// false diff --git a/typedapi/types/tophitsaggregate.go b/typedapi/types/tophitsaggregate.go index e4f6005423..6405614dde 100644 --- a/typedapi/types/tophitsaggregate.go +++ b/typedapi/types/tophitsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TopHitsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L747-L753 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L749-L755 type TopHitsAggregate struct { Hits HitsMetadata `json:"hits"` Meta Metadata `json:"meta,omitempty"` @@ -72,5 +72,3 @@ func NewTopHitsAggregate() *TopHitsAggregate { return r } - -// false diff --git a/typedapi/types/tophitsaggregation.go b/typedapi/types/tophitsaggregation.go index dba3b18d78..ebfed82ff2 100644 --- a/typedapi/types/tophitsaggregation.go +++ b/typedapi/types/tophitsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TopHitsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L346-L406 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L369-L429 type TopHitsAggregation struct { // DocvalueFields Fields for which to return doc values. DocvalueFields []FieldAndFormat `json:"docvalue_fields,omitempty"` @@ -221,7 +221,7 @@ func (s *TopHitsAggregation) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { @@ -296,13 +296,3 @@ func NewTopHitsAggregation() *TopHitsAggregation { return r } - -// true - -type TopHitsAggregationVariant interface { - TopHitsAggregationCaster() *TopHitsAggregation -} - -func (s *TopHitsAggregation) TopHitsAggregationCaster() *TopHitsAggregation { - return s -} diff --git a/typedapi/types/topleftbottomrightgeobounds.go b/typedapi/types/topleftbottomrightgeobounds.go index 1f910997d9..cd5ef1d98a 100644 --- a/typedapi/types/topleftbottomrightgeobounds.go +++ b/typedapi/types/topleftbottomrightgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TopLeftBottomRightGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L161-L164 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L161-L164 type TopLeftBottomRightGeoBounds struct { BottomRight GeoLocation `json:"bottom_right"` TopLeft GeoLocation `json:"top_left"` @@ -152,13 +152,3 @@ func NewTopLeftBottomRightGeoBounds() *TopLeftBottomRightGeoBounds { return r } - -// true - -type TopLeftBottomRightGeoBoundsVariant interface { - TopLeftBottomRightGeoBoundsCaster() *TopLeftBottomRightGeoBounds -} - -func (s *TopLeftBottomRightGeoBounds) TopLeftBottomRightGeoBoundsCaster() *TopLeftBottomRightGeoBounds { - return s -} diff --git a/typedapi/types/topmetrics.go b/typedapi/types/topmetrics.go index d1cbfa86ad..17c2e2e55b 100644 --- a/typedapi/types/topmetrics.go +++ b/typedapi/types/topmetrics.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TopMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L832-L836 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L834-L838 type TopMetrics struct { Metrics map[string]FieldValue `json:"metrics"` Sort []FieldValue `json:"sort"` @@ -36,5 +36,3 @@ func NewTopMetrics() *TopMetrics { return r } - -// false diff --git a/typedapi/types/topmetricsaggregate.go b/typedapi/types/topmetricsaggregate.go index 276caf275d..93633580a9 100644 --- a/typedapi/types/topmetricsaggregate.go +++ b/typedapi/types/topmetricsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TopMetricsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L827-L830 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L829-L832 type TopMetricsAggregate struct { Meta Metadata `json:"meta,omitempty"` Top []TopMetrics `json:"top"` @@ -72,5 +72,3 @@ func NewTopMetricsAggregate() *TopMetricsAggregate { return r } - -// false diff --git a/typedapi/types/topmetricsaggregation.go b/typedapi/types/topmetricsaggregation.go index 1e0768916d..127770b3ed 100644 --- a/typedapi/types/topmetricsaggregation.go +++ b/typedapi/types/topmetricsaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TopMetricsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L408-L425 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L431-L448 type TopMetricsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -136,13 +136,3 @@ func NewTopMetricsAggregation() *TopMetricsAggregation { return r } - -// true - -type TopMetricsAggregationVariant interface { - TopMetricsAggregationCaster() *TopMetricsAggregation -} - -func (s *TopMetricsAggregation) TopMetricsAggregationCaster() *TopMetricsAggregation { - return s -} diff --git a/typedapi/types/topmetricsvalue.go b/typedapi/types/topmetricsvalue.go index 668235406b..cd31167516 100644 --- a/typedapi/types/topmetricsvalue.go +++ b/typedapi/types/topmetricsvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TopMetricsValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L427-L432 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L450-L455 type TopMetricsValue struct { // Field A field to return as a metric. Field string `json:"field"` @@ -67,13 +67,3 @@ func NewTopMetricsValue() *TopMetricsValue { return r } - -// true - -type TopMetricsValueVariant interface { - TopMetricsValueCaster() *TopMetricsValue -} - -func (s *TopMetricsValue) TopMetricsValueCaster() *TopMetricsValue { - return s -} diff --git a/typedapi/types/toprightbottomleftgeobounds.go b/typedapi/types/toprightbottomleftgeobounds.go index c138c348c4..ca67c81a03 100644 --- a/typedapi/types/toprightbottomleftgeobounds.go +++ b/typedapi/types/toprightbottomleftgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TopRightBottomLeftGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L166-L169 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L166-L169 type TopRightBottomLeftGeoBounds struct { BottomLeft GeoLocation `json:"bottom_left"` TopRight GeoLocation `json:"top_right"` @@ -152,13 +152,3 @@ func NewTopRightBottomLeftGeoBounds() *TopRightBottomLeftGeoBounds { return r } - -// true - -type TopRightBottomLeftGeoBoundsVariant interface { - TopRightBottomLeftGeoBoundsCaster() *TopRightBottomLeftGeoBounds -} - -func (s *TopRightBottomLeftGeoBounds) TopRightBottomLeftGeoBoundsCaster() *TopRightBottomLeftGeoBounds { - return s -} diff --git a/typedapi/types/totalfeatureimportance.go b/typedapi/types/totalfeatureimportance.go index e3ecf88942..1bdd512072 100644 --- a/typedapi/types/totalfeatureimportance.go +++ b/typedapi/types/totalfeatureimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L290-L297 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L290-L297 type TotalFeatureImportance struct { // Classes If the trained model is a classification model, feature importance statistics // are gathered per target class value. @@ -83,5 +83,3 @@ func NewTotalFeatureImportance() *TotalFeatureImportance { return r } - -// false diff --git a/typedapi/types/totalfeatureimportanceclass.go b/typedapi/types/totalfeatureimportanceclass.go index 32833e9737..99ef2b8293 100644 --- a/typedapi/types/totalfeatureimportanceclass.go +++ b/typedapi/types/totalfeatureimportanceclass.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportanceClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L299-L304 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L299-L304 type TotalFeatureImportanceClass struct { // ClassName The target class value. Could be a string, boolean, or number. ClassName string `json:"class_name"` @@ -75,5 +75,3 @@ func NewTotalFeatureImportanceClass() *TotalFeatureImportanceClass { return r } - -// false diff --git a/typedapi/types/totalfeatureimportancestatistics.go b/typedapi/types/totalfeatureimportancestatistics.go index c48bf6c688..d46966cda1 100644 --- a/typedapi/types/totalfeatureimportancestatistics.go +++ b/typedapi/types/totalfeatureimportancestatistics.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TotalFeatureImportanceStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L306-L313 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L306-L313 type TotalFeatureImportanceStatistics struct { // Max The maximum importance value across all the training data for this feature. Max int `json:"max"` @@ -117,5 +117,3 @@ func NewTotalFeatureImportanceStatistics() *TotalFeatureImportanceStatistics { return r } - -// false diff --git a/typedapi/types/totaluserprofiles.go b/typedapi/types/totaluserprofiles.go index a6c6d1e4e1..45a4e4cc51 100644 --- a/typedapi/types/totaluserprofiles.go +++ b/typedapi/types/totaluserprofiles.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TotalUserProfiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/suggest_user_profiles/Response.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/suggest_user_profiles/Response.ts#L24-L27 type TotalUserProfiles struct { Relation string `json:"relation"` Value int64 `json:"value"` @@ -83,5 +83,3 @@ func NewTotalUserProfiles() *TotalUserProfiles { return r } - -// false diff --git a/typedapi/types/trackhits.go b/typedapi/types/trackhits.go index 21c7d5f6de..c93753b47e 100644 --- a/typedapi/types/trackhits.go +++ b/typedapi/types/trackhits.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,9 +25,5 @@ package types // bool // int // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/search/_types/hits.ts#L144-L152 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/search/_types/hits.ts#L144-L152 type TrackHits any - -type TrackHitsVariant interface { - TrackHitsCaster() *TrackHits -} diff --git a/typedapi/types/trainedmodel.go b/typedapi/types/trainedmodel.go index 72385a49f7..f27c0fe5e6 100644 --- a/typedapi/types/trainedmodel.go +++ b/typedapi/types/trainedmodel.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TrainedModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L60-L72 type TrainedModel struct { // Ensemble The definition for an ensemble model Ensemble *Ensemble `json:"ensemble,omitempty"` @@ -42,13 +42,3 @@ func NewTrainedModel() *TrainedModel { return r } - -// true - -type TrainedModelVariant interface { - TrainedModelCaster() *TrainedModel -} - -func (s *TrainedModel) TrainedModelCaster() *TrainedModel { - return s -} diff --git a/typedapi/types/trainedmodelassignment.go b/typedapi/types/trainedmodelassignment.go index 9da7075ce3..74cb59311b 100644 --- a/typedapi/types/trainedmodelassignment.go +++ b/typedapi/types/trainedmodelassignment.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignment type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L472-L489 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L472-L489 type TrainedModelAssignment struct { AdaptiveAllocations *AdaptiveAllocationsSettings `json:"adaptive_allocations,omitempty"` // AssignmentState The overall assignment state. @@ -131,5 +131,3 @@ func NewTrainedModelAssignment() *TrainedModelAssignment { return r } - -// false diff --git a/typedapi/types/trainedmodelassignmentroutingstateandreason.go b/typedapi/types/trainedmodelassignmentroutingstateandreason.go index 6b0c40f855..6e07ce19c7 100644 --- a/typedapi/types/trainedmodelassignmentroutingstateandreason.go +++ b/typedapi/types/trainedmodelassignmentroutingstateandreason.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentRoutingStateAndReason type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L431-L441 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L431-L441 type TrainedModelAssignmentRoutingStateAndReason struct { // Reason The reason for the current state. It is usually populated only when the // `routing_state` is `failed`. @@ -85,5 +85,3 @@ func NewTrainedModelAssignmentRoutingStateAndReason() *TrainedModelAssignmentRou return r } - -// false diff --git a/typedapi/types/trainedmodelassignmentroutingtable.go b/typedapi/types/trainedmodelassignmentroutingtable.go index 314ca8c637..adfb3a5787 100644 --- a/typedapi/types/trainedmodelassignmentroutingtable.go +++ b/typedapi/types/trainedmodelassignmentroutingtable.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentRoutingTable type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L443-L461 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L443-L461 type TrainedModelAssignmentRoutingTable struct { // CurrentAllocations Current number of allocations. CurrentAllocations int `json:"current_allocations"` @@ -121,5 +121,3 @@ func NewTrainedModelAssignmentRoutingTable() *TrainedModelAssignmentRoutingTable return r } - -// false diff --git a/typedapi/types/trainedmodelassignmenttaskparameters.go b/typedapi/types/trainedmodelassignmenttaskparameters.go index c559d5e328..a68d245eaf 100644 --- a/typedapi/types/trainedmodelassignmenttaskparameters.go +++ b/typedapi/types/trainedmodelassignmenttaskparameters.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentTaskParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L370-L406 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L370-L406 type TrainedModelAssignmentTaskParameters struct { // CacheSize The size of the trained model cache. CacheSize ByteSize `json:"cache_size,omitempty"` @@ -163,5 +163,3 @@ func NewTrainedModelAssignmentTaskParameters() *TrainedModelAssignmentTaskParame return r } - -// false diff --git a/typedapi/types/trainedmodelconfig.go b/typedapi/types/trainedmodelconfig.go index 0767edb0b2..ed325dcb6f 100644 --- a/typedapi/types/trainedmodelconfig.go +++ b/typedapi/types/trainedmodelconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TrainedModelConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L203-L240 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L203-L240 type TrainedModelConfig struct { CompressedDefinition *string `json:"compressed_definition,omitempty"` // CreateTime The time when the trained model was created. @@ -280,5 +280,3 @@ func NewTrainedModelConfig() *TrainedModelConfig { return r } - -// false diff --git a/typedapi/types/trainedmodelconfiginput.go b/typedapi/types/trainedmodelconfiginput.go index ea6dbee0e5..a96f8af364 100644 --- a/typedapi/types/trainedmodelconfiginput.go +++ b/typedapi/types/trainedmodelconfiginput.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TrainedModelConfigInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L242-L245 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L242-L245 type TrainedModelConfigInput struct { // FieldNames An array of input field names for the model. FieldNames []string `json:"field_names"` @@ -34,5 +34,3 @@ func NewTrainedModelConfigInput() *TrainedModelConfigInput { return r } - -// false diff --git a/typedapi/types/trainedmodelconfigmetadata.go b/typedapi/types/trainedmodelconfigmetadata.go index 50c9bb0418..1c1ec29fd7 100644 --- a/typedapi/types/trainedmodelconfigmetadata.go +++ b/typedapi/types/trainedmodelconfigmetadata.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TrainedModelConfigMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L247-L255 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L247-L255 type TrainedModelConfigMetadata struct { // FeatureImportanceBaseline An object that contains the baseline for feature importance values. For // regression analysis, it is a single value. For classification analysis, there @@ -47,5 +47,3 @@ func NewTrainedModelConfigMetadata() *TrainedModelConfigMetadata { return r } - -// false diff --git a/typedapi/types/trainedmodeldeploymentallocationstatus.go b/typedapi/types/trainedmodeldeploymentallocationstatus.go index 2eb906488e..3d4cb8350d 100644 --- a/typedapi/types/trainedmodeldeploymentallocationstatus.go +++ b/typedapi/types/trainedmodeldeploymentallocationstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // TrainedModelDeploymentAllocationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L463-L470 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L463-L470 type TrainedModelDeploymentAllocationStatus struct { // AllocationCount The current number of nodes where the model is allocated. AllocationCount int `json:"allocation_count"` @@ -106,5 +106,3 @@ func NewTrainedModelDeploymentAllocationStatus() *TrainedModelDeploymentAllocati return r } - -// false diff --git a/typedapi/types/trainedmodeldeploymentnodesstats.go b/typedapi/types/trainedmodeldeploymentnodesstats.go index 349d5fc096..349ea93e68 100644 --- a/typedapi/types/trainedmodeldeploymentnodesstats.go +++ b/typedapi/types/trainedmodeldeploymentnodesstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelDeploymentNodesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L156-L201 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L156-L201 type TrainedModelDeploymentNodesStats struct { // AverageInferenceTimeMs The average time for each inference call to complete on this node. AverageInferenceTimeMs Float64 `json:"average_inference_time_ms,omitempty"` @@ -302,5 +302,3 @@ func NewTrainedModelDeploymentNodesStats() *TrainedModelDeploymentNodesStats { return r } - -// false diff --git a/typedapi/types/trainedmodeldeploymentstats.go b/typedapi/types/trainedmodeldeploymentstats.go index 776c5a47b0..a350fe1ae4 100644 --- a/typedapi/types/trainedmodeldeploymentstats.go +++ b/typedapi/types/trainedmodeldeploymentstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // TrainedModelDeploymentStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L62-L107 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L62-L107 type TrainedModelDeploymentStats struct { AdaptiveAllocations *AdaptiveAllocationsSettings `json:"adaptive_allocations,omitempty"` // AllocationStatus The detailed allocation status for the deployment. @@ -286,5 +286,3 @@ func NewTrainedModelDeploymentStats() *TrainedModelDeploymentStats { return r } - -// false diff --git a/typedapi/types/trainedmodelentities.go b/typedapi/types/trainedmodelentities.go index 0b8a603b5c..6a0243fc35 100644 --- a/typedapi/types/trainedmodelentities.go +++ b/typedapi/types/trainedmodelentities.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelEntities type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L452-L458 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L452-L458 type TrainedModelEntities struct { ClassName string `json:"class_name"` ClassProbability Float64 `json:"class_probability"` @@ -138,5 +138,3 @@ func NewTrainedModelEntities() *TrainedModelEntities { return r } - -// false diff --git a/typedapi/types/trainedmodelinferenceclassimportance.go b/typedapi/types/trainedmodelinferenceclassimportance.go index fdb9ff09dd..ebbc25bab3 100644 --- a/typedapi/types/trainedmodelinferenceclassimportance.go +++ b/typedapi/types/trainedmodelinferenceclassimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L465-L468 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L465-L468 type TrainedModelInferenceClassImportance struct { ClassName string `json:"class_name"` Importance Float64 `json:"importance"` @@ -91,5 +91,3 @@ func NewTrainedModelInferenceClassImportance() *TrainedModelInferenceClassImport return r } - -// false diff --git a/typedapi/types/trainedmodelinferencefeatureimportance.go b/typedapi/types/trainedmodelinferencefeatureimportance.go index 39eff49453..bf486be0f0 100644 --- a/typedapi/types/trainedmodelinferencefeatureimportance.go +++ b/typedapi/types/trainedmodelinferencefeatureimportance.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L470-L474 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L470-L474 type TrainedModelInferenceFeatureImportance struct { Classes []TrainedModelInferenceClassImportance `json:"classes,omitempty"` FeatureName string `json:"feature_name"` @@ -97,5 +97,3 @@ func NewTrainedModelInferenceFeatureImportance() *TrainedModelInferenceFeatureIm return r } - -// false diff --git a/typedapi/types/trainedmodelinferencestats.go b/typedapi/types/trainedmodelinferencestats.go index d6281254b3..ec8df1bd33 100644 --- a/typedapi/types/trainedmodelinferencestats.go +++ b/typedapi/types/trainedmodelinferencestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L127-L147 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L127-L147 type TrainedModelInferenceStats struct { // CacheMissCount The number of times the model was loaded for inference and was not retrieved // from the cache. @@ -147,5 +147,3 @@ func NewTrainedModelInferenceStats() *TrainedModelInferenceStats { return r } - -// false diff --git a/typedapi/types/trainedmodellocation.go b/typedapi/types/trainedmodellocation.go index 75b4e18284..bbf4f060ed 100644 --- a/typedapi/types/trainedmodellocation.go +++ b/typedapi/types/trainedmodellocation.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TrainedModelLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L491-L493 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L491-L493 type TrainedModelLocation struct { Index TrainedModelLocationIndex `json:"index"` } @@ -33,5 +33,3 @@ func NewTrainedModelLocation() *TrainedModelLocation { return r } - -// false diff --git a/typedapi/types/trainedmodellocationindex.go b/typedapi/types/trainedmodellocationindex.go index ccfe4ca32c..cab417278e 100644 --- a/typedapi/types/trainedmodellocationindex.go +++ b/typedapi/types/trainedmodellocationindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TrainedModelLocationIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L495-L497 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L495-L497 type TrainedModelLocationIndex struct { Name string `json:"name"` } @@ -66,5 +66,3 @@ func NewTrainedModelLocationIndex() *TrainedModelLocationIndex { return r } - -// false diff --git a/typedapi/types/trainedmodelprefixstrings.go b/typedapi/types/trainedmodelprefixstrings.go index 285647155a..df93161051 100644 --- a/typedapi/types/trainedmodelprefixstrings.go +++ b/typedapi/types/trainedmodelprefixstrings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelPrefixStrings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L499-L508 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L499-L508 type TrainedModelPrefixStrings struct { // Ingest String prepended to input at ingest Ingest *string `json:"ingest,omitempty"` @@ -89,13 +89,3 @@ func NewTrainedModelPrefixStrings() *TrainedModelPrefixStrings { return r } - -// true - -type TrainedModelPrefixStringsVariant interface { - TrainedModelPrefixStringsCaster() *TrainedModelPrefixStrings -} - -func (s *TrainedModelPrefixStrings) TrainedModelPrefixStringsCaster() *TrainedModelPrefixStrings { - return s -} diff --git a/typedapi/types/trainedmodelsizestats.go b/typedapi/types/trainedmodelsizestats.go index 394725e0a0..ab6959452c 100644 --- a/typedapi/types/trainedmodelsizestats.go +++ b/typedapi/types/trainedmodelsizestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TrainedModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L149-L154 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L149-L154 type TrainedModelSizeStats struct { // ModelSizeBytes The size of the model in bytes. ModelSizeBytes ByteSize `json:"model_size_bytes"` @@ -74,5 +74,3 @@ func NewTrainedModelSizeStats() *TrainedModelSizeStats { return r } - -// false diff --git a/typedapi/types/trainedmodelsrecord.go b/typedapi/types/trainedmodelsrecord.go index ace2218093..e6712f5260 100644 --- a/typedapi/types/trainedmodelsrecord.go +++ b/typedapi/types/trainedmodelsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/ml_trained_models/types.ts#L23-L115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/ml_trained_models/types.ts#L23-L115 type TrainedModelsRecord struct { // CreateTime The time the model was created. CreateTime DateTime `json:"create_time,omitempty"` @@ -286,5 +286,3 @@ func NewTrainedModelsRecord() *TrainedModelsRecord { return r } - -// false diff --git a/typedapi/types/trainedmodelstats.go b/typedapi/types/trainedmodelstats.go index 0f0db4ee10..6fc5ee276d 100644 --- a/typedapi/types/trainedmodelstats.go +++ b/typedapi/types/trainedmodelstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/TrainedModel.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/TrainedModel.ts#L42-L60 type TrainedModelStats struct { // DeploymentStats A collection of deployment stats, which is present when the models are // deployed. @@ -122,5 +122,3 @@ func NewTrainedModelStats() *TrainedModelStats { return r } - -// false diff --git a/typedapi/types/trainedmodeltree.go b/typedapi/types/trainedmodeltree.go index dbfef81d0d..68529bf5bc 100644 --- a/typedapi/types/trainedmodeltree.go +++ b/typedapi/types/trainedmodeltree.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelTree type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L74-L79 type TrainedModelTree struct { ClassificationLabels []string `json:"classification_labels,omitempty"` FeatureNames []string `json:"feature_names"` @@ -92,13 +92,3 @@ func NewTrainedModelTree() *TrainedModelTree { return r } - -// true - -type TrainedModelTreeVariant interface { - TrainedModelTreeCaster() *TrainedModelTree -} - -func (s *TrainedModelTree) TrainedModelTreeCaster() *TrainedModelTree { - return s -} diff --git a/typedapi/types/trainedmodeltreenode.go b/typedapi/types/trainedmodeltreenode.go index 2a602f8507..c771a026d9 100644 --- a/typedapi/types/trainedmodeltreenode.go +++ b/typedapi/types/trainedmodeltreenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrainedModelTreeNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L81-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L81-L91 type TrainedModelTreeNode struct { DecisionType *string `json:"decision_type,omitempty"` DefaultLeft *bool `json:"default_left,omitempty"` @@ -208,13 +208,3 @@ func NewTrainedModelTreeNode() *TrainedModelTreeNode { return r } - -// true - -type TrainedModelTreeNodeVariant interface { - TrainedModelTreeNodeCaster() *TrainedModelTreeNode -} - -func (s *TrainedModelTreeNode) TrainedModelTreeNodeCaster() *TrainedModelTreeNode { - return s -} diff --git a/typedapi/types/transformauthorization.go b/typedapi/types/transformauthorization.go index 4a021dd743..d5d1f01314 100644 --- a/typedapi/types/transformauthorization.go +++ b/typedapi/types/transformauthorization.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/Authorization.ts#L59-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/Authorization.ts#L59-L71 type TransformAuthorization struct { // ApiKey If an API key was used for the most recent update to the transform, its name // and identifier are listed in the response. @@ -92,5 +92,3 @@ func NewTransformAuthorization() *TransformAuthorization { return r } - -// false diff --git a/typedapi/types/transformcontainer.go b/typedapi/types/transformcontainer.go index 0b35d3c831..2df7313e07 100644 --- a/typedapi/types/transformcontainer.go +++ b/typedapi/types/transformcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // TransformContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Transform.ts#L27-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Transform.ts#L27-L34 type TransformContainer struct { AdditionalTransformContainerProperty map[string]json.RawMessage `json:"-"` Chain []TransformContainer `json:"chain,omitempty"` @@ -72,13 +72,3 @@ func NewTransformContainer() *TransformContainer { return r } - -// true - -type TransformContainerVariant interface { - TransformContainerCaster() *TransformContainer -} - -func (s *TransformContainer) TransformContainerCaster() *TransformContainer { - return s -} diff --git a/typedapi/types/transformdestination.go b/typedapi/types/transformdestination.go index a7d1147bf0..afd99c9d38 100644 --- a/typedapi/types/transformdestination.go +++ b/typedapi/types/transformdestination.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L34-L45 type TransformDestination struct { // Index The destination index for the transform. The mappings of the destination // index are deduced based on the source @@ -86,13 +86,3 @@ func NewTransformDestination() *TransformDestination { return r } - -// true - -type TransformDestinationVariant interface { - TransformDestinationCaster() *TransformDestination -} - -func (s *TransformDestination) TransformDestinationCaster() *TransformDestination { - return s -} diff --git a/typedapi/types/transformhealthissue.go b/typedapi/types/transformhealthissue.go index c1ce2be5f3..d54bb48b58 100644 --- a/typedapi/types/transformhealthissue.go +++ b/typedapi/types/transformhealthissue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformHealthIssue type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L51-L63 type TransformHealthIssue struct { // Count Number of times this issue has occurred since it started Count int `json:"count"` @@ -134,5 +134,3 @@ func NewTransformHealthIssue() *TransformHealthIssue { return r } - -// false diff --git a/typedapi/types/transformindexerstats.go b/typedapi/types/transformindexerstats.go index 5a9e45171e..c5f40f07b5 100644 --- a/typedapi/types/transformindexerstats.go +++ b/typedapi/types/transformindexerstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformIndexerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L73-L91 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L73-L91 type TransformIndexerStats struct { DeleteTimeInMs *int64 `json:"delete_time_in_ms,omitempty"` DocumentsDeleted *int64 `json:"documents_deleted,omitempty"` @@ -285,5 +285,3 @@ func NewTransformIndexerStats() *TransformIndexerStats { return r } - -// false diff --git a/typedapi/types/transformprogress.go b/typedapi/types/transformprogress.go index d7bd2521f9..bf34c5eeee 100644 --- a/typedapi/types/transformprogress.go +++ b/typedapi/types/transformprogress.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L65-L71 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L65-L71 type TransformProgress struct { DocsIndexed int64 `json:"docs_indexed"` DocsProcessed int64 `json:"docs_processed"` @@ -142,5 +142,3 @@ func NewTransformProgress() *TransformProgress { return r } - -// false diff --git a/typedapi/types/transformsource.go b/typedapi/types/transformsource.go index d2f5c469e0..1b638f2ad6 100644 --- a/typedapi/types/transformsource.go +++ b/typedapi/types/transformsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TransformSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/_types/Transform.ts#L146-L165 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/_types/Transform.ts#L146-L165 type TransformSource struct { // Index The source indices for the transform. It can be a single index, an index // pattern (for example, `"my-index-*""`), an @@ -101,13 +101,3 @@ func NewTransformSource() *TransformSource { return r } - -// true - -type TransformSourceVariant interface { - TransformSourceCaster() *TransformSource -} - -func (s *TransformSource) TransformSourceCaster() *TransformSource { - return s -} diff --git a/typedapi/types/transformsrecord.go b/typedapi/types/transformsrecord.go index 8855b6936e..eee2921299 100644 --- a/typedapi/types/transformsrecord.go +++ b/typedapi/types/transformsrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cat/transforms/types.ts#L22-L197 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cat/transforms/types.ts#L22-L197 type TransformsRecord struct { // ChangesLastDetectionTime The timestamp when changes were last detected in the source indices. ChangesLastDetectionTime *string `json:"changes_last_detection_time,omitempty"` @@ -533,5 +533,3 @@ func NewTransformsRecord() *TransformsRecord { return r } - -// false diff --git a/typedapi/types/transformstats.go b/typedapi/types/transformstats.go index c665a17b5b..dbc664f365 100644 --- a/typedapi/types/transformstats.go +++ b/typedapi/types/transformstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L31-L42 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L31-L42 type TransformStats struct { Checkpointing Checkpointing `json:"checkpointing"` Health *TransformStatsHealth `json:"health,omitempty"` @@ -117,5 +117,3 @@ func NewTransformStats() *TransformStats { return r } - -// false diff --git a/typedapi/types/transformstatshealth.go b/typedapi/types/transformstatshealth.go index 6181099a8a..3c4339e847 100644 --- a/typedapi/types/transformstatshealth.go +++ b/typedapi/types/transformstatshealth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // TransformStatsHealth type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform_stats/types.ts#L44-L49 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform_stats/types.ts#L44-L49 type TransformStatsHealth struct { // Issues If a non-healthy status is returned, contains a list of issues of the // transform. @@ -40,5 +40,3 @@ func NewTransformStatsHealth() *TransformStatsHealth { return r } - -// false diff --git a/typedapi/types/transformsummary.go b/typedapi/types/transformsummary.go index 2c9416dab9..3d440da713 100644 --- a/typedapi/types/transformsummary.go +++ b/typedapi/types/transformsummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransformSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/transform/get_transform/types.ts#L33-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/transform/get_transform/types.ts#L33-L62 type TransformSummary struct { // Authorization The security privileges that the transform uses to run its queries. If // Elastic Stack security features were disabled at the time of the most recent @@ -170,5 +170,3 @@ func NewTransformSummary() *TransformSummary { return r } - -// false diff --git a/typedapi/types/translog.go b/typedapi/types/translog.go index f3a06166d1..ed42efe872 100644 --- a/typedapi/types/translog.go +++ b/typedapi/types/translog.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // Translog type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L355-L377 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L355-L377 type Translog struct { // Durability Whether or not to `fsync` and commit the translog after every index, delete, // update, or bulk request. @@ -101,13 +101,3 @@ func NewTranslog() *Translog { return r } - -// true - -type TranslogVariant interface { - TranslogCaster() *Translog -} - -func (s *Translog) TranslogCaster() *Translog { - return s -} diff --git a/typedapi/types/translogretention.go b/typedapi/types/translogretention.go index f55e2ec35e..80af86b7c8 100644 --- a/typedapi/types/translogretention.go +++ b/typedapi/types/translogretention.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TranslogRetention type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/_types/IndexSettings.ts#L396-L415 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/_types/IndexSettings.ts#L396-L415 type TranslogRetention struct { // Age This controls the maximum duration for which translog files are kept by each // shard. Keeping more @@ -90,13 +90,3 @@ func NewTranslogRetention() *TranslogRetention { return r } - -// true - -type TranslogRetentionVariant interface { - TranslogRetentionCaster() *TranslogRetention -} - -func (s *TranslogRetention) TranslogRetentionCaster() *TranslogRetention { - return s -} diff --git a/typedapi/types/translogstats.go b/typedapi/types/translogstats.go index 3309435ec9..d259004303 100644 --- a/typedapi/types/translogstats.go +++ b/typedapi/types/translogstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TranslogStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L400-L408 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L424-L432 type TranslogStats struct { EarliestLastModifiedAge int64 `json:"earliest_last_modified_age"` Operations int64 `json:"operations"` @@ -168,5 +168,3 @@ func NewTranslogStats() *TranslogStats { return r } - -// false diff --git a/typedapi/types/translogstatus.go b/typedapi/types/translogstatus.go index fa6ff0d93f..3a16cbbc1b 100644 --- a/typedapi/types/translogstatus.go +++ b/typedapi/types/translogstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TranslogStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L102-L109 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L102-L109 type TranslogStatus struct { Percent Percentage `json:"percent"` Recovered int64 `json:"recovered"` @@ -127,5 +127,3 @@ func NewTranslogStatus() *TranslogStatus { return r } - -// false diff --git a/typedapi/types/transport.go b/typedapi/types/transport.go index ec66e015ed..b51c812486 100644 --- a/typedapi/types/transport.go +++ b/typedapi/types/transport.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Transport type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1118-L1161 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1125-L1168 type Transport struct { // InboundHandlingTimeHistogram The distribution of the time spent handling each inbound message on a // transport thread, represented as a histogram. @@ -219,5 +219,3 @@ func NewTransport() *Transport { return r } - -// false diff --git a/typedapi/types/transporthistogram.go b/typedapi/types/transporthistogram.go index 4b0ac49362..68de6a46b8 100644 --- a/typedapi/types/transporthistogram.go +++ b/typedapi/types/transporthistogram.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TransportHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/nodes/_types/Stats.ts#L1163-L1177 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/nodes/_types/Stats.ts#L1170-L1184 type TransportHistogram struct { // Count The number of times a transport thread took a period of time within the // bounds of this bucket to handle an inbound message. @@ -115,5 +115,3 @@ func NewTransportHistogram() *TransportHistogram { return r } - -// false diff --git a/typedapi/types/triggercontainer.go b/typedapi/types/triggercontainer.go index 6588f03bc3..5f10b85346 100644 --- a/typedapi/types/triggercontainer.go +++ b/typedapi/types/triggercontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // TriggerContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Trigger.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Trigger.ts#L23-L28 type TriggerContainer struct { AdditionalTriggerContainerProperty map[string]json.RawMessage `json:"-"` Schedule *ScheduleContainer `json:"schedule,omitempty"` @@ -70,13 +70,3 @@ func NewTriggerContainer() *TriggerContainer { return r } - -// true - -type TriggerContainerVariant interface { - TriggerContainerCaster() *TriggerContainer -} - -func (s *TriggerContainer) TriggerContainerCaster() *TriggerContainer { - return s -} diff --git a/typedapi/types/triggereventcontainer.go b/typedapi/types/triggereventcontainer.go index 44e75c9640..025d9c1c51 100644 --- a/typedapi/types/triggereventcontainer.go +++ b/typedapi/types/triggereventcontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // TriggerEventContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Trigger.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Trigger.ts#L32-L37 type TriggerEventContainer struct { AdditionalTriggerEventContainerProperty map[string]json.RawMessage `json:"-"` Schedule *ScheduleTriggerEvent `json:"schedule,omitempty"` @@ -70,5 +70,3 @@ func NewTriggerEventContainer() *TriggerEventContainer { return r } - -// false diff --git a/typedapi/types/triggereventresult.go b/typedapi/types/triggereventresult.go index c807a60d6b..91245e4675 100644 --- a/typedapi/types/triggereventresult.go +++ b/typedapi/types/triggereventresult.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TriggerEventResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Trigger.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Trigger.ts#L39-L43 type TriggerEventResult struct { Manual TriggerEventContainer `json:"manual"` TriggeredTime DateTime `json:"triggered_time"` @@ -86,5 +86,3 @@ func NewTriggerEventResult() *TriggerEventResult { return r } - -// false diff --git a/typedapi/types/trimprocessor.go b/typedapi/types/trimprocessor.go index 32d9a736ed..aeff93bbab 100644 --- a/typedapi/types/trimprocessor.go +++ b/typedapi/types/trimprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TrimProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1543-L1559 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1543-L1559 type TrimProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewTrimProcessor() *TrimProcessor { return r } - -// true - -type TrimProcessorVariant interface { - TrimProcessorCaster() *TrimProcessor -} - -func (s *TrimProcessor) TrimProcessorCaster() *TrimProcessor { - return s -} diff --git a/typedapi/types/trimtokenfilter.go b/typedapi/types/trimtokenfilter.go index 131953a1b8..d0f71b89a3 100644 --- a/typedapi/types/trimtokenfilter.go +++ b/typedapi/types/trimtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // TrimTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L431-L433 type TrimTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewTrimTokenFilter() *TrimTokenFilter { return r } - -// true - -type TrimTokenFilterVariant interface { - TrimTokenFilterCaster() *TrimTokenFilter -} - -func (s *TrimTokenFilter) TrimTokenFilterCaster() *TrimTokenFilter { - return s -} diff --git a/typedapi/types/truncatetokenfilter.go b/typedapi/types/truncatetokenfilter.go index 6c2159acb3..99b9af05e8 100644 --- a/typedapi/types/truncatetokenfilter.go +++ b/typedapi/types/truncatetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,8 +31,10 @@ import ( // TruncateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L331-L334 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L435-L439 type TruncateTokenFilter struct { + // Length Character limit for each token. Tokens exceeding this limit are truncated. + // Defaults to `10`. Length *int `json:"length,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -104,13 +106,3 @@ func NewTruncateTokenFilter() *TruncateTokenFilter { return r } - -// true - -type TruncateTokenFilterVariant interface { - TruncateTokenFilterCaster() *TruncateTokenFilter -} - -func (s *TruncateTokenFilter) TruncateTokenFilterCaster() *TruncateTokenFilter { - return s -} diff --git a/typedapi/types/ttestaggregate.go b/typedapi/types/ttestaggregate.go index ccf81d3273..a6fd9315fc 100644 --- a/typedapi/types/ttestaggregate.go +++ b/typedapi/types/ttestaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TTestAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L838-L845 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L840-L847 type TTestAggregate struct { Meta Metadata `json:"meta,omitempty"` Value *Float64 `json:"value,omitempty"` @@ -86,5 +86,3 @@ func NewTTestAggregate() *TTestAggregate { return r } - -// false diff --git a/typedapi/types/ttestaggregation.go b/typedapi/types/ttestaggregation.go index ad4f8ea3d6..9f66694bd4 100644 --- a/typedapi/types/ttestaggregation.go +++ b/typedapi/types/ttestaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -26,7 +26,7 @@ import ( // TTestAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L303-L317 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L326-L340 type TTestAggregation struct { // A Test population A. A *TestPopulation `json:"a,omitempty"` @@ -42,13 +42,3 @@ func NewTTestAggregation() *TTestAggregation { return r } - -// true - -type TTestAggregationVariant interface { - TTestAggregationCaster() *TTestAggregation -} - -func (s *TTestAggregation) TTestAggregationCaster() *TTestAggregation { - return s -} diff --git a/typedapi/types/turkishanalyzer.go b/typedapi/types/turkishanalyzer.go index 16c0174562..d268de397d 100644 --- a/typedapi/types/turkishanalyzer.go +++ b/typedapi/types/turkishanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,12 +31,12 @@ import ( // TurkishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L290-L295 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L290-L295 type TurkishAnalyzer struct { - StemExclusion []string `json:"stem_exclusion,omitempty"` - Stopwords []string `json:"stopwords,omitempty"` - StopwordsPath *string `json:"stopwords_path,omitempty"` - Type string `json:"type,omitempty"` + StemExclusion []string `json:"stem_exclusion,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` + StopwordsPath *string `json:"stopwords_path,omitempty"` + Type string `json:"type,omitempty"` } func (s *TurkishAnalyzer) UnmarshalJSON(data []byte) error { @@ -60,19 +60,8 @@ func (s *TurkishAnalyzer) UnmarshalJSON(data []byte) error { } case "stopwords": - rawMsg := json.RawMessage{} - dec.Decode(&rawMsg) - if !bytes.HasPrefix(rawMsg, []byte("[")) { - o := new(string) - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&o); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } - - s.Stopwords = append(s.Stopwords, *o) - } else { - if err := json.NewDecoder(bytes.NewReader(rawMsg)).Decode(&s.Stopwords); err != nil { - return fmt.Errorf("%s | %w", "Stopwords", err) - } + if err := dec.Decode(&s.Stopwords); err != nil { + return fmt.Errorf("%s | %w", "Stopwords", err) } case "stopwords_path": @@ -118,13 +107,3 @@ func NewTurkishAnalyzer() *TurkishAnalyzer { return r } - -// true - -type TurkishAnalyzerVariant interface { - TurkishAnalyzerCaster() *TurkishAnalyzer -} - -func (s *TurkishAnalyzer) TurkishAnalyzerCaster() *TurkishAnalyzer { - return s -} diff --git a/typedapi/types/typefieldmappings.go b/typedapi/types/typefieldmappings.go index e005824ed3..eeb3d980b3 100644 --- a/typedapi/types/typefieldmappings.go +++ b/typedapi/types/typefieldmappings.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // TypeFieldMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/get_field_mapping/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/get_field_mapping/types.ts#L24-L26 type TypeFieldMappings struct { Mappings map[string]FieldMapping `json:"mappings"` } @@ -35,5 +35,3 @@ func NewTypeFieldMappings() *TypeFieldMappings { return r } - -// false diff --git a/typedapi/types/typemapping.go b/typedapi/types/typemapping.go index 3bb46567f5..87f4ba27d1 100644 --- a/typedapi/types/typemapping.go +++ b/typedapi/types/typemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // TypeMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/TypeMapping.ts#L34-L57 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/TypeMapping.ts#L34-L57 type TypeMapping struct { AllField *AllField `json:"all_field,omitempty"` DataStreamTimestamp_ *DataStreamTimestamp `json:"_data_stream_timestamp,omitempty"` @@ -294,6 +294,12 @@ func (s *TypeMapping) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -525,13 +531,3 @@ func NewTypeMapping() *TypeMapping { return r } - -// true - -type TypeMappingVariant interface { - TypeMappingCaster() *TypeMapping -} - -func (s *TypeMapping) TypeMappingCaster() *TypeMapping { - return s -} diff --git a/typedapi/types/typequery.go b/typedapi/types/typequery.go index 91cc4b59ac..7cb5007eab 100644 --- a/typedapi/types/typequery.go +++ b/typedapi/types/typequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // TypeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L301-L303 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L301-L303 type TypeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -109,13 +109,3 @@ func NewTypeQuery() *TypeQuery { return r } - -// true - -type TypeQueryVariant interface { - TypeQueryCaster() *TypeQuery -} - -func (s *TypeQuery) TypeQueryCaster() *TypeQuery { - return s -} diff --git a/typedapi/types/uaxemailurltokenizer.go b/typedapi/types/uaxemailurltokenizer.go index c264dd2085..bad8572154 100644 --- a/typedapi/types/uaxemailurltokenizer.go +++ b/typedapi/types/uaxemailurltokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UaxEmailUrlTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L130-L133 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L132-L135 type UaxEmailUrlTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -104,13 +104,3 @@ func NewUaxEmailUrlTokenizer() *UaxEmailUrlTokenizer { return r } - -// true - -type UaxEmailUrlTokenizerVariant interface { - UaxEmailUrlTokenizerCaster() *UaxEmailUrlTokenizer -} - -func (s *UaxEmailUrlTokenizer) UaxEmailUrlTokenizerCaster() *UaxEmailUrlTokenizer { - return s -} diff --git a/typedapi/types/unassignedinformation.go b/typedapi/types/unassignedinformation.go index d1d0f2c21b..1ca63a79d8 100644 --- a/typedapi/types/unassignedinformation.go +++ b/typedapi/types/unassignedinformation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // UnassignedInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/allocation_explain/types.ts#L128-L136 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/allocation_explain/types.ts#L128-L136 type UnassignedInformation struct { AllocationStatus *string `json:"allocation_status,omitempty"` At DateTime `json:"at"` @@ -146,5 +146,3 @@ func NewUnassignedInformation() *UnassignedInformation { return r } - -// false diff --git a/typedapi/types/uniquetokenfilter.go b/typedapi/types/uniquetokenfilter.go index 87f03407c7..77cfcdd384 100644 --- a/typedapi/types/uniquetokenfilter.go +++ b/typedapi/types/uniquetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,8 +31,10 @@ import ( // UniqueTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L336-L339 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L441-L445 type UniqueTokenFilter struct { + // OnlyOnSamePosition If `true`, only remove duplicate tokens in the same position. Defaults to + // `false`. OnlyOnSamePosition *bool `json:"only_on_same_position,omitempty"` Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -102,13 +104,3 @@ func NewUniqueTokenFilter() *UniqueTokenFilter { return r } - -// true - -type UniqueTokenFilterVariant interface { - UniqueTokenFilterCaster() *UniqueTokenFilter -} - -func (s *UniqueTokenFilter) UniqueTokenFilterCaster() *UniqueTokenFilter { - return s -} diff --git a/typedapi/types/unmappedraretermsaggregate.go b/typedapi/types/unmappedraretermsaggregate.go index c888811141..11eb03dce5 100644 --- a/typedapi/types/unmappedraretermsaggregate.go +++ b/typedapi/types/unmappedraretermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // UnmappedRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L493-L499 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L493-L499 type UnmappedRareTermsAggregate struct { Buckets BucketsVoid `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewUnmappedRareTermsAggregate() *UnmappedRareTermsAggregate { return r } - -// false diff --git a/typedapi/types/unmappedsampleraggregate.go b/typedapi/types/unmappedsampleraggregate.go index 744754a37a..99bea03ea1 100644 --- a/typedapi/types/unmappedsampleraggregate.go +++ b/typedapi/types/unmappedsampleraggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // UnmappedSamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L561-L562 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L561-L562 type UnmappedSamplerAggregate struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -636,5 +636,3 @@ func NewUnmappedSamplerAggregate() *UnmappedSamplerAggregate { return r } - -// false diff --git a/typedapi/types/unmappedsignificanttermsaggregate.go b/typedapi/types/unmappedsignificanttermsaggregate.go index f710c7c945..059d12c0cc 100644 --- a/typedapi/types/unmappedsignificanttermsaggregate.go +++ b/typedapi/types/unmappedsignificanttermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UnmappedSignificantTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L690-L696 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L692-L698 type UnmappedSignificantTermsAggregate struct { BgCount *int64 `json:"bg_count,omitempty"` Buckets BucketsVoid `json:"buckets"` @@ -121,5 +121,3 @@ func NewUnmappedSignificantTermsAggregate() *UnmappedSignificantTermsAggregate { return r } - -// false diff --git a/typedapi/types/unmappedtermsaggregate.go b/typedapi/types/unmappedtermsaggregate.go index 61f2d5971d..e93ea35920 100644 --- a/typedapi/types/unmappedtermsaggregate.go +++ b/typedapi/types/unmappedtermsaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UnmappedTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L463-L469 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L463-L469 type UnmappedTermsAggregate struct { Buckets BucketsVoid `json:"buckets"` DocCountErrorUpperBound *int64 `json:"doc_count_error_upper_bound,omitempty"` @@ -121,5 +121,3 @@ func NewUnmappedTermsAggregate() *UnmappedTermsAggregate { return r } - -// false diff --git a/typedapi/types/unrateddocument.go b/typedapi/types/unrateddocument.go index 43cbe25941..1791555e77 100644 --- a/typedapi/types/unrateddocument.go +++ b/typedapi/types/unrateddocument.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // UnratedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/rank_eval/types.ts#L150-L153 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/rank_eval/types.ts#L150-L153 type UnratedDocument struct { Id_ string `json:"_id"` Index_ string `json:"_index"` @@ -72,5 +72,3 @@ func NewUnratedDocument() *UnratedDocument { return r } - -// false diff --git a/typedapi/types/unsignedlongnumberproperty.go b/typedapi/types/unsignedlongnumberproperty.go index 1754eedf80..a03ccf2aeb 100644 --- a/typedapi/types/unsignedlongnumberproperty.go +++ b/typedapi/types/unsignedlongnumberproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -36,7 +36,7 @@ import ( // UnsignedLongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L191-L194 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L193-L196 type UnsignedLongNumberProperty struct { Boost *Float64 `json:"boost,omitempty"` Coerce *bool `json:"coerce,omitempty"` @@ -286,6 +286,12 @@ func (s *UnsignedLongNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -679,6 +685,12 @@ func (s *UnsignedLongNumberProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -961,13 +973,3 @@ func NewUnsignedLongNumberProperty() *UnsignedLongNumberProperty { return r } - -// true - -type UnsignedLongNumberPropertyVariant interface { - UnsignedLongNumberPropertyCaster() *UnsignedLongNumberProperty -} - -func (s *UnsignedLongNumberProperty) UnsignedLongNumberPropertyCaster() *UnsignedLongNumberProperty { - return s -} diff --git a/typedapi/types/untypeddecayfunction.go b/typedapi/types/untypeddecayfunction.go index 1fc1d4c5f7..0dde67dacc 100644 --- a/typedapi/types/untypeddecayfunction.go +++ b/typedapi/types/untypeddecayfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // UntypedDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/compound.ts#L204-L207 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/compound.ts#L204-L207 type UntypedDecayFunction struct { DecayFunctionBase map[string]DecayPlacement `json:"-"` // MultiValueMode Determines how the distance is calculated when a field used for computing the @@ -74,13 +74,3 @@ func NewUntypedDecayFunction() *UntypedDecayFunction { return r } - -// true - -type UntypedDecayFunctionVariant interface { - UntypedDecayFunctionCaster() *UntypedDecayFunction -} - -func (s *UntypedDecayFunction) UntypedDecayFunctionCaster() *UntypedDecayFunction { - return s -} diff --git a/typedapi/types/untypeddistancefeaturequery.go b/typedapi/types/untypeddistancefeaturequery.go index 001a9ad586..1f761300e8 100644 --- a/typedapi/types/untypeddistancefeaturequery.go +++ b/typedapi/types/untypeddistancefeaturequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UntypedDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/specialized.ts#L61-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/specialized.ts#L61-L64 type UntypedDistanceFeatureQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -131,13 +131,3 @@ func NewUntypedDistanceFeatureQuery() *UntypedDistanceFeatureQuery { return r } - -// true - -type UntypedDistanceFeatureQueryVariant interface { - UntypedDistanceFeatureQueryCaster() *UntypedDistanceFeatureQuery -} - -func (s *UntypedDistanceFeatureQuery) UntypedDistanceFeatureQueryCaster() *UntypedDistanceFeatureQuery { - return s -} diff --git a/typedapi/types/untypedrangequery.go b/typedapi/types/untypedrangequery.go index cbbf83220f..566e7092ad 100644 --- a/typedapi/types/untypedrangequery.go +++ b/typedapi/types/untypedrangequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // UntypedRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L150-L159 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L150-L159 type UntypedRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -160,13 +160,3 @@ func NewUntypedRangeQuery() *UntypedRangeQuery { return r } - -// true - -type UntypedRangeQueryVariant interface { - UntypedRangeQueryCaster() *UntypedRangeQuery -} - -func (s *UntypedRangeQuery) UntypedRangeQueryCaster() *UntypedRangeQuery { - return s -} diff --git a/typedapi/types/updateaction.go b/typedapi/types/updateaction.go index ddd0c6c456..64be4ca865 100644 --- a/typedapi/types/updateaction.go +++ b/typedapi/types/updateaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UpdateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L182-L217 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L182-L217 type UpdateAction struct { // DetectNoop If true, the `result` in the response is set to 'noop' when no changes to the // document occur. @@ -139,7 +139,7 @@ func (s *UpdateAction) UnmarshalJSON(data []byte) error { switch t { - case "excludes", "includes": + case "exclude_vectors", "excludes", "includes": o := NewSourceFilter() localDec := json.NewDecoder(bytes.NewReader(message)) if err := localDec.Decode(&o); err != nil { @@ -173,13 +173,3 @@ func NewUpdateAction() *UpdateAction { return r } - -// true - -type UpdateActionVariant interface { - UpdateActionCaster() *UpdateAction -} - -func (s *UpdateAction) UpdateActionCaster() *UpdateAction { - return s -} diff --git a/typedapi/types/updatebyqueryrethrottlenode.go b/typedapi/types/updatebyqueryrethrottlenode.go index 8edbdb3859..37f277b7ee 100644 --- a/typedapi/types/updatebyqueryrethrottlenode.go +++ b/typedapi/types/updatebyqueryrethrottlenode.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // UpdateByQueryRethrottleNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 type UpdateByQueryRethrottleNode struct { Attributes map[string]string `json:"attributes"` Host string `json:"host"` @@ -113,5 +113,3 @@ func NewUpdateByQueryRethrottleNode() *UpdateByQueryRethrottleNode { return r } - -// false diff --git a/typedapi/types/updateoperation.go b/typedapi/types/updateoperation.go index c0d89c1b44..298cfcf373 100644 --- a/typedapi/types/updateoperation.go +++ b/typedapi/types/updateoperation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // UpdateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_global/bulk/types.ts#L146-L156 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_global/bulk/types.ts#L146-L156 type UpdateOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` @@ -153,13 +153,3 @@ func NewUpdateOperation() *UpdateOperation { return r } - -// true - -type UpdateOperationVariant interface { - UpdateOperationCaster() *UpdateOperation -} - -func (s *UpdateOperation) UpdateOperationCaster() *UpdateOperation { - return s -} diff --git a/typedapi/types/uppercaseprocessor.go b/typedapi/types/uppercaseprocessor.go index 1650f258f6..c99d65c2e0 100644 --- a/typedapi/types/uppercaseprocessor.go +++ b/typedapi/types/uppercaseprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UppercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1561-L1577 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1561-L1577 type UppercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewUppercaseProcessor() *UppercaseProcessor { return r } - -// true - -type UppercaseProcessorVariant interface { - UppercaseProcessorCaster() *UppercaseProcessor -} - -func (s *UppercaseProcessor) UppercaseProcessorCaster() *UppercaseProcessor { - return s -} diff --git a/typedapi/types/uppercasetokenfilter.go b/typedapi/types/uppercasetokenfilter.go index f4662117f5..08553c9124 100644 --- a/typedapi/types/uppercasetokenfilter.go +++ b/typedapi/types/uppercasetokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // UppercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L341-L343 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L447-L449 type UppercaseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewUppercaseTokenFilter() *UppercaseTokenFilter { return r } - -// true - -type UppercaseTokenFilterVariant interface { - UppercaseTokenFilterCaster() *UppercaseTokenFilter -} - -func (s *UppercaseTokenFilter) UppercaseTokenFilterCaster() *UppercaseTokenFilter { - return s -} diff --git a/typedapi/types/uripartsprocessor.go b/typedapi/types/uripartsprocessor.go index e59d853aa5..6d5a6d3ea7 100644 --- a/typedapi/types/uripartsprocessor.go +++ b/typedapi/types/uripartsprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UriPartsProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1597-L1623 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1597-L1623 type UriPartsProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -193,13 +193,3 @@ func NewUriPartsProcessor() *UriPartsProcessor { return r } - -// true - -type UriPartsProcessorVariant interface { - UriPartsProcessorCaster() *UriPartsProcessor -} - -func (s *UriPartsProcessor) UriPartsProcessorCaster() *UriPartsProcessor { - return s -} diff --git a/typedapi/types/urldecodeprocessor.go b/typedapi/types/urldecodeprocessor.go index df5ae24d96..4f4f32de04 100644 --- a/typedapi/types/urldecodeprocessor.go +++ b/typedapi/types/urldecodeprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UrlDecodeProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L1579-L1595 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L1579-L1595 type UrlDecodeProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -160,13 +160,3 @@ func NewUrlDecodeProcessor() *UrlDecodeProcessor { return r } - -// true - -type UrlDecodeProcessorVariant interface { - UrlDecodeProcessorCaster() *UrlDecodeProcessor -} - -func (s *UrlDecodeProcessor) UrlDecodeProcessorCaster() *UrlDecodeProcessor { - return s -} diff --git a/typedapi/types/usagephase.go b/typedapi/types/usagephase.go index 0c424e903e..0dcd0e7d04 100644 --- a/typedapi/types/usagephase.go +++ b/typedapi/types/usagephase.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // UsagePhase type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L154-L157 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L154-L157 type UsagePhase struct { Actions []string `json:"actions"` MinAge int64 `json:"min_age"` @@ -72,5 +72,3 @@ func NewUsagePhase() *UsagePhase { return r } - -// false diff --git a/typedapi/types/usagephases.go b/typedapi/types/usagephases.go index a909887ad1..1f8cb717b7 100644 --- a/typedapi/types/usagephases.go +++ b/typedapi/types/usagephases.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // UsagePhases type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L159-L165 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L159-L165 type UsagePhases struct { Cold *UsagePhase `json:"cold,omitempty"` Delete *UsagePhase `json:"delete,omitempty"` @@ -37,5 +37,3 @@ func NewUsagePhases() *UsagePhases { return r } - -// false diff --git a/typedapi/types/usagestatsindex.go b/typedapi/types/usagestatsindex.go index 33856e1556..fafdcfa049 100644 --- a/typedapi/types/usagestatsindex.go +++ b/typedapi/types/usagestatsindex.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // UsageStatsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L41-L43 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L41-L43 type UsageStatsIndex struct { Shards []UsageStatsShards `json:"shards"` } @@ -33,5 +33,3 @@ func NewUsageStatsIndex() *UsageStatsIndex { return r } - -// false diff --git a/typedapi/types/usagestatsshards.go b/typedapi/types/usagestatsshards.go index cf5925e3ed..e168396ac6 100644 --- a/typedapi/types/usagestatsshards.go +++ b/typedapi/types/usagestatsshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UsageStatsShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L45-L50 type UsageStatsShards struct { Routing ShardRouting `json:"routing"` Stats IndicesShardsStats `json:"stats"` @@ -92,5 +92,3 @@ func NewUsageStatsShards() *UsageStatsShards { return r } - -// false diff --git a/typedapi/types/user.go b/typedapi/types/user.go index b6817e87d7..2abe524d52 100644 --- a/typedapi/types/user.go +++ b/typedapi/types/user.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // User type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/User.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/User.ts#L23-L31 type User struct { Email *string `json:"email,omitempty"` Enabled bool `json:"enabled"` @@ -119,5 +119,3 @@ func NewUser() *User { return r } - -// false diff --git a/typedapi/types/useragentprocessor.go b/typedapi/types/useragentprocessor.go index a78bd32c71..f25ecf8935 100644 --- a/typedapi/types/useragentprocessor.go +++ b/typedapi/types/useragentprocessor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // UserAgentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Processors.ts#L514-L545 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Processors.ts#L514-L545 type UserAgentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -202,13 +202,3 @@ func NewUserAgentProcessor() *UserAgentProcessor { return r } - -// true - -type UserAgentProcessorVariant interface { - UserAgentProcessorCaster() *UserAgentProcessor -} - -func (s *UserAgentProcessor) UserAgentProcessorCaster() *UserAgentProcessor { - return s -} diff --git a/typedapi/types/userindicesprivileges.go b/typedapi/types/userindicesprivileges.go index acadc450c3..9a0c94b34c 100644 --- a/typedapi/types/userindicesprivileges.go +++ b/typedapi/types/userindicesprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // UserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/Privileges.ts#L292-L314 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/Privileges.ts#L292-L314 type UserIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -159,5 +159,3 @@ func NewUserIndicesPrivileges() *UserIndicesPrivileges { return r } - -// false diff --git a/typedapi/types/userprofile.go b/typedapi/types/userprofile.go index 315f99ff25..526d493350 100644 --- a/typedapi/types/userprofile.go +++ b/typedapi/types/userprofile.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UserProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/UserProfile.ts#L41-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/UserProfile.ts#L41-L47 type UserProfile struct { Data map[string]json.RawMessage `json:"data"` Enabled *bool `json:"enabled,omitempty"` @@ -109,5 +109,3 @@ func NewUserProfile() *UserProfile { return r } - -// false diff --git a/typedapi/types/userprofilehitmetadata.go b/typedapi/types/userprofilehitmetadata.go index 3dde6fd037..3e9f7d7af0 100644 --- a/typedapi/types/userprofilehitmetadata.go +++ b/typedapi/types/userprofilehitmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UserProfileHitMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/UserProfile.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/UserProfile.ts#L27-L30 type UserProfileHitMetadata struct { PrimaryTerm_ int64 `json:"_primary_term"` SeqNo_ int64 `json:"_seq_no"` @@ -83,5 +83,3 @@ func NewUserProfileHitMetadata() *UserProfileHitMetadata { return r } - -// false diff --git a/typedapi/types/userprofileuser.go b/typedapi/types/userprofileuser.go index 42800a7196..b991a44b50 100644 --- a/typedapi/types/userprofileuser.go +++ b/typedapi/types/userprofileuser.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UserProfileUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/UserProfile.ts#L32-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/UserProfile.ts#L32-L39 type UserProfileUser struct { Email *string `json:"email,omitempty"` FullName *string `json:"full_name,omitempty"` @@ -104,5 +104,3 @@ func NewUserProfileUser() *UserProfileUser { return r } - -// false diff --git a/typedapi/types/userprofilewithmetadata.go b/typedapi/types/userprofilewithmetadata.go index 92ea25fa4d..3e7bcdc95d 100644 --- a/typedapi/types/userprofilewithmetadata.go +++ b/typedapi/types/userprofilewithmetadata.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UserProfileWithMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/_types/UserProfile.ts#L49-L52 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/_types/UserProfile.ts#L49-L52 type UserProfileWithMetadata struct { Data map[string]json.RawMessage `json:"data"` Doc_ UserProfileHitMetadata `json:"_doc"` @@ -131,5 +131,3 @@ func NewUserProfileWithMetadata() *UserProfileWithMetadata { return r } - -// false diff --git a/typedapi/types/userquerycontainer.go b/typedapi/types/userquerycontainer.go index 4a8269e9ba..483bf4140e 100644 --- a/typedapi/types/userquerycontainer.go +++ b/typedapi/types/userquerycontainer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // UserQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/query_user/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/query_user/types.ts#L37-L101 type UserQueryContainer struct { AdditionalUserQueryContainerProperty map[string]json.RawMessage `json:"-"` // Bool matches users matching boolean combinations of other queries. @@ -220,13 +220,3 @@ func NewUserQueryContainer() *UserQueryContainer { return r } - -// true - -type UserQueryContainerVariant interface { - UserQueryContainerCaster() *UserQueryContainer -} - -func (s *UserQueryContainer) UserQueryContainerCaster() *UserQueryContainer { - return s -} diff --git a/typedapi/types/userrealm.go b/typedapi/types/userrealm.go index f8cc6fad0a..ac74e61bdc 100644 --- a/typedapi/types/userrealm.go +++ b/typedapi/types/userrealm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // UserRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/security/get_token/types.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/security/get_token/types.ts#L50-L53 type UserRealm struct { Name string `json:"name"` Type string `json:"type"` @@ -80,5 +80,3 @@ func NewUserRealm() *UserRealm { return r } - -// false diff --git a/typedapi/types/validation.go b/typedapi/types/validation.go index 29777deae0..96c23d8dd0 100644 --- a/typedapi/types/validation.go +++ b/typedapi/types/validation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -28,9 +28,5 @@ package types // IncludedInValidation // RegexValidation // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/connector/_types/Connector.ts#L50-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/connector/_types/Connector.ts#L50-L56 type Validation any - -type ValidationVariant interface { - ValidationCaster() *Validation -} diff --git a/typedapi/types/validationloss.go b/typedapi/types/validationloss.go index 4d5c065167..d25c9b0391 100644 --- a/typedapi/types/validationloss.go +++ b/typedapi/types/validationloss.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ValidationLoss type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/DataframeAnalytics.ts#L571-L576 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/DataframeAnalytics.ts#L571-L576 type ValidationLoss struct { // FoldValues Validation loss values for every added decision tree during the forest // growing procedure. @@ -83,5 +83,3 @@ func NewValidationLoss() *ValidationLoss { return r } - -// false diff --git a/typedapi/types/valuecountaggregate.go b/typedapi/types/valuecountaggregate.go index 182d1f7cfe..09d77e4f2b 100644 --- a/typedapi/types/valuecountaggregate.go +++ b/typedapi/types/valuecountaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L231-L236 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L231-L236 type ValueCountAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewValueCountAggregate() *ValueCountAggregate { return r } - -// false diff --git a/typedapi/types/valuecountaggregation.go b/typedapi/types/valuecountaggregation.go index 74af350604..be1e05f1b7 100644 --- a/typedapi/types/valuecountaggregation.go +++ b/typedapi/types/valuecountaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L434-L434 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L457-L457 type ValueCountAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -95,13 +95,3 @@ func NewValueCountAggregation() *ValueCountAggregation { return r } - -// true - -type ValueCountAggregationVariant interface { - ValueCountAggregationCaster() *ValueCountAggregation -} - -func (s *ValueCountAggregation) ValueCountAggregationCaster() *ValueCountAggregation { - return s -} diff --git a/typedapi/types/variablewidthhistogramaggregate.go b/typedapi/types/variablewidthhistogramaggregate.go index 6567b50500..bc3a39baa3 100644 --- a/typedapi/types/variablewidthhistogramaggregate.go +++ b/typedapi/types/variablewidthhistogramaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // VariableWidthHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L402-L404 type VariableWidthHistogramAggregate struct { Buckets BucketsVariableWidthHistogramBucket `json:"buckets"` Meta Metadata `json:"meta,omitempty"` @@ -88,5 +88,3 @@ func NewVariableWidthHistogramAggregate() *VariableWidthHistogramAggregate { return r } - -// false diff --git a/typedapi/types/variablewidthhistogramaggregation.go b/typedapi/types/variablewidthhistogramaggregation.go index 9bc1ab0fd0..131c7322a9 100644 --- a/typedapi/types/variablewidthhistogramaggregation.go +++ b/typedapi/types/variablewidthhistogramaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // VariableWidthHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/bucket.ts#L1091-L1115 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/bucket.ts#L1091-L1115 type VariableWidthHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` @@ -132,13 +132,3 @@ func NewVariableWidthHistogramAggregation() *VariableWidthHistogramAggregation { return r } - -// true - -type VariableWidthHistogramAggregationVariant interface { - VariableWidthHistogramAggregationCaster() *VariableWidthHistogramAggregation -} - -func (s *VariableWidthHistogramAggregation) VariableWidthHistogramAggregationCaster() *VariableWidthHistogramAggregation { - return s -} diff --git a/typedapi/types/variablewidthhistogrambucket.go b/typedapi/types/variablewidthhistogrambucket.go index 8f70e89ca8..5fb26359a4 100644 --- a/typedapi/types/variablewidthhistogrambucket.go +++ b/typedapi/types/variablewidthhistogrambucket.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // VariableWidthHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L406-L413 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L406-L413 type VariableWidthHistogramBucket struct { Aggregations map[string]Aggregate `json:"-"` DocCount int64 `json:"doc_count"` @@ -720,5 +720,3 @@ func NewVariableWidthHistogramBucket() *VariableWidthHistogramBucket { return r } - -// false diff --git a/typedapi/types/vector.go b/typedapi/types/vector.go index ca803961fc..3eda9364f0 100644 --- a/typedapi/types/vector.go +++ b/typedapi/types/vector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Vector type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L464-L468 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L464-L468 type Vector struct { Available bool `json:"available"` DenseVectorDimsAvgCount int `json:"dense_vector_dims_avg_count"` @@ -142,5 +142,3 @@ func NewVector() *Vector { return r } - -// false diff --git a/typedapi/types/verifyindex.go b/typedapi/types/verifyindex.go index 979ca02dc5..6305415656 100644 --- a/typedapi/types/verifyindex.go +++ b/typedapi/types/verifyindex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // VerifyIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/indices/recovery/types.ts#L111-L116 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/indices/recovery/types.ts#L111-L116 type VerifyIndex struct { CheckIndexTime Duration `json:"check_index_time,omitempty"` CheckIndexTimeInMillis int64 `json:"check_index_time_in_millis"` @@ -84,5 +84,3 @@ func NewVerifyIndex() *VerifyIndex { return r } - -// false diff --git a/typedapi/types/versionproperty.go b/typedapi/types/versionproperty.go index c6abe4d9c6..4b9fa6491f 100644 --- a/typedapi/types/versionproperty.go +++ b/typedapi/types/versionproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // VersionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L322-L324 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L347-L349 type VersionProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -241,6 +241,12 @@ func (s *VersionProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -596,6 +602,12 @@ func (s *VersionProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -845,13 +857,3 @@ func NewVersionProperty() *VersionProperty { return r } - -// true - -type VersionPropertyVariant interface { - VersionPropertyCaster() *VersionProperty -} - -func (s *VersionProperty) VersionPropertyCaster() *VersionProperty { - return s -} diff --git a/typedapi/types/vertex.go b/typedapi/types/vertex.go index 2c6d38c4b9..615a94d986 100644 --- a/typedapi/types/vertex.go +++ b/typedapi/types/vertex.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Vertex type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/Vertex.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/Vertex.ts#L23-L28 type Vertex struct { Depth int64 `json:"depth"` Field string `json:"field"` @@ -113,5 +113,3 @@ func NewVertex() *Vertex { return r } - -// false diff --git a/typedapi/types/vertexdefinition.go b/typedapi/types/vertexdefinition.go index eb8e102736..4d76496b94 100644 --- a/typedapi/types/vertexdefinition.go +++ b/typedapi/types/vertexdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // VertexDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/Vertex.ts#L30-L59 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/Vertex.ts#L30-L59 type VertexDefinition struct { // Exclude Prevents the specified terms from being included in the results. Exclude []string `json:"exclude,omitempty"` @@ -138,13 +138,3 @@ func NewVertexDefinition() *VertexDefinition { return r } - -// true - -type VertexDefinitionVariant interface { - VertexDefinitionCaster() *VertexDefinition -} - -func (s *VertexDefinition) VertexDefinitionCaster() *VertexDefinition { - return s -} diff --git a/typedapi/types/vertexinclude.go b/typedapi/types/vertexinclude.go index b50d7a9f40..85352c5b5e 100644 --- a/typedapi/types/vertexinclude.go +++ b/typedapi/types/vertexinclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // VertexInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/graph/_types/Vertex.ts#L61-L64 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/graph/_types/Vertex.ts#L61-L64 type VertexInclude struct { Boost Float64 `json:"boost"` Term string `json:"term"` @@ -91,13 +91,3 @@ func NewVertexInclude() *VertexInclude { return r } - -// true - -type VertexIncludeVariant interface { - VertexIncludeCaster() *VertexInclude -} - -func (s *VertexInclude) VertexIncludeCaster() *VertexInclude { - return s -} diff --git a/typedapi/types/vocabulary.go b/typedapi/types/vocabulary.go index d7ec03358f..e7a1999217 100644 --- a/typedapi/types/vocabulary.go +++ b/typedapi/types/vocabulary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Vocabulary type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L248-L250 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L248-L250 type Vocabulary struct { Index string `json:"index"` } @@ -66,13 +66,3 @@ func NewVocabulary() *Vocabulary { return r } - -// true - -type VocabularyVariant interface { - VocabularyCaster() *Vocabulary -} - -func (s *Vocabulary) VocabularyCaster() *Vocabulary { - return s -} diff --git a/typedapi/types/voyageaiservicesettings.go b/typedapi/types/voyageaiservicesettings.go index 220d6edc5d..71df6e936d 100644 --- a/typedapi/types/voyageaiservicesettings.go +++ b/typedapi/types/voyageaiservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // VoyageAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1075-L1106 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1616-L1647 type VoyageAIServiceSettings struct { // Dimensions The number of dimensions for resulting output embeddings. // This setting maps to `output_dimension` in the VoyageAI documentation. @@ -131,13 +131,3 @@ func NewVoyageAIServiceSettings() *VoyageAIServiceSettings { return r } - -// true - -type VoyageAIServiceSettingsVariant interface { - VoyageAIServiceSettingsCaster() *VoyageAIServiceSettings -} - -func (s *VoyageAIServiceSettings) VoyageAIServiceSettingsCaster() *VoyageAIServiceSettings { - return s -} diff --git a/typedapi/types/voyageaitasksettings.go b/typedapi/types/voyageaitasksettings.go index 86bfcb379b..150ee6bb3b 100644 --- a/typedapi/types/voyageaitasksettings.go +++ b/typedapi/types/voyageaitasksettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // VoyageAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1108-L1132 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1649-L1673 type VoyageAITaskSettings struct { // InputType Type of the input text. // Permitted values: `ingest` (maps to `document` in the VoyageAI @@ -131,13 +131,3 @@ func NewVoyageAITaskSettings() *VoyageAITaskSettings { return r } - -// true - -type VoyageAITaskSettingsVariant interface { - VoyageAITaskSettingsCaster() *VoyageAITaskSettings -} - -func (s *VoyageAITaskSettings) VoyageAITaskSettingsCaster() *VoyageAITaskSettings { - return s -} diff --git a/typedapi/types/waitforactiveshards.go b/typedapi/types/waitforactiveshards.go index c8fd3f122e..b431b67df0 100644 --- a/typedapi/types/waitforactiveshards.go +++ b/typedapi/types/waitforactiveshards.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // int // waitforactiveshardoptions.WaitForActiveShardOptions // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/common.ts#L146-L147 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/common.ts#L146-L147 type WaitForActiveShards any diff --git a/typedapi/types/waitfornodes.go b/typedapi/types/waitfornodes.go index 70ef3ee9ba..82b9d5913c 100644 --- a/typedapi/types/waitfornodes.go +++ b/typedapi/types/waitfornodes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -25,5 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/cluster/health/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/cluster/health/types.ts#L47-L47 type WaitForNodes any diff --git a/typedapi/types/waitforsnapshotaction.go b/typedapi/types/waitforsnapshotaction.go index ace277d156..139efc21e9 100644 --- a/typedapi/types/waitforsnapshotaction.go +++ b/typedapi/types/waitforsnapshotaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WaitForSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ilm/_types/Phase.ts#L145-L147 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ilm/_types/Phase.ts#L145-L147 type WaitForSnapshotAction struct { Policy string `json:"policy"` } @@ -74,13 +74,3 @@ func NewWaitForSnapshotAction() *WaitForSnapshotAction { return r } - -// true - -type WaitForSnapshotActionVariant interface { - WaitForSnapshotActionCaster() *WaitForSnapshotAction -} - -func (s *WaitForSnapshotAction) WaitForSnapshotActionCaster() *WaitForSnapshotAction { - return s -} diff --git a/typedapi/types/warmerstats.go b/typedapi/types/warmerstats.go index 331046de3e..c6c2596476 100644 --- a/typedapi/types/warmerstats.go +++ b/typedapi/types/warmerstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WarmerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Stats.ts#L410-L415 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Stats.ts#L434-L439 type WarmerStats struct { Current int64 `json:"current"` Total int64 `json:"total"` @@ -105,5 +105,3 @@ func NewWarmerStats() *WarmerStats { return r } - -// false diff --git a/typedapi/types/watch.go b/typedapi/types/watch.go index 235b0016eb..39054a9b2f 100644 --- a/typedapi/types/watch.go +++ b/typedapi/types/watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // Watch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Watch.ts#L37-L47 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Watch.ts#L37-L47 type Watch struct { Actions map[string]WatcherAction `json:"actions"` Condition WatcherCondition `json:"condition"` @@ -119,13 +119,3 @@ func NewWatch() *Watch { return r } - -// true - -type WatchVariant interface { - WatchCaster() *Watch -} - -func (s *Watch) WatchCaster() *Watch { - return s -} diff --git a/typedapi/types/watcher.go b/typedapi/types/watcher.go index 9f3362d640..4371a4b4d4 100644 --- a/typedapi/types/watcher.go +++ b/typedapi/types/watcher.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Watcher type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L470-L474 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L470-L474 type Watcher struct { Available bool `json:"available"` Count Counter `json:"count"` @@ -109,5 +109,3 @@ func NewWatcher() *Watcher { return r } - -// false diff --git a/typedapi/types/watcheraction.go b/typedapi/types/watcheraction.go index c562703eca..ae8b08d99f 100644 --- a/typedapi/types/watcheraction.go +++ b/typedapi/types/watcheraction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // WatcherAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L35-L54 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L35-L54 type WatcherAction struct { ActionType *actiontype.ActionType `json:"action_type,omitempty"` Condition *WatcherCondition `json:"condition,omitempty"` @@ -165,13 +165,3 @@ func NewWatcherAction() *WatcherAction { return r } - -// true - -type WatcherActionVariant interface { - WatcherActionCaster() *WatcherAction -} - -func (s *WatcherAction) WatcherActionCaster() *WatcherAction { - return s -} diff --git a/typedapi/types/watcheractions.go b/typedapi/types/watcheractions.go index 6929277213..d8144d70dd 100644 --- a/typedapi/types/watcheractions.go +++ b/typedapi/types/watcheractions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // WatcherActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L406-L408 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L406-L408 type WatcherActions struct { Actions map[string]WatcherActionTotals `json:"actions"` } @@ -35,5 +35,3 @@ func NewWatcherActions() *WatcherActions { return r } - -// false diff --git a/typedapi/types/watcheractiontotals.go b/typedapi/types/watcheractiontotals.go index b7fa729ec7..a9ca38b9d2 100644 --- a/typedapi/types/watcheractiontotals.go +++ b/typedapi/types/watcheractiontotals.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // WatcherActionTotals type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L422-L425 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L422-L425 type WatcherActionTotals struct { Total Duration `json:"total"` TotalTimeInMs int64 `json:"total_time_in_ms"` @@ -72,5 +72,3 @@ func NewWatcherActionTotals() *WatcherActionTotals { return r } - -// false diff --git a/typedapi/types/watchercondition.go b/typedapi/types/watchercondition.go index 1731b35906..09491477c7 100644 --- a/typedapi/types/watchercondition.go +++ b/typedapi/types/watchercondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -29,7 +29,7 @@ import ( // WatcherCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Conditions.ts#L50-L62 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Conditions.ts#L50-L62 type WatcherCondition struct { AdditionalWatcherConditionProperty map[string]json.RawMessage `json:"-"` Always *AlwaysCondition `json:"always,omitempty"` @@ -78,13 +78,3 @@ func NewWatcherCondition() *WatcherCondition { return r } - -// true - -type WatcherConditionVariant interface { - WatcherConditionCaster() *WatcherCondition -} - -func (s *WatcherCondition) WatcherConditionCaster() *WatcherCondition { - return s -} diff --git a/typedapi/types/watcherinput.go b/typedapi/types/watcherinput.go index a67a761143..5835ecd601 100644 --- a/typedapi/types/watcherinput.go +++ b/typedapi/types/watcherinput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -27,7 +27,7 @@ import ( // WatcherInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Input.ts#L90-L98 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Input.ts#L87-L95 type WatcherInput struct { AdditionalWatcherInputProperty map[string]json.RawMessage `json:"-"` Chain *ChainInput `json:"chain,omitempty"` @@ -74,13 +74,3 @@ func NewWatcherInput() *WatcherInput { return r } - -// true - -type WatcherInputVariant interface { - WatcherInputCaster() *WatcherInput -} - -func (s *WatcherInput) WatcherInputCaster() *WatcherInput { - return s -} diff --git a/typedapi/types/watchernodestats.go b/typedapi/types/watchernodestats.go index 3d785f78c3..55c312cb72 100644 --- a/typedapi/types/watchernodestats.go +++ b/typedapi/types/watchernodestats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // WatcherNodeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stats/types.ts#L33-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stats/types.ts#L33-L61 type WatcherNodeStats struct { // CurrentWatches The current executing watches metric gives insight into the watches that are // currently being executed by Watcher. @@ -130,5 +130,3 @@ func NewWatcherNodeStats() *WatcherNodeStats { return r } - -// false diff --git a/typedapi/types/watcherstatusactions.go b/typedapi/types/watcherstatusactions.go index 51c166fb44..c10438924f 100644 --- a/typedapi/types/watcherstatusactions.go +++ b/typedapi/types/watcherstatusactions.go @@ -16,15 +16,11 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // WatcherStatusActions type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Action.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Action.ts#L56-L56 type WatcherStatusActions map[string]ActionStatus - -type WatcherStatusActionsVariant interface { - WatcherStatusActionsCaster() *WatcherStatusActions -} diff --git a/typedapi/types/watcherwatch.go b/typedapi/types/watcherwatch.go index 975e9005a4..6638b7d512 100644 --- a/typedapi/types/watcherwatch.go +++ b/typedapi/types/watcherwatch.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // WatcherWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L410-L415 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L410-L415 type WatcherWatch struct { Action map[string]Counter `json:"action,omitempty"` Condition map[string]Counter `json:"condition,omitempty"` @@ -40,5 +40,3 @@ func NewWatcherWatch() *WatcherWatch { return r } - -// false diff --git a/typedapi/types/watcherwatchtrigger.go b/typedapi/types/watcherwatchtrigger.go index 668314c5b3..c4e3b62272 100644 --- a/typedapi/types/watcherwatchtrigger.go +++ b/typedapi/types/watcherwatchtrigger.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // WatcherWatchTrigger type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L417-L420 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L417-L420 type WatcherWatchTrigger struct { All_ Counter `json:"_all"` Schedule *WatcherWatchTriggerSchedule `json:"schedule,omitempty"` @@ -34,5 +34,3 @@ func NewWatcherWatchTrigger() *WatcherWatchTrigger { return r } - -// false diff --git a/typedapi/types/watcherwatchtriggerschedule.go b/typedapi/types/watcherwatchtriggerschedule.go index d80d7b0643..c6193df1e3 100644 --- a/typedapi/types/watcherwatchtriggerschedule.go +++ b/typedapi/types/watcherwatchtriggerschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WatcherWatchTriggerSchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L476-L479 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L476-L479 type WatcherWatchTriggerSchedule struct { Active int64 `json:"active"` All_ Counter `json:"_all"` @@ -105,5 +105,3 @@ func NewWatcherWatchTriggerSchedule() *WatcherWatchTriggerSchedule { return r } - -// false diff --git a/typedapi/types/watchrecord.go b/typedapi/types/watchrecord.go index 40ae7eb964..15d5513d6b 100644 --- a/typedapi/types/watchrecord.go +++ b/typedapi/types/watchrecord.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // WatchRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/execute_watch/types.ts#L27-L39 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/execute_watch/types.ts#L27-L39 type WatchRecord struct { Condition WatcherCondition `json:"condition"` Input WatcherInput `json:"input"` @@ -136,5 +136,3 @@ func NewWatchRecord() *WatchRecord { return r } - -// false diff --git a/typedapi/types/watchrecordqueuedstats.go b/typedapi/types/watchrecordqueuedstats.go index 577419749b..275d35b5c5 100644 --- a/typedapi/types/watchrecordqueuedstats.go +++ b/typedapi/types/watchrecordqueuedstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // WatchRecordQueuedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stats/types.ts#L71-L77 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stats/types.ts#L71-L77 type WatchRecordQueuedStats struct { // ExecutionTime The time the watch was run. // This is just before the input is being run. @@ -68,5 +68,3 @@ func NewWatchRecordQueuedStats() *WatchRecordQueuedStats { return r } - -// false diff --git a/typedapi/types/watchrecordstats.go b/typedapi/types/watchrecordstats.go index fdf47fac59..0a59185a9e 100644 --- a/typedapi/types/watchrecordstats.go +++ b/typedapi/types/watchrecordstats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -32,7 +32,7 @@ import ( // WatchRecordStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stats/types.ts#L79-L94 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stats/types.ts#L79-L94 type WatchRecordStats struct { ExecutedActions []string `json:"executed_actions,omitempty"` // ExecutionPhase The current watch execution phase. @@ -103,5 +103,3 @@ func NewWatchRecordStats() *WatchRecordStats { return r } - -// false diff --git a/typedapi/types/watchstatus.go b/typedapi/types/watchstatus.go index 6ad994460a..bc632283d4 100644 --- a/typedapi/types/watchstatus.go +++ b/typedapi/types/watchstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WatchStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Watch.ts#L49-L56 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Watch.ts#L49-L56 type WatchStatus struct { Actions WatcherStatusActions `json:"actions"` ExecutionState *string `json:"execution_state,omitempty"` @@ -104,13 +104,3 @@ func NewWatchStatus() *WatchStatus { return r } - -// true - -type WatchStatusVariant interface { - WatchStatusCaster() *WatchStatus -} - -func (s *WatchStatus) WatchStatusCaster() *WatchStatus { - return s -} diff --git a/typedapi/types/watsonxservicesettings.go b/typedapi/types/watsonxservicesettings.go index 1f09432072..3c68527388 100644 --- a/typedapi/types/watsonxservicesettings.go +++ b/typedapi/types/watsonxservicesettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WatsonxServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/inference/_types/CommonTypes.ts#L1143-L1180 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/inference/_types/CommonTypes.ts#L1684-L1721 type WatsonxServiceSettings struct { // ApiKey A valid API key of your Watsonx account. // You can find your Watsonx API keys or you can create a new one on the API @@ -153,13 +153,3 @@ func NewWatsonxServiceSettings() *WatsonxServiceSettings { return r } - -// true - -type WatsonxServiceSettingsVariant interface { - WatsonxServiceSettingsCaster() *WatsonxServiceSettings -} - -func (s *WatsonxServiceSettings) WatsonxServiceSettingsCaster() *WatsonxServiceSettings { - return s -} diff --git a/typedapi/types/web.go b/typedapi/types/web.go index d76aeaefd4..8270e7b8be 100644 --- a/typedapi/types/web.go +++ b/typedapi/types/web.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // Web type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ingest/_types/Database.ts#L61-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ingest/_types/Database.ts#L61-L61 type Web struct { } @@ -32,5 +32,3 @@ func NewWeb() *Web { return r } - -// false diff --git a/typedapi/types/webhookaction.go b/typedapi/types/webhookaction.go index 89586e4f2e..58f9b9ff23 100644 --- a/typedapi/types/webhookaction.go +++ b/typedapi/types/webhookaction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // WebhookAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L293-L293 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L293-L293 type WebhookAction struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` @@ -172,13 +172,3 @@ func NewWebhookAction() *WebhookAction { return r } - -// true - -type WebhookActionVariant interface { - WebhookActionCaster() *WebhookAction -} - -func (s *WebhookAction) WebhookActionCaster() *WebhookAction { - return s -} diff --git a/typedapi/types/webhookresult.go b/typedapi/types/webhookresult.go index 976359ae90..b21ffd2c32 100644 --- a/typedapi/types/webhookresult.go +++ b/typedapi/types/webhookresult.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // WebhookResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/_types/Actions.ts#L295-L298 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/_types/Actions.ts#L295-L298 type WebhookResult struct { Request HttpInputRequestResult `json:"request"` Response *HttpInputResponseResult `json:"response,omitempty"` @@ -34,5 +34,3 @@ func NewWebhookResult() *WebhookResult { return r } - -// false diff --git a/typedapi/types/weightedaverageaggregation.go b/typedapi/types/weightedaverageaggregation.go index d36d8de0c0..42d0083180 100644 --- a/typedapi/types/weightedaverageaggregation.go +++ b/typedapi/types/weightedaverageaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // WeightedAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L449-L463 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L472-L486 type WeightedAverageAggregation struct { // Format A numeric response formatter. Format *string `json:"format,omitempty"` @@ -97,13 +97,3 @@ func NewWeightedAverageAggregation() *WeightedAverageAggregation { return r } - -// true - -type WeightedAverageAggregationVariant interface { - WeightedAverageAggregationCaster() *WeightedAverageAggregation -} - -func (s *WeightedAverageAggregation) WeightedAverageAggregationCaster() *WeightedAverageAggregation { - return s -} diff --git a/typedapi/types/weightedaveragevalue.go b/typedapi/types/weightedaveragevalue.go index 847f436cd7..ef16f1f7b5 100644 --- a/typedapi/types/weightedaveragevalue.go +++ b/typedapi/types/weightedaveragevalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WeightedAverageValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/metric.ts#L465-L475 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/metric.ts#L488-L498 type WeightedAverageValue struct { // Field The field from which to extract the values or weights. Field *string `json:"field,omitempty"` @@ -92,13 +92,3 @@ func NewWeightedAverageValue() *WeightedAverageValue { return r } - -// true - -type WeightedAverageValueVariant interface { - WeightedAverageValueCaster() *WeightedAverageValue -} - -func (s *WeightedAverageValue) WeightedAverageValueCaster() *WeightedAverageValue { - return s -} diff --git a/typedapi/types/weightedavgaggregate.go b/typedapi/types/weightedavgaggregate.go index 261ffbd1fd..2205d24015 100644 --- a/typedapi/types/weightedavgaggregate.go +++ b/typedapi/types/weightedavgaggregate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WeightedAvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/aggregations/Aggregate.ts#L224-L229 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/aggregations/Aggregate.ts#L224-L229 type WeightedAvgAggregate struct { Meta Metadata `json:"meta,omitempty"` // Value The metric value. A missing value generally means that there was no data to @@ -89,5 +89,3 @@ func NewWeightedAvgAggregate() *WeightedAvgAggregate { return r } - -// false diff --git a/typedapi/types/weightedtokensquery.go b/typedapi/types/weightedtokensquery.go index 1da3258670..406a3789a8 100644 --- a/typedapi/types/weightedtokensquery.go +++ b/typedapi/types/weightedtokensquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WeightedTokensQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/WeightedTokensQuery.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/WeightedTokensQuery.ts#L25-L33 type WeightedTokensQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -115,13 +115,3 @@ func NewWeightedTokensQuery() *WeightedTokensQuery { return r } - -// true - -type WeightedTokensQueryVariant interface { - WeightedTokensQueryCaster() *WeightedTokensQuery -} - -func (s *WeightedTokensQuery) WeightedTokensQueryCaster() *WeightedTokensQuery { - return s -} diff --git a/typedapi/types/weights.go b/typedapi/types/weights.go index c6e3fccfc6..70453fbb1a 100644 --- a/typedapi/types/weights.go +++ b/typedapi/types/weights.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // Weights type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/put_trained_model/types.ts#L108-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/put_trained_model/types.ts#L108-L110 type Weights struct { Weights Float64 `json:"weights"` } @@ -78,13 +78,3 @@ func NewWeights() *Weights { return r } - -// true - -type WeightsVariant interface { - WeightsCaster() *Weights -} - -func (s *Weights) WeightsCaster() *Weights { - return s -} diff --git a/typedapi/types/whitespaceanalyzer.go b/typedapi/types/whitespaceanalyzer.go index e36d0cd8cb..76c1a05a5e 100644 --- a/typedapi/types/whitespaceanalyzer.go +++ b/typedapi/types/whitespaceanalyzer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -30,7 +30,7 @@ import ( // WhitespaceAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/analyzers.ts#L345-L348 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/analyzers.ts#L345-L348 type WhitespaceAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -85,13 +85,3 @@ func NewWhitespaceAnalyzer() *WhitespaceAnalyzer { return r } - -// true - -type WhitespaceAnalyzerVariant interface { - WhitespaceAnalyzerCaster() *WhitespaceAnalyzer -} - -func (s *WhitespaceAnalyzer) WhitespaceAnalyzerCaster() *WhitespaceAnalyzer { - return s -} diff --git a/typedapi/types/whitespacetokenizer.go b/typedapi/types/whitespacetokenizer.go index ae60e64bc1..38ae23ace6 100644 --- a/typedapi/types/whitespacetokenizer.go +++ b/typedapi/types/whitespacetokenizer.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WhitespaceTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/tokenizers.ts#L135-L138 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/tokenizers.ts#L137-L140 type WhitespaceTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -104,13 +104,3 @@ func NewWhitespaceTokenizer() *WhitespaceTokenizer { return r } - -// true - -type WhitespaceTokenizerVariant interface { - WhitespaceTokenizerCaster() *WhitespaceTokenizer -} - -func (s *WhitespaceTokenizer) WhitespaceTokenizerCaster() *WhitespaceTokenizer { - return s -} diff --git a/typedapi/types/wildcardproperty.go b/typedapi/types/wildcardproperty.go index f7b1ffab61..be9cac33f3 100644 --- a/typedapi/types/wildcardproperty.go +++ b/typedapi/types/wildcardproperty.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -34,7 +34,7 @@ import ( // WildcardProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/mapping/core.ts#L326-L333 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/mapping/core.ts#L351-L358 type WildcardProperty struct { CopyTo []string `json:"copy_to,omitempty"` DocValues *bool `json:"doc_values,omitempty"` @@ -242,6 +242,12 @@ func (s *WildcardProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Fields | %w", err) } s.Fields[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Fields | %w", err) + } + s.Fields[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -609,6 +615,12 @@ func (s *WildcardProperty) UnmarshalJSON(data []byte) error { return fmt.Errorf("Properties | %w", err) } s.Properties[key] = oo + case "rank_vectors": + oo := NewRankVectorProperty() + if err := localDec.Decode(&oo); err != nil { + return fmt.Errorf("Properties | %w", err) + } + s.Properties[key] = oo case "semantic_text": oo := NewSemanticTextProperty() if err := localDec.Decode(&oo); err != nil { @@ -859,13 +871,3 @@ func NewWildcardProperty() *WildcardProperty { return r } - -// true - -type WildcardPropertyVariant interface { - WildcardPropertyCaster() *WildcardProperty -} - -func (s *WildcardProperty) WildcardPropertyCaster() *WildcardProperty { - return s -} diff --git a/typedapi/types/wildcardquery.go b/typedapi/types/wildcardquery.go index 6a760ce773..ccb4566caa 100644 --- a/typedapi/types/wildcardquery.go +++ b/typedapi/types/wildcardquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WildcardQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/term.ts#L305-L325 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/term.ts#L305-L325 type WildcardQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -163,13 +163,3 @@ func NewWildcardQuery() *WildcardQuery { return r } - -// true - -type WildcardQueryVariant interface { - WildcardQueryCaster() *WildcardQuery -} - -func (s *WildcardQuery) WildcardQueryCaster() *WildcardQuery { - return s -} diff --git a/typedapi/types/wktgeobounds.go b/typedapi/types/wktgeobounds.go index 0713e620d1..221f4b4420 100644 --- a/typedapi/types/wktgeobounds.go +++ b/typedapi/types/wktgeobounds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WktGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/Geo.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Geo.ts#L150-L152 type WktGeoBounds struct { Wkt string `json:"wkt"` } @@ -74,13 +74,3 @@ func NewWktGeoBounds() *WktGeoBounds { return r } - -// true - -type WktGeoBoundsVariant interface { - WktGeoBoundsCaster() *WktGeoBounds -} - -func (s *WktGeoBounds) WktGeoBoundsCaster() *WktGeoBounds { - return s -} diff --git a/typedapi/types/worddelimitergraphtokenfilter.go b/typedapi/types/worddelimitergraphtokenfilter.go index 6f9869016d..002bf204db 100644 --- a/typedapi/types/worddelimitergraphtokenfilter.go +++ b/typedapi/types/worddelimitergraphtokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,25 +31,61 @@ import ( // WordDelimiterGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L150-L167 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L205-L211 type WordDelimiterGraphTokenFilter struct { - AdjustOffsets *bool `json:"adjust_offsets,omitempty"` - CatenateAll *bool `json:"catenate_all,omitempty"` - CatenateNumbers *bool `json:"catenate_numbers,omitempty"` - CatenateWords *bool `json:"catenate_words,omitempty"` - GenerateNumberParts *bool `json:"generate_number_parts,omitempty"` - GenerateWordParts *bool `json:"generate_word_parts,omitempty"` - IgnoreKeywords *bool `json:"ignore_keywords,omitempty"` - PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` - ProtectedWords []string `json:"protected_words,omitempty"` - ProtectedWordsPath *string `json:"protected_words_path,omitempty"` - SplitOnCaseChange *bool `json:"split_on_case_change,omitempty"` - SplitOnNumerics *bool `json:"split_on_numerics,omitempty"` - StemEnglishPossessive *bool `json:"stem_english_possessive,omitempty"` - Type string `json:"type,omitempty"` - TypeTable []string `json:"type_table,omitempty"` - TypeTablePath *string `json:"type_table_path,omitempty"` - Version *string `json:"version,omitempty"` + // AdjustOffsets If `true`, the filter adjusts the offsets of split or catenated tokens to + // better reflect their actual position in the token stream. Defaults to `true`. + AdjustOffsets *bool `json:"adjust_offsets,omitempty"` + // CatenateAll If `true`, the filter produces catenated tokens for chains of alphanumeric + // characters separated by non-alphabetic delimiters. Defaults to `false`. + CatenateAll *bool `json:"catenate_all,omitempty"` + // CatenateNumbers If `true`, the filter produces catenated tokens for chains of numeric + // characters separated by non-alphabetic delimiters. Defaults to `false`. + CatenateNumbers *bool `json:"catenate_numbers,omitempty"` + // CatenateWords If `true`, the filter produces catenated tokens for chains of alphabetical + // characters separated by non-alphabetic delimiters. Defaults to `false`. + CatenateWords *bool `json:"catenate_words,omitempty"` + // GenerateNumberParts If `true`, the filter includes tokens consisting of only numeric characters + // in the output. If `false`, the filter excludes these tokens from the output. + // Defaults to `true`. + GenerateNumberParts *bool `json:"generate_number_parts,omitempty"` + // GenerateWordParts If `true`, the filter includes tokens consisting of only alphabetical + // characters in the output. If `false`, the filter excludes these tokens from + // the output. Defaults to `true`. + GenerateWordParts *bool `json:"generate_word_parts,omitempty"` + // IgnoreKeywords If `true`, the filter skips tokens with a keyword attribute of true. Defaults + // to `false`. + IgnoreKeywords *bool `json:"ignore_keywords,omitempty"` + // PreserveOriginal If `true`, the filter includes the original version of any split tokens in + // the output. This original version includes non-alphanumeric delimiters. + // Defaults to `false`. + PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` + // ProtectedWords Array of tokens the filter won’t split. + ProtectedWords []string `json:"protected_words,omitempty"` + // ProtectedWordsPath Path to a file that contains a list of tokens the filter won’t split. + // This path must be absolute or relative to the `config` location, and the file + // must be UTF-8 encoded. Each token in the file must be separated by a line + // break. + ProtectedWordsPath *string `json:"protected_words_path,omitempty"` + // SplitOnCaseChange If `true`, the filter splits tokens at letter case transitions. For example: + // camelCase -> [ camel, Case ]. Defaults to `true`. + SplitOnCaseChange *bool `json:"split_on_case_change,omitempty"` + // SplitOnNumerics If `true`, the filter splits tokens at letter-number transitions. For + // example: j2se -> [ j, 2, se ]. Defaults to `true`. + SplitOnNumerics *bool `json:"split_on_numerics,omitempty"` + // StemEnglishPossessive If `true`, the filter removes the English possessive (`'s`) from the end of + // each token. For example: O'Neil's -> [ O, Neil ]. Defaults to `true`. + StemEnglishPossessive *bool `json:"stem_english_possessive,omitempty"` + Type string `json:"type,omitempty"` + // TypeTable Array of custom type mappings for characters. This allows you to map + // non-alphanumeric characters as numeric or alphanumeric to avoid splitting on + // those characters. + TypeTable []string `json:"type_table,omitempty"` + // TypeTablePath Path to a file that contains custom type mappings for characters. This allows + // you to map non-alphanumeric characters as numeric or alphanumeric to avoid + // splitting on those characters. + TypeTablePath *string `json:"type_table_path,omitempty"` + Version *string `json:"version,omitempty"` } func (s *WordDelimiterGraphTokenFilter) UnmarshalJSON(data []byte) error { @@ -295,13 +331,3 @@ func NewWordDelimiterGraphTokenFilter() *WordDelimiterGraphTokenFilter { return r } - -// true - -type WordDelimiterGraphTokenFilterVariant interface { - WordDelimiterGraphTokenFilterCaster() *WordDelimiterGraphTokenFilter -} - -func (s *WordDelimiterGraphTokenFilter) WordDelimiterGraphTokenFilterCaster() *WordDelimiterGraphTokenFilter { - return s -} diff --git a/typedapi/types/worddelimitertokenfilter.go b/typedapi/types/worddelimitertokenfilter.go index 1cc815168d..83c2bf5bad 100644 --- a/typedapi/types/worddelimitertokenfilter.go +++ b/typedapi/types/worddelimitertokenfilter.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,23 +31,55 @@ import ( // WordDelimiterTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/analysis/token_filters.ts#L133-L148 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/analysis/token_filters.ts#L201-L203 type WordDelimiterTokenFilter struct { - CatenateAll *bool `json:"catenate_all,omitempty"` - CatenateNumbers *bool `json:"catenate_numbers,omitempty"` - CatenateWords *bool `json:"catenate_words,omitempty"` - GenerateNumberParts *bool `json:"generate_number_parts,omitempty"` - GenerateWordParts *bool `json:"generate_word_parts,omitempty"` - PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` - ProtectedWords []string `json:"protected_words,omitempty"` - ProtectedWordsPath *string `json:"protected_words_path,omitempty"` - SplitOnCaseChange *bool `json:"split_on_case_change,omitempty"` - SplitOnNumerics *bool `json:"split_on_numerics,omitempty"` - StemEnglishPossessive *bool `json:"stem_english_possessive,omitempty"` - Type string `json:"type,omitempty"` - TypeTable []string `json:"type_table,omitempty"` - TypeTablePath *string `json:"type_table_path,omitempty"` - Version *string `json:"version,omitempty"` + // CatenateAll If `true`, the filter produces catenated tokens for chains of alphanumeric + // characters separated by non-alphabetic delimiters. Defaults to `false`. + CatenateAll *bool `json:"catenate_all,omitempty"` + // CatenateNumbers If `true`, the filter produces catenated tokens for chains of numeric + // characters separated by non-alphabetic delimiters. Defaults to `false`. + CatenateNumbers *bool `json:"catenate_numbers,omitempty"` + // CatenateWords If `true`, the filter produces catenated tokens for chains of alphabetical + // characters separated by non-alphabetic delimiters. Defaults to `false`. + CatenateWords *bool `json:"catenate_words,omitempty"` + // GenerateNumberParts If `true`, the filter includes tokens consisting of only numeric characters + // in the output. If `false`, the filter excludes these tokens from the output. + // Defaults to `true`. + GenerateNumberParts *bool `json:"generate_number_parts,omitempty"` + // GenerateWordParts If `true`, the filter includes tokens consisting of only alphabetical + // characters in the output. If `false`, the filter excludes these tokens from + // the output. Defaults to `true`. + GenerateWordParts *bool `json:"generate_word_parts,omitempty"` + // PreserveOriginal If `true`, the filter includes the original version of any split tokens in + // the output. This original version includes non-alphanumeric delimiters. + // Defaults to `false`. + PreserveOriginal Stringifiedboolean `json:"preserve_original,omitempty"` + // ProtectedWords Array of tokens the filter won’t split. + ProtectedWords []string `json:"protected_words,omitempty"` + // ProtectedWordsPath Path to a file that contains a list of tokens the filter won’t split. + // This path must be absolute or relative to the `config` location, and the file + // must be UTF-8 encoded. Each token in the file must be separated by a line + // break. + ProtectedWordsPath *string `json:"protected_words_path,omitempty"` + // SplitOnCaseChange If `true`, the filter splits tokens at letter case transitions. For example: + // camelCase -> [ camel, Case ]. Defaults to `true`. + SplitOnCaseChange *bool `json:"split_on_case_change,omitempty"` + // SplitOnNumerics If `true`, the filter splits tokens at letter-number transitions. For + // example: j2se -> [ j, 2, se ]. Defaults to `true`. + SplitOnNumerics *bool `json:"split_on_numerics,omitempty"` + // StemEnglishPossessive If `true`, the filter removes the English possessive (`'s`) from the end of + // each token. For example: O'Neil's -> [ O, Neil ]. Defaults to `true`. + StemEnglishPossessive *bool `json:"stem_english_possessive,omitempty"` + Type string `json:"type,omitempty"` + // TypeTable Array of custom type mappings for characters. This allows you to map + // non-alphanumeric characters as numeric or alphanumeric to avoid splitting on + // those characters. + TypeTable []string `json:"type_table,omitempty"` + // TypeTablePath Path to a file that contains custom type mappings for characters. This allows + // you to map non-alphanumeric characters as numeric or alphanumeric to avoid + // splitting on those characters. + TypeTablePath *string `json:"type_table_path,omitempty"` + Version *string `json:"version,omitempty"` } func (s *WordDelimiterTokenFilter) UnmarshalJSON(data []byte) error { @@ -263,13 +295,3 @@ func NewWordDelimiterTokenFilter() *WordDelimiterTokenFilter { return r } - -// true - -type WordDelimiterTokenFilterVariant interface { - WordDelimiterTokenFilterCaster() *WordDelimiterTokenFilter -} - -func (s *WordDelimiterTokenFilter) WordDelimiterTokenFilterCaster() *WordDelimiterTokenFilter { - return s -} diff --git a/typedapi/types/wrapperquery.go b/typedapi/types/wrapperquery.go index 331d463812..64e71a8096 100644 --- a/typedapi/types/wrapperquery.go +++ b/typedapi/types/wrapperquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WrapperQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/_types/query_dsl/abstractions.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/query_dsl/abstractions.ts#L508-L517 type WrapperQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -111,13 +111,3 @@ func NewWrapperQuery() *WrapperQuery { return r } - -// true - -type WrapperQueryVariant interface { - WrapperQueryCaster() *WrapperQuery -} - -func (s *WrapperQuery) WrapperQueryCaster() *WrapperQuery { - return s -} diff --git a/typedapi/types/writeresponsebase.go b/typedapi/types/writeresponsebase.go new file mode 100644 index 0000000000..263db1f6c3 --- /dev/null +++ b/typedapi/types/writeresponsebase.go @@ -0,0 +1,141 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Code generated from the elasticsearch-specification DO NOT EDIT. +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/result" +) + +// WriteResponseBase type. +// +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/_types/Base.ts#L36-L67 +type WriteResponseBase struct { + ForcedRefresh *bool `json:"forced_refresh,omitempty"` + // Id_ The unique identifier for the added document. + Id_ string `json:"_id"` + // Index_ The name of the index the document was added to. + Index_ string `json:"_index"` + // PrimaryTerm_ The primary term assigned to the document for the indexing operation. + PrimaryTerm_ *int64 `json:"_primary_term,omitempty"` + // Result The result of the indexing operation: `created` or `updated`. + Result result.Result `json:"result"` + // SeqNo_ The sequence number assigned to the document for the indexing operation. + // Sequence numbers are used to ensure an older version of a document doesn't + // overwrite a newer version. + SeqNo_ *int64 `json:"_seq_no,omitempty"` + // Shards_ Information about the replication process of the operation. + Shards_ ShardStatistics `json:"_shards"` + // Version_ The document version, which is incremented each time the document is updated. + Version_ int64 `json:"_version"` +} + +func (s *WriteResponseBase) UnmarshalJSON(data []byte) error { + + dec := json.NewDecoder(bytes.NewReader(data)) + + for { + t, err := dec.Token() + if err != nil { + if errors.Is(err, io.EOF) { + break + } + return err + } + + switch t { + + case "forced_refresh": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("%s | %w", "ForcedRefresh", err) + } + s.ForcedRefresh = &value + case bool: + s.ForcedRefresh = &v + } + + case "_id": + if err := dec.Decode(&s.Id_); err != nil { + return fmt.Errorf("%s | %w", "Id_", err) + } + + case "_index": + if err := dec.Decode(&s.Index_); err != nil { + return fmt.Errorf("%s | %w", "Index_", err) + } + + case "_primary_term": + var tmp any + dec.Decode(&tmp) + switch v := tmp.(type) { + case string: + value, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return fmt.Errorf("%s | %w", "PrimaryTerm_", err) + } + s.PrimaryTerm_ = &value + case float64: + f := int64(v) + s.PrimaryTerm_ = &f + } + + case "result": + if err := dec.Decode(&s.Result); err != nil { + return fmt.Errorf("%s | %w", "Result", err) + } + + case "_seq_no": + if err := dec.Decode(&s.SeqNo_); err != nil { + return fmt.Errorf("%s | %w", "SeqNo_", err) + } + + case "_shards": + if err := dec.Decode(&s.Shards_); err != nil { + return fmt.Errorf("%s | %w", "Shards_", err) + } + + case "_version": + if err := dec.Decode(&s.Version_); err != nil { + return fmt.Errorf("%s | %w", "Version_", err) + } + + } + } + return nil +} + +// NewWriteResponseBase returns a WriteResponseBase. +func NewWriteResponseBase() *WriteResponseBase { + r := &WriteResponseBase{} + + return r +} diff --git a/typedapi/types/writesummaryinfo.go b/typedapi/types/writesummaryinfo.go index 3260c64ff1..3c6ebfc3fc 100644 --- a/typedapi/types/writesummaryinfo.go +++ b/typedapi/types/writesummaryinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // WriteSummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L162-L191 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L162-L191 type WriteSummaryInfo struct { // Count The number of write operations performed in the test. Count int `json:"count"` @@ -143,5 +143,3 @@ func NewWriteSummaryInfo() *WriteSummaryInfo { return r } - -// false diff --git a/typedapi/types/xlmrobertatokenizationconfig.go b/typedapi/types/xlmrobertatokenizationconfig.go index 9c96480596..f9f310a777 100644 --- a/typedapi/types/xlmrobertatokenizationconfig.go +++ b/typedapi/types/xlmrobertatokenizationconfig.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -33,7 +33,7 @@ import ( // XlmRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L200-L200 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L200-L200 type XlmRobertaTokenizationConfig struct { // DoLowerCase Should the tokenizer lower case the text DoLowerCase *bool `json:"do_lower_case,omitempty"` @@ -140,13 +140,3 @@ func NewXlmRobertaTokenizationConfig() *XlmRobertaTokenizationConfig { return r } - -// true - -type XlmRobertaTokenizationConfigVariant interface { - XlmRobertaTokenizationConfigCaster() *XlmRobertaTokenizationConfig -} - -func (s *XlmRobertaTokenizationConfig) XlmRobertaTokenizationConfigCaster() *XlmRobertaTokenizationConfig { - return s -} diff --git a/typedapi/types/xpackdatafeed.go b/typedapi/types/xpackdatafeed.go index 4c2edceab5..71f5a9f87c 100644 --- a/typedapi/types/xpackdatafeed.go +++ b/typedapi/types/xpackdatafeed.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // XpackDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L74-L76 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L74-L76 type XpackDatafeed struct { Count int64 `json:"count"` } @@ -77,5 +77,3 @@ func NewXpackDatafeed() *XpackDatafeed { return r } - -// false diff --git a/typedapi/types/xpackfeature.go b/typedapi/types/xpackfeature.go index a8686dd2e0..361b409dd4 100644 --- a/typedapi/types/xpackfeature.go +++ b/typedapi/types/xpackfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // XpackFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/types.ts#L85-L90 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/types.ts#L85-L90 type XpackFeature struct { Available bool `json:"available"` Description *string `json:"description,omitempty"` @@ -110,5 +110,3 @@ func NewXpackFeature() *XpackFeature { return r } - -// false diff --git a/typedapi/types/xpackfeatures.go b/typedapi/types/xpackfeatures.go index c9176f4d2d..776118243c 100644 --- a/typedapi/types/xpackfeatures.go +++ b/typedapi/types/xpackfeatures.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types // XpackFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/types.ts#L42-L83 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/types.ts#L42-L83 type XpackFeatures struct { AggregateMetric XpackFeature `json:"aggregate_metric"` Analytics XpackFeature `json:"analytics"` @@ -60,5 +60,3 @@ func NewXpackFeatures() *XpackFeatures { return r } - -// false diff --git a/typedapi/types/xpackquery.go b/typedapi/types/xpackquery.go index ea7acbb4ea..01a98ae9d4 100644 --- a/typedapi/types/xpackquery.go +++ b/typedapi/types/xpackquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // XpackQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L269-L274 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L269-L274 type XpackQuery struct { Count *int `json:"count,omitempty"` Failed *int `json:"failed,omitempty"` @@ -129,5 +129,3 @@ func NewXpackQuery() *XpackQuery { return r } - -// false diff --git a/typedapi/types/xpackrealm.go b/typedapi/types/xpackrealm.go index 08b4d111c0..ed6708fc6e 100644 --- a/typedapi/types/xpackrealm.go +++ b/typedapi/types/xpackrealm.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // XpackRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L427-L436 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L427-L436 type XpackRealm struct { Available bool `json:"available"` Cache []RealmCache `json:"cache,omitempty"` @@ -139,5 +139,3 @@ func NewXpackRealm() *XpackRealm { return r } - -// false diff --git a/typedapi/types/xpackrolemapping.go b/typedapi/types/xpackrolemapping.go index aa31cfa12d..28e6363853 100644 --- a/typedapi/types/xpackrolemapping.go +++ b/typedapi/types/xpackrolemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // XpackRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L280-L283 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L280-L283 type XpackRoleMapping struct { Enabled int `json:"enabled"` Size int `json:"size"` @@ -95,5 +95,3 @@ func NewXpackRoleMapping() *XpackRoleMapping { return r } - -// false diff --git a/typedapi/types/xpackruntimefieldtypes.go b/typedapi/types/xpackruntimefieldtypes.go index addb8cbee9..d6a541ad78 100644 --- a/typedapi/types/xpackruntimefieldtypes.go +++ b/typedapi/types/xpackruntimefieldtypes.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // XpackRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/types.ts#L285-L287 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/types.ts#L285-L287 type XpackRuntimeFieldTypes struct { Available bool `json:"available"` Enabled bool `json:"enabled"` @@ -97,5 +97,3 @@ func NewXpackRuntimeFieldTypes() *XpackRuntimeFieldTypes { return r } - -// false diff --git a/typedapi/types/zeroshotclassificationinferenceoptions.go b/typedapi/types/zeroshotclassificationinferenceoptions.go index 0b10d2f752..411d77a634 100644 --- a/typedapi/types/zeroshotclassificationinferenceoptions.go +++ b/typedapi/types/zeroshotclassificationinferenceoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L216-L237 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L216-L237 type ZeroShotClassificationInferenceOptions struct { // ClassificationLabels The zero shot classification labels indicating entailment, neutral, and // contradiction @@ -129,13 +129,3 @@ func NewZeroShotClassificationInferenceOptions() *ZeroShotClassificationInferenc return r } - -// true - -type ZeroShotClassificationInferenceOptionsVariant interface { - ZeroShotClassificationInferenceOptionsCaster() *ZeroShotClassificationInferenceOptions -} - -func (s *ZeroShotClassificationInferenceOptions) ZeroShotClassificationInferenceOptionsCaster() *ZeroShotClassificationInferenceOptions { - return s -} diff --git a/typedapi/types/zeroshotclassificationinferenceupdateoptions.go b/typedapi/types/zeroshotclassificationinferenceupdateoptions.go index b203e637e6..0b7d387803 100644 --- a/typedapi/types/zeroshotclassificationinferenceupdateoptions.go +++ b/typedapi/types/zeroshotclassificationinferenceupdateoptions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/ml/_types/inference.ts#L393-L402 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/ml/_types/inference.ts#L393-L402 type ZeroShotClassificationInferenceUpdateOptions struct { // Labels The labels to predict. Labels []string `json:"labels"` @@ -107,13 +107,3 @@ func NewZeroShotClassificationInferenceUpdateOptions() *ZeroShotClassificationIn return r } - -// true - -type ZeroShotClassificationInferenceUpdateOptionsVariant interface { - ZeroShotClassificationInferenceUpdateOptionsCaster() *ZeroShotClassificationInferenceUpdateOptions -} - -func (s *ZeroShotClassificationInferenceUpdateOptions) ZeroShotClassificationInferenceUpdateOptionsCaster() *ZeroShotClassificationInferenceUpdateOptions { - return s -} diff --git a/typedapi/watcher/ackwatch/ack_watch.go b/typedapi/watcher/ackwatch/ack_watch.go index 5c324196f2..cdac95c020 100644 --- a/typedapi/watcher/ackwatch/ack_watch.go +++ b/typedapi/watcher/ackwatch/ack_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Acknowledge a watch. // Acknowledging a watch enables you to manually throttle the execution of the diff --git a/typedapi/watcher/ackwatch/response.go b/typedapi/watcher/ackwatch/response.go index 7b89702df5..e6459f2fe1 100644 --- a/typedapi/watcher/ackwatch/response.go +++ b/typedapi/watcher/ackwatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package ackwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ackwatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/ack_watch/WatcherAckWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/ack_watch/WatcherAckWatchResponse.ts#L22-L24 type Response struct { Status types.WatchStatus `json:"status"` } diff --git a/typedapi/watcher/activatewatch/activate_watch.go b/typedapi/watcher/activatewatch/activate_watch.go index fcfa9a8903..3405c482e4 100644 --- a/typedapi/watcher/activatewatch/activate_watch.go +++ b/typedapi/watcher/activatewatch/activate_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Activate a watch. // A watch can be either active or inactive. diff --git a/typedapi/watcher/activatewatch/response.go b/typedapi/watcher/activatewatch/response.go index ccd7928af4..0fdabf82ae 100644 --- a/typedapi/watcher/activatewatch/response.go +++ b/typedapi/watcher/activatewatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package activatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package activatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/activate_watch/WatcherActivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/activate_watch/WatcherActivateWatchResponse.ts#L22-L24 type Response struct { Status types.ActivationStatus `json:"status"` } diff --git a/typedapi/watcher/deactivatewatch/deactivate_watch.go b/typedapi/watcher/deactivatewatch/deactivate_watch.go index cc11450122..0e5bdc97d8 100644 --- a/typedapi/watcher/deactivatewatch/deactivate_watch.go +++ b/typedapi/watcher/deactivatewatch/deactivate_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Deactivate a watch. // A watch can be either active or inactive. diff --git a/typedapi/watcher/deactivatewatch/response.go b/typedapi/watcher/deactivatewatch/response.go index 4d37eed7a5..fe55502785 100644 --- a/typedapi/watcher/deactivatewatch/response.go +++ b/typedapi/watcher/deactivatewatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deactivatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deactivatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/deactivate_watch/DeactivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/deactivate_watch/DeactivateWatchResponse.ts#L22-L24 type Response struct { Status types.ActivationStatus `json:"status"` } diff --git a/typedapi/watcher/deletewatch/delete_watch.go b/typedapi/watcher/deletewatch/delete_watch.go index 4a51bf8db2..774aba7e8a 100644 --- a/typedapi/watcher/deletewatch/delete_watch.go +++ b/typedapi/watcher/deletewatch/delete_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Delete a watch. // When the watch is removed, the document representing the watch in the diff --git a/typedapi/watcher/deletewatch/response.go b/typedapi/watcher/deletewatch/response.go index 263eb6bac7..edb1bed821 100644 --- a/typedapi/watcher/deletewatch/response.go +++ b/typedapi/watcher/deletewatch/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package deletewatch // Response holds the response body struct for the package deletewatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/delete_watch/DeleteWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/delete_watch/DeleteWatchResponse.ts#L22-L24 type Response struct { Found bool `json:"found"` Id_ string `json:"_id"` diff --git a/typedapi/watcher/executewatch/execute_watch.go b/typedapi/watcher/executewatch/execute_watch.go index 2ea6117902..8aeef81a2b 100644 --- a/typedapi/watcher/executewatch/execute_watch.go +++ b/typedapi/watcher/executewatch/execute_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Run a watch. // This API can be used to force execution of the watch outside of its @@ -421,135 +421,92 @@ func (r *ExecuteWatch) Pretty(pretty bool) *ExecuteWatch { return r } -// Determines how to handle the watch actions as part of the watch execution. +// ActionModes Determines how to handle the watch actions as part of the watch execution. // API name: action_modes func (r *ExecuteWatch) ActionModes(actionmodes map[string]actionexecutionmode.ActionExecutionMode) *ExecuteWatch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ActionModes = actionmodes - return r -} - -func (r *ExecuteWatch) AddActionMode(key string, value actionexecutionmode.ActionExecutionMode) *ExecuteWatch { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - - var tmp map[string]actionexecutionmode.ActionExecutionMode - if r.req.ActionModes == nil { - r.req.ActionModes = make(map[string]actionexecutionmode.ActionExecutionMode) - } else { - tmp = r.req.ActionModes - } - tmp[key] = value + r.req.ActionModes = actionmodes - r.req.ActionModes = tmp return r } -// When present, the watch uses this object as a payload instead of executing +// AlternativeInput When present, the watch uses this object as a payload instead of executing // its own input. // API name: alternative_input func (r *ExecuteWatch) AlternativeInput(alternativeinput map[string]json.RawMessage) *ExecuteWatch { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.AlternativeInput = alternativeinput - return r -} - -func (r *ExecuteWatch) AddAlternativeInput(key string, value json.RawMessage) *ExecuteWatch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]json.RawMessage - if r.req.AlternativeInput == nil { - r.req.AlternativeInput = make(map[string]json.RawMessage) - } else { - tmp = r.req.AlternativeInput - } - - tmp[key] = value + r.req.AlternativeInput = alternativeinput - r.req.AlternativeInput = tmp return r } -// When set to `true`, the watch execution uses the always condition. This can +// IgnoreCondition When set to `true`, the watch execution uses the always condition. This can // also be specified as an HTTP parameter. // API name: ignore_condition func (r *ExecuteWatch) IgnoreCondition(ignorecondition bool) *ExecuteWatch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IgnoreCondition = &ignorecondition return r } -// When set to `true`, the watch record representing the watch execution result +// RecordExecution When set to `true`, the watch record representing the watch execution result // is persisted to the `.watcher-history` index for the current time. // In addition, the status of the watch is updated, possibly throttling // subsequent runs. // This can also be specified as an HTTP parameter. // API name: record_execution func (r *ExecuteWatch) RecordExecution(recordexecution bool) *ExecuteWatch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.RecordExecution = &recordexecution return r } // API name: simulated_actions -func (r *ExecuteWatch) SimulatedActions(simulatedactions types.SimulatedActionsVariant) *ExecuteWatch { - // Initialize the request if it is not already initialized +func (r *ExecuteWatch) SimulatedActions(simulatedactions *types.SimulatedActions) *ExecuteWatch { if r.req == nil { r.req = NewRequest() } - r.req.SimulatedActions = simulatedactions.SimulatedActionsCaster() + r.req.SimulatedActions = simulatedactions return r } -// This structure is parsed as the data of the trigger event that will be used +// TriggerData This structure is parsed as the data of the trigger event that will be used // during the watch execution. // API name: trigger_data -func (r *ExecuteWatch) TriggerData(triggerdata types.ScheduleTriggerEventVariant) *ExecuteWatch { - // Initialize the request if it is not already initialized +func (r *ExecuteWatch) TriggerData(triggerdata *types.ScheduleTriggerEvent) *ExecuteWatch { if r.req == nil { r.req = NewRequest() } - r.req.TriggerData = triggerdata.ScheduleTriggerEventCaster() + r.req.TriggerData = triggerdata return r } -// When present, this watch is used instead of the one specified in the request. +// Watch When present, this watch is used instead of the one specified in the request. // This watch is not persisted to the index and `record_execution` cannot be // set. // API name: watch -func (r *ExecuteWatch) Watch(watch types.WatchVariant) *ExecuteWatch { - // Initialize the request if it is not already initialized +func (r *ExecuteWatch) Watch(watch *types.Watch) *ExecuteWatch { if r.req == nil { r.req = NewRequest() } - r.req.Watch = watch.WatchCaster() + r.req.Watch = watch return r } diff --git a/typedapi/watcher/executewatch/request.go b/typedapi/watcher/executewatch/request.go index 48e4dab48c..ce5c4bd7f4 100644 --- a/typedapi/watcher/executewatch/request.go +++ b/typedapi/watcher/executewatch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package executewatch @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L105 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L105 type Request struct { // ActionModes Determines how to handle the watch actions as part of the watch execution. diff --git a/typedapi/watcher/executewatch/response.go b/typedapi/watcher/executewatch/response.go index 34c7650ee5..a8046b8163 100644 --- a/typedapi/watcher/executewatch/response.go +++ b/typedapi/watcher/executewatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package executewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L34 type Response struct { // Id_ The watch record identifier as it would be stored in the `.watcher-history` diff --git a/typedapi/watcher/getsettings/get_settings.go b/typedapi/watcher/getsettings/get_settings.go index 998bf60f0c..c8a4b2e2b0 100644 --- a/typedapi/watcher/getsettings/get_settings.go +++ b/typedapi/watcher/getsettings/get_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get Watcher index settings. // Get settings for the Watcher internal index (`.watches`). diff --git a/typedapi/watcher/getsettings/response.go b/typedapi/watcher/getsettings/response.go index 1b20a76010..6e8bdfc1d6 100644 --- a/typedapi/watcher/getsettings/response.go +++ b/typedapi/watcher/getsettings/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/get_settings/WatcherGetSettingsResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/get_settings/WatcherGetSettingsResponse.ts#L22-L26 type Response struct { Index types.IndexSettings `json:"index"` } diff --git a/typedapi/watcher/getwatch/get_watch.go b/typedapi/watcher/getwatch/get_watch.go index d697935200..ac830802e8 100644 --- a/typedapi/watcher/getwatch/get_watch.go +++ b/typedapi/watcher/getwatch/get_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get a watch. package getwatch diff --git a/typedapi/watcher/getwatch/response.go b/typedapi/watcher/getwatch/response.go index 37eae89b4a..f495a8463d 100644 --- a/typedapi/watcher/getwatch/response.go +++ b/typedapi/watcher/getwatch/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package getwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getwatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/get_watch/GetWatchResponse.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/get_watch/GetWatchResponse.ts#L24-L34 type Response struct { Found bool `json:"found"` Id_ string `json:"_id"` diff --git a/typedapi/watcher/putwatch/put_watch.go b/typedapi/watcher/putwatch/put_watch.go index 0551bc3d87..2294c9102b 100644 --- a/typedapi/watcher/putwatch/put_watch.go +++ b/typedapi/watcher/putwatch/put_watch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Create or update a watch. // When a watch is registered, a new document that represents the watch is added @@ -430,131 +430,103 @@ func (r *PutWatch) Pretty(pretty bool) *PutWatch { return r } -// The list of actions that will be run if the condition matches. +// Actions The list of actions that will be run if the condition matches. // API name: actions func (r *PutWatch) Actions(actions map[string]types.WatcherAction) *PutWatch { - // Initialize the request if it is not already initialized - if r.req == nil { - r.req = NewRequest() - } - r.req.Actions = actions - return r -} - -func (r *PutWatch) AddAction(key string, value types.WatcherActionVariant) *PutWatch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - var tmp map[string]types.WatcherAction - if r.req.Actions == nil { - r.req.Actions = make(map[string]types.WatcherAction) - } else { - tmp = r.req.Actions - } - - tmp[key] = *value.WatcherActionCaster() + r.req.Actions = actions - r.req.Actions = tmp return r } -// The condition that defines if the actions should be run. +// Condition The condition that defines if the actions should be run. // API name: condition -func (r *PutWatch) Condition(condition types.WatcherConditionVariant) *PutWatch { - // Initialize the request if it is not already initialized +func (r *PutWatch) Condition(condition *types.WatcherCondition) *PutWatch { if r.req == nil { r.req = NewRequest() } - r.req.Condition = condition.WatcherConditionCaster() + r.req.Condition = condition return r } -// The input that defines the input that loads the data for the watch. +// Input The input that defines the input that loads the data for the watch. // API name: input -func (r *PutWatch) Input(input types.WatcherInputVariant) *PutWatch { - // Initialize the request if it is not already initialized +func (r *PutWatch) Input(input *types.WatcherInput) *PutWatch { if r.req == nil { r.req = NewRequest() } - r.req.Input = input.WatcherInputCaster() + r.req.Input = input return r } -// Metadata JSON that will be copied into the history entries. +// Metadata Metadata JSON that will be copied into the history entries. // API name: metadata -func (r *PutWatch) Metadata(metadata types.MetadataVariant) *PutWatch { - // Initialize the request if it is not already initialized +func (r *PutWatch) Metadata(metadata types.Metadata) *PutWatch { if r.req == nil { r.req = NewRequest() } - - r.req.Metadata = *metadata.MetadataCaster() + r.req.Metadata = metadata return r } -// The minimum time between actions being run. +// ThrottlePeriod The minimum time between actions being run. // The default is 5 seconds. // This default can be changed in the config file with the setting // `xpack.watcher.throttle.period.default_period`. // If both this value and the `throttle_period_in_millis` parameter are // specified, Watcher uses the last parameter included in the request. // API name: throttle_period -func (r *PutWatch) ThrottlePeriod(duration types.DurationVariant) *PutWatch { - // Initialize the request if it is not already initialized +func (r *PutWatch) ThrottlePeriod(duration types.Duration) *PutWatch { if r.req == nil { r.req = NewRequest() } - - r.req.ThrottlePeriod = *duration.DurationCaster() + r.req.ThrottlePeriod = duration return r } -// Minimum time in milliseconds between actions being run. Defaults to 5000. If +// ThrottlePeriodInMillis Minimum time in milliseconds between actions being run. Defaults to 5000. If // both this value and the throttle_period parameter are specified, Watcher uses // the last parameter included in the request. // API name: throttle_period_in_millis func (r *PutWatch) ThrottlePeriodInMillis(durationvalueunitmillis int64) *PutWatch { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.ThrottlePeriodInMillis = &durationvalueunitmillis return r } -// The transform that processes the watch payload to prepare it for the watch +// Transform The transform that processes the watch payload to prepare it for the watch // actions. // API name: transform -func (r *PutWatch) Transform(transform types.TransformContainerVariant) *PutWatch { - // Initialize the request if it is not already initialized +func (r *PutWatch) Transform(transform *types.TransformContainer) *PutWatch { if r.req == nil { r.req = NewRequest() } - r.req.Transform = transform.TransformContainerCaster() + r.req.Transform = transform return r } -// The trigger that defines when the watch should run. +// Trigger The trigger that defines when the watch should run. // API name: trigger -func (r *PutWatch) Trigger(trigger types.TriggerContainerVariant) *PutWatch { - // Initialize the request if it is not already initialized +func (r *PutWatch) Trigger(trigger *types.TriggerContainer) *PutWatch { if r.req == nil { r.req = NewRequest() } - r.req.Trigger = trigger.TriggerContainerCaster() + r.req.Trigger = trigger return r } diff --git a/typedapi/watcher/putwatch/request.go b/typedapi/watcher/putwatch/request.go index 976b91f027..e6fc6ee74e 100644 --- a/typedapi/watcher/putwatch/request.go +++ b/typedapi/watcher/putwatch/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putwatch @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L31-L110 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L31-L110 type Request struct { // Actions The list of actions that will be run if the condition matches. diff --git a/typedapi/watcher/putwatch/response.go b/typedapi/watcher/putwatch/response.go index 540952483d..a17f585dca 100644 --- a/typedapi/watcher/putwatch/response.go +++ b/typedapi/watcher/putwatch/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package putwatch // Response holds the response body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/put_watch/WatcherPutWatchResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/put_watch/WatcherPutWatchResponse.ts#L23-L31 type Response struct { Created bool `json:"created"` Id_ string `json:"_id"` diff --git a/typedapi/watcher/querywatches/query_watches.go b/typedapi/watcher/querywatches/query_watches.go index 3e049c5204..a92d9474d2 100644 --- a/typedapi/watcher/querywatches/query_watches.go +++ b/typedapi/watcher/querywatches/query_watches.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Query watches. // Get all registered watches in a paginated manner and optionally filter @@ -344,74 +344,61 @@ func (r *QueryWatches) Pretty(pretty bool) *QueryWatches { return r } -// The offset from the first result to fetch. +// From The offset from the first result to fetch. // It must be non-negative. // API name: from func (r *QueryWatches) From(from int) *QueryWatches { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.From = &from return r } -// A query that filters the watches to be returned. +// Query A query that filters the watches to be returned. // API name: query -func (r *QueryWatches) Query(query types.QueryVariant) *QueryWatches { - // Initialize the request if it is not already initialized +func (r *QueryWatches) Query(query *types.Query) *QueryWatches { if r.req == nil { r.req = NewRequest() } - r.req.Query = query.QueryCaster() + r.req.Query = query return r } -// Retrieve the next page of hits using a set of sort values from the previous +// SearchAfter Retrieve the next page of hits using a set of sort values from the previous // page. // API name: search_after -func (r *QueryWatches) SearchAfter(sortresults ...types.FieldValueVariant) *QueryWatches { - // Initialize the request if it is not already initialized +func (r *QueryWatches) SearchAfter(sortresults ...types.FieldValue) *QueryWatches { if r.req == nil { r.req = NewRequest() } - - for _, v := range sortresults { - r.req.SearchAfter = append(r.req.SearchAfter, *v.FieldValueCaster()) - } + r.req.SearchAfter = sortresults return r } -// The number of hits to return. +// Size The number of hits to return. // It must be non-negative. // API name: size func (r *QueryWatches) Size(size int) *QueryWatches { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Size = &size return r } -// One or more fields used to sort the search results. +// Sort One or more fields used to sort the search results. // API name: sort -func (r *QueryWatches) Sort(sorts ...types.SortCombinationsVariant) *QueryWatches { - // Initialize the request if it is not already initialized +func (r *QueryWatches) Sort(sorts ...types.SortCombinations) *QueryWatches { if r.req == nil { r.req = NewRequest() } - - for _, v := range sorts { - r.req.Sort = append(r.req.Sort, *v.SortCombinationsCaster()) - } + r.req.Sort = sorts return r } diff --git a/typedapi/watcher/querywatches/request.go b/typedapi/watcher/querywatches/request.go index 1e1264555f..c6f2f65b3e 100644 --- a/typedapi/watcher/querywatches/request.go +++ b/typedapi/watcher/querywatches/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package querywatches @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L70 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L70 type Request struct { // From The offset from the first result to fetch. diff --git a/typedapi/watcher/querywatches/response.go b/typedapi/watcher/querywatches/response.go index 2ce3926a87..a1bdbdeef4 100644 --- a/typedapi/watcher/querywatches/response.go +++ b/typedapi/watcher/querywatches/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package querywatches @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L34 type Response struct { // Count The total number of watches found. diff --git a/typedapi/watcher/start/response.go b/typedapi/watcher/start/response.go index 9455774225..f18f89adcb 100644 --- a/typedapi/watcher/start/response.go +++ b/typedapi/watcher/start/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/start/WatcherStartResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/start/WatcherStartResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/watcher/start/start.go b/typedapi/watcher/start/start.go index 26efdbed99..7574327432 100644 --- a/typedapi/watcher/start/start.go +++ b/typedapi/watcher/start/start.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Start the watch service. // Start the Watcher service if it is not already running. diff --git a/typedapi/watcher/stats/response.go b/typedapi/watcher/stats/response.go index 22d93d5ffe..29b64c601e 100644 --- a/typedapi/watcher/stats/response.go +++ b/typedapi/watcher/stats/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stats/WatcherStatsResponse.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stats/WatcherStatsResponse.ts#L24-L32 type Response struct { ClusterName string `json:"cluster_name"` ManuallyStopped bool `json:"manually_stopped"` diff --git a/typedapi/watcher/stats/stats.go b/typedapi/watcher/stats/stats.go index 4cde8824a5..0c255e9822 100644 --- a/typedapi/watcher/stats/stats.go +++ b/typedapi/watcher/stats/stats.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get Watcher statistics. // This API always returns basic metrics. diff --git a/typedapi/watcher/stop/response.go b/typedapi/watcher/stop/response.go index 4ef43437fb..56d9714280 100644 --- a/typedapi/watcher/stop/response.go +++ b/typedapi/watcher/stop/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/stop/WatcherStopResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/stop/WatcherStopResponse.ts#L22-L24 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/watcher/stop/stop.go b/typedapi/watcher/stop/stop.go index 3c52699d70..5be2d0ef6b 100644 --- a/typedapi/watcher/stop/stop.go +++ b/typedapi/watcher/stop/stop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Stop the watch service. // Stop the Watcher service if it is running. diff --git a/typedapi/watcher/updatesettings/request.go b/typedapi/watcher/updatesettings/request.go index 773d2b7cb4..57caa15d0d 100644 --- a/typedapi/watcher/updatesettings/request.go +++ b/typedapi/watcher/updatesettings/request.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatesettings @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L61 type Request struct { IndexAutoExpandReplicas *string `json:"index.auto_expand_replicas,omitempty"` IndexNumberOfReplicas *int `json:"index.number_of_replicas,omitempty"` diff --git a/typedapi/watcher/updatesettings/response.go b/typedapi/watcher/updatesettings/response.go index 5dc732fc69..73b4e51b13 100644 --- a/typedapi/watcher/updatesettings/response.go +++ b/typedapi/watcher/updatesettings/response.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package updatesettings // Response holds the response body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24 type Response struct { Acknowledged bool `json:"acknowledged"` } diff --git a/typedapi/watcher/updatesettings/update_settings.go b/typedapi/watcher/updatesettings/update_settings.go index 541bb6b9d4..2b60a4162c 100644 --- a/typedapi/watcher/updatesettings/update_settings.go +++ b/typedapi/watcher/updatesettings/update_settings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Update Watcher index settings. // Update settings for the Watcher internal index (`.watches`). @@ -374,7 +374,6 @@ func (r *UpdateSettings) Pretty(pretty bool) *UpdateSettings { // API name: index.auto_expand_replicas func (r *UpdateSettings) IndexAutoExpandReplicas(indexautoexpandreplicas string) *UpdateSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } @@ -386,11 +385,9 @@ func (r *UpdateSettings) IndexAutoExpandReplicas(indexautoexpandreplicas string) // API name: index.number_of_replicas func (r *UpdateSettings) IndexNumberOfReplicas(indexnumberofreplicas int) *UpdateSettings { - // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.IndexNumberOfReplicas = &indexnumberofreplicas return r diff --git a/typedapi/xpack/info/info.go b/typedapi/xpack/info/info.go index 12a50631c2..e86e58e2f2 100644 --- a/typedapi/xpack/info/info.go +++ b/typedapi/xpack/info/info.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get information. // The information provided by the API includes: diff --git a/typedapi/xpack/info/response.go b/typedapi/xpack/info/response.go index a2105acc8d..3b12f11108 100644 --- a/typedapi/xpack/info/response.go +++ b/typedapi/xpack/info/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/info/XPackInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/info/XPackInfoResponse.ts#L22-L29 type Response struct { Build types.BuildInformation `json:"build"` Features types.XpackFeatures `json:"features"` diff --git a/typedapi/xpack/usage/response.go b/typedapi/xpack/usage/response.go index 8348cbacdd..949484f56a 100644 --- a/typedapi/xpack/usage/response.go +++ b/typedapi/xpack/usage/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/f1932ce6b46a53a8342db522b1a7883bcc9e0996/specification/xpack/usage/XPackUsageResponse.ts#L43-L79 +// https://github.com/elastic/elasticsearch-specification/blob/470b4b9aaaa25cae633ec690e54b725c6fc939c7/specification/xpack/usage/XPackUsageResponse.ts#L43-L79 type Response struct { AggregateMetric types.Base `json:"aggregate_metric"` Analytics types.Analytics `json:"analytics"` diff --git a/typedapi/xpack/usage/usage.go b/typedapi/xpack/usage/usage.go index 87720ad6b7..aec8f21a69 100644 --- a/typedapi/xpack/usage/usage.go +++ b/typedapi/xpack/usage/usage.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/f1932ce6b46a53a8342db522b1a7883bcc9e0996 +// https://github.com/elastic/elasticsearch-specification/tree/470b4b9aaaa25cae633ec690e54b725c6fc939c7 // Get usage information. // Get information about the features that are currently enabled and available